@lvce-editor/shared-process 0.25.10 → 0.25.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/package.json +4 -4
  2. package/src/parts/AddAccurateMemoryUsage/AddAccurateMemoryUsage.js +7 -8
  3. package/src/parts/AddSemiColon/AddSemiColon.js +3 -4
  4. package/src/parts/AppWindow/AppWindow.js +14 -16
  5. package/src/parts/ApplyEdit/ApplyEdit.js +6 -7
  6. package/src/parts/Assert/Assert.js +1 -1
  7. package/src/parts/AttachDebugger/AttachDebugger.ipc.js +4 -6
  8. package/src/parts/AttachDebugger/AttachDebugger.js +4 -5
  9. package/src/parts/Authority/Authority.js +1 -1
  10. package/src/parts/AutoUpdateType/AutoUpdateType.js +4 -4
  11. package/src/parts/AutoUpdater/AutoUpdater.ipc.js +5 -7
  12. package/src/parts/AutoUpdater/AutoUpdater.js +31 -31
  13. package/src/parts/AutoUpdaterAppImage/AutoUpdaterAppImage.ipc.js +5 -7
  14. package/src/parts/AutoUpdaterAppImage/AutoUpdaterAppImage.js +49 -50
  15. package/src/parts/AutoUpdaterWindowsNsis/AutoUpdaterWindowsNsis.ipc.js +5 -7
  16. package/src/parts/AutoUpdaterWindowsNsis/AutoUpdaterWindowsNsis.js +49 -49
  17. package/src/parts/BulkReplacement/BulkReplacement.ipc.js +4 -6
  18. package/src/parts/BulkReplacement/BulkReplacement.js +16 -16
  19. package/src/parts/BulkReplacementContent/BulkReplacementContent.js +26 -27
  20. package/src/parts/ByteSize/ByteSize.js +4 -4
  21. package/src/parts/Callback/Callback.js +1 -1
  22. package/src/parts/Character/Character.js +12 -12
  23. package/src/parts/ChildProcess/ChildProcess.js +71 -86
  24. package/src/parts/Clamp/Clamp.js +2 -2
  25. package/src/parts/Cli/Cli.js +12 -12
  26. package/src/parts/CliCommandType/CliCommandType.js +11 -11
  27. package/src/parts/CliHelp/CliHelp.js +8 -9
  28. package/src/parts/CliInstall/CliInstall.js +24 -24
  29. package/src/parts/CliLink/CliLink.js +17 -17
  30. package/src/parts/CliList/CliList.js +15 -18
  31. package/src/parts/CliModule/CliModule.js +26 -27
  32. package/src/parts/CliStatus/CliStatus.js +4 -5
  33. package/src/parts/CliUnlink/CliUnlink.js +17 -17
  34. package/src/parts/CliVersion/CliVersion.js +7 -8
  35. package/src/parts/ClipBoard/ClipBoard.ipc.js +5 -7
  36. package/src/parts/ClipBoard/ClipBoard.js +18 -21
  37. package/src/parts/ClipBoard/ClipBoardGnome.js +49 -54
  38. package/src/parts/ClipBoard/ClipBoardNoop.js +10 -12
  39. package/src/parts/ClipBoard/ClipBoardWindows.js +17 -18
  40. package/src/parts/CollectTextSearchStdout/CollectTextSearchStdout.js +83 -93
  41. package/src/parts/ColorTheme/ColorTheme.js +14 -17
  42. package/src/parts/Command/Command.js +61 -68
  43. package/src/parts/CommandNotFoundError/CommandNotFoundError.js +7 -8
  44. package/src/parts/CompareVersion/CompareVersion.js +2 -2
  45. package/src/parts/ContentSecurityPolicy/ContentSecurityPolicy.ipc.js +4 -6
  46. package/src/parts/ContentSecurityPolicy/ContentSecurityPolicy.js +6 -7
  47. package/src/parts/ContentSecurityPolicyDiffWorker/ContentSecurityPolicyDiffWorker.js +2 -0
  48. package/src/parts/ContentSecurityPolicyDocument/ContentSecurityPolicyDocument.js +9 -10
  49. package/src/parts/ContentSecurityPolicyState/ContentSecurityPolicyState.js +5 -7
  50. package/src/parts/ContentSecurityPolicySyntaxHighlightingWorker/ContentSecurityPolicySyntaxHighlightingWorker.js +2 -3
  51. package/src/parts/ContentSecurityPolicyTerminalWorker/ContentSecurityPolicyTerminalWorker.js +2 -3
  52. package/src/parts/ContentSecurityPolicyTestWorker/ContentSecurityPolicyTestWorker.js +2 -3
  53. package/src/parts/ContentSecurityPolicyWorker/ContentSecurityPolicyWorker.js +6 -7
  54. package/src/parts/CpuProfile/CpuProfile.js +22 -25
  55. package/src/parts/Crash/Crash.ipc.js +5 -7
  56. package/src/parts/Crash/Crash.js +8 -11
  57. package/src/parts/CreatePidMap/CreatePidMap.js +4 -5
  58. package/src/parts/CreateTestOverview/CreateTestOverview.js +19 -22
  59. package/src/parts/CrossOriginEmbedderPolicy/CrossOriginEmbedderPolicy.js +1 -1
  60. package/src/parts/CrossOriginOpenerPolicy/CrossOriginOpenerPolicy.js +2 -2
  61. package/src/parts/Debug/Debug.js +2 -3
  62. package/src/parts/DefaultUrl/DefaultUrl.js +3 -4
  63. package/src/parts/Desktop/Desktop.js +18 -19
  64. package/src/parts/DesktopCapturer/DesktopCapturer.ipc.js +4 -6
  65. package/src/parts/DesktopCapturer/DesktopCapturer.js +3 -4
  66. package/src/parts/DesktopType/DesktopType.js +3 -3
  67. package/src/parts/DestroySocket/DestroySocket.js +5 -4
  68. package/src/parts/Developer/Developer.ipc.js +12 -14
  69. package/src/parts/Developer/Developer.js +33 -40
  70. package/src/parts/DirentType/DirentType.js +12 -12
  71. package/src/parts/Download/Download.ipc.js +4 -6
  72. package/src/parts/Download/Download.js +20 -19
  73. package/src/parts/DownloadAndExtract/DownloadAndExtract.js +16 -20
  74. package/src/parts/ElectronApplicationMenu/ElectronApplicationMenu.ipc.js +5 -7
  75. package/src/parts/ElectronApplicationMenu/ElectronApplicationMenu.js +20 -23
  76. package/src/parts/ElectronBrowserView/ElectronBrowserView.ipc.js +5 -7
  77. package/src/parts/ElectronBrowserView/ElectronBrowserView.js +18 -21
  78. package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.ipc.js +17 -19
  79. package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.js +26 -41
  80. package/src/parts/ElectronBrowserViewIpcState/ElectronBrowserViewIpcState.js +10 -14
  81. package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.ipc.js +5 -7
  82. package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.js +5 -7
  83. package/src/parts/ElectronBrowserViewState/ElectronBrowserViewState.js +8 -11
  84. package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.ipc.js +6 -8
  85. package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.js +7 -10
  86. package/src/parts/ElectronClipBoard/ElectronClipBoard.ipc.js +4 -6
  87. package/src/parts/ElectronClipBoard/ElectronClipBoard.js +3 -4
  88. package/src/parts/ElectronContentTracing/ElectronContentTracing.ipc.js +5 -7
  89. package/src/parts/ElectronContentTracing/ElectronContentTracing.js +5 -7
  90. package/src/parts/ElectronContextMenu/ElectronContextMenu.ipc.js +4 -6
  91. package/src/parts/ElectronContextMenu/ElectronContextMenu.js +7 -8
  92. package/src/parts/ElectronDeveloper/ElectronDeveloper.ipc.js +4 -6
  93. package/src/parts/ElectronDeveloper/ElectronDeveloper.js +3 -4
  94. package/src/parts/ElectronDialog/ElectronDialog.ipc.js +5 -7
  95. package/src/parts/ElectronDialog/ElectronDialog.js +5 -7
  96. package/src/parts/ElectronInitialize/ElectronInitialize.ipc.js +4 -6
  97. package/src/parts/ElectronInitialize/ElectronInitialize.js +9 -10
  98. package/src/parts/ElectronNet/ElectronNet.ipc.js +4 -6
  99. package/src/parts/ElectronNet/ElectronNet.js +3 -4
  100. package/src/parts/ElectronNetLog/ElectronNetLog.ipc.js +5 -7
  101. package/src/parts/ElectronNetLog/ElectronNetLog.js +5 -7
  102. package/src/parts/ElectronPowerSaveBlocker/ElectronPowerSaveBlocker.ipc.js +5 -7
  103. package/src/parts/ElectronPowerSaveBlocker/ElectronPowerSaveBlocker.js +5 -7
  104. package/src/parts/ElectronProcess/ElectronProcess.ipc.js +5 -7
  105. package/src/parts/ElectronProcess/ElectronProcess.js +5 -7
  106. package/src/parts/ElectronSafeStorage/ElectronSafeStorage.ipc.js +6 -8
  107. package/src/parts/ElectronSafeStorage/ElectronSafeStorage.js +10 -13
  108. package/src/parts/ElectronShell/ElectronShell.ipc.js +4 -6
  109. package/src/parts/ElectronShell/ElectronShell.js +3 -4
  110. package/src/parts/ElectronWebContents/ElectronWebContents.ipc.js +11 -13
  111. package/src/parts/ElectronWebContents/ElectronWebContents.js +45 -61
  112. package/src/parts/ElectronWebContentsView/ElectronWebContentsView.ipc.js +5 -7
  113. package/src/parts/ElectronWebContentsView/ElectronWebContentsView.js +16 -18
  114. package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.ipc.js +17 -19
  115. package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.js +26 -41
  116. package/src/parts/ElectronWindow/ElectronWindow.ipc.js +15 -17
  117. package/src/parts/ElectronWindow/ElectronWindow.js +60 -81
  118. package/src/parts/ElectronWindowAbout/ElectronWindowAbout.ipc.js +4 -6
  119. package/src/parts/ElectronWindowAbout/ElectronWindowAbout.js +3 -4
  120. package/src/parts/ElectronWindowProcessExplorer/ElectronWindowProcessExplorer.ipc.js +4 -6
  121. package/src/parts/ElectronWindowProcessExplorer/ElectronWindowProcessExplorer.js +31 -33
  122. package/src/parts/EncodingType/EncodingType.js +2 -2
  123. package/src/parts/Env/Env.js +11 -16
  124. package/src/parts/Error/FileSystemError.js +6 -7
  125. package/src/parts/ErrorCodes/ErrorCodes.js +22 -22
  126. package/src/parts/ErrorHandling/ErrorHandling.js +52 -60
  127. package/src/parts/Exec/Exec.js +11 -12
  128. package/src/parts/ExecCommand/ExecCommand.js +19 -22
  129. package/src/parts/ExecPromise/ExecPromise.js +3 -4
  130. package/src/parts/Exit/Exit.ipc.js +4 -6
  131. package/src/parts/Exit/Exit.js +3 -4
  132. package/src/parts/ExitCode/ExitCode.js +3 -5
  133. package/src/parts/ExportStatic/ExportStatic.js +318 -419
  134. package/src/parts/ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js +13 -14
  135. package/src/parts/ExtensionHostRpc/ExtensionHostRpc.js +70 -79
  136. package/src/parts/ExtensionInstall/ExtensionInstall.ipc.js +4 -6
  137. package/src/parts/ExtensionInstall/ExtensionInstall.js +21 -23
  138. package/src/parts/ExtensionInstallFromFile/ExtensionInstallFromFile.js +32 -33
  139. package/src/parts/ExtensionInstallFromGitHub/ExtensionInstallFromGitHub.js +30 -30
  140. package/src/parts/ExtensionInstallFromUrl/ExtensionInstallFromUrl.js +30 -30
  141. package/src/parts/ExtensionInstallParseInput/ExtensionInstallParseInput.js +43 -46
  142. package/src/parts/ExtensionInstallType/ExtensionInstallType.js +4 -7
  143. package/src/parts/ExtensionLink/ExtensionLink.js +40 -40
  144. package/src/parts/ExtensionList/ExtensionList.js +57 -63
  145. package/src/parts/ExtensionManagement/ExtensionManagement.ipc.js +16 -17
  146. package/src/parts/ExtensionManagement/ExtensionManagement.js +70 -87
  147. package/src/parts/ExtensionManagement/ExtensionManagementColorTheme.js +62 -70
  148. package/src/parts/ExtensionManagement/ExtensionManagementIconTheme.js +26 -26
  149. package/src/parts/ExtensionManagement/ExtensionManagementLanguages.js +55 -59
  150. package/src/parts/ExtensionManifest/ExtensionManifest.js +50 -48
  151. package/src/parts/ExtensionManifestInputType/ExtensionManifestInputType.js +3 -5
  152. package/src/parts/ExtensionManifestStatus/ExtensionManifestStatus.js +2 -3
  153. package/src/parts/ExtensionManifests/ExtensionManifests.js +36 -40
  154. package/src/parts/ExtensionManifests/ExtensionManifestsFromFolder.js +19 -19
  155. package/src/parts/ExtensionManifests/ExtensionManifestsFromLinkedExtensionsFolder.js +46 -47
  156. package/src/parts/ExtensionManifests/ExtensionManifestsFromOnlyExtension.js +7 -8
  157. package/src/parts/ExtensionUninstall/ExtensionUninstall.js +17 -17
  158. package/src/parts/ExtensionUnlink/ExtensionUnlink.js +19 -19
  159. package/src/parts/Extract/Extract.js +24 -28
  160. package/src/parts/FileNotFoundError/FileNotFoundError.js +11 -13
  161. package/src/parts/FileSystem/FileSystem.ipc.js +27 -30
  162. package/src/parts/FileSystem/FileSystem.js +214 -228
  163. package/src/parts/FileSystemWatch/FileSystemWatch.js +4 -5
  164. package/src/parts/FirstNodeWorkerEventType/FirstNodeWorkerEventType.js +3 -3
  165. package/src/parts/GetAccurateMemoryUsage/GetAccurateMemoryUsage.js +34 -34
  166. package/src/parts/GetAppImageDownloadUrl/GetAppImageDownloadUrl.js +4 -5
  167. package/src/parts/GetAppImagePath/GetAppImagePath.js +3 -4
  168. package/src/parts/GetAppWindowOptions/GetAppWindowOptions.js +26 -28
  169. package/src/parts/GetBrowserWindowOptions/GetBrowserWindowOptions.js +26 -27
  170. package/src/parts/GetContentSecurityPolicy/GetContentSecurityPolicy.js +4 -5
  171. package/src/parts/GetDirentType/GetDirentType.js +24 -25
  172. package/src/parts/GetElectronFileResponse/GetElectronFileResponse.ipc.js +4 -6
  173. package/src/parts/GetElectronFileResponse/GetElectronFileResponse.js +43 -43
  174. package/src/parts/GetElectronFileResponseAbsolutePath/GetElectronFileResponseAbsolutePath.js +32 -33
  175. package/src/parts/GetElectronFileResponseContent/GetElectronFileResponseContent.js +15 -16
  176. package/src/parts/GetElectronFileResponseRelativePath/GetElectronFileResponseRelativePath.js +11 -13
  177. package/src/parts/GetElectronRebuildPath/GetElectronRebuildPath.js +8 -9
  178. package/src/parts/GetEtag/GetEtag.js +2 -2
  179. package/src/parts/GetFirstEvent/GetFirstEvent.js +20 -21
  180. package/src/parts/GetFirstNodeWorkerEvent/GetFirstNodeWorkerEvent.js +7 -8
  181. package/src/parts/GetFirstSpawnedProcessEvent/GetFirstSpawnedProcessEvent.js +7 -8
  182. package/src/parts/GetHeaders/GetHeaders.js +50 -52
  183. package/src/parts/GetHeadersDefault/GetHeadersDefault.js +2 -2
  184. package/src/parts/GetHeadersExtensionHostWorker/GetHeadersExtensionHostWorker.js +8 -9
  185. package/src/parts/GetHeadersMainFrame/GetHeadersMainFrame.js +10 -11
  186. package/src/parts/GetHeadersOtherWorker/GetHeadersOtherWorker.js +12 -13
  187. package/src/parts/GetHeadersRendererWorker/GetHeadersRendererWorker.js +8 -9
  188. package/src/parts/GetHeadersSyntaxHighlightingWorker/GetHeadersSyntaxHighlightingWorker.js +8 -9
  189. package/src/parts/GetHeadersTerminalWorker/GetHeadersTerminalWorker.js +8 -9
  190. package/src/parts/GetHeadersTestWorker/GetHeadersTestWorker.js +8 -9
  191. package/src/parts/GetHelpString/GetHelpString.js +4 -5
  192. package/src/parts/GetHttpErrorMessage/GetHttpErrorMessage.js +20 -21
  193. package/src/parts/GetIcon/GetIcon.js +17 -18
  194. package/src/parts/GetLatestReleaseVersion/GetLatestReleaseVersion.js +29 -30
  195. package/src/parts/GetMimeType/GetMimeType.js +26 -27
  196. package/src/parts/GetNewLineIndex/GetNewLineIndex.js +3 -4
  197. package/src/parts/GetNotFoundResponse/GetNotFoundResponse.js +10 -11
  198. package/src/parts/GetNotModifiedResponse/GetNotModifiedResponse.js +9 -10
  199. package/src/parts/GetNsisUpdateArgs/GetNsisUpdateArgs.js +6 -6
  200. package/src/parts/GetNsisUpdateDownloadPath/GetNsisUpdateDownloadPath.js +9 -10
  201. package/src/parts/GetPathName/GetPathName.js +3 -3
  202. package/src/parts/GetPreloadUrl/GetPreloadUrl.js +4 -5
  203. package/src/parts/GetProcessExplorerUrl/GetProcessExplorerUrl.js +3 -4
  204. package/src/parts/GetPsOutput/GetPsOutput.js +16 -17
  205. package/src/parts/GetRemoteUrl/GetRemoteUrl.js +4 -5
  206. package/src/parts/GetServerErrorResponse/GetServerErrorResponse.js +10 -11
  207. package/src/parts/GetStatusString/GetStatusString.js +54 -62
  208. package/src/parts/GetTerminalProcessPath/GetTerminalProcessPath.js +4 -5
  209. package/src/parts/GetTerminalSpawnOptions/GetTerminalSpawnOptions.ipc.js +4 -6
  210. package/src/parts/GetTerminalSpawnOptions/GetTerminalSpawnOptions.js +16 -17
  211. package/src/parts/GetTestPath/GetTestPath.js +10 -11
  212. package/src/parts/GetTestRequestResponse/GetTestRequestResponse.js +41 -42
  213. package/src/parts/GetTitleBarItems/GetTitleBarItems.js +40 -41
  214. package/src/parts/GetTypeFromUrl/GetTypeFromUrl.js +17 -18
  215. package/src/parts/GetTypeScriptPath/GetTypeScriptPath.js +11 -20
  216. package/src/parts/GetVersionString/GetVersionString.js +4 -5
  217. package/src/parts/GetWindowId/GetWindowId.ipc.js +4 -6
  218. package/src/parts/GetWindowId/GetWindowId.js +4 -5
  219. package/src/parts/GetWindowsNsisDownloadUrl/GetWindowsNsisDownloadUrl.js +6 -7
  220. package/src/parts/GetWorkspaceId/GetWorkspaceId.js +3 -4
  221. package/src/parts/GitLsFiles/GitLsFiles.ipc.js +6 -8
  222. package/src/parts/GitLsFiles/GitLsFiles.js +19 -22
  223. package/src/parts/HandleCliArgs/HandleCliArgs.ipc.js +4 -6
  224. package/src/parts/HandleCliArgs/HandleCliArgs.js +11 -11
  225. package/src/parts/HandleElectronMessagePort/HandleElectronMessagePort.ipc.js +4 -6
  226. package/src/parts/HandleElectronMessagePort/HandleElectronMessagePort.js +14 -14
  227. package/src/parts/HandleElectronReady/HandleElectronReady.ipc.js +4 -6
  228. package/src/parts/HandleElectronReady/HandleElectronReady.js +8 -9
  229. package/src/parts/HandleIpc/HandleIpc.js +20 -23
  230. package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.ipc.js +4 -6
  231. package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.js +17 -18
  232. package/src/parts/HandleMessagePortForTerminalProcess/HandleMessagePortForTerminalProcess.ipc.js +4 -6
  233. package/src/parts/HandleMessagePortForTerminalProcess/HandleMessagePortForTerminalProcess.js +8 -9
  234. package/src/parts/HandleNodeMessagePort/HandleNodeMessagePort.ipc.js +4 -6
  235. package/src/parts/HandleNodeMessagePort/HandleNodeMessagePort.js +9 -10
  236. package/src/parts/HandleRemoteRequest/HandleRemoteRequest.ipc.js +4 -6
  237. package/src/parts/HandleRemoteRequest/HandleRemoteRequest.js +8 -9
  238. package/src/parts/HandleRequestTest/HandleRequestTest.ipc.js +4 -6
  239. package/src/parts/HandleRequestTest/HandleRequestTest.js +9 -10
  240. package/src/parts/HandleSocketError/HandleSocketError.js +10 -11
  241. package/src/parts/HandleUncaughtExceptionMonitor/HandleUncaughtExceptionMonitor.js +9 -12
  242. package/src/parts/HandleWebSocket/HandleWebSocket.ipc.js +4 -6
  243. package/src/parts/HandleWebSocket/HandleWebSocket.js +19 -19
  244. package/src/parts/HandleWebSocketForExtensionHostHelperProcess/HandleWebSocketForExtensionHostHelperProcess.js +8 -9
  245. package/src/parts/HandleWebSocketForSharedProcess/HandleWebSocketForSharedProcess.js +15 -16
  246. package/src/parts/HandleWebSocketForTerminalProcess/HandleWebSocketForTerminalProcess.js +17 -21
  247. package/src/parts/HandleWebSocketForUnknown/HandleWebSocketForUnknown.js +9 -9
  248. package/src/parts/HandleWebSocketModule/HandleWebSocketModule.js +16 -17
  249. package/src/parts/HandleWindowAllClosed/HandleWindowAllClosed.ipc.js +4 -6
  250. package/src/parts/HandleWindowAllClosed/HandleWindowAllClosed.js +9 -10
  251. package/src/parts/HasPositiveMemoryUsage/HasPositiveMemoryUsage.js +2 -2
  252. package/src/parts/Hash/Hash.js +4 -6
  253. package/src/parts/HeapSnapshot/HeapSnapshot.ipc.js +4 -6
  254. package/src/parts/HeapSnapshot/HeapSnapshot.js +6 -9
  255. package/src/parts/HttpHeader/HttpHeader.js +7 -7
  256. package/src/parts/HttpServerResponse/HttpServerResponse.js +15 -16
  257. package/src/parts/HttpStatusCode/HttpStatusCode.js +5 -5
  258. package/src/parts/Id/Id.js +4 -5
  259. package/src/parts/IncrementalTextSearch/IncrementalTextSearch.js +44 -47
  260. package/src/parts/IncrementalTextSearch/IncremetalTextSearch.ipc.js +4 -6
  261. package/src/parts/InferExtensionId/InferExtensionId.js +7 -8
  262. package/src/parts/InstallExtension/InstallExtension.ipc.js +3 -4
  263. package/src/parts/InstallExtension/InstallExtension.js +32 -32
  264. package/src/parts/IpcChild/IpcChild.js +12 -13
  265. package/src/parts/IpcChildModule/IpcChildModule.js +19 -26
  266. package/src/parts/IpcChildType/IpcChildType.js +18 -19
  267. package/src/parts/IpcChildWithElectronMessagePort/IpcChildWithElectronMessagePort.js +47 -48
  268. package/src/parts/IpcChildWithNodeMessagePort/IpcChildWithNodeMessagePort.js +44 -41
  269. package/src/parts/IpcError/IpcError.js +4 -4
  270. package/src/parts/IpcParent/IpcParent.js +8 -9
  271. package/src/parts/IpcParentModule/IpcParentModule.js +13 -14
  272. package/src/parts/IpcParentType/IpcParentType.js +3 -3
  273. package/src/parts/IpcParentWithElectronUtilityProcess/IpcParentWithElectronUtilityProcess.js +49 -48
  274. package/src/parts/IsAbsolutePath/IsAbsolutePath.js +3 -4
  275. package/src/parts/IsAppImage/IsAppImage.js +3 -4
  276. package/src/parts/IsAutoUpdateSupported/IsAutoUpdateSupported.ipc.js +4 -6
  277. package/src/parts/IsAutoUpdateSupported/IsAutoUpdateSupported.js +6 -8
  278. package/src/parts/IsBuiltServer/IsBuiltServer.js +1 -1
  279. package/src/parts/IsDlOpenError/IsDlOpenError.js +3 -4
  280. package/src/parts/IsElectron/IsElectron.js +3 -4
  281. package/src/parts/IsEnoentError/IsEnoentError.js +9 -11
  282. package/src/parts/IsEnoentErrorWindows/IsEnoentErrorWindows.js +2 -2
  283. package/src/parts/IsEsrchError/IsEsrchError.js +3 -4
  284. package/src/parts/IsIgnoredError/IsIgnoredError.js +12 -13
  285. package/src/parts/IsMessagePort/IsMessagePort.js +2 -2
  286. package/src/parts/IsMessagePortMain/IsMessagePortMain.js +2 -2
  287. package/src/parts/IsTypeScriptPath/IsTypeScriptPath.js +2 -2
  288. package/src/parts/IsWindows/IsWindows.js +1 -1
  289. package/src/parts/JoinLines/JoinLines.js +3 -4
  290. package/src/parts/Json/Json.js +15 -17
  291. package/src/parts/JsonFile/JsonFile.js +10 -12
  292. package/src/parts/JsonRpc/JsonRpc.js +1 -1
  293. package/src/parts/JsonRpcVersion/JsonRpcVersion.js +1 -1
  294. package/src/parts/Jsonc/Jsonc.js +1 -1
  295. package/src/parts/JsoncFile/JsoncFile.js +7 -8
  296. package/src/parts/LeftCut/LeftCut.js +17 -18
  297. package/src/parts/LimitString/LimitString.js +13 -14
  298. package/src/parts/ListProcessGetName/ListProcessGetName.js +55 -56
  299. package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js +4 -6
  300. package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.js +9 -11
  301. package/src/parts/ListProcessesWithMemoryUsageUnix/ListProcessesWithMemoryUsageUnix.js +19 -20
  302. package/src/parts/ListProcessesWithMemoryUsageWindows/ListProcessesWithMemoryUsageWindows.js +33 -36
  303. package/src/parts/LoadTypeScript/LoadTypeScript.js +12 -12
  304. package/src/parts/LoadWindowsProcessTree/LoadWindowsProcessTree.js +11 -13
  305. package/src/parts/Logger/Logger.js +34 -42
  306. package/src/parts/Main/Main.js +13 -14
  307. package/src/parts/MakeExecutable/MakeExecutable.js +9 -9
  308. package/src/parts/MimeType/MimeType.js +37 -37
  309. package/src/parts/Module/Module.js +150 -151
  310. package/src/parts/ModuleId/ModuleId.js +76 -76
  311. package/src/parts/ModuleMap/ModuleMap.js +329 -330
  312. package/src/parts/OpenExternal/OpenExternal.ipc.js +5 -7
  313. package/src/parts/OpenExternal/OpenExternal.js +5 -7
  314. package/src/parts/OpenNativeFolder/OpenNativeFolder.ipc.js +4 -6
  315. package/src/parts/OpenNativeFolder/OpenNativeFolder.js +9 -9
  316. package/src/parts/Os/Os.ipc.js +4 -6
  317. package/src/parts/Os/Os.js +3 -4
  318. package/src/parts/OutputChannel/OutputChannel.ipc.js +35 -39
  319. package/src/parts/OutputChannel/OutputChannel.js +32 -35
  320. package/src/parts/OutputChannelState/OutputChannelState.js +10 -14
  321. package/src/parts/ParentIpc/ParentIpc.js +19 -25
  322. package/src/parts/ParseInt/ParseInt.js +2 -2
  323. package/src/parts/ParseMemory/ParseMemory.js +9 -10
  324. package/src/parts/ParsePsOutput/ParsePsOutput.js +42 -46
  325. package/src/parts/ParseRipGrepLines/ParseRipGrepLines.js +9 -10
  326. package/src/parts/ParseUrlGithub/ParseUrlGithub.js +49 -51
  327. package/src/parts/Path/Path.js +11 -16
  328. package/src/parts/Performance/Performance.ipc.js +4 -6
  329. package/src/parts/Performance/Performance.js +16 -27
  330. package/src/parts/Platform/Platform.ipc.js +28 -30
  331. package/src/parts/Platform/Platform.js +46 -73
  332. package/src/parts/PlatformPaths/PlatformPaths.ipc.js +21 -23
  333. package/src/parts/PlatformPaths/PlatformPaths.js +79 -114
  334. package/src/parts/Preferences/Preferences.ipc.js +4 -6
  335. package/src/parts/Preferences/Preferences.js +69 -70
  336. package/src/parts/PrettyError/PrettyError.js +1 -1
  337. package/src/parts/PrintPrettyError/PrintPrettyError.js +3 -4
  338. package/src/parts/Process/Process.ipc.js +10 -12
  339. package/src/parts/Process/Process.js +35 -48
  340. package/src/parts/ProcessDisplayName/ProcessDisplayName.js +1 -1
  341. package/src/parts/ProcessExitEventType/ProcessExitEventType.js +2 -2
  342. package/src/parts/ProcessId/ProcessId.ipc.js +5 -7
  343. package/src/parts/ProcessId/ProcessId.js +4 -5
  344. package/src/parts/ProcessListeners/ProcessListeners.js +11 -14
  345. package/src/parts/Promises/Promises.js +18 -18
  346. package/src/parts/ProtocolType/ProtocolType.js +4 -4
  347. package/src/parts/PtyHost/PtyHost.js +56 -62
  348. package/src/parts/PtyHostPath/PtyHostPath.js +10 -10
  349. package/src/parts/PtyHostState/PtyHostState.js +16 -16
  350. package/src/parts/Queue/Queue.js +30 -31
  351. package/src/parts/RebuildForElectron/RebuildForElectron.js +14 -14
  352. package/src/parts/RebuildForNode/RebuildForNode.js +12 -12
  353. package/src/parts/RebuildNodePty/RebuildNodePty.ipc.js +4 -6
  354. package/src/parts/RebuildNodePty/RebuildNodePty.js +20 -22
  355. package/src/parts/RecentlyOpened/RecentlyOpened.ipc.js +4 -6
  356. package/src/parts/RecentlyOpened/RecentlyOpened.js +54 -53
  357. package/src/parts/RemoveSymlink/RemoveSymlink.js +11 -11
  358. package/src/parts/RequiresSocket/RequiresSocket.js +14 -15
  359. package/src/parts/Restart/Restart.js +9 -10
  360. package/src/parts/RipGrep/RipGrep.js +35 -37
  361. package/src/parts/RipGrepParsedLineType/RipGrepParsedLineType.js +4 -4
  362. package/src/parts/RipGrepPath/RipGrepPath.js +1 -1
  363. package/src/parts/Root/Root.js +4 -6
  364. package/src/parts/Screen/Screen.ipc.js +6 -8
  365. package/src/parts/Screen/Screen.js +7 -10
  366. package/src/parts/SearchFile/SearchFile.ipc.js +4 -6
  367. package/src/parts/SearchFile/SearchFile.js +26 -27
  368. package/src/parts/SetHeaders/SetHeaders.js +4 -4
  369. package/src/parts/ShouldLogError/ShouldLogError.js +6 -7
  370. package/src/parts/ShouldTranspileTypescript/ShouldTranspileTypescript.js +10 -11
  371. package/src/parts/Signal/Signal.js +3 -3
  372. package/src/parts/SplitLines/SplitLines.js +3 -4
  373. package/src/parts/SymLink/SymLink.js +3 -4
  374. package/src/parts/TemporaryMessagePort/TemporaryMessagePort.ipc.js +4 -6
  375. package/src/parts/TemporaryMessagePort/TemporaryMessagePort.js +18 -21
  376. package/src/parts/Terminal/Terminal.ipc.js +7 -9
  377. package/src/parts/Terminal/Terminal.js +68 -73
  378. package/src/parts/TerminalState/TerminalState.js +8 -11
  379. package/src/parts/TextDocument/TextDocument.ipc.js +3 -4
  380. package/src/parts/TextDocument/TextDocument.js +17 -22
  381. package/src/parts/TextSearch/TextSearch.ipc.js +4 -6
  382. package/src/parts/TextSearch/TextSearch.js +18 -22
  383. package/src/parts/TextSearchError/TextSearchError.js +12 -12
  384. package/src/parts/TextSearchResultType/TextSearchResultType.js +2 -2
  385. package/src/parts/Timeout/Timeout.js +4 -5
  386. package/src/parts/TmpFile/TmpFile.js +11 -13
  387. package/src/parts/ToAbsolutePaths/ToAbsolutePaths.js +7 -8
  388. package/src/parts/ToTextSearchResult/ToTextSearchResult.js +23 -24
  389. package/src/parts/Trace/Trace.js +10 -14
  390. package/src/parts/TranspileTypeScript/TranspileTypeScript.js +19 -19
  391. package/src/parts/Trash/Trash.js +15 -16
  392. package/src/parts/TrashElectron/TrashElectron.js +7 -8
  393. package/src/parts/TrashNode/TrashNode.js +3 -4
  394. package/src/parts/UpdateState/UpdateState.js +7 -10
  395. package/src/parts/UpdateStateType/UpdateStateType.js +9 -9
  396. package/src/parts/VError/VError.js +1 -1
  397. package/src/parts/WaitForProcessToExit/WaitForProcessToExit.js +7 -8
  398. package/src/parts/WebSocketServer/WebSocketServer.ipc.js +4 -6
  399. package/src/parts/WebSocketServer/WebSocketServer.js +1 -1
  400. package/src/parts/WindowsProcessTree/WindowsProcessTree.js +12 -14
  401. package/src/parts/WindowsProcessTreeDataFlag/WindowsProcessTreeDataFlag.js +3 -3
  402. package/src/parts/Workspace/Workspace.ipc.js +5 -7
  403. package/src/parts/Workspace/Workspace.js +79 -84
  404. package/src/parts/WorkspaceSource/WorkspaceSource.js +2 -2
  405. package/src/sharedProcessMain.js +2 -3
