@lvce-editor/shared-process 0.25.9 → 0.25.11
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.
- package/package.json +5 -6
- package/src/parts/AddAccurateMemoryUsage/AddAccurateMemoryUsage.js +7 -8
- package/src/parts/AddSemiColon/AddSemiColon.js +3 -4
- package/src/parts/AppWindow/AppWindow.js +14 -16
- package/src/parts/ApplyEdit/ApplyEdit.js +6 -7
- package/src/parts/Assert/Assert.js +1 -1
- package/src/parts/AttachDebugger/AttachDebugger.ipc.js +4 -6
- package/src/parts/AttachDebugger/AttachDebugger.js +4 -5
- package/src/parts/Authority/Authority.js +1 -1
- package/src/parts/AutoUpdateType/AutoUpdateType.js +4 -4
- package/src/parts/AutoUpdater/AutoUpdater.ipc.js +5 -7
- package/src/parts/AutoUpdater/AutoUpdater.js +31 -31
- package/src/parts/AutoUpdaterAppImage/AutoUpdaterAppImage.ipc.js +5 -7
- package/src/parts/AutoUpdaterAppImage/AutoUpdaterAppImage.js +49 -50
- package/src/parts/AutoUpdaterWindowsNsis/AutoUpdaterWindowsNsis.ipc.js +5 -7
- package/src/parts/AutoUpdaterWindowsNsis/AutoUpdaterWindowsNsis.js +49 -49
- package/src/parts/BulkReplacement/BulkReplacement.ipc.js +4 -6
- package/src/parts/BulkReplacement/BulkReplacement.js +16 -16
- package/src/parts/BulkReplacementContent/BulkReplacementContent.js +26 -27
- package/src/parts/ByteSize/ByteSize.js +4 -4
- package/src/parts/Callback/Callback.js +1 -1
- package/src/parts/Character/Character.js +12 -12
- package/src/parts/ChildProcess/ChildProcess.js +71 -86
- package/src/parts/Clamp/Clamp.js +2 -2
- package/src/parts/Cli/Cli.js +12 -12
- package/src/parts/CliCommandType/CliCommandType.js +11 -11
- package/src/parts/CliHelp/CliHelp.js +8 -9
- package/src/parts/CliInstall/CliInstall.js +24 -24
- package/src/parts/CliLink/CliLink.js +17 -17
- package/src/parts/CliList/CliList.js +15 -18
- package/src/parts/CliModule/CliModule.js +26 -27
- package/src/parts/CliStatus/CliStatus.js +4 -5
- package/src/parts/CliUnlink/CliUnlink.js +17 -17
- package/src/parts/CliVersion/CliVersion.js +7 -8
- package/src/parts/ClipBoard/ClipBoard.ipc.js +5 -7
- package/src/parts/ClipBoard/ClipBoard.js +18 -21
- package/src/parts/ClipBoard/ClipBoardGnome.js +49 -54
- package/src/parts/ClipBoard/ClipBoardNoop.js +10 -12
- package/src/parts/ClipBoard/ClipBoardWindows.js +17 -18
- package/src/parts/CollectTextSearchStdout/CollectTextSearchStdout.js +83 -93
- package/src/parts/ColorTheme/ColorTheme.js +14 -17
- package/src/parts/Command/Command.js +61 -68
- package/src/parts/CommandNotFoundError/CommandNotFoundError.js +7 -8
- package/src/parts/CompareVersion/CompareVersion.js +2 -2
- package/src/parts/ContentSecurityPolicy/ContentSecurityPolicy.ipc.js +4 -6
- package/src/parts/ContentSecurityPolicy/ContentSecurityPolicy.js +6 -7
- package/src/parts/ContentSecurityPolicyDocument/ContentSecurityPolicyDocument.js +10 -14
- package/src/parts/ContentSecurityPolicyState/ContentSecurityPolicyState.js +5 -7
- package/src/parts/ContentSecurityPolicySyntaxHighlightingWorker/ContentSecurityPolicySyntaxHighlightingWorker.js +2 -0
- package/src/parts/ContentSecurityPolicyTerminalWorker/ContentSecurityPolicyTerminalWorker.js +2 -4
- package/src/parts/ContentSecurityPolicyTestWorker/ContentSecurityPolicyTestWorker.js +2 -4
- package/src/parts/ContentSecurityPolicyWorker/ContentSecurityPolicyWorker.js +7 -12
- package/src/parts/CpuProfile/CpuProfile.js +22 -25
- package/src/parts/Crash/Crash.ipc.js +5 -7
- package/src/parts/Crash/Crash.js +8 -11
- package/src/parts/CreatePidMap/CreatePidMap.js +4 -5
- package/src/parts/CreateTestOverview/CreateTestOverview.js +19 -22
- package/src/parts/CrossOriginEmbedderPolicy/CrossOriginEmbedderPolicy.js +1 -1
- package/src/parts/CrossOriginOpenerPolicy/CrossOriginOpenerPolicy.js +2 -2
- package/src/parts/Debug/Debug.js +2 -3
- package/src/parts/DefaultUrl/DefaultUrl.js +3 -4
- package/src/parts/Desktop/Desktop.js +18 -19
- package/src/parts/DesktopCapturer/DesktopCapturer.ipc.js +4 -6
- package/src/parts/DesktopCapturer/DesktopCapturer.js +3 -4
- package/src/parts/DesktopType/DesktopType.js +3 -3
- package/src/parts/DestroySocket/DestroySocket.js +5 -4
- package/src/parts/Developer/Developer.ipc.js +12 -14
- package/src/parts/Developer/Developer.js +33 -40
- package/src/parts/DirentType/DirentType.js +12 -12
- package/src/parts/Download/Download.ipc.js +4 -6
- package/src/parts/Download/Download.js +20 -19
- package/src/parts/DownloadAndExtract/DownloadAndExtract.js +16 -20
- package/src/parts/ElectronApplicationMenu/ElectronApplicationMenu.ipc.js +5 -7
- package/src/parts/ElectronApplicationMenu/ElectronApplicationMenu.js +20 -23
- package/src/parts/ElectronBrowserView/ElectronBrowserView.ipc.js +5 -7
- package/src/parts/ElectronBrowserView/ElectronBrowserView.js +18 -21
- package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.ipc.js +17 -19
- package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.js +26 -41
- package/src/parts/ElectronBrowserViewIpcState/ElectronBrowserViewIpcState.js +10 -14
- package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.ipc.js +5 -7
- package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.js +5 -7
- package/src/parts/ElectronBrowserViewState/ElectronBrowserViewState.js +8 -11
- package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.ipc.js +6 -8
- package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.js +7 -10
- package/src/parts/ElectronClipBoard/ElectronClipBoard.ipc.js +4 -6
- package/src/parts/ElectronClipBoard/ElectronClipBoard.js +3 -4
- package/src/parts/ElectronContentTracing/ElectronContentTracing.ipc.js +5 -7
- package/src/parts/ElectronContentTracing/ElectronContentTracing.js +5 -7
- package/src/parts/ElectronContextMenu/ElectronContextMenu.ipc.js +4 -6
- package/src/parts/ElectronContextMenu/ElectronContextMenu.js +7 -8
- package/src/parts/ElectronDeveloper/ElectronDeveloper.ipc.js +4 -6
- package/src/parts/ElectronDeveloper/ElectronDeveloper.js +3 -4
- package/src/parts/ElectronDialog/ElectronDialog.ipc.js +5 -7
- package/src/parts/ElectronDialog/ElectronDialog.js +5 -7
- package/src/parts/ElectronInitialize/ElectronInitialize.ipc.js +4 -6
- package/src/parts/ElectronInitialize/ElectronInitialize.js +9 -10
- package/src/parts/ElectronNet/ElectronNet.ipc.js +4 -6
- package/src/parts/ElectronNet/ElectronNet.js +3 -4
- package/src/parts/ElectronNetLog/ElectronNetLog.ipc.js +5 -7
- package/src/parts/ElectronNetLog/ElectronNetLog.js +5 -7
- package/src/parts/ElectronPowerSaveBlocker/ElectronPowerSaveBlocker.ipc.js +5 -7
- package/src/parts/ElectronPowerSaveBlocker/ElectronPowerSaveBlocker.js +5 -7
- package/src/parts/ElectronProcess/ElectronProcess.ipc.js +5 -7
- package/src/parts/ElectronProcess/ElectronProcess.js +5 -7
- package/src/parts/ElectronSafeStorage/ElectronSafeStorage.ipc.js +6 -8
- package/src/parts/ElectronSafeStorage/ElectronSafeStorage.js +10 -13
- package/src/parts/ElectronShell/ElectronShell.ipc.js +4 -6
- package/src/parts/ElectronShell/ElectronShell.js +3 -4
- package/src/parts/ElectronWebContents/ElectronWebContents.ipc.js +11 -13
- package/src/parts/ElectronWebContents/ElectronWebContents.js +45 -61
- package/src/parts/ElectronWebContentsView/ElectronWebContentsView.ipc.js +5 -7
- package/src/parts/ElectronWebContentsView/ElectronWebContentsView.js +16 -18
- package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.ipc.js +17 -19
- package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.js +26 -41
- package/src/parts/ElectronWindow/ElectronWindow.ipc.js +15 -17
- package/src/parts/ElectronWindow/ElectronWindow.js +60 -81
- package/src/parts/ElectronWindowAbout/ElectronWindowAbout.ipc.js +4 -6
- package/src/parts/ElectronWindowAbout/ElectronWindowAbout.js +3 -4
- package/src/parts/ElectronWindowProcessExplorer/ElectronWindowProcessExplorer.ipc.js +4 -6
- package/src/parts/ElectronWindowProcessExplorer/ElectronWindowProcessExplorer.js +31 -33
- package/src/parts/EncodingType/EncodingType.js +2 -2
- package/src/parts/Env/Env.js +11 -16
- package/src/parts/Error/FileSystemError.js +6 -7
- package/src/parts/ErrorCodes/ErrorCodes.js +22 -22
- package/src/parts/ErrorHandling/ErrorHandling.js +52 -60
- package/src/parts/Exec/Exec.js +11 -12
- package/src/parts/ExecCommand/ExecCommand.js +19 -22
- package/src/parts/ExecPromise/ExecPromise.js +3 -4
- package/src/parts/Exit/Exit.ipc.js +4 -6
- package/src/parts/Exit/Exit.js +3 -4
- package/src/parts/ExitCode/ExitCode.js +3 -5
- package/src/parts/ExportStatic/ExportStatic.js +318 -419
- package/src/parts/ExtensionHostHelperProcessIpc/ExtensionHostHelperProcessIpc.js +13 -14
- package/src/parts/ExtensionHostRpc/ExtensionHostRpc.js +70 -79
- package/src/parts/ExtensionInstall/ExtensionInstall.ipc.js +4 -6
- package/src/parts/ExtensionInstall/ExtensionInstall.js +21 -23
- package/src/parts/ExtensionInstallFromFile/ExtensionInstallFromFile.js +32 -33
- package/src/parts/ExtensionInstallFromGitHub/ExtensionInstallFromGitHub.js +30 -30
- package/src/parts/ExtensionInstallFromUrl/ExtensionInstallFromUrl.js +30 -30
- package/src/parts/ExtensionInstallParseInput/ExtensionInstallParseInput.js +43 -46
- package/src/parts/ExtensionInstallType/ExtensionInstallType.js +4 -7
- package/src/parts/ExtensionLink/ExtensionLink.js +40 -40
- package/src/parts/ExtensionList/ExtensionList.js +57 -63
- package/src/parts/ExtensionManagement/ExtensionManagement.ipc.js +16 -17
- package/src/parts/ExtensionManagement/ExtensionManagement.js +70 -87
- package/src/parts/ExtensionManagement/ExtensionManagementColorTheme.js +62 -70
- package/src/parts/ExtensionManagement/ExtensionManagementIconTheme.js +26 -26
- package/src/parts/ExtensionManagement/ExtensionManagementLanguages.js +55 -59
- package/src/parts/ExtensionManifest/ExtensionManifest.js +50 -48
- package/src/parts/ExtensionManifestInputType/ExtensionManifestInputType.js +3 -5
- package/src/parts/ExtensionManifestStatus/ExtensionManifestStatus.js +2 -3
- package/src/parts/ExtensionManifests/ExtensionManifests.js +36 -40
- package/src/parts/ExtensionManifests/ExtensionManifestsFromFolder.js +19 -19
- package/src/parts/ExtensionManifests/ExtensionManifestsFromLinkedExtensionsFolder.js +46 -47
- package/src/parts/ExtensionManifests/ExtensionManifestsFromOnlyExtension.js +7 -8
- package/src/parts/ExtensionUninstall/ExtensionUninstall.js +17 -17
- package/src/parts/ExtensionUnlink/ExtensionUnlink.js +19 -19
- package/src/parts/Extract/Extract.js +24 -28
- package/src/parts/FileNotFoundError/FileNotFoundError.js +11 -13
- package/src/parts/FileSystem/FileSystem.ipc.js +27 -30
- package/src/parts/FileSystem/FileSystem.js +214 -228
- package/src/parts/FileSystemWatch/FileSystemWatch.js +4 -5
- package/src/parts/FirstNodeWorkerEventType/FirstNodeWorkerEventType.js +3 -3
- package/src/parts/GetAccurateMemoryUsage/GetAccurateMemoryUsage.js +34 -34
- package/src/parts/GetAppImageDownloadUrl/GetAppImageDownloadUrl.js +4 -5
- package/src/parts/GetAppImagePath/GetAppImagePath.js +3 -4
- package/src/parts/GetAppWindowOptions/GetAppWindowOptions.js +26 -28
- package/src/parts/GetBrowserWindowOptions/GetBrowserWindowOptions.js +26 -27
- package/src/parts/GetContentSecurityPolicy/GetContentSecurityPolicy.js +5 -0
- package/src/parts/GetDirentType/GetDirentType.js +24 -25
- package/src/parts/GetElectronFileResponse/GetElectronFileResponse.ipc.js +4 -6
- package/src/parts/GetElectronFileResponse/GetElectronFileResponse.js +43 -43
- package/src/parts/GetElectronFileResponseAbsolutePath/GetElectronFileResponseAbsolutePath.js +32 -33
- package/src/parts/GetElectronFileResponseContent/GetElectronFileResponseContent.js +15 -16
- package/src/parts/GetElectronFileResponseRelativePath/GetElectronFileResponseRelativePath.js +11 -13
- package/src/parts/GetElectronRebuildPath/GetElectronRebuildPath.js +8 -9
- package/src/parts/GetEtag/GetEtag.js +2 -2
- package/src/parts/GetFirstEvent/GetFirstEvent.js +20 -21
- package/src/parts/GetFirstNodeWorkerEvent/GetFirstNodeWorkerEvent.js +7 -8
- package/src/parts/GetFirstSpawnedProcessEvent/GetFirstSpawnedProcessEvent.js +7 -8
- package/src/parts/GetHeaders/GetHeaders.js +50 -48
- package/src/parts/GetHeadersDefault/GetHeadersDefault.js +2 -2
- package/src/parts/GetHeadersExtensionHostWorker/GetHeadersExtensionHostWorker.js +8 -9
- package/src/parts/GetHeadersMainFrame/GetHeadersMainFrame.js +10 -11
- package/src/parts/GetHeadersOtherWorker/GetHeadersOtherWorker.js +12 -13
- package/src/parts/GetHeadersRendererWorker/GetHeadersRendererWorker.js +8 -9
- package/src/parts/GetHeadersSyntaxHighlightingWorker/GetHeadersSyntaxHighlightingWorker.js +9 -0
- package/src/parts/GetHeadersTerminalWorker/GetHeadersTerminalWorker.js +8 -9
- package/src/parts/GetHeadersTestWorker/GetHeadersTestWorker.js +8 -9
- package/src/parts/GetHelpString/GetHelpString.js +4 -5
- package/src/parts/GetHttpErrorMessage/GetHttpErrorMessage.js +20 -21
- package/src/parts/GetIcon/GetIcon.js +17 -18
- package/src/parts/GetLatestReleaseVersion/GetLatestReleaseVersion.js +29 -30
- package/src/parts/GetMimeType/GetMimeType.js +26 -27
- package/src/parts/GetNewLineIndex/GetNewLineIndex.js +3 -4
- package/src/parts/GetNotFoundResponse/GetNotFoundResponse.js +10 -11
- package/src/parts/GetNotModifiedResponse/GetNotModifiedResponse.js +9 -10
- package/src/parts/GetNsisUpdateArgs/GetNsisUpdateArgs.js +6 -6
- package/src/parts/GetNsisUpdateDownloadPath/GetNsisUpdateDownloadPath.js +9 -10
- package/src/parts/GetPathName/GetPathName.js +3 -3
- package/src/parts/GetPreloadUrl/GetPreloadUrl.js +4 -5
- package/src/parts/GetProcessExplorerUrl/GetProcessExplorerUrl.js +3 -4
- package/src/parts/GetPsOutput/GetPsOutput.js +16 -17
- package/src/parts/GetRemoteUrl/GetRemoteUrl.js +4 -5
- package/src/parts/GetServerErrorResponse/GetServerErrorResponse.js +10 -11
- package/src/parts/GetStatusString/GetStatusString.js +54 -62
- package/src/parts/GetTerminalProcessPath/GetTerminalProcessPath.js +4 -5
- package/src/parts/GetTerminalSpawnOptions/GetTerminalSpawnOptions.ipc.js +4 -6
- package/src/parts/GetTerminalSpawnOptions/GetTerminalSpawnOptions.js +16 -17
- package/src/parts/GetTestPath/GetTestPath.js +10 -11
- package/src/parts/GetTestRequestResponse/GetTestRequestResponse.js +41 -42
- package/src/parts/GetTitleBarItems/GetTitleBarItems.js +40 -41
- package/src/parts/GetTypeFromUrl/GetTypeFromUrl.js +17 -18
- package/src/parts/GetTypeScriptPath/GetTypeScriptPath.js +11 -20
- package/src/parts/GetVersionString/GetVersionString.js +4 -5
- package/src/parts/GetWindowId/GetWindowId.ipc.js +4 -6
- package/src/parts/GetWindowId/GetWindowId.js +4 -5
- package/src/parts/GetWindowsNsisDownloadUrl/GetWindowsNsisDownloadUrl.js +6 -7
- package/src/parts/GetWorkspaceId/GetWorkspaceId.js +3 -4
- package/src/parts/GitLsFiles/GitLsFiles.ipc.js +6 -8
- package/src/parts/GitLsFiles/GitLsFiles.js +19 -22
- package/src/parts/HandleCliArgs/HandleCliArgs.ipc.js +4 -6
- package/src/parts/HandleCliArgs/HandleCliArgs.js +11 -11
- package/src/parts/HandleElectronMessagePort/HandleElectronMessagePort.ipc.js +4 -6
- package/src/parts/HandleElectronMessagePort/HandleElectronMessagePort.js +13 -14
- package/src/parts/HandleElectronReady/HandleElectronReady.ipc.js +4 -6
- package/src/parts/HandleElectronReady/HandleElectronReady.js +8 -9
- package/src/parts/HandleIpc/HandleIpc.js +20 -23
- package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.ipc.js +4 -6
- package/src/parts/HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.js +17 -18
- package/src/parts/HandleMessagePortForTerminalProcess/HandleMessagePortForTerminalProcess.ipc.js +4 -6
- package/src/parts/HandleMessagePortForTerminalProcess/HandleMessagePortForTerminalProcess.js +8 -9
- package/src/parts/HandleNodeMessagePort/HandleNodeMessagePort.ipc.js +4 -6
- package/src/parts/HandleNodeMessagePort/HandleNodeMessagePort.js +9 -10
- package/src/parts/HandleRemoteRequest/HandleRemoteRequest.ipc.js +4 -6
- package/src/parts/HandleRemoteRequest/HandleRemoteRequest.js +8 -9
- package/src/parts/HandleRequestTest/HandleRequestTest.ipc.js +4 -6
- package/src/parts/HandleRequestTest/HandleRequestTest.js +9 -10
- package/src/parts/HandleSocketError/HandleSocketError.js +10 -11
- package/src/parts/HandleUncaughtExceptionMonitor/HandleUncaughtExceptionMonitor.js +9 -12
- package/src/parts/HandleWebSocket/HandleWebSocket.ipc.js +4 -6
- package/src/parts/HandleWebSocket/HandleWebSocket.js +19 -19
- package/src/parts/HandleWebSocketForExtensionHostHelperProcess/HandleWebSocketForExtensionHostHelperProcess.js +8 -9
- package/src/parts/HandleWebSocketForSharedProcess/HandleWebSocketForSharedProcess.js +15 -16
- package/src/parts/HandleWebSocketForTerminalProcess/HandleWebSocketForTerminalProcess.js +17 -21
- package/src/parts/HandleWebSocketForUnknown/HandleWebSocketForUnknown.js +9 -9
- package/src/parts/HandleWebSocketModule/HandleWebSocketModule.js +16 -17
- package/src/parts/HandleWindowAllClosed/HandleWindowAllClosed.ipc.js +4 -6
- package/src/parts/HandleWindowAllClosed/HandleWindowAllClosed.js +9 -10
- package/src/parts/HasPositiveMemoryUsage/HasPositiveMemoryUsage.js +2 -2
- package/src/parts/Hash/Hash.js +4 -6
- package/src/parts/HeapSnapshot/HeapSnapshot.ipc.js +4 -6
- package/src/parts/HeapSnapshot/HeapSnapshot.js +6 -9
- package/src/parts/HttpHeader/HttpHeader.js +7 -7
- package/src/parts/HttpServerResponse/HttpServerResponse.js +15 -16
- package/src/parts/HttpStatusCode/HttpStatusCode.js +5 -5
- package/src/parts/Id/Id.js +4 -5
- package/src/parts/IncrementalTextSearch/IncrementalTextSearch.js +44 -47
- package/src/parts/IncrementalTextSearch/IncremetalTextSearch.ipc.js +4 -6
- package/src/parts/InferExtensionId/InferExtensionId.js +7 -8
- package/src/parts/InstallExtension/InstallExtension.ipc.js +3 -4
- package/src/parts/InstallExtension/InstallExtension.js +32 -32
- package/src/parts/IpcChild/IpcChild.js +12 -13
- package/src/parts/IpcChildModule/IpcChildModule.js +19 -26
- package/src/parts/IpcChildType/IpcChildType.js +18 -19
- package/src/parts/IpcChildWithElectronMessagePort/IpcChildWithElectronMessagePort.js +47 -48
- package/src/parts/IpcChildWithNodeMessagePort/IpcChildWithNodeMessagePort.js +40 -41
- package/src/parts/IpcError/IpcError.js +4 -4
- package/src/parts/IpcParent/IpcParent.js +8 -9
- package/src/parts/IpcParentModule/IpcParentModule.js +13 -14
- package/src/parts/IpcParentType/IpcParentType.js +3 -3
- package/src/parts/IpcParentWithElectronUtilityProcess/IpcParentWithElectronUtilityProcess.js +45 -48
- package/src/parts/IsAbsolutePath/IsAbsolutePath.js +3 -4
- package/src/parts/IsAppImage/IsAppImage.js +3 -4
- package/src/parts/IsAutoUpdateSupported/IsAutoUpdateSupported.ipc.js +4 -6
- package/src/parts/IsAutoUpdateSupported/IsAutoUpdateSupported.js +6 -8
- package/src/parts/IsBuiltServer/IsBuiltServer.js +1 -1
- package/src/parts/IsDlOpenError/IsDlOpenError.js +3 -4
- package/src/parts/IsElectron/IsElectron.js +3 -4
- package/src/parts/IsEnoentError/IsEnoentError.js +9 -11
- package/src/parts/IsEnoentErrorWindows/IsEnoentErrorWindows.js +2 -2
- package/src/parts/IsEsrchError/IsEsrchError.js +3 -4
- package/src/parts/IsIgnoredError/IsIgnoredError.js +12 -13
- package/src/parts/IsMessagePort/IsMessagePort.js +2 -2
- package/src/parts/IsMessagePortMain/IsMessagePortMain.js +2 -2
- package/src/parts/IsTypeScriptPath/IsTypeScriptPath.js +2 -2
- package/src/parts/IsWindows/IsWindows.js +1 -1
- package/src/parts/JoinLines/JoinLines.js +3 -4
- package/src/parts/Json/Json.js +15 -17
- package/src/parts/JsonFile/JsonFile.js +10 -12
- package/src/parts/JsonRpc/JsonRpc.js +1 -1
- package/src/parts/JsonRpcVersion/JsonRpcVersion.js +1 -1
- package/src/parts/Jsonc/Jsonc.js +1 -1
- package/src/parts/JsoncFile/JsoncFile.js +7 -8
- package/src/parts/LeftCut/LeftCut.js +17 -18
- package/src/parts/LimitString/LimitString.js +13 -14
- package/src/parts/ListProcessGetName/ListProcessGetName.js +55 -56
- package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js +4 -6
- package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.js +9 -11
- package/src/parts/ListProcessesWithMemoryUsageUnix/ListProcessesWithMemoryUsageUnix.js +19 -20
- package/src/parts/ListProcessesWithMemoryUsageWindows/ListProcessesWithMemoryUsageWindows.js +33 -36
- package/src/parts/LoadTypeScript/LoadTypeScript.js +12 -12
- package/src/parts/LoadWindowsProcessTree/LoadWindowsProcessTree.js +11 -13
- package/src/parts/Logger/Logger.js +34 -42
- package/src/parts/Main/Main.js +13 -14
- package/src/parts/MakeExecutable/MakeExecutable.js +9 -9
- package/src/parts/MimeType/MimeType.js +37 -37
- package/src/parts/Module/Module.js +150 -153
- package/src/parts/ModuleId/ModuleId.js +76 -76
- package/src/parts/ModuleMap/ModuleMap.js +329 -330
- package/src/parts/OpenExternal/OpenExternal.ipc.js +5 -7
- package/src/parts/OpenExternal/OpenExternal.js +5 -7
- package/src/parts/OpenNativeFolder/OpenNativeFolder.ipc.js +4 -6
- package/src/parts/OpenNativeFolder/OpenNativeFolder.js +9 -9
- package/src/parts/Os/Os.ipc.js +4 -6
- package/src/parts/Os/Os.js +3 -4
- package/src/parts/OutputChannel/OutputChannel.ipc.js +35 -39
- package/src/parts/OutputChannel/OutputChannel.js +32 -35
- package/src/parts/OutputChannelState/OutputChannelState.js +10 -14
- package/src/parts/ParentIpc/ParentIpc.js +19 -25
- package/src/parts/ParseInt/ParseInt.js +2 -2
- package/src/parts/ParseMemory/ParseMemory.js +9 -10
- package/src/parts/ParsePsOutput/ParsePsOutput.js +42 -46
- package/src/parts/ParseRipGrepLines/ParseRipGrepLines.js +9 -10
- package/src/parts/ParseUrlGithub/ParseUrlGithub.js +49 -51
- package/src/parts/Path/Path.js +11 -16
- package/src/parts/Performance/Performance.ipc.js +4 -6
- package/src/parts/Performance/Performance.js +16 -27
- package/src/parts/Platform/Platform.ipc.js +28 -30
- package/src/parts/Platform/Platform.js +46 -73
- package/src/parts/PlatformPaths/PlatformPaths.ipc.js +21 -23
- package/src/parts/PlatformPaths/PlatformPaths.js +79 -114
- package/src/parts/Preferences/Preferences.ipc.js +4 -6
- package/src/parts/Preferences/Preferences.js +69 -70
- package/src/parts/PrettyError/PrettyError.js +1 -1
- package/src/parts/PrintPrettyError/PrintPrettyError.js +3 -4
- package/src/parts/Process/Process.ipc.js +10 -12
- package/src/parts/Process/Process.js +35 -48
- package/src/parts/ProcessDisplayName/ProcessDisplayName.js +1 -1
- package/src/parts/ProcessExitEventType/ProcessExitEventType.js +2 -2
- package/src/parts/ProcessId/ProcessId.ipc.js +5 -7
- package/src/parts/ProcessId/ProcessId.js +4 -5
- package/src/parts/ProcessListeners/ProcessListeners.js +11 -14
- package/src/parts/Promises/Promises.js +18 -18
- package/src/parts/ProtocolType/ProtocolType.js +4 -4
- package/src/parts/PtyHost/PtyHost.js +55 -62
- package/src/parts/PtyHostPath/PtyHostPath.js +10 -10
- package/src/parts/PtyHostState/PtyHostState.js +16 -16
- package/src/parts/Queue/Queue.js +30 -31
- package/src/parts/RebuildForElectron/RebuildForElectron.js +14 -14
- package/src/parts/RebuildForNode/RebuildForNode.js +12 -12
- package/src/parts/RebuildNodePty/RebuildNodePty.ipc.js +4 -6
- package/src/parts/RebuildNodePty/RebuildNodePty.js +20 -22
- package/src/parts/RecentlyOpened/RecentlyOpened.ipc.js +4 -6
- package/src/parts/RecentlyOpened/RecentlyOpened.js +54 -53
- package/src/parts/RemoveSymlink/RemoveSymlink.js +11 -11
- package/src/parts/RequiresSocket/RequiresSocket.js +14 -15
- package/src/parts/Restart/Restart.js +9 -10
- package/src/parts/RipGrep/RipGrep.js +35 -37
- package/src/parts/RipGrepParsedLineType/RipGrepParsedLineType.js +4 -4
- package/src/parts/RipGrepPath/RipGrepPath.js +1 -1
- package/src/parts/Root/Root.js +4 -6
- package/src/parts/Screen/Screen.ipc.js +6 -8
- package/src/parts/Screen/Screen.js +7 -10
- package/src/parts/SearchFile/SearchFile.ipc.js +4 -6
- package/src/parts/SearchFile/SearchFile.js +26 -27
- package/src/parts/SetHeaders/SetHeaders.js +4 -4
- package/src/parts/ShouldLogError/ShouldLogError.js +6 -7
- package/src/parts/ShouldTranspileTypescript/ShouldTranspileTypescript.js +10 -11
- package/src/parts/Signal/Signal.js +3 -3
- package/src/parts/SplitLines/SplitLines.js +3 -4
- package/src/parts/SymLink/SymLink.js +3 -4
- package/src/parts/TemporaryMessagePort/TemporaryMessagePort.ipc.js +4 -6
- package/src/parts/TemporaryMessagePort/TemporaryMessagePort.js +18 -21
- package/src/parts/Terminal/Terminal.ipc.js +7 -9
- package/src/parts/Terminal/Terminal.js +68 -73
- package/src/parts/TerminalState/TerminalState.js +8 -11
- package/src/parts/TextDocument/TextDocument.ipc.js +3 -4
- package/src/parts/TextDocument/TextDocument.js +17 -22
- package/src/parts/TextSearch/TextSearch.ipc.js +4 -6
- package/src/parts/TextSearch/TextSearch.js +18 -22
- package/src/parts/TextSearchError/TextSearchError.js +12 -12
- package/src/parts/TextSearchResultType/TextSearchResultType.js +2 -2
- package/src/parts/Timeout/Timeout.js +4 -5
- package/src/parts/TmpFile/TmpFile.js +11 -13
- package/src/parts/ToAbsolutePaths/ToAbsolutePaths.js +7 -8
- package/src/parts/ToTextSearchResult/ToTextSearchResult.js +23 -24
- package/src/parts/Trace/Trace.js +10 -14
- package/src/parts/TranspileTypeScript/TranspileTypeScript.js +19 -19
- package/src/parts/Trash/Trash.js +15 -16
- package/src/parts/TrashElectron/TrashElectron.js +7 -8
- package/src/parts/TrashNode/TrashNode.js +3 -4
- package/src/parts/UpdateState/UpdateState.js +7 -10
- package/src/parts/UpdateStateType/UpdateStateType.js +9 -9
- package/src/parts/VError/VError.js +1 -1
- package/src/parts/WaitForProcessToExit/WaitForProcessToExit.js +7 -8
- package/src/parts/WebSocketServer/WebSocketServer.ipc.js +4 -6
- package/src/parts/WebSocketServer/WebSocketServer.js +1 -1
- package/src/parts/WindowsProcessTree/WindowsProcessTree.js +12 -14
- package/src/parts/WindowsProcessTreeDataFlag/WindowsProcessTreeDataFlag.js +3 -3
- package/src/parts/Workspace/Workspace.ipc.js +5 -7
- package/src/parts/Workspace/Workspace.js +79 -84
- package/src/parts/WorkspaceSource/WorkspaceSource.js +2 -2
- package/src/sharedProcessMain.js +2 -3
- package/src/parts/ChromeExtension/ChromeExtension.ipc.js +0 -8
- package/src/parts/ChromeExtension/ChromeExtension.js +0 -46
- package/src/parts/ExtractZip/ExtractZip.js +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.11",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "^1.2.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.25.
|
|
22
|
-
"@lvce-editor/ipc": "^3.
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.25.11",
|
|
22
|
+
"@lvce-editor/ipc": "^3.7.1",
|
|
23
23
|
"@lvce-editor/json-rpc": "^1.3.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "^1.2.0",
|
|
25
25
|
"@lvce-editor/pretty-error": "^1.5.0",
|
|
26
|
-
"@lvce-editor/pty-host": "0.25.
|
|
26
|
+
"@lvce-editor/pty-host": "0.25.11",
|
|
27
27
|
"@lvce-editor/verror": "^1.2.0",
|
|
28
28
|
"@lvce-editor/web-socket-server": "^1.1.0",
|
|
29
29
|
"debug": "^4.3.4",
|
|
30
30
|
"execa": "^8.0.1",
|
|
31
31
|
"exit-hook": "^4.0.0",
|
|
32
|
-
"got": "^
|
|
32
|
+
"got": "^14.2.1",
|
|
33
33
|
"is-object": "^1.0.2",
|
|
34
34
|
"p-queue": "^8.0.1",
|
|
35
35
|
"tar-fs": "^3.0.5",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
39
|
"@lvce-editor/ripgrep": "^1.0.2",
|
|
40
|
-
"extract-zip": "^2.0.1",
|
|
41
40
|
"open": "^10.1.0",
|
|
42
41
|
"tail": "^2.2.6",
|
|
43
42
|
"tmp-promise": "^3.0.3",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as GetAccurateMemoryUsage from '../GetAccurateMemoryUsage/GetAccurateMemoryUsage.js'
|
|
2
|
-
|
|
1
|
+
import * as GetAccurateMemoryUsage from '../GetAccurateMemoryUsage/GetAccurateMemoryUsage.js';
|
|
3
2
|
export const addAccurateMemoryUsage = async (process) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
const accurateMemoryUsage = await GetAccurateMemoryUsage.getAccurateMemoryUsage(process.pid);
|
|
4
|
+
return {
|
|
5
|
+
...process,
|
|
6
|
+
memory: accurateMemoryUsage,
|
|
7
|
+
};
|
|
8
|
+
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import * as DefaultUrl from '../DefaultUrl/DefaultUrl.js'
|
|
2
|
-
import * as GetAppWindowOptions from '../GetAppWindowOptions/GetAppWindowOptions.js'
|
|
3
|
-
import * as GetTitleBarItems from '../GetTitleBarItems/GetTitleBarItems.js'
|
|
4
|
-
import * as ParentIpc from '../ParentIpc/ParentIpc.js'
|
|
5
|
-
import * as Preferences from '../Preferences/Preferences.js'
|
|
6
|
-
import * as Screen from '../Screen/Screen.js'
|
|
7
|
-
|
|
1
|
+
import * as DefaultUrl from '../DefaultUrl/DefaultUrl.js';
|
|
2
|
+
import * as GetAppWindowOptions from '../GetAppWindowOptions/GetAppWindowOptions.js';
|
|
3
|
+
import * as GetTitleBarItems from '../GetTitleBarItems/GetTitleBarItems.js';
|
|
4
|
+
import * as ParentIpc from '../ParentIpc/ParentIpc.js';
|
|
5
|
+
import * as Preferences from '../Preferences/Preferences.js';
|
|
6
|
+
import * as Screen from '../Screen/Screen.js';
|
|
8
7
|
export const createAppWindow = async (preferences, parsedArgs, workingDirectory, url = DefaultUrl.defaultUrl) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
8
|
+
const { width, height } = await Screen.getBounds();
|
|
9
|
+
const windowOptions = GetAppWindowOptions.getAppWindowOptions(preferences, width, height);
|
|
10
|
+
const titleBarItems = GetTitleBarItems.getTitleBarItems();
|
|
11
|
+
return ParentIpc.invoke('AppWindow.createAppWindow', windowOptions, parsedArgs, workingDirectory, titleBarItems, url);
|
|
12
|
+
};
|
|
15
13
|
export const openNew = async (url) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
14
|
+
const preferences = await Preferences.getAll();
|
|
15
|
+
return createAppWindow(preferences, [], '', url);
|
|
16
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as FileSystem from '../FileSystem/FileSystem.js'
|
|
2
|
-
import * as BulkReplacementContent from '../BulkReplacementContent/BulkReplacementContent.js'
|
|
3
|
-
|
|
1
|
+
import * as FileSystem from '../FileSystem/FileSystem.js';
|
|
2
|
+
import * as BulkReplacementContent from '../BulkReplacementContent/BulkReplacementContent.js';
|
|
4
3
|
export const applyEdit = async (path, ranges, replacement) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
const content = await FileSystem.readFile(path);
|
|
5
|
+
const newContent = BulkReplacementContent.getNewContent(content, ranges, replacement);
|
|
6
|
+
await FileSystem.writeFile(path, newContent);
|
|
7
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@lvce-editor/assert'
|
|
1
|
+
export * from '@lvce-editor/assert';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as AttachDebugger from './AttachDebugger.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'AttachDebugger'
|
|
4
|
-
|
|
1
|
+
import * as AttachDebugger from './AttachDebugger.js';
|
|
2
|
+
export const name = 'AttachDebugger';
|
|
5
3
|
export const Commands = {
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
attachDebugger: AttachDebugger.attachDebugger,
|
|
5
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as Process from '../Process/Process.js'
|
|
2
|
-
import * as Signal from '../Signal/Signal.js'
|
|
3
|
-
|
|
1
|
+
import * as Process from '../Process/Process.js';
|
|
2
|
+
import * as Signal from '../Signal/Signal.js';
|
|
4
3
|
export const attachDebugger = (pid) => {
|
|
5
|
-
|
|
6
|
-
}
|
|
4
|
+
Process.kill(pid, Signal.SIGUSR1);
|
|
5
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Authority = '-'
|
|
1
|
+
export const Authority = '-';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const AppImage = 'AppImage'
|
|
2
|
-
export const Deb = 'Deb'
|
|
3
|
-
export const None = 'None'
|
|
4
|
-
export const WindowsNsis = 'WindowsNsis'
|
|
1
|
+
export const AppImage = 'AppImage';
|
|
2
|
+
export const Deb = 'Deb';
|
|
3
|
+
export const None = 'None';
|
|
4
|
+
export const WindowsNsis = 'WindowsNsis';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as AutoUpdater from './AutoUpdater.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'AutoUpdater'
|
|
4
|
-
|
|
1
|
+
import * as AutoUpdater from './AutoUpdater.js';
|
|
2
|
+
export const name = 'AutoUpdater';
|
|
5
3
|
export const Commands = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
getAutoUpdateType: AutoUpdater.getAutoUpdateType,
|
|
5
|
+
getLatestVersion: AutoUpdater.getLatestVersion,
|
|
6
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import * as AutoUpdateType from '../AutoUpdateType/AutoUpdateType.js'
|
|
2
|
-
import * as CompareVersion from '../CompareVersion/CompareVersion.js'
|
|
3
|
-
import * as GetLatestReleaseVersion from '../GetLatestReleaseVersion/GetLatestReleaseVersion.js'
|
|
4
|
-
import * as IsAppImage from '../IsAppImage/IsAppImage.js'
|
|
5
|
-
import * as Platform from '../Platform/Platform.js'
|
|
6
|
-
import { VError } from '../VError/VError.js'
|
|
7
|
-
|
|
1
|
+
import * as AutoUpdateType from '../AutoUpdateType/AutoUpdateType.js';
|
|
2
|
+
import * as CompareVersion from '../CompareVersion/CompareVersion.js';
|
|
3
|
+
import * as GetLatestReleaseVersion from '../GetLatestReleaseVersion/GetLatestReleaseVersion.js';
|
|
4
|
+
import * as IsAppImage from '../IsAppImage/IsAppImage.js';
|
|
5
|
+
import * as Platform from '../Platform/Platform.js';
|
|
6
|
+
import { VError } from '../VError/VError.js';
|
|
8
7
|
export const getAutoUpdateType = async () => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
try {
|
|
9
|
+
if (Platform.isDeb) {
|
|
10
|
+
return AutoUpdateType.Deb;
|
|
11
|
+
}
|
|
12
|
+
if (Platform.isWindows) {
|
|
13
|
+
return AutoUpdateType.WindowsNsis;
|
|
14
|
+
}
|
|
15
|
+
if (IsAppImage.isAppImage()) {
|
|
16
|
+
return AutoUpdateType.AppImage;
|
|
17
|
+
}
|
|
18
|
+
return AutoUpdateType.None;
|
|
12
19
|
}
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new VError(error, `Failed to get auto update type`);
|
|
15
22
|
}
|
|
16
|
-
|
|
17
|
-
return AutoUpdateType.AppImage
|
|
18
|
-
}
|
|
19
|
-
return AutoUpdateType.None
|
|
20
|
-
} catch (error) {
|
|
21
|
-
throw new VError(error, `Failed to get auto update type`)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
23
|
+
};
|
|
25
24
|
export const getLatestVersion = async () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
const repository = Platform.getRepository();
|
|
26
|
+
const version = await GetLatestReleaseVersion.getLatestReleaseVersion(repository);
|
|
27
|
+
const currentVersion = Platform.version;
|
|
28
|
+
if (CompareVersion.isGreater(version, currentVersion)) {
|
|
29
|
+
return {
|
|
30
|
+
version,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
console.log('not update is available');
|
|
32
35
|
}
|
|
33
|
-
|
|
34
|
-
console.log('not update is available')
|
|
35
|
-
}
|
|
36
|
-
}
|
|
36
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as AutoUpdaterAppImage from './AutoUpdaterAppImage.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'AutoUpdaterAppImage'
|
|
4
|
-
|
|
1
|
+
import * as AutoUpdaterAppImage from './AutoUpdaterAppImage.js';
|
|
2
|
+
export const name = 'AutoUpdaterAppImage';
|
|
5
3
|
export const Commands = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
downloadUpdate: AutoUpdaterAppImage.downloadUpdate,
|
|
5
|
+
installAndRestart: AutoUpdaterAppImage.installAndRestart,
|
|
6
|
+
};
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { rename } from 'node:fs/promises'
|
|
2
|
-
import { tmpdir } from 'node:os'
|
|
3
|
-
import { join } from 'node:path'
|
|
4
|
-
import * as Assert from '../Assert/Assert.js'
|
|
5
|
-
import * as Download from '../Download/Download.js'
|
|
6
|
-
import * as GetAppImageDownloadUrl from '../GetAppImageDownloadUrl/GetAppImageDownloadUrl.js'
|
|
7
|
-
import * as GetAppImagePath from '../GetAppImagePath/GetAppImagePath.js'
|
|
8
|
-
import * as MakeExecutable from '../MakeExecutable/MakeExecutable.js'
|
|
9
|
-
import * as Platform from '../Platform/Platform.js'
|
|
10
|
-
import * as Restart from '../Restart/Restart.js'
|
|
11
|
-
import { VError } from '../VError/VError.js'
|
|
12
|
-
|
|
1
|
+
import { rename } from 'node:fs/promises';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import * as Assert from '../Assert/Assert.js';
|
|
5
|
+
import * as Download from '../Download/Download.js';
|
|
6
|
+
import * as GetAppImageDownloadUrl from '../GetAppImageDownloadUrl/GetAppImageDownloadUrl.js';
|
|
7
|
+
import * as GetAppImagePath from '../GetAppImagePath/GetAppImagePath.js';
|
|
8
|
+
import * as MakeExecutable from '../MakeExecutable/MakeExecutable.js';
|
|
9
|
+
import * as Platform from '../Platform/Platform.js';
|
|
10
|
+
import * as Restart from '../Restart/Restart.js';
|
|
11
|
+
import { VError } from '../VError/VError.js';
|
|
13
12
|
const getOutfilePath = (version) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
13
|
+
Assert.string(version);
|
|
14
|
+
const outFile = join(tmpdir(), `appimage-${version}`);
|
|
15
|
+
return outFile;
|
|
16
|
+
};
|
|
19
17
|
export const downloadUpdate = async (version) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
18
|
+
try {
|
|
19
|
+
Assert.string(version);
|
|
20
|
+
const repository = Platform.getRepository();
|
|
21
|
+
const appImageName = Platform.getAppImageName();
|
|
22
|
+
const downLoadUrl = GetAppImageDownloadUrl.getDownloadUrl(repository, version, appImageName);
|
|
23
|
+
const outFile = getOutfilePath(version);
|
|
24
|
+
await Download.download(downLoadUrl, outFile);
|
|
25
|
+
return outFile;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw new VError(error, `Failed to download new version ${version}`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
33
31
|
const installNewAppImage = async (currentAppImageFile, downloadPath) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
32
|
+
try {
|
|
33
|
+
await rename(downloadPath, currentAppImageFile);
|
|
34
|
+
return currentAppImageFile;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
throw new VError(error, `Failed to rename AppImage file`);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
42
40
|
export const installAndRestart = async (downloadPath) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
try {
|
|
42
|
+
Assert.string(downloadPath);
|
|
43
|
+
const currentAppImageFile = GetAppImagePath.getAppImagePath();
|
|
44
|
+
if (!currentAppImageFile) {
|
|
45
|
+
throw new Error(`AppImage path not found`);
|
|
46
|
+
}
|
|
47
|
+
await MakeExecutable.makeExecutable(downloadPath);
|
|
48
|
+
const installedPath = await installNewAppImage(currentAppImageFile, downloadPath);
|
|
49
|
+
await Restart.restart(installedPath);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
throw new VError(error, `Failed to install AppImage update`);
|
|
48
53
|
}
|
|
49
|
-
|
|
50
|
-
const installedPath = await installNewAppImage(currentAppImageFile, downloadPath)
|
|
51
|
-
await Restart.restart(installedPath)
|
|
52
|
-
} catch (error) {
|
|
53
|
-
throw new VError(error, `Failed to install AppImage update`)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
54
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as AutoUpdaterWindowsNsis from './AutoUpdaterWindowsNsis.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'AutoUpdaterWindowsNsis'
|
|
4
|
-
|
|
1
|
+
import * as AutoUpdaterWindowsNsis from './AutoUpdaterWindowsNsis.js';
|
|
2
|
+
export const name = 'AutoUpdaterWindowsNsis';
|
|
5
3
|
export const Commands = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
downloadUpdate: AutoUpdaterWindowsNsis.downloadUpdate,
|
|
5
|
+
installAndRestart: AutoUpdaterWindowsNsis.installAndRestart,
|
|
6
|
+
};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { spawn } from 'node:child_process'
|
|
2
|
-
import * as Assert from '../Assert/Assert.js'
|
|
3
|
-
import * as Download from '../Download/Download.js'
|
|
4
|
-
import * as FirstNodeWorkerEventType from '../FirstNodeWorkerEventType/FirstNodeWorkerEventType.js'
|
|
5
|
-
import * as GetFirstSpawnedProcessEvent from '../GetFirstSpawnedProcessEvent/GetFirstSpawnedProcessEvent.js'
|
|
6
|
-
import * as GetNsisUpdateArgs from '../GetNsisUpdateArgs/GetNsisUpdateArgs.js'
|
|
7
|
-
import * as GetNsisDownloadPath from '../GetNsisUpdateDownloadPath/GetNsisUpdateDownloadPath.js'
|
|
8
|
-
import * as GetWindowsNsisDownloadUrl from '../GetWindowsNsisDownloadUrl/GetWindowsNsisDownloadUrl.js'
|
|
9
|
-
import * as Logger from '../Logger/Logger.js'
|
|
10
|
-
import * as Platform from '../Platform/Platform.js'
|
|
11
|
-
import * as UpdateState from '../UpdateState/UpdateState.js'
|
|
12
|
-
import * as UpdateStateType from '../UpdateStateType/UpdateStateType.js'
|
|
13
|
-
import { VError } from '../VError/VError.js'
|
|
14
|
-
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import * as Assert from '../Assert/Assert.js';
|
|
3
|
+
import * as Download from '../Download/Download.js';
|
|
4
|
+
import * as FirstNodeWorkerEventType from '../FirstNodeWorkerEventType/FirstNodeWorkerEventType.js';
|
|
5
|
+
import * as GetFirstSpawnedProcessEvent from '../GetFirstSpawnedProcessEvent/GetFirstSpawnedProcessEvent.js';
|
|
6
|
+
import * as GetNsisUpdateArgs from '../GetNsisUpdateArgs/GetNsisUpdateArgs.js';
|
|
7
|
+
import * as GetNsisDownloadPath from '../GetNsisUpdateDownloadPath/GetNsisUpdateDownloadPath.js';
|
|
8
|
+
import * as GetWindowsNsisDownloadUrl from '../GetWindowsNsisDownloadUrl/GetWindowsNsisDownloadUrl.js';
|
|
9
|
+
import * as Logger from '../Logger/Logger.js';
|
|
10
|
+
import * as Platform from '../Platform/Platform.js';
|
|
11
|
+
import * as UpdateState from '../UpdateState/UpdateState.js';
|
|
12
|
+
import * as UpdateStateType from '../UpdateStateType/UpdateStateType.js';
|
|
13
|
+
import { VError } from '../VError/VError.js';
|
|
15
14
|
// TODO make it possible to cancel downloading updates
|
|
16
15
|
export const downloadUpdate = async (version) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
16
|
+
try {
|
|
17
|
+
Assert.string(version);
|
|
18
|
+
const repository = Platform.getRepository();
|
|
19
|
+
const setupName = Platform.getSetupName();
|
|
20
|
+
const fileName = `${setupName}-v${version}.exe`;
|
|
21
|
+
const downLoadUrl = GetWindowsNsisDownloadUrl.getDownloadUrl(repository, version, fileName);
|
|
22
|
+
const outFile = GetNsisDownloadPath.getNsisUpdateDownloadPath(version);
|
|
23
|
+
Logger.info(`[shared-process] downloading nsis update: ${downLoadUrl} -> ${outFile}`);
|
|
24
|
+
UpdateState.set(UpdateStateType.Downloading);
|
|
25
|
+
await Download.download(downLoadUrl, outFile);
|
|
26
|
+
UpdateState.set(UpdateStateType.Downloaded);
|
|
27
|
+
Logger.info(`[shared-process] downloaded nsis update: ${outFile}`);
|
|
28
|
+
return outFile;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
throw new VError(error, `Failed to download new version ${version}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
35
34
|
export const installAndRestart = async (downloadPath) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
try {
|
|
36
|
+
Assert.string(downloadPath);
|
|
37
|
+
const args = GetNsisUpdateArgs.getNsisUpdateArgs();
|
|
38
|
+
Logger.info(`[shared-process] spawning nsis update: ${downloadPath}`);
|
|
39
|
+
UpdateState.set(UpdateStateType.Updating);
|
|
40
|
+
const child = spawn(downloadPath, args, {
|
|
41
|
+
stdio: 'inherit',
|
|
42
|
+
detached: true,
|
|
43
|
+
});
|
|
44
|
+
const { type, event } = await GetFirstSpawnedProcessEvent.getFirstSpawnedProcessEvent(child);
|
|
45
|
+
if (type === FirstNodeWorkerEventType.Error) {
|
|
46
|
+
throw new Error(`Child process error: ${event}`);
|
|
47
|
+
}
|
|
48
|
+
Logger.info(`[shared-process] finished nsis update`);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
throw new VError(error, `Failed to install nsis update`);
|
|
48
52
|
}
|
|
49
|
-
|
|
50
|
-
} catch (error) {
|
|
51
|
-
throw new VError(error, `Failed to install nsis update`)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
53
|
+
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as BulkReplacement from './BulkReplacement.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'BulkReplacement'
|
|
4
|
-
|
|
1
|
+
import * as BulkReplacement from './BulkReplacement.js';
|
|
2
|
+
export const name = 'BulkReplacement';
|
|
5
3
|
export const Commands = {
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
applyBulkReplacement: BulkReplacement.applyBulkReplacement,
|
|
5
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as ApplyEdit from '../ApplyEdit/ApplyEdit.js'
|
|
2
|
-
import { VError } from '../VError/VError.js'
|
|
3
|
-
|
|
1
|
+
import * as ApplyEdit from '../ApplyEdit/ApplyEdit.js';
|
|
2
|
+
import { VError } from '../VError/VError.js';
|
|
4
3
|
export const applyBulkReplacement = async (files, ranges, replacement) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
try {
|
|
5
|
+
let rangeIndex = 0;
|
|
6
|
+
for (const file of files) {
|
|
7
|
+
const rangeLength = ranges[rangeIndex];
|
|
8
|
+
const rangeStartIndex = rangeIndex + 1;
|
|
9
|
+
const rangeEndIndex = rangeStartIndex + rangeLength;
|
|
10
|
+
const fileRanges = ranges.slice(rangeStartIndex, rangeEndIndex);
|
|
11
|
+
await ApplyEdit.applyEdit(file, fileRanges, replacement);
|
|
12
|
+
rangeIndex = rangeEndIndex;
|
|
13
|
+
}
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new VError(error, `Bulk replacement failed`);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import * as GetNewLineIndex from '../GetNewLineIndex/GetNewLineIndex.js'
|
|
2
|
-
|
|
1
|
+
import * as GetNewLineIndex from '../GetNewLineIndex/GetNewLineIndex.js';
|
|
3
2
|
export const getNewContent = (content, ranges, replacement) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
let rowIndex = 0
|
|
8
|
-
let newLineIndex = -1
|
|
9
|
-
let copiedContentIndex = 0
|
|
10
|
-
let newContent = ''
|
|
11
|
-
let previousNewLineIndex = -1
|
|
12
|
-
for (let i = 0; i < ranges.length; i += 4) {
|
|
13
|
-
while (rowIndex < ranges[i]) {
|
|
14
|
-
previousNewLineIndex = newLineIndex
|
|
15
|
-
newLineIndex = GetNewLineIndex.getNewLineIndex(content, newLineIndex + 1)
|
|
16
|
-
rowIndex++
|
|
3
|
+
if (ranges.length === 0) {
|
|
4
|
+
return content;
|
|
17
5
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
let rowIndex = 0;
|
|
7
|
+
let newLineIndex = -1;
|
|
8
|
+
let copiedContentIndex = 0;
|
|
9
|
+
let newContent = '';
|
|
10
|
+
let previousNewLineIndex = -1;
|
|
11
|
+
for (let i = 0; i < ranges.length; i += 4) {
|
|
12
|
+
while (rowIndex < ranges[i]) {
|
|
13
|
+
previousNewLineIndex = newLineIndex;
|
|
14
|
+
newLineIndex = GetNewLineIndex.getNewLineIndex(content, newLineIndex + 1);
|
|
15
|
+
rowIndex++;
|
|
16
|
+
}
|
|
17
|
+
const startRowIndex = ranges[i];
|
|
18
|
+
const startColumnIndex = ranges[i + 1];
|
|
19
|
+
const endRowIndex = ranges[i + 2];
|
|
20
|
+
const endColumnIndex = ranges[i + 3];
|
|
21
|
+
if (copiedContentIndex <= newLineIndex) {
|
|
22
|
+
newContent += content.slice(copiedContentIndex, newLineIndex + 1);
|
|
23
|
+
copiedContentIndex = newLineIndex + 1;
|
|
24
|
+
}
|
|
25
|
+
newContent += replacement;
|
|
26
|
+
copiedContentIndex += endColumnIndex - startColumnIndex;
|
|
25
27
|
}
|
|
26
|
-
newContent
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
return newContent
|
|
30
|
-
}
|
|
28
|
+
return newContent;
|
|
29
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const KB = 1024
|
|
2
|
-
export const MB = 1024 ** 2
|
|
3
|
-
export const GB = 1024 ** 3
|
|
4
|
-
export const TB = 1024 ** 4
|
|
1
|
+
export const KB = 1024;
|
|
2
|
+
export const MB = 1024 ** 2;
|
|
3
|
+
export const GB = 1024 ** 3;
|
|
4
|
+
export const TB = 1024 ** 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { resolve } from '@lvce-editor/json-rpc'
|
|
1
|
+
export { resolve } from '@lvce-editor/json-rpc';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export const Backslash = '\\'
|
|
2
|
-
export const Dash = '-'
|
|
3
|
-
export const Dot = '.'
|
|
4
|
-
export const EmptyString = ''
|
|
5
|
-
export const NewLine = '\n'
|
|
6
|
-
export const OpenAngleBracket = '<'
|
|
7
|
-
export const Slash = '/'
|
|
8
|
-
export const Space = ' '
|
|
9
|
-
export const Tab = '\t'
|
|
10
|
-
export const Underline = '_'
|
|
11
|
-
export const T = 't'
|
|
12
|
-
export const SemiColon = ';'
|
|
1
|
+
export const Backslash = '\\';
|
|
2
|
+
export const Dash = '-';
|
|
3
|
+
export const Dot = '.';
|
|
4
|
+
export const EmptyString = '';
|
|
5
|
+
export const NewLine = '\n';
|
|
6
|
+
export const OpenAngleBracket = '<';
|
|
7
|
+
export const Slash = '/';
|
|
8
|
+
export const Space = ' ';
|
|
9
|
+
export const Tab = '\t';
|
|
10
|
+
export const Underline = '_';
|
|
11
|
+
export const T = 't';
|
|
12
|
+
export const SemiColon = ';';
|