@@ -1,15 +1,15 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as HandleIpc from '../HandleIpc/HandleIpc.js'
3
- import * as IpcChild from '../IpcChild/IpcChild.js'
4
- import * as IpcChildType from '../IpcChildType/IpcChildType.js'
5
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as HandleIpc from '../HandleIpc/HandleIpc.js';
3
+ import * as IpcChild from '../IpcChild/IpcChild.js';
4
+ import * as IpcChildType from '../IpcChildType/IpcChildType.js';
6
5
  export const handleElectronMessagePort = async (messagePort, ...params) => {
7
- Assert.object(messagePort)
8
- const ipc = await IpcChild.listen({
9
- method: IpcChildType.ElectronMessagePort,
10
- messagePort,
11
- })
12
- HandleIpc.handleIpc(ipc)
13
- // TODO find better way to associate configuration with ipc
14
- ipc.windowId = params[1]
15
- }
6
+ Assert.object(messagePort);
7
+ const ipc = await IpcChild.listen({
8
+ method: IpcChildType.ElectronMessagePort,
9
+ messagePort,
10
+ });
11
+ HandleIpc.handleIpc(ipc);
12
+ // TODO find better way to associate configuration with ipc
13
+ // @ts-ignore
14
+ ipc.windowId = params[1];
15
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleElectronReady from './HandleElectronReady.js'
2
-
3
- export const name = 'HandleElectronReady'
4
-
1
+ import * as HandleElectronReady from './HandleElectronReady.js';
2
+ export const name = 'HandleElectronReady';
5
3
  export const Commands = {
6
- handleElectronReady: HandleElectronReady.handleElectronReady,
7
- }
4
+ handleElectronReady: HandleElectronReady.handleElectronReady,
5
+ };
@@ -1,10 +1,9 @@
1
- import * as AppWindow from '../AppWindow/AppWindow.js'
2
- import * as Assert from '../Assert/Assert.js'
3
- import * as Preferences from '../Preferences/Preferences.js'
4
-
1
+ import * as AppWindow from '../AppWindow/AppWindow.js';
2
+ import * as Assert from '../Assert/Assert.js';
3
+ import * as Preferences from '../Preferences/Preferences.js';
5
4
  export const handleElectronReady = async (parsedArgs, workingDirectory) => {
6
- Assert.object(parsedArgs)
7
- Assert.string(workingDirectory)
8
- const preferences = await Preferences.getAll()
9
- await AppWindow.createAppWindow(preferences, parsedArgs, workingDirectory)
10
- }
5
+ Assert.object(parsedArgs);
6
+ Assert.string(workingDirectory);
7
+ const preferences = await Preferences.getAll();
8
+ await AppWindow.createAppWindow(preferences, parsedArgs, workingDirectory);
9
+ };
@@ -1,25 +1,22 @@
1
- import * as Callback from '../Callback/Callback.js'
2
- import * as Command from '../Command/Command.js'
3
- import * as JsonRpc from '../JsonRpc/JsonRpc.js'
4
- import * as PrettyError from '../PrettyError/PrettyError.js'
5
- import * as PrintPrettyError from '../PrintPrettyError/PrintPrettyError.js'
6
- import * as RequiresSocket from '../RequiresSocket/RequiresSocket.js'
7
- import * as ShouldLogError from '../ShouldLogError/ShouldLogError.js'
8
-
9
- const preparePrettyError = PrettyError.prepare
10
-
1
+ import * as Callback from '../Callback/Callback.js';
2
+ import * as Command from '../Command/Command.js';
3
+ import * as JsonRpc from '../JsonRpc/JsonRpc.js';
4
+ import * as PrettyError from '../PrettyError/PrettyError.js';
5
+ import * as PrintPrettyError from '../PrintPrettyError/PrintPrettyError.js';
6
+ import * as RequiresSocket from '../RequiresSocket/RequiresSocket.js';
7
+ import * as ShouldLogError from '../ShouldLogError/ShouldLogError.js';
8
+ const preparePrettyError = PrettyError.prepare;
11
9
  const logError = (error, prettyError) => {
12
- if (ShouldLogError.shouldLogError(error)) {
13
- PrintPrettyError.printPrettyError(prettyError, `[shared-process] `)
14
- }
15
- }
16
-
10
+ if (ShouldLogError.shouldLogError(error)) {
11
+ PrintPrettyError.printPrettyError(prettyError, `[shared-process] `);
12
+ }
13
+ };
14
+ const handleMessage = (event) => {
15
+ return JsonRpc.handleJsonRpcMessage(event.target, event.data, Command.execute, Callback.resolve, preparePrettyError, logError, RequiresSocket.requiresSocket);
16
+ };
17
17
  export const handleIpc = (ipc) => {
18
- const handleMessage = (message) => {
19
- return JsonRpc.handleJsonRpcMessage(ipc, message, Command.execute, Callback.resolve, preparePrettyError, logError, RequiresSocket.requiresSocket)
20
- }
21
- ipc.on('message', handleMessage)
22
- if (ipc.start) {
23
- ipc.start()
24
- }
25
- }
18
+ ipc.on('message', handleMessage);
19
+ if (ipc.start) {
20
+ ipc.start();
21
+ }
22
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleMessagePortForExtensionHostHelperProcess from './HandleMessagePortForExtensionHostHelperProcess.js'
2
-
3
- export const name = 'HandleMessagePortForExtensionHostHelperProcess'
4
-
1
+ import * as HandleMessagePortForExtensionHostHelperProcess from './HandleMessagePortForExtensionHostHelperProcess.js';
2
+ export const name = 'HandleMessagePortForExtensionHostHelperProcess';
5
3
  export const Commands = {
6
- handleMessagePortForExtensionHostHelperProcess: HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess,
7
- }
4
+ handleMessagePortForExtensionHostHelperProcess: HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess,
5
+ };
@@ -1,24 +1,23 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as ExtensionHostHelperProcessIpc from '../ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js'
3
- import * as HandleIpc from '../HandleIpc/HandleIpc.js'
4
- import * as IpcParentType from '../IpcParentType/IpcParentType.js'
5
- import * as JsonRpc from '../JsonRpc/JsonRpc.js'
6
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as ExtensionHostHelperProcessIpc from '../ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js';
3
+ import * as HandleIpc from '../HandleIpc/HandleIpc.js';
4
+ import * as IpcParentType from '../IpcParentType/IpcParentType.js';
5
+ import * as JsonRpc from '../JsonRpc/JsonRpc.js';
7
6
  // TODO connect this ipc to the renderer worker ipc
8
7
  // when renderer worker ipc closes, dispose all
9
8
  // matching extension host helper processes
10
9
  // unless the app is exiting, in which case the child processes
11
10
  // would get cleaned up automatically
12
11
  export const handleMessagePortForExtensionHostHelperProcess = async (rendererWorkerIpc, port) => {
13
- Assert.object(port)
14
- const ipc = await ExtensionHostHelperProcessIpc.create({
15
- method: IpcParentType.ElectronUtilityProcess,
16
- })
17
- HandleIpc.handleIpc(ipc)
18
- await JsonRpc.invokeAndTransfer(ipc, [port], 'HandleElectronMessagePort.handleElectronMessagePort')
19
- const cleanup = () => {
20
- ipc.dispose()
21
- rendererWorkerIpc.off('close', cleanup)
22
- }
23
- rendererWorkerIpc.on('close', cleanup)
24
- }
12
+ Assert.object(port);
13
+ const ipc = await ExtensionHostHelperProcessIpc.create({
14
+ method: IpcParentType.ElectronUtilityProcess,
15
+ });
16
+ HandleIpc.handleIpc(ipc);
17
+ await JsonRpc.invokeAndTransfer(ipc, [port], 'HandleElectronMessagePort.handleElectronMessagePort');
18
+ const cleanup = () => {
19
+ ipc.dispose();
20
+ rendererWorkerIpc.off('close', cleanup);
21
+ };
22
+ rendererWorkerIpc.on('close', cleanup);
23
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleMessagePortForTerminalProcess from './HandleMessagePortForTerminalProcess.js'
2
-
3
- export const name = 'HandleMessagePortForTerminalProcess'
4
-
1
+ import * as HandleMessagePortForTerminalProcess from './HandleMessagePortForTerminalProcess.js';
2
+ export const name = 'HandleMessagePortForTerminalProcess';
5
3
  export const Commands = {
6
- handleMessagePortForTerminalProcess: HandleMessagePortForTerminalProcess.handleMessagePortForTerminalProcess,
7
- }
4
+ handleMessagePortForTerminalProcess: HandleMessagePortForTerminalProcess.handleMessagePortForTerminalProcess,
5
+ };
@@ -1,10 +1,9 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as IpcParentType from '../IpcParentType/IpcParentType.js'
3
- import * as JsonRpc from '../JsonRpc/JsonRpc.js'
4
- import * as PtyHost from '../PtyHost/PtyHost.js'
5
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as IpcParentType from '../IpcParentType/IpcParentType.js';
3
+ import * as JsonRpc from '../JsonRpc/JsonRpc.js';
4
+ import * as PtyHost from '../PtyHost/PtyHost.js';
6
5
  export const handleMessagePortForTerminalProcess = async (port) => {
7
- Assert.object(port)
8
- const ptyHost = await PtyHost.getOrCreate(IpcParentType.ElectronUtilityProcess)
9
- await JsonRpc.invokeAndTransfer(ptyHost, [port], 'HandleElectronMessagePort.handleElectronMessagePort')
10
- }
6
+ Assert.object(port);
7
+ const ptyHost = await PtyHost.getOrCreate(IpcParentType.ElectronUtilityProcess);
8
+ await JsonRpc.invokeAndTransfer(ptyHost, [port], 'HandleElectronMessagePort.handleElectronMessagePort');
9
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleNodeMessagePort from './HandleNodeMessagePort.js'
2
-
3
- export const name = 'HandleNodeMessagePort'
4
-
1
+ import * as HandleNodeMessagePort from './HandleNodeMessagePort.js';
2
+ export const name = 'HandleNodeMessagePort';
5
3
  export const Commands = {
6
- handleNodeMessagePort: HandleNodeMessagePort.handleNodeMessagePort,
7
- }
4
+ handleNodeMessagePort: HandleNodeMessagePort.handleNodeMessagePort,
5
+ };
@@ -1,11 +1,10 @@
1
- import * as HandleIpc from '../HandleIpc/HandleIpc.js'
2
- import * as IpcChild from '../IpcChild/IpcChild.js'
3
- import * as IpcChildType from '../IpcChildType/IpcChildType.js'
4
-
1
+ import * as HandleIpc from '../HandleIpc/HandleIpc.js';
2
+ import * as IpcChild from '../IpcChild/IpcChild.js';
3
+ import * as IpcChildType from '../IpcChildType/IpcChildType.js';
5
4
  export const handleNodeMessagePort = async (messagePort) => {
6
- const ipc = await IpcChild.listen({
7
- method: IpcChildType.NodeMessagePort,
8
- messagePort,
9
- })
10
- HandleIpc.handleIpc(ipc)
11
- }
5
+ const ipc = await IpcChild.listen({
6
+ method: IpcChildType.NodeMessagePort,
7
+ messagePort,
8
+ });
9
+ HandleIpc.handleIpc(ipc);
10
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleRemoteRequest from './HandleRemoteRequest.js'
2
-
3
- export const name = 'HandleRemoteRequest'
4
-
1
+ import * as HandleRemoteRequest from './HandleRemoteRequest.js';
2
+ export const name = 'HandleRemoteRequest';
5
3
  export const Commands = {
6
- handleRemoteRequest: HandleRemoteRequest.handleRemoteRequest,
7
- }
4
+ handleRemoteRequest: HandleRemoteRequest.handleRemoteRequest,
5
+ };
@@ -1,10 +1,9 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as GetElectronFileResponse from '../GetElectronFileResponse/GetElectronFileResponse.js'
3
- import * as HttpServerResponse from '../HttpServerResponse/HttpServerResponse.js'
4
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as GetElectronFileResponse from '../GetElectronFileResponse/GetElectronFileResponse.js';
3
+ import * as HttpServerResponse from '../HttpServerResponse/HttpServerResponse.js';
5
4
  export const handleRemoteRequest = async (request, socket) => {
6
- Assert.object(request)
7
- Assert.object(socket)
8
- const result = await GetElectronFileResponse.getElectronFileResponse(request.url, request)
9
- HttpServerResponse.send(request, socket, result)
10
- }
5
+ Assert.object(request);
6
+ Assert.object(socket);
7
+ const result = await GetElectronFileResponse.getElectronFileResponse(request.url, request);
8
+ HttpServerResponse.send(request, socket, result);
9
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleRequestTest from './HandleRequestTest.js'
2
-
3
- export const name = 'HandleRequestTest'
4
-
1
+ import * as HandleRequestTest from './HandleRequestTest.js';
2
+ export const name = 'HandleRequestTest';
5
3
  export const Commands = {
6
- handleRequestTest: HandleRequestTest.handleRequestTest,
7
- }
4
+ handleRequestTest: HandleRequestTest.handleRequestTest,
5
+ };
@@ -1,11 +1,10 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as GetTestRequestResponse from '../GetTestRequestResponse/GetTestRequestResponse.js'
3
- import * as HttpServerResponse from '../HttpServerResponse/HttpServerResponse.js'
4
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as GetTestRequestResponse from '../GetTestRequestResponse/GetTestRequestResponse.js';
3
+ import * as HttpServerResponse from '../HttpServerResponse/HttpServerResponse.js';
5
4
  export const handleRequestTest = async (request, indexHtmlPath, socket) => {
6
- Assert.object(request)
7
- Assert.string(indexHtmlPath)
8
- Assert.object(socket)
9
- const result = await GetTestRequestResponse.getTestRequestResponse(request, indexHtmlPath)
10
- HttpServerResponse.send(request, socket, result)
11
- }
5
+ Assert.object(request);
6
+ Assert.string(indexHtmlPath);
7
+ Assert.object(socket);
8
+ const result = await GetTestRequestResponse.getTestRequestResponse(request, indexHtmlPath);
9
+ HttpServerResponse.send(request, socket, result);
10
+ };
@@ -1,12 +1,11 @@
1
- import * as ErrorCodes from '../ErrorCodes/ErrorCodes.js'
2
- import * as Logger from '../Logger/Logger.js'
3
-
1
+ import * as ErrorCodes from '../ErrorCodes/ErrorCodes.js';
2
+ import * as Logger from '../Logger/Logger.js';
4
3
  export const handleSocketError = (error) => {
5
- if (error && error.code === ErrorCodes.ECONNRESET) {
6
- return
7
- }
8
- if (error && error.code === ErrorCodes.EPIPE) {
9
- return
10
- }
11
- Logger.info('[info shared process: handle error]', error)
12
- }
4
+ if (error && error.code === ErrorCodes.ECONNRESET) {
5
+ return;
6
+ }
7
+ if (error && error.code === ErrorCodes.EPIPE) {
8
+ return;
9
+ }
10
+ Logger.info('[info shared process: handle error]', error);
11
+ };
@@ -1,15 +1,12 @@
1
- import * as ErrorHandling from '../ErrorHandling/ErrorHandling.js'
2
-
1
+ import * as ErrorHandling from '../ErrorHandling/ErrorHandling.js';
3
2
  const handleUncaughtExceptionMonitor = (error) => {
4
- ErrorHandling.handleUncaughtExceptionMonitor(error)
5
- }
6
-
3
+ ErrorHandling.handleUncaughtExceptionMonitor(error);
4
+ };
7
5
  export const handleUncaughtException = (error) => {
8
- handleUncaughtExceptionMonitor(error)
9
- process.exit(1)
10
- }
11
-
6
+ handleUncaughtExceptionMonitor(error);
7
+ process.exit(1);
8
+ };
12
9
  export const handleUnhandledRejection = (error) => {
13
- handleUncaughtExceptionMonitor(error)
14
- process.exit(1)
15
- }
10
+ handleUncaughtExceptionMonitor(error);
11
+ process.exit(1);
12
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleWebSocket from './HandleWebSocket.js'
2
-
3
- export const name = 'HandleWebSocket'
4
-
1
+ import * as HandleWebSocket from './HandleWebSocket.js';
2
+ export const name = 'HandleWebSocket';
5
3
  export const Commands = {
6
- handleWebSocket: HandleWebSocket.handleWebSocket,
7
- }
4
+ handleWebSocket: HandleWebSocket.handleWebSocket,
5
+ };
@@ -1,20 +1,20 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as DestroyWebSocket from '../DestroySocket/DestroySocket.js'
3
- import * as HandleWebSocketModule from '../HandleWebSocketModule/HandleWebSocketModule.js'
4
- import * as GetTypeFromUrl from '../GetTypeFromUrl/GetTypeFromUrl.js'
5
- import { VError } from '../VError/VError.js'
6
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as DestroyWebSocket from '../DestroySocket/DestroySocket.js';
3
+ import * as HandleWebSocketModule from '../HandleWebSocketModule/HandleWebSocketModule.js';
4
+ import * as GetTypeFromUrl from '../GetTypeFromUrl/GetTypeFromUrl.js';
5
+ import { VError } from '../VError/VError.js';
7
6
  export const handleWebSocket = async (message, handle) => {
8
- try {
9
- Assert.object(message)
10
- Assert.object(handle)
11
- const { url } = message
12
- const type = GetTypeFromUrl.getTypeFromUrl(url)
13
- handle.pause()
14
- const module = await HandleWebSocketModule.load(type)
15
- await module.handleWebSocket(message, handle, type)
16
- } catch (error) {
17
- DestroyWebSocket.destroySocket(handle)
18
- throw new VError(error, `Failed to connect to websocket`)
19
- }
20
- }
7
+ try {
8
+ Assert.object(message);
9
+ Assert.object(handle);
10
+ const { url } = message;
11
+ const type = GetTypeFromUrl.getTypeFromUrl(url);
12
+ handle.pause();
13
+ const module = await HandleWebSocketModule.load(type);
14
+ await module.handleWebSocket(message, handle, type);
15
+ }
16
+ catch (error) {
17
+ DestroyWebSocket.destroySocket(handle);
18
+ throw new VError(error, `Failed to connect to websocket`);
19
+ }
20
+ };
@@ -1,10 +1,9 @@
1
- import * as ExtensionHostHelperProcessIpc from '../ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js'
2
- import * as IpcParentType from '../IpcParentType/IpcParentType.js'
3
- import * as JsonRpc from '../JsonRpc/JsonRpc.js'
4
-
1
+ import * as ExtensionHostHelperProcessIpc from '../ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js';
2
+ import * as IpcParentType from '../IpcParentType/IpcParentType.js';
3
+ import * as JsonRpc from '../JsonRpc/JsonRpc.js';
5
4
  export const handleWebSocket = async (message, handle) => {
6
- const ipc = await ExtensionHostHelperProcessIpc.create({
7
- method: IpcParentType.NodeForkedProcess,
8
- })
9
- await JsonRpc.invokeAndTransfer(ipc, handle, 'HandleWebSocket.handleWebSocket', message)
10
- }
5
+ const ipc = await ExtensionHostHelperProcessIpc.create({
6
+ method: IpcParentType.NodeForkedProcess,
7
+ });
8
+ await JsonRpc.invokeAndTransfer(ipc, handle, 'HandleWebSocket.handleWebSocket', message);
9
+ };
@@ -1,17 +1,16 @@
1
- import * as Assert from '../Assert/Assert.js'
2
- import * as HandleIpc from '../HandleIpc/HandleIpc.js'
3
- import * as HandleSocketError from '../HandleSocketError/HandleSocketError.js'
4
- import * as IpcChild from '../IpcChild/IpcChild.js'
5
- import * as IpcChildType from '../IpcChildType/IpcChildType.js'
6
-
1
+ import * as Assert from '../Assert/Assert.js';
2
+ import * as HandleIpc from '../HandleIpc/HandleIpc.js';
3
+ import * as HandleSocketError from '../HandleSocketError/HandleSocketError.js';
4
+ import * as IpcChild from '../IpcChild/IpcChild.js';
5
+ import * as IpcChildType from '../IpcChildType/IpcChildType.js';
7
6
  export const handleWebSocket = async (request, handle) => {
8
- Assert.object(request)
9
- Assert.object(handle)
10
- handle.on('error', HandleSocketError.handleSocketError)
11
- const ipc = await IpcChild.listen({
12
- method: IpcChildType.WebSocket,
13
- request,
14
- handle,
15
- })
16
- HandleIpc.handleIpc(ipc)
17
- }
7
+ Assert.object(request);
8
+ Assert.object(handle);
9
+ handle.on('error', HandleSocketError.handleSocketError);
10
+ const ipc = await IpcChild.listen({
11
+ method: IpcChildType.WebSocket,
12
+ request,
13
+ handle,
14
+ });
15
+ HandleIpc.handleIpc(ipc);
16
+ };
@@ -1,22 +1,18 @@
1
- import * as PtyHost from '../PtyHost/PtyHost.js'
2
-
1
+ import * as PtyHost from '../PtyHost/PtyHost.js';
3
2
  export const handleWebSocket = async (message, handle) => {
4
- const instance = await PtyHost.getOrCreate()
5
- instance.sendAndTransfer(
6
- {
7
- jsonrpc: '2.0',
8
- method: 'HandleWebSocket.handleWebSocket',
9
- params: [message],
10
- },
11
- handle,
12
- )
13
- // console.log({ instance })
14
- // const ipc = await PtyHost.getOrCreate()
15
- // console.info('[sharedprocess] creating extension ipc')
16
- // const rpc = await ExtensionHostRpc.create(ipc, handle)
17
- // console.info('[sharedprocess] created extension host rpc')
18
- // ipc._process.send(message, handle)
19
- // rpc.send(message)
20
- // console.log('spawned extension host')
21
- // console.log(rpc)
22
- }
3
+ const instance = await PtyHost.getOrCreate();
4
+ instance.sendAndTransfer({
5
+ jsonrpc: '2.0',
6
+ method: 'HandleWebSocket.handleWebSocket',
7
+ params: [message],
8
+ }, handle);
9
+ // console.log({ instance })
10
+ // const ipc = await PtyHost.getOrCreate()
11
+ // console.info('[sharedprocess] creating extension ipc')
12
+ // const rpc = await ExtensionHostRpc.create(ipc, handle)
13
+ // console.info('[sharedprocess] created extension host rpc')
14
+ // ipc._process.send(message, handle)
15
+ // rpc.send(message)
16
+ // console.log('spawned extension host')
17
+ // console.log(rpc)
18
+ };
@@ -1,10 +1,10 @@
1
- import * as Logger from '../Logger/Logger.js'
2
-
1
+ import * as Logger from '../Logger/Logger.js';
3
2
  export const handleWebSocket = (message, handle, protocol) => {
4
- Logger.warn(`[shared-process] unsupported sec-websocket-procotol ${protocol}`)
5
- try {
6
- handle.destroy()
7
- } catch {
8
- // ignore
9
- }
10
- }
3
+ Logger.warn(`[shared-process] unsupported sec-websocket-procotol ${protocol}`);
4
+ try {
5
+ handle.destroy();
6
+ }
7
+ catch {
8
+ // ignore
9
+ }
10
+ };
@@ -1,18 +1,17 @@
1
- import * as ProtocolType from '../ProtocolType/ProtocolType.js'
2
- import { VError } from '../VError/VError.js'
3
-
1
+ import * as ProtocolType from '../ProtocolType/ProtocolType.js';
2
+ import { VError } from '../VError/VError.js';
4
3
  export const load = (protocol) => {
5
- if (!protocol) {
6
- throw new VError('missing sec websocket protocol header')
7
- }
8
- switch (protocol) {
9
- case ProtocolType.SharedProcess:
10
- return import('../HandleWebSocketForSharedProcess/HandleWebSocketForSharedProcess.js')
11
- case ProtocolType.ExtensionHostHelperProcess:
12
- return import('../HandleWebSocketForExtensionHostHelperProcess/HandleWebSocketForExtensionHostHelperProcess.js')
13
- case ProtocolType.TerminalProcess:
14
- return import('../HandleWebSocketForTerminalProcess/HandleWebSocketForTerminalProcess.js')
15
- default:
16
- return import('../HandleWebSocketForUnknown/HandleWebSocketForUnknown.js')
17
- }
18
- }
4
+ if (!protocol) {
5
+ throw new VError('missing sec websocket protocol header');
6
+ }
7
+ switch (protocol) {
8
+ case ProtocolType.SharedProcess:
9
+ return import('../HandleWebSocketForSharedProcess/HandleWebSocketForSharedProcess.js');
10
+ case ProtocolType.ExtensionHostHelperProcess:
11
+ return import('../HandleWebSocketForExtensionHostHelperProcess/HandleWebSocketForExtensionHostHelperProcess.js');
12
+ case ProtocolType.TerminalProcess:
13
+ return import('../HandleWebSocketForTerminalProcess/HandleWebSocketForTerminalProcess.js');
14
+ default:
15
+ return import('../HandleWebSocketForUnknown/HandleWebSocketForUnknown.js');
16
+ }
17
+ };
@@ -1,7 +1,5 @@
1
- import * as HandleWindowAllClosed from './HandleWindowAllClosed.js'
2
-
3
- export const name = 'HandleWindowAllClosed'
4
-
1
+ import * as HandleWindowAllClosed from './HandleWindowAllClosed.js';
2
+ export const name = 'HandleWindowAllClosed';
5
3
  export const Commands = {
6
- handleWindowAllClosed: HandleWindowAllClosed.handleWindowAllClosed,
7
- }
4
+ handleWindowAllClosed: HandleWindowAllClosed.handleWindowAllClosed,
5
+ };
@@ -1,11 +1,10 @@
1
- import * as Debug from '../Debug/Debug.js'
2
- import * as ParentIpc from '../ParentIpc/ParentIpc.js'
3
- import * as Platform from '../Platform/Platform.js'
4
-
1
+ import * as Debug from '../Debug/Debug.js';
2
+ import * as ParentIpc from '../ParentIpc/ParentIpc.js';
3
+ import * as Platform from '../Platform/Platform.js';
5
4
  export const handleWindowAllClosed = async () => {
6
- Debug.debug('[info] all windows closed')
7
- if (!Platform.isMacOs) {
8
- Debug.debug('[info] quitting')
9
- await ParentIpc.invoke('Exit.exit')
10
- }
11
- }
5
+ Debug.debug('[info] all windows closed');
6
+ if (!Platform.isMacOs) {
7
+ Debug.debug('[info] quitting');
8
+ await ParentIpc.invoke('Exit.exit');
9
+ }
10
+ };
@@ -1,3 +1,3 @@
1
1
  export const hasPositiveMemoryUsage = (process) => {
2
- return process.memory >= 0
3
- }
2
+ return process.memory >= 0;
3
+ };
@@ -1,7 +1,5 @@
1
- import * as NodeCrypto from 'node:crypto'
2
-
1
+ import * as NodeCrypto from 'node:crypto';
3
2
  export const fromString = (content) => {
4
- return NodeCrypto.createHash('sha1').update(content).digest('hex')
5
- }
6
-
7
- export const { createHash } = NodeCrypto
3
+ return NodeCrypto.createHash('sha1').update(content).digest('hex');
4
+ };
5
+ export const { createHash } = NodeCrypto;
@@ -1,7 +1,5 @@
1
- import * as HeapSnapshot from './HeapSnapshot.js'
2
-
3
- export const name = 'HeapSnapshot'
4
-
1
+ import * as HeapSnapshot from './HeapSnapshot.js';
2
+ export const name = 'HeapSnapshot';
5
3
  export const Commands = {
6
- createHeapSnapshot: HeapSnapshot.createHeapSnapshot,
7
- }
4
+ createHeapSnapshot: HeapSnapshot.createHeapSnapshot,
5
+ };