diff --git a/install.sh b/install.sh index 1bdd60f..591e0b2 100644 --- a/install.sh +++ b/install.sh @@ -4,6 +4,13 @@ cd || exit mkdir tmp_install cd tmp_install || exit +if [ "$1" == 1 ]; then + curl https://sertifika.meb.gov.tr/MEB_SERTIFIKASI.cer --output MEB_SERTIFIKASI.cer + openssl x509 -inform DER -in MEB_SERTIFIKASI.cer -out MEB_SERTIFIKASI.crt + sudo cp MEB_SERTIFIKASI.crt /usr/local/share/ca-certificates/ + sudo chmod 644 /usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt + sudo update-ca-certificates +fi wget https://github.com/asandikci/iflbot-setup/archive/refs/heads/main.tar.gz tar -xzvf main.tar.gz cd iflbot-setup-main || exit @@ -13,3 +20,7 @@ chmod +x prerequisites.sh chmod +x applications.sh bash .prerequisites.sh bash .applications.sh +cp franneck94.c-cpp-runner-4.1.2 /home/"$USER"/.vscode/extensions/ +cd || exit +rm -r tmp_install +rmdir tmp_install diff --git a/src/franneck94.c-cpp-runner-4.1.2/.github/workflows/codeql-analysis.yml b/src/franneck94.c-cpp-runner-4.1.2/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..77db791 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/.github/workflows/codeql-analysis.yml @@ -0,0 +1,32 @@ +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/src/franneck94.c-cpp-runner-4.1.2/CHANGELOG.md b/src/franneck94.c-cpp-runner-4.1.2/CHANGELOG.md new file mode 100644 index 0000000..41121a4 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/CHANGELOG.md @@ -0,0 +1,469 @@ +# C/C++ Runner Change Log + +## Version 4.1.2: Oct 11, 2022 + +- **Bugfix**: MSVC C++ standard bugfix + +## Version 4.1.1: Oct 04, 2022 + +- **Bugfix**: MSVC c standard bugfix +- **Bugfix**: Added problems output again +- **Info**: MSVC Default C Standard is now C11 + +## Version 4.1.0: Oct 03, 2022 + +- **Info**: Better default value for MSVC, by scanning for installed VS + +## Version 4.0.7: Sep 12, 2022 + +- **Info**: Added check for windows system drive + +## Version 4.0.6: Sep 11, 2022 + +- **Bugfix**: Bug fixes for compiler detection + +## Version 4.0.5: Sep 08, 2022 + +- **Bugfix**: Fixed build error with default include paths + +## Version 4.0.4: Aug 21, 2022 + +- **Bugfix**: On windows gcc, external console for debugging is true +- **Bugfix**: Fixed issue with MIDebuggerPath on Mac with non ARM chip + +## Version 4.0.3: May 24, 2022 + +- **Info**: Updated README +- **Regression**: Removed include paths sync with Microsoft's extension, the user should rather set the include paths settings value of this extension + +## Version 4.0.2: May 23, 2022 + +- **Regression**: Fixed properties <=> settings sync bugs + +## Version 4.0.1: May 22, 2022 + +- **Regression**: Fixed failing msvc compilation with multiple source files +- **Regression**: Fixed properties <=> settings sync bug + +## Version 4.0.0: May 17, 2022 + +- **Info**: Major update about the settings handling. Now, the global (default) settings are used to generate the local .vscode settings files, instead of searching for any compiler installation on your computer. If you do not set an absolute compiler path in the settings, it is expected to have the compiler in the PATH variables (like calling `gcc` in the terminal). +- **Info**: Added boolean flag setting **useMsvc** to indicate if the user wants to use MSVC instead of GCC/Clang in the current workspace. +- **Info**: Clang on windows (backed by MSVC) will also use the MSVC debuggee type +- **Info**: Updated settings.json <=> c_cpp_properties.json sync: + - **Only** Only syncing: C/C++ compiler path, C/C++ standard and include paths + +## Version 3.4.0: May 4, 2022 + +- **Info**: Shortened the msvc commands to have a better overview of the executed command +- **Info**: Added currently known problems list to the README + +## Version 3.3.0: April 14, 2022 + +- **Info**: For debugging the internal console is now used on all operating systems +- **Info**: Removed not working logging + +## Version 3.2.4: March 24, 2022 + +- **Regression**: Fixed MSVC compiling issue + +## Version 3.2.3: March 22, 2022 + +- **Bugfix**: Fixed cmd argument bugs +- **Bugfix**: Fixed double folder entries in folder selection + +## Version 3.2.2: March 6, 2022 + +- **Internal**: Removed task provider +- **Regression**: Fixed CMD arguments bug with whitespaces + +## Version 3.2.1: March 5, 2022 + +- **Regression**: Fixed problem with whitespaces in workspace dir + +## Version 3.2.0: March 5, 2022 + +- **Info**: Now using relative paths for building the binary, hence the console output is shortened and more readable +- **Bugfix**: Hotfix since the extension was not working anymore with VSCode 1.65.0 + +## Version 3.1.1: January 31, 2022 + +- **Info**: Updated MSVC instructions + +## Version 3.1.0: January 19, 20212 + +- **Info**: Removed Makefile deactivation +- **Info**: Updated README + +## Version 3.0.0: December 31, 2021 + +- **Feature**: MSVC Compiler Support + - Add Compiler Commands + - Add Setting for MSVC Batch Path + - E.g.: "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" + - MSVC Host/Target architecture is equal to current architecture + - Added debug config for MSVC + - Default warning level for MSVC is **/W4**, this will be set if MSVC "mode" is active + - Default C version is c17 for MSVC +- **Info**: Removed warnings from compiler args in c_cpp_properties.json +- **Feature**: Updated logic for exclude pattern for folder selection +- **Feature**: Added Include pattern for folder selection + +## Version 2.1.1: December 21, 2021 + +- **Bugfix**: Now passing linker args after the object files + +## Version 2.1.0: December 07, 2021 + +- **Info**: Load global *C_Cpp.default.includePath* setting for the extensions *includePaths* +- **Bugfix**: Opening a project for the first time with the C/C++ Runner extension and an already existing c_cpp_properties.json file, the compiler args are now correctly read-in. + +## Version 2.0.5: November 29, 2021 + +- **Info**: Updated README +- **Info**: Now using the internal console for debugging on Mac M1 +- **Bugfix**: Command-line arguments are now stored in a single line in launch.json's args array, thus whitespaces in the arguments are handled correctly + +## Version 2.0.4: November 23, 2021 + +- **Info**: On windows, the paths in the launch.json file are now stored with "/" instead of "\\" +- **Info**: On windows, the commands are now always launched in an extra CMD instance + +## Version 2.0.3: November 22, 2021 + +- **Regression Bugfix**: Fixed issue with cmd arguments + +## Version 2.0.2: November 22, 2021 + +- **Bugfix**: Fixed issue for ARM64 Mac user + +## Version 2.0.1: November 17, 2021 + +- **Regression Bugfix**: Fixed issue for handling whitespaces in paths + +## Version 2.0.0: November 16, 2021 + +- **Info**: Makefile is not used anymore and hence it is no dependency, instead all commands are directly executed with VSCode's task API +- **Info**: Added C++23 Standard to **C_Cpp_Runner.cppStandard** setting +- **Improvement**: Added shortcut for active folder selection **ctrl+alt+f** +- **Improvement**: Added shortcut for build mode selection **ctrl+alt+g** +- **Info**: Added **vadimcn.vscode-lldb** as an extension dependency since this will be used for debugging on Mac with M1 chip +- **Info**: Updated debug target on MacOS with an ARM chip + +## Version 1.5.5: November 12, 2021 + +- **Info**: For Windows users, the paths to the compiler tools are now stored with single slashed "/" instead of double backslashes "\\\\" due to issues with the properties handler of Microsoft's C/C++ extension + +## Version 1.5.4: November 10, 2021 + +- **Bugfix**: Bugfix for settings detection based on c_cpp_properties.json file when there is no local settings.json file present + +## Version 1.5.3: November 09, 2021 + +- **Bugfix**: For a single file task the Compiler, Linker, and Include args are now correctly handled + +## Version 1.5.2: October 28, 2021 + +- **Bugfix**: For a single file task the command line arguments are now passed into the executable call +- **Bugfix**: For single-file tasks, the active folder is now updated + +## Version 1.5.1: October 28, 2021 + +- **Bugfix**: Fixed bug where single file tasks can't be executed when no active folder was selected + +## Version 1.5.0: October 27, 2021 + +- **Improvement**: If the workspace is opened with an existing c_cpp_properties file but no settings.json file, the settings from the properties file are now used for initialization +- **Info**: For Windows users with one of the following conditions, the experimental setting (compiling without Makefile) is now the standard due to several issues in the past: + - MinGW (e.g. MSYS2) users + - Space in the username + - Any space in the filenames of the active folder +- **Info**: Toggle extension keybind command is changed from **ctrl+alt+r** to **ctrl+alt+t** +- **Info**: Commandline arguments keybind command is changed from **ctrl+shift+a** to **ctrl+alt+a** +- **Improvement**: Added following commands for single C/C++ files: + - Build single file (**ctrl+alt+b**) - **b** for build + - Run single file (**ctrl+alt+r**) - **r** for run + - Debug single file (**ctrl+alt+d**) - **d** for debug + +## Version 1.4.2: October 25, 2021 + +- **Info**: Set mac launch config to console andf stopAtEntry. + +## Version 1.4.1: September 20, 2021 + +- **Bugfix**: Fixed big for deactivation event with Makefile projects. + +## Version 1.4.0: September 18, 2021 + +- **Improvement**: Updated activation/deactivation logic with the previously called keybinding *toggle status bar* which is now called *toggleExtensionState*. By this command, you can de-/activate the extension for the current workspace. If the extension is deactivated, the setting/properties/launch files won't be re-created on delete. +- **Improvement**: In a workspace with multiple sub-directories, and hence the active folder is not selected on start-up, the settings and properties files are created once the active folder is selected. This speeds up the start-up time for vscode with this extension activated and makes no difference in the usage of this extension. +- **Improvement**: Added command to reset local settings and properties file +- **Bugfix**: Fixed issue for Windows PowerShell users with the experimental setting. Now the CMD is also used to execute the tasks even if the PowerShell is the default terminal. + +## Version 1.3.0: August 28, 2021 + +- **Improvement**: Update gcc/clang search logic, to only search in */usr/* and */usr/bin/* on Linux, and only in paths containing Cygwin, mingw, or msys on windows +- **Improvement**: If the build path contains whitespaces or non-extended ASCII chars the extension's experimental code runner is used instead of Makefile +- **Bugfix**: Fixed using incorrect compiler path in the experimental setting + +## Version 1.2.0: August 25, 2021 + +- **Feature**: Added pretty print for gdb in debug (launch) configuration + +## Version 1.1.5: August 16, 2021 + +- **Bugfix**: Fixed problem with empty arguments for executing the binary on windows with mingw compiler + +## Version 1.1.4: August 15, 2021 + +- **Bugfix**: Fixed problem with Linker Args +- **Info**: Updated README + +## Version 1.1.3: July 27, 2021 + +- **Bugfix**: Fixed problem with Makefile in .vscode folder (regarding my Udemy Courses setup) + +## Version 1.1.2: July 26, 2021 + +- **Bugfix**: Updated run task for windows such that the executable name has .exe file extension since this is needed for MinGW +- **Bugfix**: Fixed bug that debugging the release build was not possible + +## Version 1.1.1: July 26, 2021 + +- **Improvement**: Creating and deleting the build folder is now executed by the extension code and not anymore by the Makefile + +## Version 1.1.0: July 24, 2021 + +- **Feature**: Added experimental setting to run compiler commands without Makefile + +## Version 1.0.2: July 9, 2021 + +- **Bugfix**: Fixed bug for compiler search on Linux and Mac + +## Version 1.0.1: July 4, 2021 + +- **Info**: Added information message if a path has whitespaces. Makefile can not work with paths/filenames with whitespaces properly. + +## Version 1.0.0: July 3, 2021 + +- **Improvement**: Following settings are now array of strings instead of strings: + - `C_Cpp_runner.warnings` + - `C_Cpp_runner.includePaths` + - `C_Cpp_runner.compilerArgs` + - `C_Cpp_runner.linkerArgs` + +So for example previously we used: + +```json +{ + "C_Cpp_Runner.warnings": "-Wall -Wextra -Wpedantic" +} +``` + +This would now be: + +```json +{ + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic" + ] +} +``` + +- All settings are now stored in the local `.vscode/settings.json` file + +## Version 0.17.1: June 16, 2021 + +- **Bugfix**: Bugfix for passing multiple include paths + +## Version 0.17.0: June 13, 2021 + +- **Improvement**: Added option for glob patterns to exclude from the selected folder search +- **Bugfix**: Bugfix for configuration triplet + +## Version 0.16.2: June 12, 2021 + +- **Bugfix**: Bugfix for configuration triplet + +## Version 0.16.1: June 12, 2021 + +- **Bugfix**: Several bug fixes for Linux/mac + +## Version 0.16.0: June 12, 2021 + +- **Improvement**: Updating c_cpp_properties.json and launch.json do trigger an update for settings.json. Hence, the user can edit any of these files and all other files are updated accordingly. +- **Improvement**: Updated compiler search on windows, to speed up the process. +- **Info**: Added some unit tests. Will be extended in the future. +- **Bugfix**: Several bug fixes + +## Version 0.15.0: June 7, 2021 + +- **Info**: If settings/properties were configured e.g. windows and the project is opened in for example Linux, the commands (compiler, etc.) are searched again and stored in the settings.json/c_cpp_properties.json file +- **Bugfix**: Fixed extension crash + +## Version 0.14.2: June 3, 2021 + +- **Info**: When using cygwin64 the intellisense triplet is changed to "Linux" due to the following [issue](https://github.com/microsoft/vscode-cpptools/issues/7637). + +## Version 0.14.1: June 1, 2021 + +- **Bugfix**: Fixed crash when no compiler was found +- **Info**: Do not list folders in the selection that contain '__' (2 underscores) +- **Info**: Do not list folders that are named 'build' (equality check) +- **Info**: Added x64 as default architecture + +## Version 0.14.0: May 26, 2021 + +- **Feature**: Added option to pass arguments to the binary for running and debugging. Users can set the arguments by the new keybinding `ctrl+shift+a`. +- **Bugfix**: Fixed bug for shortened folder path in the status bar. +- **Important Info**: Removed `ctrl+rshift+r` keybinding for the tasks dropdown menu. If the user does not want to use the status bar items, the commands can be executed from the command palette. +- **Info**: Removed extension activation "onDebugResolve:c/cpp" since the debugging is not triggered by the user anyway. +- **Info**: Removed extension activation "workspaceContains:.vscode/c_cpp_properties.json" since this may result in extension activations where the user does not intend to use c/cpp code. + +## Version 0.13.0: May 19, 2021 + +- **Improvement**: Selected folder path is shortened in the status bar. +- **Improvement**: Remove x86/x64 architecture from build mode. The user should rather select an appropriate x86 or x64 compiler in the settings. +- **Improvement**: The default c and cpp standard is now the compiler's default. +- **Improvement**: Improved lookup performance for installed software. + +## Version 0.12.1: May 10, 2021 + +- **Bugfix**: Fixed naming "C_cpp_Properties.json" to "c_cpp_properties.json". + +## Version 0.12.0: May 09, 2021 + +- **Info**: Extension does not show up if a Makefile is present in the root directory of the workspace or inside the .vscode folder of the workspace. + +## Version 0.11.0: May 04, 2021 + +- **Improvement**: The settings are now read/saved correctly in a use case with multiple workspaces. +A multi-workspace setting is now fully compatible with the extension. +- **Bugfix**: External console is now set to false for Mac due to debugging issues. +- **Bugfix**: In a multi-root workspace use case the cmake detection is now working properly. + +## Version 0.10.0: April 26, 2021 + +- **Info**: Updated display logic of status bar items. For more info see the [here](https://github.com/franneck94/vscode-c-cpp-runner/blob/HEAD/README.md) +- **Info**: Added logging entries +- **Info**: Updated project structure + +## Version 0.9.1: April 23, 2021 + +- **Bugfix**: Major bugfix of tasks were not working + +## Version 0.9.0: April 23, 2021 + +- **Bugfix**: Makefile issue with Windows/MinGW +- **Info**: Added try/catch clauses to all IO related functions +- **Info**: Added logger to log certain info/errors. Also added the setting loggingActive to activate the logger + +## Version 0.8.2: April 19, 2021 + +- **Bugfix**: Set debug console to external for lldb (MacOS) - see: [github issue](https://github.com/microsoft/vscode-cpptools/issues/5079) +- **Bugfix**: Makefile arguments that can hold multiple values are now passed with "" instead of '' +- **Bugfix**: In a multi-root workspace use case, the file watchers were not updated to a new selected workspace (on workspace change) +- **Info**: In a multi-root workspace use case, the extension's settings are stored in the '.code-workspace' file + +## Version 0.8.1: April 14, 2021 + +- **Bugfix**: Commands are now callable if the extension is not activated +- **Bugfix**: Now the correct debug config is used +- **Bugfix**: Removed bug that the debug task was always executed when the selected folder has "debug" in its name +- **Improvement**: Now filtering only the target files on delete events +- **Info**: Toggle status bar command changes to `Ctrl+Alt+R` +- **Info**: Added toggle command description to README + +## Version 0.8.0: April 14, 2021 + +- **Feature**: Added command `Shift+Alt+R` to toggle (hide/show) the status bar items +- **Improvement**: Renamed launch (debug) config to 'C/C++ Runner: Debug Session' +- **Bugfix**: Fixed bug of passing the warnings flags to the Makefile +- **Info**: Folders with a '.' in their name are not displayed in the folder quick pick menu + +## Version 0.7.0: April 12, 2021 + +- **Feature**: Added context menu option to select the folder +- **Feature**: Deactivate extension, if "cmake.sourceDirectory" is set +- **Improvement**: Added events for a selected folder on a name change and delete +- **Bugfix**: Fixed behavior of settings/launch/c_cpp_properties.json files if these were already present without the extension entries +- **Bugfix**: Fixed makefile issue when 'Warnings' is an empty string +- **Info**: Updated C Standard default to c99 +- **Info**: Update README regarding context menu + +## Version 0.6.2: April 11, 2021 + +- **Bugfix**: Fixed file watcher for single root folder use-case +- **Improvement**: Now sorting the folder list by localeCompare ordering +- **Improvement**: Compilers are searched in the PATH just once on extension start and not re-searched after deleting the local settings.json file + +## Version 0.6.1: April 10, 2021 + +- **Bugfix**: Fixed file watcher for single root folder use-case + +## Version 0.6.0: April 9, 2021 + +- **Feature**: Removed extension activation when CMakeLists.txt is present in the root folder of the workspace +- **Feature**: Select the root folder automatically, if this is the only folder in the workspace +- **Bugfix**: Corrected packing with webpack +- **Bugfix**: settings.json is now re-created on delete event +- **Info**: Added Microsoft's C/C++ extension as "extensionDependencies" entry +- **Info**: Updated README for an easier introduction + +## Version 0.5.3: April 5, 2021 + +- **Feature**: Added search for "mingw32-make" for MinGW users +- **Feature**: Updated makefile for Windows users without Cygwin/MSYS installed +- **Info**: Removed Microsoft's C/C++ extension as an "extensionPack" entry, since deactivating/uninstalling this extension would also do so for the Microsoft ones +- **Bugfix**: The extension couldn't start after installing + +## Version 0.5.2: April 5, 2021 + +- **Info**: Added Microsoft's C/C++ extension as "extensionPack" entry + +## Version 0.5.1: April 5, 2021 + +- **Bugfix**: Fixed critical bug of getting the extension's root dir + +## Version 0.5.0: April 4, 2021 + +- **Feature**: Added new buttons to the status bar for: Build, Run, and Debug +- **Feature**: Added a task for debugging to the tasks list (ctrl+shift+r) +- **Bugfix**: If the root directory has code and there is no sub-dir, no dir can be selected +- **Bugfix**: Corrected path to the binary in the launch.json file +- **Feature**: New activation command for extension: .vscode/c_cpp_properties.json is present in workspace + +## Version 0.4.0: April 3, 2021 + +- **Feature**: Added quick pick to select a folder for compiling/running etc. + - After picking a folder a c_cpp_properties.json and launch.json config file is created +- **Feature**: Added status bar item for build and architecture mode (e.g. Debug - x64) + - Architecture mode selection works as follows: + - For 64bit compiler: -m64 compiler argument + - For 32bit compiler: -m32 compiler argument +- **Bugfix**: When deleting the .vscode folder, no \*.json files are created +- **Feature**: Updated task provider behavior: + - Only provide tasks if the user has selected a working directory + - Only run and clean tasks are provided if there is a build folder in the selected working directory +- **Feature**: Output binary with unified name (non-dependent on the C/C++ file name), always called outDebug (.exe for windows) + +## Version 0.3.0: April 1, 2021 + +- **Feature**: Generating a launch.json configuration for the debug build + +## Version 0.2.0: March 31, 2021 + +- **Feature**: If not provided, creating a c_cpp_properties.json file for the C/C++ Microsoft extension +- **Feature**: Added options for the include path, additional compiler, and linker args +- **Feature**: Updated Build/Run/Clean tasks +- **Info**: Now bundling with webpack for improved performance + +## Version 0.1.0: March 29, 2021 + +- **Feature**: Added platform-dependent compiler usage + +## Version 0.0.1: March 23, 2021 + +- **Info**: First alpha Version diff --git a/src/franneck94.c-cpp-runner-4.1.2/LICENSE.txt b/src/franneck94.c-cpp-runner-4.1.2/LICENSE.txt new file mode 100644 index 0000000..2b8216f --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/LICENSE.txt @@ -0,0 +1,21 @@ +Copyright (c) 2021-2022 Jan Schaffranek. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/franneck94.c-cpp-runner-4.1.2/Makefile b/src/franneck94.c-cpp-runner-4.1.2/Makefile new file mode 100644 index 0000000..d1a4b26 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/Makefile @@ -0,0 +1,5 @@ +clean: + rm -rf test/**/.vscode 2> /dev/null + rm -rf test/**/build 2> /dev/null + +.phony: clean diff --git a/src/franneck94.c-cpp-runner-4.1.2/README.md b/src/franneck94.c-cpp-runner-4.1.2/README.md new file mode 100644 index 0000000..69ce15e --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/README.md @@ -0,0 +1,139 @@ +# VSCode C/C++ Runner + +🚀 Compile, run and debug **single** or **multiple** C/C++ files with ease. 🚀 +You do not need to know about any compiler commands. 😎 + +## Example + +![ExampleGif](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/ExecuteTasks.gif?raw=true) + +## Software Requirements + +- 🔧 For C code: Any GCC, Clang or MSVC compiler +- 🔧 For C++ code: Any G++, Clang++ or MSVC compiler + +Make sure that your GCC/Clang compiler is either in your PATH or you have to set the **C/ C++ Compiler Path** setting of this extension. +For the MSVC compiler usage see [here](#Using-the-MSVC-Compiler). + +## Extension Activation Conditions + +- Whenever there is a C/C++ file in the **base** directory of your workspace +- Whenever you open a C/C++ file in your workspace + +## How to use: Compile **all** files in a folder + +1️⃣ Select the folder that contains the C/C++ files. +You can select the folder by the quick pick menu from the status bar. +![TaskStatusBar](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/FolderStatusBar.png) +Besides that, you can also select a folder by right-clicking in the context menu. +2️⃣ Select either debug or release mode for building the binary (debug is the default case). +![TaskStatusBar](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/ModeStatusBar.png) +3️⃣ Now you can build/run/debug the binary. +![TaskStatusBar](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/TaskStatusBar.png) + +- ⚙️ Build: This task will compile all C/C++ files in the selected folder and will link them into a binary. +- ▶️ Run*: This task will execute the built binary. +- 🗑️ Clean*: This helper task will delete all compiled object files (*.o). +- 🐞 Debug*: This task will start a debugging session for the binary. + +*This task is a no-op if the build task was not executed previously. + +## How to use: Compile a **single** file + +1️⃣ Open the C/C++ file you want to compile (build). +2️⃣ Select either debug or release mode for building the binary (debug is the default case). +3️⃣ To build the binary press **ctrl+alt+b**. +4️⃣ To run the binary press **ctrl+alt+r**. +5️⃣ To debug the binary press **ctrl+alt+d**. + +## Extension Features + +### Passing Commandline Arguments + +You can pass in command-line arguments for running or debugging the binary. +Make sure to select the active folder beforehand, then press `ctrl+alt+a` to open the message box to type in the arguments: + +![Arguments](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/arguments.png) + +These arguments will be stored in the launch.json config for debugging the binary. + +![ArgumentsDebug](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/argumentsDebug.png) + +If you now run or debug your program these values will be fed into **argc**/**argv**. +The stored arguments will be reset after selecting a new active folder. +Note: For strings with whitespaces please use \" (not single \'). + +### Include & Exclude Folders for Selection + +You can add glob patterns to include and exclude folders from the search to shorten the list. +Note: The include pattern is used before the exclude pattern. + +For example with the following exclude glob pattern: + +![ExcludePattern](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/excludePattern.png) + +The folder selection would change from left to right. + +![ExcludePaths1](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/excludePaths1.png) +![ExcludePaths2](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/excludePaths2.png) + +For more information about glob pattern see [here](https://en.wikipedia.org/wiki/Glob_(programming)#Syntax). + +### Configuration + +The current configuration settings will be stored locally in *".vscode/settings.json"*. +![FoundCompiler](https://github.com/franneck94/vscode-c-cpp-runner/raw/HEAD/media/Settings.png) + +Based on the settings, the local *.vscode/c_cpp_properties.json* file is created and will be used by [Microsoft's *C/C++*](https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference) extension for intellisense. +There, the compiler path, the C/C++ standard, and the included paths are **synced** with this extension settings. + +### Extension Settings + +- ⚙️ C Compiler path (defaults to gcc) +- ⚙️ C Standard (defaults to the compiler's default) +- ⚙️ C++ Compiler path (defaults to g++) +- ⚙️ C++ Standard (defaults to the compiler's default) +- ⚙️ Debugger path (defaults to gdb) +- ⚙️ MSVC batch path (defaults to \"\") +- ⚙️ Use MSVC (defaults to false) +- ⚙️ To enable warnings (defaults to True) +- ⚙️ What warnings should be checked by the compiler (defaults to [\"-Wall\", \"-Wextra\", \"-Wpedantic\"]) +- ⚙️ To treat warnings as errors (defaults to False) +- ⚙️ Additional compiler arguments (defaults to [] e.g. **-flto**) +- ⚙️ Additional linker arguments (defaults to [] e.g. **-lpthread**). + - Note: It **is** expected to prefix the arguments with the appropriate flags (e.g. -l or -L) +- ⚙️ Additional include paths (defaults to [] e.g. **path/to/headers/**) + - Note: It is **not** (!) expected to prefix the arguments with the **-I** flag +- ⚙️ Include glob pattern for the folder selection (defaults to ["\*", "\*\*/\*"]) +- ⚙️ Exclude glob pattern for the folder selection (defaults to ["\*\*/build", "\*\*/.\*", "\*\*/.vscode",]) + +## Important Notes + +### Constraints on Files and Folders + +- 📝 Allowed file extensions for headers: \*.h, \*.hpp, \*.hh, \*.hxx +- 📝 Allowed file extensions for sources: \*.c, \*.cpp, \*.cc, \*.cxx +- ⚠️ Include paths with whitespaces can make the compilation fail + +### CMake Projects in the Workspace Directory + +This extension does not start whenever there is a CMakeLists.txt in the workspace root directory. +This prevents an overloaded status bar with a lot of icons due to Microsoft's CMake extension. +However, the user can trigger the start-up of this extension by pressing `ctrl+alt+t`. + +## Using the MSVC Compiler + +To use the MSVC compiler (toolchain), set the **msvcBatchPath** setting to a valid path. +An example path would be **"*PathToVs2022*/Community/VC/Auxiliary/Build/vcvarsall.bat"**. +Then set the **useMsvc** to true, to not use GCC/Clang tools in the current workspace. +If you want to stop using the MSVC compiler, just set **useMsvc** to false. +Note: Only the 64bit (no cross-compiling) version of MSVC is allowed + +## Release Notes + +Refer to the [CHANGELOG](https://github.com/franneck94/vscode-c-cpp-runner/blob/HEAD/CHANGELOG.md). + +## License + +Copyright (C) 2021-2022 Jan Schaffranek. +Licensed under the [MIT License](https://github.com/franneck94/vscode-c-cpp-runner/blob/HEAD/LICENSE). diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/main.js b/src/franneck94.c-cpp-runner-4.1.2/dist/main.js new file mode 100644 index 0000000..592a007 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/main.js @@ -0,0 +1,5432 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/balanced-match/index.js": +/*!**********************************************!*\ + !*** ./node_modules/balanced-match/index.js ***! + \**********************************************/ +/***/ ((module) => { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), + +/***/ "./node_modules/brace-expansion/index.js": +/*!***********************************************!*\ + !*** ./node_modules/brace-expansion/index.js ***! + \***********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var concatMap = __webpack_require__(/*! concat-map */ "./node_modules/concat-map/index.js"); +var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js"); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + + +/***/ }), + +/***/ "./node_modules/concat-map/index.js": +/*!******************************************!*\ + !*** ./node_modules/concat-map/index.js ***! + \******************************************/ +/***/ ((module) => { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + + +/***/ }), + +/***/ "./node_modules/json5/lib/index.js": +/*!*****************************************!*\ + !*** ./node_modules/json5/lib/index.js ***! + \*****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/json5/lib/parse.js") +const stringify = __webpack_require__(/*! ./stringify */ "./node_modules/json5/lib/stringify.js") + +const JSON5 = { + parse, + stringify, +} + +module.exports = JSON5 + + +/***/ }), + +/***/ "./node_modules/json5/lib/parse.js": +/*!*****************************************!*\ + !*** ./node_modules/json5/lib/parse.js ***! + \*****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +const util = __webpack_require__(/*! ./util */ "./node_modules/json5/lib/util.js") + +let source +let parseState +let stack +let pos +let line +let column +let token +let key +let root + +module.exports = function parse (text, reviver) { + source = String(text) + parseState = 'start' + stack = [] + pos = 0 + line = 1 + column = 0 + token = undefined + key = undefined + root = undefined + + do { + token = lex() + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState]() + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +} + +function internalize (holder, name, reviver) { + const value = holder[name] + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver) + if (replacement === undefined) { + delete value[key] + } else { + value[key] = replacement + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState +let buffer +let doubleQuote +let sign +let c + +function lex () { + lexState = 'default' + buffer = '' + doubleQuote = false + sign = 1 + + for (;;) { + c = peek() + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState]() + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek() + + if (c === '\n') { + line++ + column = 0 + } else if (c) { + column += c.length + } else { + column++ + } + + if (c) { + pos += c.length + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + return + + case '/': + read() + lexState = 'comment' + return + + case undefined: + read() + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read() + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read() + lexState = 'multiLineComment' + return + + case '/': + read() + lexState = 'singleLineComment' + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read() + lexState = 'multiLineCommentAsterisk' + return + + case undefined: + throw invalidChar(read()) + } + + read() + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read() + return + + case '/': + read() + lexState = 'default' + return + + case undefined: + throw invalidChar(read()) + } + + read() + lexState = 'multiLineComment' + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + lexState = 'default' + return + + case undefined: + read() + return newToken('eof') + } + + read() + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read() + literal('ull') + return newToken('null', null) + + case 't': + read() + literal('rue') + return newToken('boolean', true) + + case 'f': + read() + literal('alse') + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1 + } + + lexState = 'sign' + return + + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"') + buffer = '' + lexState = 'string' + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read() + return + + case '\\': + read() + lexState = 'identifierNameEscape' + return + } + + if (util.isIdContinueChar(c)) { + buffer += read() + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + sign () { + switch (c) { + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', sign * Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + + case 'x': + case 'X': + buffer += read() + lexState = 'hexadecimal' + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read() + lexState = 'decimalExponentSign' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read() + lexState = 'hexadecimalInteger' + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read() + buffer += escape() + return + + case '"': + if (doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case "'": + if (!doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c) + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read() + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value' + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read() + lexState = 'identifierName' + return + + case '\\': + read() + lexState = 'identifierNameStartEscape' + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"') + lexState = 'string' + return + } + + if (util.isIdStartChar(c)) { + buffer += read() + lexState = 'identifierName' + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value' + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value' + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +} + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek() + + if (p !== c) { + throw invalidChar(read()) + } + + read() + } +} + +function escape () { + const c = peek() + switch (c) { + case 'b': + read() + return '\b' + + case 'f': + read() + return '\f' + + case 'n': + read() + return '\n' + + case 'r': + read() + return '\r' + + case 't': + read() + return '\t' + + case 'v': + read() + return '\v' + + case '0': + read() + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read() + return hexEscape() + + case 'u': + read() + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read() + return '' + + case '\r': + read() + if (peek() === '\n') { + read() + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = '' + let c = peek() + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = '' + let count = 4 + + while (count-- > 0) { + const c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value + parseState = 'afterPropertyName' + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop() + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue' + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop() + return + } + + push() + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName' + return + + case '}': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue' + return + + case ']': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +} + +function push () { + let value + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {} + break + + case '[': + value = [] + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value + } else { + const parent = stack[stack.length - 1] + if (Array.isArray(parent)) { + parent.push(value) + } else { + parent[key] = value + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value) + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue' + } else { + parseState = 'beforePropertyName' + } + } else { + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } + } +} + +function pop () { + stack.pop() + + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5 + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16) + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message) + err.lineNumber = line + err.columnNumber = column + return err +} + + +/***/ }), + +/***/ "./node_modules/json5/lib/stringify.js": +/*!*********************************************!*\ + !*** ./node_modules/json5/lib/stringify.js ***! + \*********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +const util = __webpack_require__(/*! ./util */ "./node_modules/json5/lib/util.js") + +module.exports = function stringify (value, replacer, space) { + const stack = [] + let indent = '' + let propertyList + let replacerFunc + let gap = '' + let quote + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space + quote = replacer.quote + replacer = replacer.replacer + } + + if (typeof replacer === 'function') { + replacerFunc = replacer + } else if (Array.isArray(replacer)) { + propertyList = [] + for (const v of replacer) { + let item + + if (typeof v === 'string') { + item = v + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v) + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item) + } + } + } + + if (space instanceof Number) { + space = Number(space) + } else if (space instanceof String) { + space = String(space) + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)) + gap = ' '.substr(0, space) + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10) + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key] + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key) + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key) + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value) + } + + if (value instanceof Number) { + value = Number(value) + } else if (value instanceof String) { + value = String(value) + } else if (value instanceof Boolean) { + value = value.valueOf() + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + } + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + let product = '' + + for (let i = 0; i < value.length; i++) { + const c = value[i] + switch (c) { + case "'": + case '"': + quotes[c]++ + product += c + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00' + continue + } + } + + if (replacements[c]) { + product += replacements[c] + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16) + product += '\\x' + ('00' + hexString).substring(hexString.length) + continue + } + + product += c + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let keys = propertyList || Object.keys(value) + let partial = [] + for (const key of keys) { + const propertyString = serializeProperty(key, value) + if (propertyString !== undefined) { + let member = serializeKey(key) + ':' + if (gap !== '') { + member += ' ' + } + member += propertyString + partial.push(member) + } + } + + let final + if (partial.length === 0) { + final = '{}' + } else { + let properties + if (gap === '') { + properties = partial.join(',') + final = '{' + properties + '}' + } else { + let separator = ',\n' + indent + properties = partial.join(separator) + final = '{\n' + indent + properties + ',\n' + stepback + '}' + } + } + + stack.pop() + indent = stepback + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)) + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let partial = [] + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value) + partial.push((propertyString !== undefined) ? propertyString : 'null') + } + + let final + if (partial.length === 0) { + final = '[]' + } else { + if (gap === '') { + let properties = partial.join(',') + final = '[' + properties + ']' + } else { + let separator = ',\n' + indent + let properties = partial.join(separator) + final = '[\n' + indent + properties + ',\n' + stepback + ']' + } + } + + stack.pop() + indent = stepback + return final + } +} + + +/***/ }), + +/***/ "./node_modules/json5/lib/unicode.js": +/*!*******************************************!*\ + !*** ./node_modules/json5/lib/unicode.js ***! + \*******************************************/ +/***/ ((module) => { + +// This is a generated file. Do not edit. +module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ +module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\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\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ +module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u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0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F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CA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + + +/***/ }), + +/***/ "./node_modules/json5/lib/util.js": +/*!****************************************!*\ + !*** ./node_modules/json5/lib/util.js ***! + \****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +const unicode = __webpack_require__(/*! ../lib/unicode */ "./node_modules/json5/lib/unicode.js") + +module.exports = { + isSpaceSeparator (c) { + return typeof c === 'string' && unicode.Space_Separator.test(c) + }, + + isIdStartChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, +} + + +/***/ }), + +/***/ "./node_modules/lookpath/lib/index.js": +/*!********************************************!*\ + !*** ./node_modules/lookpath/lib/index.js ***! + \********************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.lookpath = void 0; +var fs = __importStar(__webpack_require__(/*! fs */ "fs")); +var path = __importStar(__webpack_require__(/*! path */ "path")); +var isWindows = /^win/i.test(process.platform); +/** + * Sometimes, people want to look for local executable files + * which are specified with either relative or absolute file path. + * @private + * @param cmd + * @return {string} An absolute path of given command, or undefined. + */ +var isFilepath = function (cmd) { + return cmd.includes(path.sep) ? path.resolve(cmd) : undefined; +}; +/** + * Just promisifies "fs.access" + * @private + * @param {string} fpath An absolute file path with an applicable extension appended. + * @return {Promise} Resolves absolute path or empty string. + */ +var access = function (fpath) { + return new Promise(function (resolve) { return fs.access(fpath, fs.constants.X_OK, function (err) { return resolve(err ? undefined : fpath); }); }); +}; +/** + * Resolves if the given file is executable or not, regarding "PATHEXT" to be applied. + * @private + * @param {string} abspath A file path to be checked. + * @return {Promise} Resolves the absolute file path just checked, or undefined. + */ +var isExecutable = function (abspath, opt) { + if (opt === void 0) { opt = {}; } + return __awaiter(void 0, void 0, void 0, function () { + var envvars, exts, bins; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + envvars = opt.env || process.env; + exts = (envvars.PATHEXT || '').split(path.delimiter).concat(''); + return [4 /*yield*/, Promise.all(exts.map(function (ext) { return access(abspath + ext); }))]; + case 1: + bins = _a.sent(); + return [2 /*return*/, bins.find(function (bin) { return !!bin; })]; + } + }); + }); +}; +/** + * Returns a list of directories on which the target command should be looked for. + * @private + * @param {string[]} opt.include Will be added to "PATH" env. + * @param {string[]} opt.exclude Will be filtered from "PATH" env. + * @return {string[]} Directories to dig into. + */ +var getDirsToWalkThrough = function (opt) { + var envvars = opt.env || process.env; + var envname = isWindows ? 'Path' : 'PATH'; + return (envvars[envname] || '').split(path.delimiter).concat(opt.include || []).filter(function (p) { return !(opt.exclude || []).includes(p); }); +}; +/** + * Returns async promise with absolute file path of given command, + * and resolves with undefined if the command not found. + * @param {string} command Command name to look for. + * @param {LookPathOption} opt Options for lookpath. + * @return {Promise} Resolves absolute file path, or undefined if not found. + */ +function lookpath(command, opt) { + if (opt === void 0) { opt = {}; } + return __awaiter(this, void 0, void 0, function () { + var directpath, dirs, bins; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + directpath = isFilepath(command); + if (directpath) + return [2 /*return*/, isExecutable(directpath, opt)]; + dirs = getDirsToWalkThrough(opt); + return [4 /*yield*/, Promise.all(dirs.map(function (dir) { return isExecutable(path.join(dir, command), opt); }))]; + case 1: + bins = _a.sent(); + return [2 /*return*/, bins.find(function (bin) { return !!bin; })]; + } + }); + }); +} +exports.lookpath = lookpath; + + +/***/ }), + +/***/ "./node_modules/minimatch/minimatch.js": +/*!*********************************************!*\ + !*** ./node_modules/minimatch/minimatch.js ***! + \*********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return __webpack_require__(/*! path */ "path") } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __webpack_require__(/*! brace-expansion */ "./node_modules/brace-expansion/index.js") + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), + +/***/ "./src/executor/builder.ts": +/*!*********************************!*\ + !*** ./src/executor/builder.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.executeBuildTask = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const settingsProvider_1 = __webpack_require__(/*! ../provider/settingsProvider */ "./src/provider/settingsProvider.ts"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const EXTENSION_NAME = 'C_Cpp_Runner'; +async function executeBuildTask(settingsProvider, activeFolder, buildMode, singleFileBuild) { + const appendSymbol = '&&'; + const language = (0, fileUtils_1.getLanguage)(activeFolder); + let files; + if (!singleFileBuild) { + files = (0, fileUtils_1.filesInDir)(activeFolder); + } + else { + const currentFile = vscode.window.activeTextEditor?.document.fileName; + if (!currentFile) + return; + const isSource = (0, fileUtils_1.isSourceFile)(path.extname(currentFile)); + if (!isSource) + return; + files = [path.basename(currentFile)]; + } + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!(0, fileUtils_1.pathExists)(modeDir)) { + (0, fileUtils_1.mkdirRecursive)(modeDir); + } + const operatingSystem = settingsProvider.operatingSystem; + let executableName; + if (operatingSystem === types_1.OperatingSystems.windows) { + executableName = `out${buildMode}.exe`; + } + else { + executableName = `out${buildMode}`; + } + const executablePath = path.join(modeDir, executableName); + let commandLine; + if (operatingSystem === types_1.OperatingSystems.windows && + settingsProvider.useMsvc) { + commandLine = executeBuildTaskMsvcBased(settingsProvider, activeFolder, buildMode, language, files, modeDir, appendSymbol, executablePath); + } + else { + commandLine = executeBuildTaskUnixBased(settingsProvider, activeFolder, buildMode, language, files, modeDir, appendSymbol, executablePath); + } + if (!commandLine) + return; + const task_name = 'Build'; + const definition = { + type: 'shell', + task: task_name, + }; + const execution = (0, vscodeUtils_1.getProcessExecution)(operatingSystem, settingsProvider.useMsvc, commandLine, activeFolder); + const problemMatcher = operatingSystem === types_1.OperatingSystems.windows && settingsProvider.useMsvc + ? ['$msCompile'] + : ['$gcc']; + const task = new vscode.Task(definition, vscode.TaskScope.Workspace, task_name, EXTENSION_NAME, execution, problemMatcher); + await vscode.tasks.executeTask(task); +} +exports.executeBuildTask = executeBuildTask; +function executeBuildTaskUnixBased(settingsProvider, activeFolder, buildMode, language, files, modeDir, appendSymbol, executablePath) { + let compiler; + let standard; + if (language === types_1.Languages.cpp) { + compiler = settingsProvider.cppCompilerPath; + standard = settingsProvider.cppStandard; + } + else { + compiler = settingsProvider.cCompilerPath; + standard = settingsProvider.cStandard; + } + const useWarnings = settingsProvider.enableWarnings; + const warningsAsErrors = settingsProvider.warningsAsError; + let warnings = ''; + if (useWarnings) { + warnings = settingsProvider.warnings.join(' '); + } + if (useWarnings && warningsAsErrors) { + warnings += ' -Werror'; + } + const includePaths = settingsProvider.includePaths; + const compilerArgs = settingsProvider.compilerArgs; + const linkerArgs = settingsProvider.linkerArgs; + let fullCompilerArgs = ''; + let fullLinkerArgs = ''; + if (warnings) { + fullCompilerArgs += warnings; + } + if (standard) { + fullCompilerArgs += ` --std=${standard}`; + } + if (buildMode === types_1.Builds.debug) { + fullCompilerArgs += ' -g3 -O0'; + } + else { + fullCompilerArgs += ' -O3 -DNDEBUG'; + } + if (compilerArgs && compilerArgs.length > 0) { + fullCompilerArgs += ' ' + compilerArgs.join(' '); + } + if (includePaths && includePaths.length > 0) { + for (const includePath of includePaths) { + if (includePath.includes('$(default)')) + continue; + const hasSpace = includePath.includes(' '); + if (hasSpace) { + fullCompilerArgs += ` -I"${includePath}"`; + } + else { + fullCompilerArgs += ` -I${includePath}`; + } + } + } + if (linkerArgs && linkerArgs.length > 0) { + fullLinkerArgs += ' ' + linkerArgs.join(' '); + } + let commandLine = ''; + const objectFiles = []; + let idx = -1; + for (const file of files) { + const fileExtension = path.parse(file).ext; + if (language === types_1.Languages.c && !(0, fileUtils_1.isCSourceFile)(fileExtension)) { + continue; + } + else if (language === types_1.Languages.cpp && !(0, fileUtils_1.isCppSourceFile)(fileExtension)) { + continue; + } + idx++; + const fileBaseName = path.parse(file).name; + modeDir = modeDir.replace(activeFolder, ''); + let objectFilePath = path.join(modeDir, fileBaseName + '.o'); + if (!objectFilePath.startsWith('.')) { + objectFilePath = '.' + objectFilePath; + } + objectFiles.push(objectFilePath); + const hasSpace = file.includes(' '); + let fullFileArgs; + if (hasSpace) { + fullFileArgs = `-c "${file}" -o "${objectFilePath}"`; + } + else { + fullFileArgs = `-c ${file} -o ${objectFilePath}`; + } + if (idx === 0) { + commandLine += `${compiler} ${fullCompilerArgs} ${fullFileArgs}`; + } + else { + commandLine += ` ${appendSymbol} ${compiler} ${fullCompilerArgs} ${fullFileArgs}`; + } + } + let objectFilesStr = ''; + for (const objectfile of objectFiles) { + objectFilesStr += ` ${objectfile}`; + } + if (objectFilesStr === '') + return; + executablePath = executablePath.replace(activeFolder, ''); + if (!executablePath.startsWith('.')) { + executablePath = '.' + executablePath; + } + const fullObjectFileArgs = `${objectFilesStr} -o ${executablePath}`; + commandLine += ` ${appendSymbol} ${compiler} ${fullCompilerArgs} ${fullObjectFileArgs}`; + if (fullLinkerArgs && fullLinkerArgs !== '') { + commandLine += fullLinkerArgs; + } + commandLine = commandLine.replace(' ', ' '); + return commandLine; +} +function executeBuildTaskMsvcBased(settingsProvider, activeFolder, buildMode, language, files, modeDir, appendSymbol, executablePath) { + let compiler; + let standard; + if (language === types_1.Languages.cpp) { + compiler = settingsProvider_1.SettingsProvider.MSVC_COMPILER_NAME; + standard = settingsProvider.cppStandard; + } + else { + compiler = settingsProvider_1.SettingsProvider.MSVC_COMPILER_NAME; + standard = settingsProvider.cStandard; + } + const useWarnings = settingsProvider.enableWarnings; + const warningsAsErrors = settingsProvider.warningsAsError; + let warnings = ''; + if (useWarnings) { + warnings = settingsProvider.warnings.join(' '); + } + if (useWarnings && warningsAsErrors) { + warnings += ' -WX'; + } + const includePaths = settingsProvider.includePaths; + const compilerArgs = settingsProvider.compilerArgs; + const linkerArgs = settingsProvider.linkerArgs; + let fullCompilerArgs = ''; + if (useWarnings && warnings !== '') { + fullCompilerArgs += warnings; + } + const old_standard = ['c89', 'c99', 'gnu89', 'gnu99'].some((ext) => settingsProvider.cStandard === ext); + if (standard && (language === types_1.Languages.cpp || !old_standard)) { + fullCompilerArgs += ` /std:${standard}`; + } + if (language === types_1.Languages.c) { + if (old_standard) { + fullCompilerArgs += ' /D_CRT_SECURE_NO_WARNINGS'; + } + } + if (buildMode === types_1.Builds.debug) { + fullCompilerArgs += ' /Od /Zi'; + } + else { + fullCompilerArgs += ' /Ox /GL /DNDEBUG'; + } + fullCompilerArgs += ' /EHsc'; + if (includePaths && includePaths.length > 0) { + for (const includePath of includePaths) { + if (includePath.includes('$(default)')) + continue; + const hasSpace = includePath.includes(' '); + if (hasSpace) { + fullCompilerArgs += ` /I"${includePath}"`; + } + else { + fullCompilerArgs += ` /I${includePath}`; + } + } + } + let fullLinkerArgs = ''; + if (linkerArgs && linkerArgs.length > 0) { + fullLinkerArgs += ' ' + linkerArgs.join(' '); + } + fullCompilerArgs += fullLinkerArgs; + if (compilerArgs && compilerArgs.length > 0) { + fullCompilerArgs += ' ' + compilerArgs.join(' '); + } + let commandLine = `"${settingsProvider.msvcBatchPath}" ${settingsProvider.architecure} ${appendSymbol} `; + modeDir = modeDir.replace(activeFolder, '.'); + executablePath = executablePath.replace(activeFolder, '.'); + const pathArgs = `/Fd${modeDir}\\ /Fo${modeDir}\\ /Fe${executablePath}`; + let fullFileArgs = ''; + for (const file of files) { + const fileExtension = path.parse(file).ext; + if (language === types_1.Languages.c && !(0, fileUtils_1.isCSourceFile)(fileExtension)) { + continue; + } + else if (language === types_1.Languages.cpp && !(0, fileUtils_1.isCppSourceFile)(fileExtension)) { + continue; + } + const hasSpace = file.includes(' '); + if (hasSpace) { + fullFileArgs += ` .\\"${file}"`; + } + else { + fullFileArgs += ` .\\${file}`; + } + } + if (fullFileArgs === '') + return; + commandLine += ` cd ${activeFolder} &&`; + commandLine += `${compiler} ${fullCompilerArgs} ${pathArgs} ${fullFileArgs}`; + return commandLine; +} + + +/***/ }), + +/***/ "./src/executor/cleaner.ts": +/*!*********************************!*\ + !*** ./src/executor/cleaner.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.executeCleanTask = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const EXTENSION_NAME = 'C_Cpp_Runner'; +async function executeCleanTask(activeFolder, buildMode, workspaceFolder, operatingSystem) { + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + let relativeModeDir = modeDir.replace(workspaceFolder, ''); + relativeModeDir = (0, fileUtils_1.replaceBackslashes)(relativeModeDir); + const commandLine = `echo Cleaning ${relativeModeDir}...`; + if (!(0, fileUtils_1.pathExists)(modeDir)) + return; + (0, fileUtils_1.rmdirRecursive)(modeDir); + if (!commandLine) + return; + const task_name = 'Clean'; + const execution = (0, vscodeUtils_1.getProcessExecution)(operatingSystem, false, commandLine, activeFolder); + const definition = { + type: 'shell', + task: task_name, + }; + const task = new vscode.Task(definition, vscode.TaskScope.Workspace, task_name, EXTENSION_NAME, execution); + await vscode.tasks.executeTask(task); +} +exports.executeCleanTask = executeCleanTask; + + +/***/ }), + +/***/ "./src/executor/debugger.ts": +/*!**********************************!*\ + !*** ./src/executor/debugger.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.runDebugger = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const CONFIG_NAME = 'C/C++ Runner: Debug Session'; +async function runDebugger(activeFolder, workspaceFolder, buildMode) { + const uriWorkspaceFolder = vscode.Uri.file(workspaceFolder); + const folder = vscode.workspace.getWorkspaceFolder(uriWorkspaceFolder); + const launchPath = path.join(workspaceFolder, '.vscode', 'launch.json'); + const configJson = (0, fileUtils_1.readJsonFile)(launchPath); + if (!configJson) + return; + const configIdx = (0, vscodeUtils_1.getLaunchConfigIndex)(configJson, CONFIG_NAME); + if (configIdx === undefined) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!(0, fileUtils_1.pathExists)(modeDir)) + return; + if (!configJson.configurations === undefined || + !configJson.configurations[configIdx] === undefined) + return; + await vscode.debug.startDebugging(folder, configJson.configurations[configIdx]); +} +exports.runDebugger = runDebugger; + + +/***/ }), + +/***/ "./src/executor/runner.ts": +/*!********************************!*\ + !*** ./src/executor/runner.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.executeRunTask = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const EXTENSION_NAME = 'C_Cpp_Runner'; +async function executeRunTask(activeFolder, buildMode, argumentsString, operatingSystem) { + const modeDir = path.join('build', buildMode); + if (!(0, fileUtils_1.pathExists)(path.join(activeFolder, modeDir))) + return; + let executableName; + let executablePath; + if (operatingSystem === types_1.OperatingSystems.windows) { + executableName = `out${buildMode}.exe`; + executablePath = `.\\${path.join(modeDir, executableName)}`; + } + else { + executableName = `out${buildMode}`; + executablePath = `./${path.join(modeDir, executableName)}`; + } + let commandLine = ''; + const executablePathHasSpace = executablePath.includes(' '); + if (executablePathHasSpace) { + commandLine = `"${executablePath}"`; + } + else { + commandLine = executablePath; + } + if (argumentsString) { + commandLine += ` ${argumentsString.replace(/"/g, '')}`; + } + if (!commandLine) + return; + const task_name = 'Run'; + const execution = (0, vscodeUtils_1.getProcessExecution)(operatingSystem, false, commandLine, activeFolder); + const definition = { + type: 'shell', + task: task_name, + }; + const task = new vscode.Task(definition, vscode.TaskScope.Workspace, task_name, EXTENSION_NAME, execution); + await vscode.tasks.executeTask(task); +} +exports.executeRunTask = executeRunTask; + + +/***/ }), + +/***/ "./src/extension.ts": +/*!**************************!*\ + !*** ./src/extension.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deactivate = exports.activate = exports.extensionPath = exports.extensionState = exports.extensionContext = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const builder_1 = __webpack_require__(/*! ./executor/builder */ "./src/executor/builder.ts"); +const cleaner_1 = __webpack_require__(/*! ./executor/cleaner */ "./src/executor/cleaner.ts"); +const debugger_1 = __webpack_require__(/*! ./executor/debugger */ "./src/executor/debugger.ts"); +const runner_1 = __webpack_require__(/*! ./executor/runner */ "./src/executor/runner.ts"); +const folderHandler_1 = __webpack_require__(/*! ./handler/folderHandler */ "./src/handler/folderHandler.ts"); +const modeHandler_1 = __webpack_require__(/*! ./handler/modeHandler */ "./src/handler/modeHandler.ts"); +const statusBarItems_1 = __webpack_require__(/*! ./items/statusBarItems */ "./src/items/statusBarItems.ts"); +const launchProvider_1 = __webpack_require__(/*! ./provider/launchProvider */ "./src/provider/launchProvider.ts"); +const propertiesProvider_1 = __webpack_require__(/*! ./provider/propertiesProvider */ "./src/provider/propertiesProvider.ts"); +const settingsProvider_1 = __webpack_require__(/*! ./provider/settingsProvider */ "./src/provider/settingsProvider.ts"); +const fileUtils_1 = __webpack_require__(/*! ./utils/fileUtils */ "./src/utils/fileUtils.ts"); +const types_1 = __webpack_require__(/*! ./utils/types */ "./src/utils/types.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ./utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +let folderContextMenuDisposable; +let commandHandlerDisposable; +let commandToggleStateDisposable; +let commandFolderDisposable; +let commandModeDisposable; +let commandBuildDisposable; +let commandRunDisposable; +let commandBuildSingleFileDisposable; +let commandRunSingleFileDisposable; +let commandDebugSingleFileDisposable; +let commandDebugDisposable; +let commandCleanDisposable; +let commandArgumentDisposable; +let commandResetDisposable; +let eventConfigurationDisposable; +let eventRenameFilesDisposable; +let eventDeleteFilesDisposable; +let settingsProvider; +let launchProvider; +let propertiesProvider; +let folderStatusBar; +let modeStatusBar; +let buildStatusBar; +let runStatusBar; +let debugStatusBar; +let cleanStatusBar; +let argumentsString; +let workspaceFolder; +let activeFolder; +let buildMode = types_1.Builds.debug; +let showStatusBarItems = true; +let createExtensionFiles = true; +const EXTENSION_NAME = 'C_Cpp_Runner'; +function activate(context) { + if (!vscode.workspace.workspaceFolders || + vscode.workspace.workspaceFolders.length === 0) { + return; + } + if (!vscode.workspace.workspaceFolders[0] || + !vscode.workspace.workspaceFolders[0].uri) { + return; + } + if (vscode.workspace.workspaceFolders.length === 1) { + workspaceFolder = vscode.workspace.workspaceFolders[0].uri.fsPath; + } + const cmakeFileFound = (0, vscodeUtils_1.isCmakeProject)(); + if (cmakeFileFound) { + showStatusBarItems = false; + createExtensionFiles = false; + } + exports.extensionContext = context; + exports.extensionPath = context.extensionPath; + exports.extensionState = context.workspaceState; + (0, vscodeUtils_1.setContextValue)(`${EXTENSION_NAME}:activatedExtension`, true); + (0, vscodeUtils_1.updateActivationState)(true); + initFolderStatusBar(); + initModeStatusBar(); + initBuildStatusBar(); + initRunStatusBar(); + initDebugStatusBar(); + initCleanStatusBar(); + initBuildSingleFile(); + initRunSingleFile(); + initDebugSingleFile(); + initWorkspaceProvider(); + initWorkspaceDisposables(); + initEventListener(); +} +exports.activate = activate; +function deactivate() { + (0, vscodeUtils_1.setContextValue)(`${EXTENSION_NAME}:activatedExtension`, false); + (0, vscodeUtils_1.updateActivationState)(false); + (0, vscodeUtils_1.disposeItem)(folderStatusBar); + (0, vscodeUtils_1.disposeItem)(modeStatusBar); + (0, vscodeUtils_1.disposeItem)(buildStatusBar); + (0, vscodeUtils_1.disposeItem)(runStatusBar); + (0, vscodeUtils_1.disposeItem)(debugStatusBar); + (0, vscodeUtils_1.disposeItem)(cleanStatusBar); + (0, vscodeUtils_1.disposeItem)(folderContextMenuDisposable); + (0, vscodeUtils_1.disposeItem)(commandHandlerDisposable); + (0, vscodeUtils_1.disposeItem)(commandToggleStateDisposable); + (0, vscodeUtils_1.disposeItem)(commandFolderDisposable); + (0, vscodeUtils_1.disposeItem)(commandModeDisposable); + (0, vscodeUtils_1.disposeItem)(commandBuildDisposable); + (0, vscodeUtils_1.disposeItem)(commandRunDisposable); + (0, vscodeUtils_1.disposeItem)(commandBuildSingleFileDisposable); + (0, vscodeUtils_1.disposeItem)(commandRunSingleFileDisposable); + (0, vscodeUtils_1.disposeItem)(commandDebugSingleFileDisposable); + (0, vscodeUtils_1.disposeItem)(commandDebugDisposable); + (0, vscodeUtils_1.disposeItem)(commandCleanDisposable); + (0, vscodeUtils_1.disposeItem)(commandArgumentDisposable); + (0, vscodeUtils_1.disposeItem)(commandResetDisposable); + (0, vscodeUtils_1.disposeItem)(eventConfigurationDisposable); + (0, vscodeUtils_1.disposeItem)(eventDeleteFilesDisposable); + (0, vscodeUtils_1.disposeItem)(eventRenameFilesDisposable); +} +exports.deactivate = deactivate; +function initWorkspaceProvider() { + if (!workspaceFolder || !createExtensionFiles || !activeFolder) + return; + if (!settingsProvider) { + settingsProvider = new settingsProvider_1.SettingsProvider(workspaceFolder, activeFolder); + } + if (!propertiesProvider) { + propertiesProvider = new propertiesProvider_1.PropertiesProvider(settingsProvider, workspaceFolder, activeFolder); + } + if (!launchProvider) { + launchProvider = new launchProvider_1.LaunchProvider(settingsProvider, workspaceFolder, activeFolder); + } +} +function initWorkspaceDisposables() { + initArgumentParser(); + initContextMenuDisposable(); + initReset(); + initToggleDisposable(); +} +function initToggleDisposable() { + if (commandToggleStateDisposable) + return; + commandToggleStateDisposable = vscode.commands.registerCommand(`${EXTENSION_NAME}.toggleExtensionState`, () => { + showStatusBarItems = !showStatusBarItems; + toggleStatusBarItems(); + createExtensionFiles = !createExtensionFiles; + if (createExtensionFiles) { + initWorkspaceProvider(); + initWorkspaceDisposables(); + settingsProvider?.createFileData(); + propertiesProvider?.createFileData(); + } + const extensionIsDisabled = !showStatusBarItems && !createExtensionFiles; + if (extensionIsDisabled) { + (0, vscodeUtils_1.setContextValue)(`${EXTENSION_NAME}:activatedExtension`, !extensionIsDisabled); + (0, vscodeUtils_1.updateActivationState)(!extensionIsDisabled); + } + else { + (0, vscodeUtils_1.setContextValue)(`${EXTENSION_NAME}:activatedExtension`, !extensionIsDisabled); + (0, vscodeUtils_1.updateActivationState)(!extensionIsDisabled); + } + }); + exports.extensionContext?.subscriptions.push(commandToggleStateDisposable); +} +function initContextMenuDisposable() { + if (folderContextMenuDisposable) + return; + folderContextMenuDisposable = vscode.commands.registerCommand(`${EXTENSION_NAME}.folderContextMenu`, async (clickedUriItem, selectedUriItems) => { + if (selectedUriItems.length > 1) + return; + const workspaceItem = vscode.workspace.getWorkspaceFolder(clickedUriItem); + if (!workspaceItem) + return; + activeFolder = clickedUriItem.fsPath; + workspaceFolder = workspaceItem.uri.fsPath; + updateFolderData(); + }); + exports.extensionContext?.subscriptions.push(folderContextMenuDisposable); +} +function initEventListener() { + initConfigurationChangeDisposable(); + initFileRenameDisposable(); + initFileDeleteDisposable(); +} +function initConfigurationChangeDisposable() { + if (eventConfigurationDisposable) + return; + eventConfigurationDisposable = vscode.workspace.onDidChangeConfiguration((e) => { + const isChanged = e.affectsConfiguration(EXTENSION_NAME); + const extensionIsActive = (0, vscodeUtils_1.getActivationState)(); + if (isChanged && extensionIsActive) { + settingsProvider?.updateFileContent(); + propertiesProvider?.updateFileContent(); + launchProvider?.updateFileContent(); + } + }); + exports.extensionContext?.subscriptions.push(eventConfigurationDisposable); +} +function initFileRenameDisposable() { + if (eventRenameFilesDisposable) + return; + eventRenameFilesDisposable = vscode.workspace.onDidRenameFiles((e) => { + const extensionIsActive = (0, vscodeUtils_1.getActivationState)(); + if (!extensionIsActive) + return; + e.files.forEach((file) => { + const oldName = file.oldUri.fsPath; + const newName = file.newUri.fsPath; + if (workspaceFolder && oldName === workspaceFolder) { + workspaceFolder = newName; + updateFolderData(); + } + else if (activeFolder && oldName === activeFolder) { + activeFolder = newName; + updateFolderData(); + } + }); + }); + exports.extensionContext?.subscriptions.push(eventRenameFilesDisposable); +} +function initFileDeleteDisposable() { + if (!eventDeleteFilesDisposable) + return; + eventDeleteFilesDisposable = vscode.workspace.onDidDeleteFiles((e) => { + const extensionIsActive = (0, vscodeUtils_1.getActivationState)(); + if (!extensionIsActive) + return; + e.files.forEach((file) => { + const oldName = file.fsPath; + if (workspaceFolder && oldName === workspaceFolder) { + workspaceFolder = undefined; + updateFolderData(); + (0, statusBarItems_1.updateFolderStatus)(folderStatusBar, workspaceFolder, activeFolder, showStatusBarItems); + } + else if (activeFolder && oldName === activeFolder) { + activeFolder = undefined; + updateFolderData(); + (0, statusBarItems_1.updateFolderStatus)(folderStatusBar, workspaceFolder, activeFolder, showStatusBarItems); + } + }); + }); + exports.extensionContext?.subscriptions.push(eventDeleteFilesDisposable); +} +function toggleStatusBarItems() { + if (showStatusBarItems) { + folderStatusBar?.show(); + modeStatusBar?.show(); + buildStatusBar?.show(); + runStatusBar?.show(); + debugStatusBar?.show(); + cleanStatusBar?.show(); + } + else { + folderStatusBar?.hide(); + modeStatusBar?.hide(); + buildStatusBar?.hide(); + runStatusBar?.hide(); + debugStatusBar?.hide(); + cleanStatusBar?.hide(); + } +} +function updateFolderData() { + initWorkspaceProvider(); + initWorkspaceDisposables(); + argumentsString = ''; + if (workspaceFolder && activeFolder) { + if (settingsProvider) { + settingsProvider.updateFolderData(workspaceFolder); + settingsProvider.updateFileContent(); + if (propertiesProvider) { + propertiesProvider.updateFolderData(workspaceFolder); + } + if (launchProvider) { + launchProvider.updateFolderData(workspaceFolder, activeFolder); + launchProvider.updateModeData(buildMode); + launchProvider?.updateArgumentsData(argumentsString); + launchProvider.updateFileContent(); + } + } + } + if (folderStatusBar) { + (0, statusBarItems_1.updateFolderStatus)(folderStatusBar, workspaceFolder, activeFolder, showStatusBarItems); + } + if (modeStatusBar) { + (0, statusBarItems_1.updateModeStatus)(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + } + if (buildStatusBar) { + (0, statusBarItems_1.updateBuildStatus)(buildStatusBar, showStatusBarItems, activeFolder); + } + if (runStatusBar) { + (0, statusBarItems_1.updateRunStatus)(runStatusBar, showStatusBarItems, activeFolder); + } + if (cleanStatusBar) { + (0, statusBarItems_1.updateCleanStatus)(cleanStatusBar, showStatusBarItems, activeFolder); + } + if (debugStatusBar) { + (0, statusBarItems_1.updateDebugStatus)(debugStatusBar, showStatusBarItems, activeFolder); + } +} +function initFolderStatusBar() { + if (folderStatusBar) + return; + folderStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(folderStatusBar); + const workspaceFolders = vscode.workspace.workspaceFolders; + if (workspaceFolders) { + if (workspaceFolders.length === 1) { + if (!workspaceFolders[0] || !workspaceFolders[0].uri.fsPath) + return; + const workspaceFolderFs = workspaceFolders[0].uri.fsPath; + const folders = (0, fileUtils_1.foldersInDir)(workspaceFolderFs); + if (folders.length === 0) { + workspaceFolder = workspaceFolderFs; + activeFolder = workspaceFolderFs; + updateFolderData(); + } + else { + (0, statusBarItems_1.updateFolderStatus)(folderStatusBar, workspaceFolder, activeFolder, showStatusBarItems); + } + } + else { + (0, statusBarItems_1.updateFolderStatus)(folderStatusBar, workspaceFolder, activeFolder, showStatusBarItems); + } + } + if (commandFolderDisposable) + return; + const commandName = `${EXTENSION_NAME}.folder`; + commandFolderDisposable = vscode.commands.registerCommand(commandName, async () => { + const ret = await (0, folderHandler_1.folderHandler)(settingsProvider); + if (ret && ret.activeFolder && ret.workspaceFolder) { + activeFolder = ret.activeFolder; + workspaceFolder = ret.workspaceFolder; + updateFolderData(); + } + }); + folderStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandFolderDisposable); +} +function initModeStatusBar() { + if (modeStatusBar) + return; + modeStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(modeStatusBar); + (0, statusBarItems_1.updateModeStatus)(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + const commandName = `${EXTENSION_NAME}.mode`; + commandModeDisposable = vscode.commands.registerCommand(commandName, async () => { + const pickedMode = await (0, modeHandler_1.modeHandler)(); + if (pickedMode) { + buildMode = pickedMode; + (0, statusBarItems_1.updateModeStatus)(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + if (!launchProvider) + return; + launchProvider.updateModeData(buildMode); + launchProvider.updateFileContent(); + } + }); + modeStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandModeDisposable); +} +function initArgumentParser() { + if (commandArgumentDisposable) + return; + const commandName = `${EXTENSION_NAME}.args`; + commandArgumentDisposable = vscode.commands.registerCommand(commandName, async () => { + argumentsString = await vscode.window.showInputBox(); + launchProvider?.updateArgumentsData(argumentsString); + launchProvider?.updateFileContent(); + }); + exports.extensionContext?.subscriptions.push(commandArgumentDisposable); +} +function initReset() { + if (commandResetDisposable) + return; + const commandName = `${EXTENSION_NAME}.resetLocalSettings`; + commandResetDisposable = vscode.commands.registerCommand(commandName, async () => { + settingsProvider?.reset(); + propertiesProvider?.updateFileContent(); + launchProvider?.updateFileContent(); + }); + exports.extensionContext?.subscriptions.push(commandResetDisposable); +} +function initBuildStatusBar() { + if (buildStatusBar) + return; + buildStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(buildStatusBar); + (0, statusBarItems_1.updateBuildStatus)(buildStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.build`; + commandBuildDisposable = vscode.commands.registerCommand(commandName, async () => buildTaskCallback(false)); + buildStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandBuildDisposable); +} +function initRunStatusBar() { + if (runStatusBar) + return; + runStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(runStatusBar); + (0, statusBarItems_1.updateRunStatus)(runStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.run`; + commandRunDisposable = vscode.commands.registerCommand(commandName, async () => runTaskCallback()); + runStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandRunDisposable); +} +function initDebugStatusBar() { + if (debugStatusBar) + return; + debugStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(debugStatusBar); + (0, statusBarItems_1.updateDebugStatus)(debugStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.debug`; + commandDebugDisposable = vscode.commands.registerCommand(commandName, () => debugTaskCallback()); + debugStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandDebugDisposable); +} +async function initCleanStatusBar() { + if (cleanStatusBar) + return; + cleanStatusBar = (0, vscodeUtils_1.createStatusBarItem)(); + exports.extensionContext?.subscriptions.push(cleanStatusBar); + (0, statusBarItems_1.updateCleanStatus)(cleanStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.clean`; + commandCleanDisposable = vscode.commands.registerCommand(commandName, async () => { + cleanTaskCallback(); + }); + cleanStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandCleanDisposable); +} +function initProviderBasedOnSingleFile() { + const currentFile = vscode.window.activeTextEditor?.document.fileName; + if (!currentFile) + return; + const currentFolder = path.dirname(currentFile); + if (activeFolder !== currentFolder) { + activeFolder = currentFolder; + initWorkspaceProvider(); + updateFolderData(); + } +} +function initBuildSingleFile() { + const commandName = `${EXTENSION_NAME}.buildSingleFile`; + commandBuildSingleFileDisposable = vscode.commands.registerCommand(commandName, async () => { + initProviderBasedOnSingleFile(); + buildTaskCallback(true); + }); + exports.extensionContext?.subscriptions.push(commandBuildSingleFileDisposable); +} +function initRunSingleFile() { + const commandName = `${EXTENSION_NAME}.runSingleFile`; + commandRunSingleFileDisposable = vscode.commands.registerCommand(commandName, async () => { + initProviderBasedOnSingleFile(); + runTaskCallback(); + }); + exports.extensionContext?.subscriptions.push(commandRunSingleFileDisposable); +} +function initDebugSingleFile() { + const commandName = `${EXTENSION_NAME}.debugSingleFile`; + commandDebugSingleFileDisposable = vscode.commands.registerCommand(commandName, () => { + initProviderBasedOnSingleFile(); + debugTaskCallback(); + }); + exports.extensionContext?.subscriptions.push(commandDebugSingleFileDisposable); +} +async function buildTaskCallback(singleFileBuild) { + if (!activeFolder) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!(0, fileUtils_1.pathExists)(modeDir)) + (0, fileUtils_1.mkdirRecursive)(modeDir); + if (!settingsProvider) + return; + await (0, builder_1.executeBuildTask)(settingsProvider, activeFolder, buildMode, singleFileBuild); +} +async function runTaskCallback() { + if (!activeFolder) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!(0, fileUtils_1.pathExists)(modeDir)) + return; + if (!settingsProvider) { + return; + } + await (0, runner_1.executeRunTask)(activeFolder, buildMode, argumentsString, settingsProvider.operatingSystem); +} +async function cleanTaskCallback() { + if (!settingsProvider || + !settingsProvider.operatingSystem || + !activeFolder || + !workspaceFolder) { + return; + } + await (0, cleaner_1.executeCleanTask)(activeFolder, buildMode, workspaceFolder, settingsProvider.operatingSystem); +} +function debugTaskCallback() { + if (!activeFolder) + return; + if (!workspaceFolder) + return; + (0, debugger_1.runDebugger)(activeFolder, workspaceFolder, buildMode); +} + + +/***/ }), + +/***/ "./src/handler/folderHandler.ts": +/*!**************************************!*\ + !*** ./src/handler/folderHandler.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.folderHandler = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const settingsProvider_1 = __webpack_require__(/*! ../provider/settingsProvider */ "./src/provider/settingsProvider.ts"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +async function folderHandler(settingsProvider) { + const workspacesFolders = vscode.workspace.workspaceFolders; + if (!workspacesFolders) + return; + let foldersList = []; + workspacesFolders.forEach((folder) => { + const directories = [folder.name]; + const recursiveDirectories = (0, fileUtils_1.getDirectoriesRecursive)(folder.uri.fsPath); + if (recursiveDirectories) { + directories.push(...recursiveDirectories); + } + directories.forEach((dir) => { + let text = dir.replace(folder.uri.fsPath, folder.name); + text = (0, fileUtils_1.replaceBackslashes)(text); + foldersList.push(text); + }); + if (settingsProvider) { + foldersList = (0, fileUtils_1.includePatternFromList)(settingsProvider.includeSearch, foldersList); + } + if (settingsProvider) { + foldersList = (0, fileUtils_1.excludePatternFromList)(settingsProvider.excludeSearch, foldersList); + } + else { + foldersList = (0, fileUtils_1.excludePatternFromList)(settingsProvider_1.SettingsProvider.DEFAULT_EXCLUDE_SEARCH, foldersList); + } + const foldersSet = new Set(foldersList); + foldersList = Array.from(foldersSet); + foldersList = (0, fileUtils_1.naturalSort)(foldersList); + }); + const activeFolderStr = await vscode.window.showQuickPick(foldersList, { + placeHolder: 'Select folder to init the C/C++ Runner extension.', + }); + let activeFolder; + let workspaceFolder; + if (activeFolderStr) { + const folderSplit = activeFolderStr.split('/'); + const workspaceName = folderSplit[0]; + workspacesFolders.forEach((folder) => { + if (folder.name === workspaceName) { + workspaceFolder = folder.uri.fsPath; + } + }); + if (workspaceFolder) { + activeFolder = path.join(workspaceFolder, ...folderSplit.slice(1)); + } + } + return { activeFolder, workspaceFolder }; +} +exports.folderHandler = folderHandler; + + +/***/ }), + +/***/ "./src/handler/modeHandler.ts": +/*!************************************!*\ + !*** ./src/handler/modeHandler.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.modeHandler = void 0; +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +async function modeHandler() { + const combinations = [types_1.Builds.debug, types_1.Builds.release]; + const pickedCombination = await vscode.window.showQuickPick(combinations, { + placeHolder: 'Select a build mode', + }); + if (!pickedCombination) + return undefined; + const pickedMode = pickedCombination.includes(types_1.Builds.debug) + ? types_1.Builds.debug + : types_1.Builds.release; + return pickedMode; +} +exports.modeHandler = modeHandler; + + +/***/ }), + +/***/ "./src/items/statusBarItems.ts": +/*!*************************************!*\ + !*** ./src/items/statusBarItems.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.updateCleanStatus = exports.updateDebugStatus = exports.updateRunStatus = exports.updateBuildStatus = exports.updateModeStatus = exports.updateFolderStatus = void 0; +const path = __webpack_require__(/*! path */ "path"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +function updateFolderStatus(status, workspaceFolder, activeFolder, showStatusBarItems) { + if (!status) + return; + if (workspaceFolder && activeFolder) { + const workspaceName = path.basename(workspaceFolder); + let text = activeFolder.replace(workspaceFolder, workspaceName); + text = (0, fileUtils_1.replaceBackslashes)(text); + const dirs = text.split('/'); + if (dirs.length > 2) { + const lastElement = dirs.length - 1; + text = `${dirs[0]}/.../${dirs[lastElement]}`; + } + status.color = ''; + status.text = `$(folder-active) ${text}`; + } + else { + status.color = '#ffff00'; + status.text = '$(alert) Select folder.'; + } + if (showStatusBarItems) { + status.show(); + } + else { + status.hide(); + } +} +exports.updateFolderStatus = updateFolderStatus; +function updateModeStatus(status, showStatusBarItems, activeFolder, buildMode) { + if (!status) + return; + status.text = `$(tools) ${buildMode}`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateModeStatus = updateModeStatus; +function updateBuildStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(gear)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateBuildStatus = updateBuildStatus; +function updateRunStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(play)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateRunStatus = updateRunStatus; +function updateDebugStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(bug)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateDebugStatus = updateDebugStatus; +function updateCleanStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(trash)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateCleanStatus = updateCleanStatus; +function toggleShow(status, showStatusBarItems, activeFolder) { + if (!status) + return; + if (showStatusBarItems && activeFolder) { + status.show(); + } + else { + status.hide(); + } +} + + +/***/ }), + +/***/ "./src/provider/callbackProvider.ts": +/*!******************************************!*\ + !*** ./src/provider/callbackProvider.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CallbackProvider = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +class CallbackProvider { + constructor(_workspaceFolder, templateFileName, outputFileName) { + this._workspaceFolder = _workspaceFolder; + this.templateFileName = templateFileName; + this.outputFileName = outputFileName; + this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode'); + this._outputPath = path.join(this._vscodeDirectory, outputFileName); + this.createFileWatcher(); + } + createFileWatcher() { + const filePattern = new vscode.RelativePattern(this._workspaceFolder, '.vscode/**'); + this._fileWatcherOnDelete = vscode.workspace.createFileSystemWatcher(filePattern, true, true, false); + this._fileWatcherOnChange = vscode.workspace.createFileSystemWatcher(filePattern, true, false, true); + this._fileWatcherOnDelete.onDidDelete((e) => { + const pathName = e.fsPath; + if (pathName === this._vscodeDirectory || pathName === this._outputPath) { + const extensionIsActive = (0, vscodeUtils_1.getActivationState)(); + if (extensionIsActive) + this.deleteCallback(); + } + }); + this._fileWatcherOnChange.onDidChange((e) => { + const pathName = e.fsPath; + if (pathName === this._outputPath) { + this.changeCallback(); + } + }); + return; + } +} +exports.CallbackProvider = CallbackProvider; + + +/***/ }), + +/***/ "./src/provider/fileProvider.ts": +/*!**************************************!*\ + !*** ./src/provider/fileProvider.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FileProvider = void 0; +const path = __webpack_require__(/*! path */ "path"); +const extension_1 = __webpack_require__(/*! ../extension */ "./src/extension.ts"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const callbackProvider_1 = __webpack_require__(/*! ./callbackProvider */ "./src/provider/callbackProvider.ts"); +class FileProvider extends callbackProvider_1.CallbackProvider { + constructor(workspaceFolder, templateFileName, outputFileName) { + super(workspaceFolder, templateFileName, outputFileName); + const templateDirectory = path.join(extension_1.extensionPath ? extension_1.extensionPath : '', 'templates'); + if (templateFileName) { + this.templatePath = path.join(templateDirectory, templateFileName); + } + if (!(0, fileUtils_1.pathExists)(this._vscodeDirectory)) { + (0, fileUtils_1.mkdirRecursive)(this._vscodeDirectory); + } + } + createFileData() { + if (!(0, fileUtils_1.pathExists)(this._vscodeDirectory)) { + (0, fileUtils_1.mkdirRecursive)(this._vscodeDirectory); + } + this.writeFileData(); + } + updateFileContent() { + this.writeFileData(); + } + deleteCallback() { + const extensionIsActive = (0, vscodeUtils_1.getActivationState)(); + if (extensionIsActive) + this.createFileData(); + } + _updateFolderData(_workspaceFolder) { + this._workspaceFolder = _workspaceFolder; + this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode'); + this._outputPath = path.join(this._vscodeDirectory, this.outputFileName); + this.createFileWatcher(); + } +} +exports.FileProvider = FileProvider; + + +/***/ }), + +/***/ "./src/provider/launchProvider.ts": +/*!****************************************!*\ + !*** ./src/provider/launchProvider.ts ***! + \****************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LaunchProvider = void 0; +const path = __webpack_require__(/*! path */ "path"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +const vscodeUtils_1 = __webpack_require__(/*! ../utils/vscodeUtils */ "./src/utils/vscodeUtils.ts"); +const fileProvider_1 = __webpack_require__(/*! ./fileProvider */ "./src/provider/fileProvider.ts"); +const settingsProvider_1 = __webpack_require__(/*! ./settingsProvider */ "./src/provider/settingsProvider.ts"); +const TEMPLATE_FILENAME = 'launch_template.json'; +const OUTPUT_FILENAME = 'launch.json'; +const CONFIG_NAME = 'C/C++ Runner: Debug Session'; +class LaunchProvider extends fileProvider_1.FileProvider { + constructor(settings, workspaceFolder, activeFolder) { + super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME); + this.settings = settings; + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + this.buildMode = types_1.Builds.debug; + if (!this.activeFolder) { + this.activeFolder = this.workspaceFolder; + } + const updateRequired = this.updateCheck(); + if (updateRequired && activeFolder) { + this.createFileData(); + } + } + updateCheck() { + if (!(0, fileUtils_1.pathExists)(this._outputPath)) { + return true; + } + else { + const configJson = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (configJson) { + configJson.configurations.forEach((config) => { + const triplet = config.name; + if (triplet.includes(this.settings.operatingSystem)) { + return true; + } + }); + } + } + return false; + } + writeFileData() { + if (!this.workspaceFolder && !this.activeFolder) + return; + if (!this.activeFolder) { + this.activeFolder = this.workspaceFolder; + } + if (!this.templatePath) + return; + const launchTemplate = (0, fileUtils_1.readJsonFile)(this.templatePath); + if (!launchTemplate) + return; + if (this.settings.operatingSystem === types_1.OperatingSystems.windows && + (this.settings.useMsvc || this.settings.cCompilerPath.includes('clang'))) { + this.msvcBasedDebugger(launchTemplate); + delete launchTemplate.configurations[0]?.externalConsole; + } + else if (this.settings.operatingSystem === types_1.OperatingSystems.windows && + launchTemplate.configurations[0]) { + this.unixBasedDebugger(launchTemplate); + delete launchTemplate.configurations[0]?.console; + launchTemplate.configurations[0].externalConsole = true; + } + else { + this.unixBasedDebugger(launchTemplate); + delete launchTemplate.configurations[0]?.console; + } + const launchLocal = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!launchLocal) { + (0, fileUtils_1.writeJsonFile)(this._outputPath, launchTemplate); + return; + } + let configIdx = (0, vscodeUtils_1.getLaunchConfigIndex)(launchLocal, CONFIG_NAME); + if (configIdx === undefined) { + configIdx = launchLocal.configurations.length; + } + if (!launchTemplate.configurations[0]) + return; + if (launchLocal && launchLocal.configurations.length === configIdx) { + launchLocal.configurations.push(launchTemplate.configurations[0]); + } + else { + if (!launchLocal.configurations[configIdx]) + return; + launchLocal.configurations[configIdx] = launchTemplate.configurations[0]; + } + (0, fileUtils_1.writeJsonFile)(this._outputPath, launchLocal); + } + updateFolderData(workspaceFolder, activeFolder) { + this.activeFolder = activeFolder; + super._updateFolderData(workspaceFolder); + } + updateModeData(buildMode) { + this.buildMode = buildMode; + } + updateArgumentsData(argumentsString) { + if (argumentsString === undefined) + return; + if (argumentsString === '') { + this.argumentsString = []; + return; + } + if (!argumentsString.includes(' ')) { + this.argumentsString = [argumentsString]; + } + if (!argumentsString.includes('"')) { + this.argumentsString = argumentsString.split(' '); + return; + } + const indicies = (0, fileUtils_1.getOccurenceIndicies)(argumentsString, '"'); + this.argumentsString = []; + const strsToReplace = []; + if (!indicies || indicies.length < 2) + return; + for (let i = 0; i < indicies.length; i += 2) { + const sub = argumentsString.slice(indicies[i] + 1, indicies[i + 1]); + this.argumentsString.push(sub); + strsToReplace.push(sub); + } + for (const strReplace of strsToReplace) { + argumentsString = argumentsString.replace(strReplace, ''); + } + argumentsString = argumentsString.replace(/"/g, ''); + if (argumentsString.startsWith(' ')) { + argumentsString = argumentsString.slice(1); + } + if (argumentsString.endsWith(' ')) { + argumentsString = argumentsString.slice(0, argumentsString.length - 2); + } + this.argumentsString.push(...argumentsString.split(' ').filter((str) => Boolean(str))); + this.argumentsString.map((str) => str.replace(/"/g, '')); + } + changeCallback() { + const launchLocal = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!launchLocal) + return; + const configIdx = (0, vscodeUtils_1.getLaunchConfigIndex)(launchLocal, CONFIG_NAME); + if (configIdx !== undefined) { + const currentConfig = launchLocal.configurations[configIdx]; + if (currentConfig === undefined) + return; + if (currentConfig.miDebuggerPath !== this.settings.debuggerPath && + currentConfig.miDebuggerPath) { + this.settings.debuggerPath = currentConfig.miDebuggerPath; + if (currentConfig.miDebuggerPath.includes(types_1.Debuggers.gdb) || + currentConfig.miDebuggerPath.includes(types_1.Debuggers.lldb)) { + this.settings.debuggerPath = currentConfig.miDebuggerPath; + } + } + } + else { + this.writeFileData(); + } + } + msvcBasedDebugger(launchTemplate) { + if (launchTemplate.configurations[0] === undefined) + return; + launchTemplate.configurations[0].name = CONFIG_NAME; + delete launchTemplate.configurations[0].MIMode; + delete launchTemplate.configurations[0].miDebuggerPath; + delete launchTemplate.configurations[0].setupCommands; + launchTemplate.configurations[0].type = 'cppvsdbg'; + if (this.argumentsString) { + launchTemplate.configurations[0].args = this.argumentsString; + } + else { + launchTemplate.configurations[0].args = []; + } + launchTemplate.configurations[0].cwd = (0, fileUtils_1.replaceBackslashes)(this.activeFolder); + const debugPath = path.join(this.activeFolder, `build/${this.buildMode}/out${this.buildMode}`); + launchTemplate.configurations[0].program = (0, fileUtils_1.replaceBackslashes)(debugPath); + return launchTemplate; + } + unixBasedDebugger(launchTemplate) { + if (launchTemplate.configurations[0] === undefined) + return; + launchTemplate.configurations[0].name = CONFIG_NAME; + if (this.settings.debuggerPath) { + launchTemplate.configurations[0].MIMode = + this.settings.debuggerPath.includes(types_1.Debuggers.gdb) + ? types_1.Debuggers.gdb + : types_1.Debuggers.lldb; + launchTemplate.configurations[0].miDebuggerPath = + this.settings.debuggerPath; + } + else { + launchTemplate.configurations[0].MIMode = + settingsProvider_1.SettingsProvider.DEFAULT_DEBUGGER_PATH; + launchTemplate.configurations[0].miDebuggerPath = + settingsProvider_1.SettingsProvider.DEFAULT_DEBUGGER_PATH; + } + if (types_1.OperatingSystems.mac === this.settings.operatingSystem) { + launchTemplate.configurations[0].stopAtEntry = true; + if (launchTemplate.configurations[0].setupCommands) { + delete launchTemplate.configurations[0].setupCommands; + } + if (this.settings.architecure === types_1.Architectures.ARM64) { + launchTemplate.configurations[0].type = 'lldb'; + if (launchTemplate.configurations[0].miDebuggerPath) { + delete launchTemplate.configurations[0].miDebuggerPath; + } + } + } + if (this.argumentsString && this.argumentsString.length > 0) { + launchTemplate.configurations[0].args = this.argumentsString; + } + else { + launchTemplate.configurations[0].args = []; + } + if (this.settings.operatingSystem === types_1.OperatingSystems.windows) { + launchTemplate.configurations[0].cwd = (0, fileUtils_1.replaceBackslashes)(this.activeFolder); + } + else { + launchTemplate.configurations[0].cwd = this.activeFolder; + } + const debugPath = path.join(this.activeFolder, `build/${this.buildMode}/out${this.buildMode}`); + if (this.settings.operatingSystem === types_1.OperatingSystems.windows) { + launchTemplate.configurations[0].program = (0, fileUtils_1.replaceBackslashes)(debugPath); + } + else { + launchTemplate.configurations[0].program = debugPath; + } + return launchTemplate; + } +} +exports.LaunchProvider = LaunchProvider; + + +/***/ }), + +/***/ "./src/provider/propertiesProvider.ts": +/*!********************************************!*\ + !*** ./src/provider/propertiesProvider.ts ***! + \********************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PropertiesProvider = void 0; +const path = __webpack_require__(/*! path */ "path"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const general_1 = __webpack_require__(/*! ../utils/general */ "./src/utils/general.ts"); +const systemUtils_1 = __webpack_require__(/*! ../utils/systemUtils */ "./src/utils/systemUtils.ts"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +const fileProvider_1 = __webpack_require__(/*! ./fileProvider */ "./src/provider/fileProvider.ts"); +const settingsProvider_1 = __webpack_require__(/*! ./settingsProvider */ "./src/provider/settingsProvider.ts"); +const TEMPLATE_FILENAME = 'properties_template.json'; +const OUTPUT_FILENAME = 'c_cpp_properties.json'; +const INCLUDE_PATTERN = '${workspaceFolder}/**'; +class PropertiesProvider extends fileProvider_1.FileProvider { + constructor(settings, workspaceFolder, activeFolder) { + super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME); + this.settings = settings; + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + const updateRequired = this.updateCheck(); + if (updateRequired && activeFolder) { + this.createFileData(); + } + if ((0, fileUtils_1.pathExists)(this._outputPath)) { + this.lastConfig = (0, fileUtils_1.readJsonFile)(this._outputPath); + } + } + updateCheck() { + if (!(0, fileUtils_1.pathExists)(this._outputPath)) + return true; + const currentConfig = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!currentConfig) + return true; + const currentConfigEntry = currentConfig.configurations[0]; + if (currentConfigEntry === undefined) + return true; + const triplet = currentConfigEntry.name; + if (!triplet.includes(this.settings.operatingSystem)) + return true; + if (this.settings.useMsvc && + !currentConfigEntry.intelliSenseMode.includes('msvc')) { + return true; + } + return false; + } + async writeFileData() { + let configLocal; + if (!this.templatePath) + return; + if (!(0, fileUtils_1.pathExists)(this._outputPath)) { + configLocal = (0, fileUtils_1.readJsonFile)(this.templatePath); + } + else { + configLocal = (0, fileUtils_1.readJsonFile)(this._outputPath); + } + if (!configLocal) + return; + if (!this.settings.cCompilerPath && !this.settings.useMsvc) + return; + const os = this.settings.operatingSystem.toLowerCase(); + let arch; + if (!this.settings.architecure) { + arch = types_1.Architectures.x64; + } + else { + arch = this.settings.architecure.toLowerCase(); + } + let compiler; + if (this.settings.useMsvc) { + compiler = types_1.CompilerSystems.msvc; + } + else if (this.settings.cCompilerPath) { + compiler = this.settings.cCompilerPath.toLowerCase().includes('gcc') + ? types_1.CompilerSystems.gcc + : types_1.CompilerSystems.clang; + } + else { + return; + } + const triplet = `${os}-${compiler}-${arch}`; + const configLocalEntry = configLocal.configurations[0]; + if (configLocalEntry === undefined) + return; + if (this.settings.includePaths.length > 0) { + configLocalEntry.includePath = [INCLUDE_PATTERN]; + for (const path of this.settings.includePaths) { + const includePathSet = new Set(configLocalEntry.includePath); + if (!includePathSet.has(path) && + path !== INCLUDE_PATTERN && + !path.includes('$(default)')) { + configLocalEntry.includePath.push(path); + } + } + } + else { + configLocalEntry.includePath = [INCLUDE_PATTERN]; + } + const old_standard = ['c89', 'c99', 'gnu89', 'gnu99'].some((ext) => this.settings.cStandard === ext); + configLocalEntry.cStandard = this.settings.cStandard + ? this.settings.cStandard + : this.settings.useMsvc + ? settingsProvider_1.SettingsProvider.DEFAULT_C_STANDARD_MSVC + : '${default}'; + if (this.settings.operatingSystem === types_1.OperatingSystems.windows && + this.settings.useMsvc && + old_standard) { + configLocalEntry.cStandard = 'c11'; + } + configLocalEntry.cppStandard = this.settings.cppStandard + ? this.settings.cppStandard + : '${default}'; + if (this.settings.useMsvc) { + configLocalEntry.compilerPath = path.join(this.settings.msvcToolsPath, settingsProvider_1.SettingsProvider.MSVC_COMPILER_NAME); + } + else { + if ((0, fileUtils_1.pathExists)(this.settings.cCompilerPath)) { + configLocalEntry.compilerPath = this.settings.cCompilerPath; + } + else { + const ret = await (0, systemUtils_1.commandExists)(this.settings.cCompilerPath); + if (!ret || + !ret.p || + ret.p.includes('perl') || + ret.p.includes('ruby')) { + configLocalEntry.compilerPath = this.settings.cCompilerPath; + } + else { + configLocalEntry.compilerPath = (0, fileUtils_1.replaceBackslashes)(ret.p); + } + } + } + if (this.settings.isCygwin && + !this.settings.useMsvc && + this.settings.operatingSystem === types_1.OperatingSystems.windows) { + configLocalEntry.name = triplet.replace('windows', 'windows-cygwin'); + configLocalEntry.intelliSenseMode = triplet.replace('windows', 'linux'); + } + else { + configLocalEntry.name = triplet; + configLocalEntry.intelliSenseMode = triplet; + } + (0, fileUtils_1.writeJsonFile)(this._outputPath, configLocal); + } + updateFolderData(workspaceFolder) { + super._updateFolderData(workspaceFolder); + } + changeCallback() { + const currentConfig = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!this.lastConfig) { + this.lastConfig = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!this.lastConfig) + return; + } + if (!currentConfig) + return; + const currentConfigEntry = currentConfig.configurations[0]; + if (currentConfigEntry === undefined) + return; + const lastConfigEntry = this.lastConfig.configurations[0]; + if (lastConfigEntry === undefined) + return; + let updated = false; + if (currentConfigEntry.cStandard !== lastConfigEntry.cStandard) { + this.settings.cStandard = + currentConfigEntry.cStandard !== '${default}' + ? currentConfigEntry.cStandard + : ''; + updated = true; + } + if (currentConfigEntry.cppStandard !== lastConfigEntry.cppStandard) { + this.settings.cppStandard = + currentConfigEntry.cppStandard !== '${default}' + ? currentConfigEntry.cppStandard + : ''; + updated = true; + } + if (currentConfigEntry.compilerPath !== lastConfigEntry.compilerPath && + !currentConfigEntry.compilerPath.includes('cl.exe')) { + this.settings.cCompilerPath = currentConfigEntry.compilerPath; + updated = true; + } + if (!(0, general_1.arraysEqual)(currentConfigEntry.includePath, lastConfigEntry.includePath)) { + this.settings.includePaths = currentConfigEntry.includePath.filter((path) => path !== INCLUDE_PATTERN && !path.includes('$(default)')); + updated = true; + } + if (updated) { + this.settings.writeFileData(); + this.lastConfig = currentConfig; + } + } +} +exports.PropertiesProvider = PropertiesProvider; + + +/***/ }), + +/***/ "./src/provider/settingsProvider.ts": +/*!******************************************!*\ + !*** ./src/provider/settingsProvider.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SettingsProvider = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const fileUtils_1 = __webpack_require__(/*! ../utils/fileUtils */ "./src/utils/fileUtils.ts"); +const systemUtils_1 = __webpack_require__(/*! ../utils/systemUtils */ "./src/utils/systemUtils.ts"); +const types_1 = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts"); +const fileProvider_1 = __webpack_require__(/*! ./fileProvider */ "./src/provider/fileProvider.ts"); +const OUTPUT_FILENAME = 'settings.json'; +const EXTENSION_NAME = 'C_Cpp_Runner'; +class SettingsProvider extends fileProvider_1.FileProvider { + constructor(workspaceFolder, activeFolder) { + super(workspaceFolder, undefined, OUTPUT_FILENAME); + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + this._configGlobal = vscode.workspace.getConfiguration(EXTENSION_NAME); + this.operatingSystem = (0, systemUtils_1.getOperatingSystem)(); + this.isCygwin = false; + this.cCompilerPath = SettingsProvider.DEFAULT_C_COMPILER_PATH; + this.cppCompilerPath = SettingsProvider.DEFAULT_CPP_COMPILER_PATH; + this.debuggerPath = SettingsProvider.DEFAULT_DEBUGGER_PATH; + this.msvcBatchPath = SettingsProvider.DEFAULT_MSVC_BATCH_PATH; + this.msvcToolsPath = SettingsProvider.DEFAULT_MSVC_TOOLS_PATH; + this.useMsvc = SettingsProvider.DEFAULT_USE_MSVC; + this.cStandard = SettingsProvider.DEFAULT_C_STANDARD_UNIX; + this.cppStandard = SettingsProvider.DEFAULT_CPP_STANDARD; + this.compilerArgs = SettingsProvider.DEFAULT_COMPILER_ARGS; + this.linkerArgs = SettingsProvider.DEFAULT_LINKER_ARGS; + this.includePaths = SettingsProvider.DEFAULT_INCLUDE_PATHS; + this.includeSearch = SettingsProvider.DEFAULT_INCLUDE_SEARCH; + this.excludeSearch = SettingsProvider.DEFAULT_EXCLUDE_SEARCH; + this.enableWarnings = SettingsProvider.DEFAULT_ENABLE_WARNINGS; + this.warningsAsError = SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS; + this.warnings = SettingsProvider.DEFAULT_WARNINGS_UNIX; + const settingsFileMissing = this.localFileExist('settings.json'); + const settingsMissing = this.updateCheck(); + const propertiesFileMissing = this.localFileExist('c_cpp_properties.json'); + const allInfoMissing = settingsMissing && propertiesFileMissing && activeFolder; + const onlySettingsMissing = settingsFileMissing && !propertiesFileMissing && activeFolder; + if (allInfoMissing) { + this.loadGlobalSettings(); + this.createFileData(); + this.getArchitecture(); + return; + } + if (onlySettingsMissing) { + this.getSettingsFromProperties(); + this.createFileData(); + this.getArchitecture(); + return; + } + if (activeFolder) { + this.loadLocalSettings(); + this.getArchitecture(); + return; + } + } + updateCheck() { + if (!(0, fileUtils_1.pathExists)(this._outputPath)) { + return true; + } + else if (!this.commandsAlreadyStored()) { + return true; + } + return false; + } + localFileExist(name) { + let settingsFileMissing = false; + const settingsPath = path.join(this._vscodeDirectory, name); + if (!(0, fileUtils_1.pathExists)(settingsPath)) { + settingsFileMissing = true; + } + return settingsFileMissing; + } + commandsAlreadyStored() { + if ((0, fileUtils_1.pathExists)(this._outputPath)) { + const settingsJson = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!settingsJson) + return false; + if ((0, fileUtils_1.localSettingExist)(`${EXTENSION_NAME}.cCompilerPath`, settingsJson) && + (0, fileUtils_1.localSettingExist)(`${EXTENSION_NAME}.cppCompilerPath`, settingsJson) && + (0, fileUtils_1.localSettingExist)(`${EXTENSION_NAME}.debuggerPath`, settingsJson)) { + return true; + } + } + return false; + } + writeFileData() { + this.storeSettings(); + } + deleteCallback() { + this.storeSettings(); + } + changeCallback() { + this.loadLocalSettings(); + } + updateFolderData(workspaceFolder) { + super._updateFolderData(workspaceFolder); + } + loadLocalSettings() { + const settingsLocal = (0, fileUtils_1.readJsonFile)(this._outputPath); + this.cCompilerPath = this.getSettingsValue(settingsLocal, 'cCompilerPath', SettingsProvider.DEFAULT_C_COMPILER_PATH); + this.cppCompilerPath = this.getSettingsValue(settingsLocal, 'cppCompilerPath', SettingsProvider.DEFAULT_CPP_COMPILER_PATH); + this.debuggerPath = this.getSettingsValue(settingsLocal, 'debuggerPath', SettingsProvider.DEFAULT_DEBUGGER_PATH); + this.msvcBatchPath = this.getSettingsValue(settingsLocal, 'msvcBatchPath', SettingsProvider.DEFAULT_MSVC_BATCH_PATH); + if (this.msvcBatchPath === SettingsProvider.DEFAULT_MSVC_BATCH_PATH) { + if ((0, fileUtils_1.pathExists)(this.msvcBatchPath.replace('VR_NR', '2022'))) { + this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2022'); + this.update('msvcBatchPath', this.msvcBatchPath); + } + else if ((0, fileUtils_1.pathExists)(this.msvcBatchPath.replace('VR_NR', '2017'))) { + this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2017'); + this.update('msvcBatchPath', this.msvcBatchPath); + } + else if ((0, fileUtils_1.pathExists)(this.msvcBatchPath.replace('VR_NR', '2015'))) { + this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2015'); + this.update('msvcBatchPath', this.msvcBatchPath); + } + else { + this.msvcBatchPath = ''; + this.update('msvcBatchPath', this.msvcBatchPath); + } + } + this.useMsvc = this.getSettingsValue(settingsLocal, 'useMsvc', SettingsProvider.DEFAULT_USE_MSVC); + if (this.useMsvc) { + this.searchMsvcToolsPath(); + } + this.enableWarnings = this.getSettingsValue(settingsLocal, 'enableWarnings', SettingsProvider.DEFAULT_ENABLE_WARNINGS); + this.warnings = this.getSettingsValue(settingsLocal, 'warnings', SettingsProvider.DEFAULT_WARNINGS_UNIX); + const msvcWarnings = this.warnings.some((warning) => warning.includes('/')); + if (this.useMsvc && !msvcWarnings) { + this.warnings = SettingsProvider.DEFAULT_WARNINGS_MSVC; + } + else if (!this.useMsvc && msvcWarnings) { + this.warnings = SettingsProvider.DEFAULT_WARNINGS_UNIX; + } + this.warningsAsError = this.getSettingsValue(settingsLocal, 'warningsAsError', SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS); + this.cStandard = this.getSettingsValue(settingsLocal, 'cStandard', SettingsProvider.DEFAULT_C_STANDARD_UNIX); + this.cppStandard = this.getSettingsValue(settingsLocal, 'cppStandard', SettingsProvider.DEFAULT_CPP_STANDARD); + this.compilerArgs = this.getSettingsValue(settingsLocal, 'compilerArgs', SettingsProvider.DEFAULT_COMPILER_ARGS); + this.linkerArgs = this.getSettingsValue(settingsLocal, 'linkerArgs', SettingsProvider.DEFAULT_LINKER_ARGS); + this.includePaths = this.getSettingsValue(settingsLocal, 'includePaths', SettingsProvider.DEFAULT_INCLUDE_PATHS); + this.includeSearch = this.getSettingsValue(settingsLocal, 'includeSearch', SettingsProvider.DEFAULT_INCLUDE_SEARCH); + this.excludeSearch = this.getSettingsValue(settingsLocal, 'excludeSearch', SettingsProvider.DEFAULT_EXCLUDE_SEARCH); + } + getSettingsFromProperties() { + const propertiesPath = path.join(this._vscodeDirectory, 'c_cpp_properties.json'); + const propertiesConfig = (0, fileUtils_1.readJsonFile)(propertiesPath); + if (!propertiesConfig) + return; + const currentConfigEntry = propertiesConfig.configurations[0]; + if (!currentConfigEntry) + return; + this.cCompilerPath = this.getPropertiesValue(currentConfigEntry, 'compilerPath', this.cCompilerPath); + const isGccBased = this.cCompilerPath.includes(types_1.CompilerSystems.gcc); + const isClangBased = this.cCompilerPath.includes(types_1.CompilerSystems.clang); + if (isGccBased) { + const cppPath = this.cCompilerPath.replace('gcc', 'g++'); + const dbgPath = this.cCompilerPath.replace('gcc', 'gdb'); + this.cppCompilerPath = cppPath; + this.debuggerPath = dbgPath; + } + else if (isClangBased) { + const cppPath = this.cCompilerPath.replace('clang', 'clang++'); + const dbgPath = this.cCompilerPath.replace('clang', 'lldb'); + this.cppCompilerPath = path.join(cppPath); + this.debuggerPath = dbgPath; + } + const _cStandard = this.getPropertiesValue(currentConfigEntry, 'cStandard', this.cStandard); + this.cStandard = + _cStandard !== '${default}' + ? _cStandard + : SettingsProvider.DEFAULT_C_STANDARD_UNIX; + const _cppStandard = this.getPropertiesValue(currentConfigEntry, 'cppStandard', this.cppStandard); + this.cppStandard = + _cppStandard !== '${default}' + ? _cppStandard + : SettingsProvider.DEFAULT_CPP_STANDARD; + const _includePaths = this.getPropertiesValue(currentConfigEntry, 'includePath', this.includePaths); + this.includePaths = + _includePaths.length !== 0 + ? _includePaths + : SettingsProvider.DEFAULT_INCLUDE_PATHS; + } + searchMsvcToolsPath() { + let msvcBasePath = this.msvcBatchPath.split('VC')[0]; + if (!msvcBasePath) + return; + msvcBasePath += 'VC/Tools/MSVC'; + const installed_versions = (0, fileUtils_1.foldersInDir)(msvcBasePath); + const newst_version_path = installed_versions[installed_versions.length - 1]; + if (installed_versions.length === 0 || !newst_version_path) + return; + const newst_version_path_splitted = newst_version_path.split('\\'); + if (newst_version_path_splitted.length === 0) + return; + const versionNumber = newst_version_path_splitted[newst_version_path_splitted.length - 1]; + if (!versionNumber) + return; + let architecturePath; + if (this.architecure === types_1.Architectures.x64 || + this.architecure === undefined) { + architecturePath = 'bin/Hostx64/x64'; + } + else { + architecturePath = 'bin/Hostx86/x86'; + } + if (!(0, fileUtils_1.pathExists)(architecturePath)) + return; + this.msvcToolsPath = path.join(msvcBasePath, versionNumber, architecturePath); + } + getArchitecture() { + if (this.useMsvc) { + this.architecure = types_1.Architectures.x64; + this.isCygwin = false; + return; + } + if (this.cCompilerPath) { + const ret = (0, systemUtils_1.getCompilerArchitecture)(this.cCompilerPath); + this.architecure = ret.architecure; + this.isCygwin = ret.isCygwin; + return; + } + if (this.cppCompilerPath) { + const ret = (0, systemUtils_1.getCompilerArchitecture)(this.cppCompilerPath); + this.architecure = ret.architecure; + this.isCygwin = ret.isCygwin; + return; + } + this.architecure = types_1.Architectures.x64; + this.isCygwin = false; + } + reset() { + this.loadGlobalSettings(); + this.storeSettings(); + } + loadGlobalSettings() { + this.cCompilerPath = this.getGlobalSettingsValue('cCompilerPath', SettingsProvider.DEFAULT_C_COMPILER_PATH); + this.cppCompilerPath = this.getGlobalSettingsValue('cppCompilerPath', SettingsProvider.DEFAULT_CPP_COMPILER_PATH); + this.debuggerPath = this.getGlobalSettingsValue('debuggerPath', SettingsProvider.DEFAULT_DEBUGGER_PATH); + this.msvcBatchPath = this.getGlobalSettingsValue('msvcBatchPath', SettingsProvider.DEFAULT_MSVC_BATCH_PATH); + this.msvcToolsPath = this.getGlobalSettingsValue('msvcToolsPath', SettingsProvider.DEFAULT_MSVC_TOOLS_PATH); + this.useMsvc = this.getGlobalSettingsValue('useMsvc', SettingsProvider.DEFAULT_USE_MSVC); + this.enableWarnings = this.getGlobalSettingsValue('enableWarnings', SettingsProvider.DEFAULT_ENABLE_WARNINGS); + this.warnings = this.getGlobalSettingsValue('warnings', SettingsProvider.DEFAULT_WARNINGS_UNIX); + this.enableWarnings = this.getGlobalSettingsValue('enableWarnings', SettingsProvider.DEFAULT_ENABLE_WARNINGS); + this.warningsAsError = this.getGlobalSettingsValue('warningsAsError', SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS); + this.cStandard = this.getGlobalSettingsValue('cStandard', SettingsProvider.DEFAULT_C_STANDARD_UNIX); + this.cppStandard = this.getGlobalSettingsValue('cppStandard', SettingsProvider.DEFAULT_CPP_STANDARD); + this.compilerArgs = this.getGlobalSettingsValue('compilerArgs', SettingsProvider.DEFAULT_COMPILER_ARGS); + this.linkerArgs = this.getGlobalSettingsValue('linkerArgs', SettingsProvider.DEFAULT_LINKER_ARGS); + this.includePaths = this.getGlobalSettingsValue('includePaths', SettingsProvider.DEFAULT_INCLUDE_PATHS); + this.excludeSearch = this.getGlobalSettingsValue('excludeSearch', SettingsProvider.DEFAULT_EXCLUDE_SEARCH); + } + storeSettings() { + this.updateBasedOnEnv('cCompilerPath', this.cCompilerPath); + this.updateBasedOnEnv('cppCompilerPath', this.cppCompilerPath); + this.updateBasedOnEnv('debuggerPath', this.debuggerPath); + this.update('cStandard', this.cStandard); + this.update('cppStandard', this.cppStandard); + this.update('msvcBatchPath', this.msvcBatchPath); + this.update('useMsvc', this.useMsvc); + this.update('warnings', this.warnings); + this.update('enableWarnings', this.enableWarnings); + this.update('warningsAsError', this.warningsAsError); + this.update('compilerArgs', this.compilerArgs); + this.update('linkerArgs', this.linkerArgs); + this.update('includePaths', this.includePaths); + this.update('includeSearch', this.includeSearch); + this.update('excludeSearch', this.excludeSearch); + } + getGlobalSettingsValue(name, defaultValue) { + const fullSettingInfo = this._configGlobal.inspect(name); + return fullSettingInfo?.globalValue + ? fullSettingInfo.globalValue + : defaultValue; + } + getSettingsValue(settingsLocal, name, defaultValue) { + const settingName = `${EXTENSION_NAME}.${name}`; + if (settingsLocal && settingsLocal[settingName] !== undefined) { + return settingsLocal[settingName]; + } + return this.getGlobalSettingsValue(name, defaultValue); + } + getPropertiesValue(properties, name, defaultValue) { + if (properties && properties[name] !== undefined) { + return properties[name]; + } + return defaultValue; + } + update(key, value) { + let settingsJson = (0, fileUtils_1.readJsonFile)(this._outputPath); + if (!settingsJson) + settingsJson = {}; + const settingName = `${EXTENSION_NAME}.${key}`; + settingsJson[settingName] = value; + (0, fileUtils_1.writeJsonFile)(this._outputPath, settingsJson); + } + updateBasedOnEnv(settingsName, settingsValue) { + if (this.operatingSystem === types_1.OperatingSystems.windows) { + this.update(settingsName, (0, fileUtils_1.replaceBackslashes)(settingsValue)); + } + else { + this.update(settingsName, settingsValue); + } + } +} +exports.SettingsProvider = SettingsProvider; +SettingsProvider.DEFAULT_C_COMPILER_PATH = 'gcc'; +SettingsProvider.DEFAULT_CPP_COMPILER_PATH = 'g++'; +SettingsProvider.DEFAULT_DEBUGGER_PATH = 'gdb'; +SettingsProvider.DEFAULT_MSVC_BATCH_PATH = 'C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat'; +SettingsProvider.DEFAULT_MSVC_TOOLS_PATH = ''; +SettingsProvider.DEFAULT_C_STANDARD_UNIX = ''; +SettingsProvider.DEFAULT_C_STANDARD_MSVC = 'c11'; +SettingsProvider.DEFAULT_CPP_STANDARD = ''; +SettingsProvider.DEFAULT_INCLUDE_SEARCH = ['*', '**/*']; +SettingsProvider.DEFAULT_EXCLUDE_SEARCH = [ + '**/build', + '**/build/**', + '**/.*', + '**/.*/**', + '**/.vscode', + '**/.vscode/**', +]; +SettingsProvider.DEFAULT_ENABLE_WARNINGS = true; +SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS = false; +SettingsProvider.DEFAULT_WARNINGS_UNIX = ['-Wall', '-Wextra', '-Wpedantic']; +SettingsProvider.DEFAULT_WARNINGS_MSVC = ['/W4']; +SettingsProvider.DEFAULT_COMPILER_ARGS = []; +SettingsProvider.DEFAULT_LINKER_ARGS = []; +SettingsProvider.DEFAULT_INCLUDE_PATHS = []; +SettingsProvider.DEFAULT_USE_MSVC = false; +SettingsProvider.MSVC_COMPILER_NAME = 'cl.exe'; + + +/***/ }), + +/***/ "./src/utils/fileUtils.ts": +/*!********************************!*\ + !*** ./src/utils/fileUtils.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOccurenceIndicies = exports.getBasename = exports.removeExtension = exports.hasPathSeperators = exports.localSettingExist = exports.naturalSort = exports.writeJsonFile = exports.readJsonFile = exports.foldersInDir = exports.excludePatternFromList = exports.includePatternFromList = exports.filesInDir = exports.readDir = exports.getDirectoriesRecursive = exports.getLanguage = exports.isCSourceFile = exports.isCppSourceFile = exports.isHeaderFile = exports.addFileExtensionDot = exports.isSourceFile = exports.pathExists = exports.filterOnString = exports.rmdirRecursive = exports.mkdirRecursive = exports.replaceBackslashes = void 0; +const fs = __webpack_require__(/*! fs */ "fs"); +const JSON5 = __webpack_require__(/*! json5 */ "./node_modules/json5/lib/index.js"); +const minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js"); +const path = __webpack_require__(/*! path */ "path"); +const types_1 = __webpack_require__(/*! ./types */ "./src/utils/types.ts"); +function replaceBackslashes(text) { + return text.replace(/\\/g, '/'); +} +exports.replaceBackslashes = replaceBackslashes; +function mkdirRecursive(dir) { + try { + fs.mkdirSync(dir, { recursive: true }); + } + catch (err) { } +} +exports.mkdirRecursive = mkdirRecursive; +function rmdirRecursive(dir) { + try { + fs.rmdirSync(dir, { recursive: true }); + } + catch (err) { } +} +exports.rmdirRecursive = rmdirRecursive; +function filterOnString(names, filterName) { + return names.filter((name) => !name.includes(filterName)); +} +exports.filterOnString = filterOnString; +function pathExists(filepath) { + try { + fs.accessSync(filepath); + } + catch (err) { + return false; + } + return true; +} +exports.pathExists = pathExists; +function isSourceFile(fileExt) { + const fileExtLower = fileExt.toLowerCase(); + if (isHeaderFile(fileExtLower)) { + return false; + } + if (!(isCSourceFile(fileExtLower) || isCppSourceFile(fileExtLower))) { + return false; + } + return true; +} +exports.isSourceFile = isSourceFile; +function addFileExtensionDot(fileExt) { + if (!fileExt.includes('.')) { + fileExt = `.${fileExt}`; + } + return fileExt; +} +exports.addFileExtensionDot = addFileExtensionDot; +function isHeaderFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return ['.hpp', '.hh', '.hxx', '.h'].some((ext) => fileExtLower === ext); +} +exports.isHeaderFile = isHeaderFile; +function isCppSourceFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return ['.cpp', '.cc', '.cxx'].some((ext) => fileExtLower === ext); +} +exports.isCppSourceFile = isCppSourceFile; +function isCSourceFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return fileExtLower === '.c'; +} +exports.isCSourceFile = isCSourceFile; +function getLanguage(dir) { + const files = filesInDir(dir); + const anyCppFile = files.some((file) => isCppSourceFile(path.extname(file))); + if (anyCppFile) { + return types_1.Languages.cpp; + } + else { + return types_1.Languages.c; + } +} +exports.getLanguage = getLanguage; +function getDirectoriesRecursive(dir) { + const directories = foldersInDir(dir); + if (directories.length === 0) + return; + directories.forEach((dir) => getDirectoriesRecursive(dir)?.forEach((newDir) => directories.push(newDir))); + return directories; +} +exports.getDirectoriesRecursive = getDirectoriesRecursive; +function readDir(dir) { + try { + return fs.readdirSync(dir, { withFileTypes: true }); + } + catch (err) { } +} +exports.readDir = readDir; +function filesInDir(dir) { + const fileDirents = readDir(dir); + if (!fileDirents) + return []; + const files = fileDirents + .filter((file) => file.isFile()) + .map((file) => file.name); + return files; +} +exports.filesInDir = filesInDir; +function includePatternFromList(includeSearch, foldersList) { + const result = []; + for (const pattern of includeSearch) { + result.push(...foldersList.filter((folder) => minimatch(folder, pattern))); + } + return result; +} +exports.includePatternFromList = includePatternFromList; +function excludePatternFromList(excludeSearch, foldersList) { + for (const pattern of excludeSearch) { + foldersList = foldersList.filter((folder) => !minimatch(folder, pattern)); + } + return foldersList; +} +exports.excludePatternFromList = excludePatternFromList; +function foldersInDir(dir) { + const fileDirents = readDir(dir); + if (!fileDirents) + return []; + const folders = fileDirents.filter((folder) => folder.isDirectory()); + const folderNames = folders.map((folder) => path.join(dir.toString(), folder.name)); + return folderNames; +} +exports.foldersInDir = foldersInDir; +function readJsonFile(filepath) { + let configJson; + try { + const fileContent = fs.readFileSync(filepath, 'utf-8'); + configJson = JSON5.parse(fileContent); + } + catch (err) { } + return configJson; +} +exports.readJsonFile = readJsonFile; +function writeJsonFile(outputFilePath, jsonContent) { + if (jsonContent === undefined) + return; + const dirname = path.dirname(outputFilePath); + if (!pathExists(dirname)) { + mkdirRecursive(dirname); + } + const jsonString = JSON.stringify(jsonContent, null, 2); + try { + fs.writeFileSync(outputFilePath, jsonString); + } + catch (err) { } +} +exports.writeJsonFile = writeJsonFile; +function naturalSort(names) { + return names.sort((a, b) => a.localeCompare(b, undefined, { + numeric: true, + sensitivity: 'base', + })); +} +exports.naturalSort = naturalSort; +function localSettingExist(key, jsonData) { + const commandPath = jsonData[key]; + if (!commandPath) + return false; + if (!pathExists(commandPath)) + return false; + return true; +} +exports.localSettingExist = localSettingExist; +function hasPathSeperators(pathStr) { + return pathStr.includes('/') || pathStr.includes('\\'); +} +exports.hasPathSeperators = hasPathSeperators; +function removeExtension(pathStr, ext) { + const extStr = addFileExtensionDot(ext); + if (pathStr.includes(extStr)) { + return pathStr.replace(extStr, ''); + } + return pathStr; +} +exports.removeExtension = removeExtension; +function getBasename(pathStr) { + if (hasPathSeperators(pathStr)) { + return path.basename(pathStr); + } + return pathStr; +} +exports.getBasename = getBasename; +function getOccurenceIndicies(text, char) { + const indices = []; + for (let i = 0; i < text.length; i++) { + if (text[i] === char) + indices.push(i); + } + return indices; +} +exports.getOccurenceIndicies = getOccurenceIndicies; + + +/***/ }), + +/***/ "./src/utils/general.ts": +/*!******************************!*\ + !*** ./src/utils/general.ts ***! + \******************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.arraysEqual = void 0; +function arraysEqual(a, b) { + if (a === b) + return true; + if (a.length !== b.length) + return false; + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; + } + return true; +} +exports.arraysEqual = arraysEqual; + + +/***/ }), + +/***/ "./src/utils/systemUtils.ts": +/*!**********************************!*\ + !*** ./src/utils/systemUtils.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCompilerArchitecture = exports.getOperatingSystem = exports.commandExists = void 0; +const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); +const lookpath_1 = __webpack_require__(/*! lookpath */ "./node_modules/lookpath/lib/index.js"); +const os_1 = __webpack_require__(/*! os */ "os"); +const types_1 = __webpack_require__(/*! ./types */ "./src/utils/types.ts"); +async function commandExists(command) { + let commandPath = await (0, lookpath_1.lookpath)(command); + if (!commandPath) { + return { f: false, p: commandPath }; + } + if (commandPath.includes('.EXE')) { + commandPath = commandPath.replace('.EXE', '.exe'); + } + return { f: true, p: commandPath }; +} +exports.commandExists = commandExists; +function getOperatingSystem() { + const platformName = (0, os_1.platform)(); + let operatingSystem; + if (platformName === 'win32') { + operatingSystem = types_1.OperatingSystems.windows; + } + else if (platformName === 'darwin') { + operatingSystem = types_1.OperatingSystems.mac; + } + else { + operatingSystem = types_1.OperatingSystems.linux; + } + return operatingSystem; +} +exports.getOperatingSystem = getOperatingSystem; +function getCompilerArchitecture(compiler) { + const command = `${compiler} -dumpmachine`; + let byteArray; + try { + byteArray = (0, child_process_1.execSync)(command); + } + catch (err) { + byteArray = Buffer.from('x64', 'utf-8'); + } + const str = String.fromCharCode(...byteArray); + let architecure = types_1.Architectures.x64; + let isCygwin = false; + if (str.toLowerCase().includes('arm')) { + architecure = types_1.Architectures.ARM64; + } + else if (str.includes('64')) { + architecure = types_1.Architectures.x64; + } + else { + architecure = types_1.Architectures.x86; + } + if (str.includes('cygwin')) { + isCygwin = true; + } + return { architecure: architecure, isCygwin: isCygwin }; +} +exports.getCompilerArchitecture = getCompilerArchitecture; + + +/***/ }), + +/***/ "./src/utils/types.ts": +/*!****************************!*\ + !*** ./src/utils/types.ts ***! + \****************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Builds = exports.Architectures = exports.OperatingSystems = exports.Debuggers = exports.CompilerSystems = exports.Languages = exports.Task = void 0; +const vscode = __webpack_require__(/*! vscode */ "vscode"); +class Task extends vscode.Task { +} +exports.Task = Task; +var Languages; +(function (Languages) { + Languages["c"] = "C"; + Languages["cpp"] = "Cpp"; +})(Languages = exports.Languages || (exports.Languages = {})); +var CompilerSystems; +(function (CompilerSystems) { + CompilerSystems["gcc"] = "gcc"; + CompilerSystems["clang"] = "clang"; + CompilerSystems["msvc"] = "msvc"; +})(CompilerSystems = exports.CompilerSystems || (exports.CompilerSystems = {})); +var Debuggers; +(function (Debuggers) { + Debuggers["lldb"] = "lldb"; + Debuggers["gdb"] = "gdb"; +})(Debuggers = exports.Debuggers || (exports.Debuggers = {})); +var OperatingSystems; +(function (OperatingSystems) { + OperatingSystems["windows"] = "windows"; + OperatingSystems["linux"] = "linux"; + OperatingSystems["mac"] = "macos"; +})(OperatingSystems = exports.OperatingSystems || (exports.OperatingSystems = {})); +var Architectures; +(function (Architectures) { + Architectures["x86"] = "x86"; + Architectures["x64"] = "x64"; + Architectures["ARM64"] = "ARM64"; +})(Architectures = exports.Architectures || (exports.Architectures = {})); +var Builds; +(function (Builds) { + Builds["debug"] = "Debug"; + Builds["release"] = "Release"; +})(Builds = exports.Builds || (exports.Builds = {})); + + +/***/ }), + +/***/ "./src/utils/vscodeUtils.ts": +/*!**********************************!*\ + !*** ./src/utils/vscodeUtils.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getProcessExecution = exports.isCmakeProject = exports.getActivationState = exports.updateActivationState = exports.getLaunchConfigIndex = exports.setContextValue = exports.createStatusBarItem = exports.disposeItem = void 0; +const path = __webpack_require__(/*! path */ "path"); +const vscode = __webpack_require__(/*! vscode */ "vscode"); +const extension_1 = __webpack_require__(/*! ../extension */ "./src/extension.ts"); +const fileUtils_1 = __webpack_require__(/*! ./fileUtils */ "./src/utils/fileUtils.ts"); +const types_1 = __webpack_require__(/*! ./types */ "./src/utils/types.ts"); +const STATUS_BAR_ALIGN = vscode.StatusBarAlignment.Left; +const STATUS_BAR_PRIORITY = 50; +function disposeItem(disposableItem) { + disposableItem?.dispose(); +} +exports.disposeItem = disposeItem; +function createStatusBarItem() { + return vscode.window.createStatusBarItem(STATUS_BAR_ALIGN, STATUS_BAR_PRIORITY); +} +exports.createStatusBarItem = createStatusBarItem; +function setContextValue(key, value) { + return vscode.commands.executeCommand('setContext', key, value); +} +exports.setContextValue = setContextValue; +function getLaunchConfigIndex(configJson, configName) { + let configIdx = 0; + if (configJson) { + for (const config of configJson.configurations) { + if (config.name !== configName) { + configIdx++; + } + else { + return configIdx; + } + } + } + return undefined; +} +exports.getLaunchConfigIndex = getLaunchConfigIndex; +function updateActivationState(newState) { + extension_1.extensionState?.update('activatedExtension', newState); +} +exports.updateActivationState = updateActivationState; +function getActivationState() { + if (extension_1.extensionState) { + return extension_1.extensionState.get('activatedExtension'); + } + return false; +} +exports.getActivationState = getActivationState; +function isCmakeProject() { + let cmakeFileFound = false; + const workspaceFodlers = vscode.workspace.workspaceFolders; + const cmakeExtensionName = 'cmake'; + const cmakeSettingName = 'sourceDirectory'; + if (workspaceFodlers) { + workspaceFodlers.forEach((folder) => { + if (!cmakeFileFound) { + const files = (0, fileUtils_1.filesInDir)(folder.uri.fsPath); + files.forEach((file) => { + if (file.toLowerCase() === 'CMakeLists.txt'.toLowerCase()) { + cmakeFileFound = true; + } + }); + const settingsPath = path.join(folder.uri.fsPath, '.vscode', 'settings.json'); + if ((0, fileUtils_1.pathExists)(settingsPath)) { + const configLocal = (0, fileUtils_1.readJsonFile)(settingsPath); + if (configLocal && + configLocal[`${cmakeExtensionName}.${cmakeSettingName}`]) { + cmakeFileFound = true; + } + } + } + }); + } + if (!cmakeFileFound) { + const config = vscode.workspace.getConfiguration(cmakeExtensionName); + const cmakeSetting = config.get(cmakeSettingName); + if (cmakeSetting && cmakeSetting !== '${workspaceFolder}') { + cmakeFileFound = true; + } + } + return cmakeFileFound; +} +exports.isCmakeProject = isCmakeProject; +function getProcessExecution(operatingSystem, isMsvcBuildTask, commandLine, activeFolder) { + const options = { + cwd: activeFolder, + }; + if (operatingSystem === types_1.OperatingSystems.windows) { + return winProcessExecution(isMsvcBuildTask, commandLine, options); + } + else { + return unixProcessExecution(commandLine, options); + } +} +exports.getProcessExecution = getProcessExecution; +function winProcessExecution(isMsvcBuildTask, commandLine, options) { + const drive = process.env['SystemDrive'] ? process.env['SystemDrive'] : 'C:'; + if (isMsvcBuildTask) { + const shellOptions = { + executable: drive + '/Windows/System32/cmd.exe', + shellArgs: ['/d', '/c'], + }; + return new vscode.ShellExecution(commandLine, shellOptions); + } + else { + return new vscode.ProcessExecution(drive + '/Windows/System32/cmd.exe', ['/d', '/c', commandLine], options); + } +} +function unixProcessExecution(commandLine, options) { + const standard_shell = process.env['SHELL'] + ? process.env['SHELL'] + : '/bin/bash'; + return new vscode.ProcessExecution(standard_shell, ['-c', commandLine], options); +} + + +/***/ }), + +/***/ "vscode": +/*!*************************!*\ + !*** external "vscode" ***! + \*************************/ +/***/ ((module) => { + +"use strict"; +module.exports = require("vscode"); + +/***/ }), + +/***/ "child_process": +/*!********************************!*\ + !*** external "child_process" ***! + \********************************/ +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + +/***/ "fs": +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ "os": +/*!*********************!*\ + !*** external "os" ***! + \*********************/ +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ "path": +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__("./src/extension.ts"); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/main.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/main.js.map new file mode 100644 index 0000000..fe188a5 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;AC7DA,gBAAgB,mBAAO,CAAC,sDAAY;AACpC,eAAe,mBAAO,CAAC,8DAAgB;;AAEvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;;;AAGA;AACA;AACA,wCAAwC,GAAG,IAAI;AAC/C;AACA;AACA;;AAEA;AACA,qBAAqB,KAAK;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B,uCAAuC,GAAG;AAC1C,YAAY,GAAG,yBAAyB;AACxC;AACA;AACA,8BAA8B;AAC9B,cAAc,GAAG;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,KAAK;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,EAAE;AACV,2BAA2B;AAC3B,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,YAAY,KAAK,QAAQ,EAAE,IAAI,EAAE;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,oCAAoC,0BAA0B;AAC9D;;AAEA,kBAAkB,cAAc;AAChC,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACvMA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACZA,cAAc,mBAAO,CAAC,kDAAS;AAC/B,kBAAkB,mBAAO,CAAC,0DAAa;;AAEvC;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACRA,aAAa,mBAAO,CAAC,gDAAQ;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA,4BAA4B,SAAS;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,WAAW;AAClE;;AAEA;AACA;AACA,qDAAqD,MAAM;AAC3D;;AAEA;AACA;AACA,6DAA6D,KAAK,GAAG,OAAO;AAC5E;;AAEA,oDAAoD,cAAc,OAAO,KAAK,GAAG,OAAO;AACxF;;AAEA;AACA,yDAAyD,KAAK,GAAG,OAAO;AACxE;;AAEA;AACA;AACA;AACA,gEAAgE,KAAK,GAAG,OAAO;AAC/E;;AAEA;AACA,uDAAuD,cAAc,OAAO,KAAK,GAAG,OAAO;AAC3F;;AAEA;AACA;AACA,iEAAiE,KAAK,GAAG,OAAO;AAChF;;AAEA;AACA,4BAA4B,cAAc,sCAAsC;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9jCA,aAAa,mBAAO,CAAC,gDAAQ;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,kCAAkC,UAAU;;AAE5C;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB,UAAU;AACV;AACA;AACA;AACA,0BAA0B,mBAAmB;AAC7C,cAAc;AACd;AACA;AACA,0BAA0B,iDAAiD;AAC3E;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpQA;AACA,8BAA8B;AAC9B,uBAAuB;AACvB,0BAA0B;;;;;;;;;;;ACH1B,gBAAgB,mBAAO,CAAC,2DAAgB;;AAExC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;;;;;;;;;;;;AClCa;AACb;AACA;AACA,mCAAmC,oCAAoC,gBAAgB;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAA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ACA;AACA,WAAW,QAAQ;AACnB,WAAW,gBAAgB;AAC3B,YAAY,2BAA2B;AACvC;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,oDAAoD;AACnI;AACA;AACA,qEAAqE,eAAe;AACpF;AACA,SAAS;AACT,KAAK;AACL;AACA,gBAAgB;;;;;;;;;;;AC7IhB;AACA;;AAEA,0BAA0B,MAAM,OAAO,mBAAO,CAAC,kBAAM,IAAI,aAAa;AACtE;AACA;AACA;;AAEA;AACA,aAAa,mBAAO,CAAC,gEAAiB;;AAEtC;AACA,SAAS,sCAAsC;AAC/C,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,IAAI;;AAE7C;AACA;AACA;;AAEA;AACA,gCAAgC;;AAEhC,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,qDAAqD;;AAErD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAM;AACN,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK,IAAI;AACT,KAAK,GAAG;AACR,KAAK,KAAK;AACV,KAAK,IAAI,IAAI,EAAE;AACf,KAAK,IAAI,EAAE,IAAI;AACf;AACA;AACA,KAAK,IAAI,OAAO,IAAI;AACpB,KAAK,EAAE,OAAO,EAAE;AAChB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,QAAQ,MAAM;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA,MAAM;AACN,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;AACA;AACA,gCAAgC,EAAE,EAAE,KAAK;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,4CAA4C;;AAElD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR,QAAQ;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AA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GAAiC;YACjD,UAAU,EAAE,KAAK,GAAG,2BAA2B;YAC/C,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;SACxB,CAAC;QACF,OAAO,IAAI,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;KAC7D;SAAM;QACL,OAAO,IAAI,MAAM,CAAC,gBAAgB,CAChC,KAAK,GAAG,2BAA2B,EACnC,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EACzB,OAAO,CACR,CAAC;KACH;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,WAAmB,EAAE,OAAwB;IACzE,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;QACzC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,WAAW,CAAC;IAChB,OAAO,IAAI,MAAM,CAAC,gBAAgB,CAChC,cAAc,EACd,CAAC,IAAI,EAAE,WAAW,CAAC,EACnB,OAAO,CACR,CAAC;AACJ,CAAC;;;;;;;;;;;;ACzJD;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://c-cpp-runner/./node_modules/balanced-match/index.js","webpack://c-cpp-runner/./node_modules/brace-expansion/index.js","webpack://c-cpp-runner/./node_modules/concat-map/index.js","webpack://c-cpp-runner/./node_modules/json5/lib/index.js","webpack://c-cpp-runner/./node_modules/json5/lib/parse.js","webpack://c-cpp-runner/./node_modules/json5/lib/stringify.js","webpack://c-cpp-runner/./node_modules/json5/lib/unicode.js","webpack://c-cpp-runner/./node_modules/json5/lib/util.js","webpack://c-cpp-runner/./node_modules/lookpath/lib/index.js","webpack://c-cpp-runner/./node_modules/minimatch/minimatch.js","webpack://c-cpp-runner/./src/executor/builder.ts","webpack://c-cpp-runner/./src/executor/cleaner.ts","webpack://c-cpp-runner/./src/executor/debugger.ts","webpack://c-cpp-runner/./src/executor/runner.ts","webpack://c-cpp-runner/./src/extension.ts","webpack://c-cpp-runner/./src/handler/folderHandler.ts","webpack://c-cpp-runner/./src/handler/modeHandler.ts","webpack://c-cpp-runner/./src/items/statusBarItems.ts","webpack://c-cpp-runner/./src/provider/callbackProvider.ts","webpack://c-cpp-runner/./src/provider/fileProvider.ts","webpack://c-cpp-runner/./src/provider/launchProvider.ts","webpack://c-cpp-runner/./src/provider/propertiesProvider.ts","webpack://c-cpp-runner/./src/provider/settingsProvider.ts","webpack://c-cpp-runner/./src/utils/fileUtils.ts","webpack://c-cpp-runner/./src/utils/general.ts","webpack://c-cpp-runner/./src/utils/systemUtils.ts","webpack://c-cpp-runner/./src/utils/types.ts","webpack://c-cpp-runner/./src/utils/vscodeUtils.ts","webpack://c-cpp-runner/external commonjs \"vscode\"","webpack://c-cpp-runner/external node-commonjs \"child_process\"","webpack://c-cpp-runner/external node-commonjs \"fs\"","webpack://c-cpp-runner/external node-commonjs \"os\"","webpack://c-cpp-runner/external node-commonjs \"path\"","webpack://c-cpp-runner/webpack/bootstrap","webpack://c-cpp-runner/webpack/before-startup","webpack://c-cpp-runner/webpack/startup","webpack://c-cpp-runner/webpack/after-startup"],"sourcesContent":["'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","const parse = require('./parse')\nconst stringify = require('./stringify')\n\nconst JSON5 = {\n parse,\n stringify,\n}\n\nmodule.exports = JSON5\n","const util = require('./util')\n\nlet source\nlet parseState\nlet stack\nlet pos\nlet line\nlet column\nlet token\nlet key\nlet root\n\nmodule.exports = function parse (text, reviver) {\n source = String(text)\n parseState = 'start'\n stack = []\n pos = 0\n line = 1\n column = 0\n token = undefined\n key = undefined\n root = undefined\n\n do {\n token = lex()\n\n // This code is unreachable.\n // if (!parseStates[parseState]) {\n // throw invalidParseState()\n // }\n\n parseStates[parseState]()\n } while (token.type !== 'eof')\n\n if (typeof reviver === 'function') {\n return internalize({'': root}, '', reviver)\n }\n\n return root\n}\n\nfunction internalize (holder, name, reviver) {\n const value = holder[name]\n if (value != null && typeof value === 'object') {\n for (const key in value) {\n const replacement = internalize(value, key, reviver)\n if (replacement === undefined) {\n delete value[key]\n } else {\n value[key] = replacement\n }\n }\n }\n\n return reviver.call(holder, name, value)\n}\n\nlet lexState\nlet buffer\nlet doubleQuote\nlet sign\nlet c\n\nfunction lex () {\n lexState = 'default'\n buffer = ''\n doubleQuote = false\n sign = 1\n\n for (;;) {\n c = peek()\n\n // This code is unreachable.\n // if (!lexStates[lexState]) {\n // throw invalidLexState(lexState)\n // }\n\n const token = lexStates[lexState]()\n if (token) {\n return token\n }\n }\n}\n\nfunction peek () {\n if (source[pos]) {\n return String.fromCodePoint(source.codePointAt(pos))\n }\n}\n\nfunction read () {\n const c = peek()\n\n if (c === '\\n') {\n line++\n column = 0\n } else if (c) {\n column += c.length\n } else {\n column++\n }\n\n if (c) {\n pos += c.length\n }\n\n return c\n}\n\nconst lexStates = {\n default () {\n switch (c) {\n case '\\t':\n case '\\v':\n case '\\f':\n case ' ':\n case '\\u00A0':\n case '\\uFEFF':\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read()\n return\n\n case '/':\n read()\n lexState = 'comment'\n return\n\n case undefined:\n read()\n return newToken('eof')\n }\n\n if (util.isSpaceSeparator(c)) {\n read()\n return\n }\n\n // This code is unreachable.\n // if (!lexStates[parseState]) {\n // throw invalidLexState(parseState)\n // }\n\n return lexStates[parseState]()\n },\n\n comment () {\n switch (c) {\n case '*':\n read()\n lexState = 'multiLineComment'\n return\n\n case '/':\n read()\n lexState = 'singleLineComment'\n return\n }\n\n throw invalidChar(read())\n },\n\n multiLineComment () {\n switch (c) {\n case '*':\n read()\n lexState = 'multiLineCommentAsterisk'\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read()\n },\n\n multiLineCommentAsterisk () {\n switch (c) {\n case '*':\n read()\n return\n\n case '/':\n read()\n lexState = 'default'\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read()\n lexState = 'multiLineComment'\n },\n\n singleLineComment () {\n switch (c) {\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read()\n lexState = 'default'\n return\n\n case undefined:\n read()\n return newToken('eof')\n }\n\n read()\n },\n\n value () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n case 'n':\n read()\n literal('ull')\n return newToken('null', null)\n\n case 't':\n read()\n literal('rue')\n return newToken('boolean', true)\n\n case 'f':\n read()\n literal('alse')\n return newToken('boolean', false)\n\n case '-':\n case '+':\n if (read() === '-') {\n sign = -1\n }\n\n lexState = 'sign'\n return\n\n case '.':\n buffer = read()\n lexState = 'decimalPointLeading'\n return\n\n case '0':\n buffer = read()\n lexState = 'zero'\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read()\n lexState = 'decimalInteger'\n return\n\n case 'I':\n read()\n literal('nfinity')\n return newToken('numeric', Infinity)\n\n case 'N':\n read()\n literal('aN')\n return newToken('numeric', NaN)\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"')\n buffer = ''\n lexState = 'string'\n return\n }\n\n throw invalidChar(read())\n },\n\n identifierNameStartEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read()\n const u = unicodeEscape()\n switch (u) {\n case '$':\n case '_':\n break\n\n default:\n if (!util.isIdStartChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u\n lexState = 'identifierName'\n },\n\n identifierName () {\n switch (c) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n buffer += read()\n return\n\n case '\\\\':\n read()\n lexState = 'identifierNameEscape'\n return\n }\n\n if (util.isIdContinueChar(c)) {\n buffer += read()\n return\n }\n\n return newToken('identifier', buffer)\n },\n\n identifierNameEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read()\n const u = unicodeEscape()\n switch (u) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n break\n\n default:\n if (!util.isIdContinueChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u\n lexState = 'identifierName'\n },\n\n sign () {\n switch (c) {\n case '.':\n buffer = read()\n lexState = 'decimalPointLeading'\n return\n\n case '0':\n buffer = read()\n lexState = 'zero'\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read()\n lexState = 'decimalInteger'\n return\n\n case 'I':\n read()\n literal('nfinity')\n return newToken('numeric', sign * Infinity)\n\n case 'N':\n read()\n literal('aN')\n return newToken('numeric', NaN)\n }\n\n throw invalidChar(read())\n },\n\n zero () {\n switch (c) {\n case '.':\n buffer += read()\n lexState = 'decimalPoint'\n return\n\n case 'e':\n case 'E':\n buffer += read()\n lexState = 'decimalExponent'\n return\n\n case 'x':\n case 'X':\n buffer += read()\n lexState = 'hexadecimal'\n return\n }\n\n return newToken('numeric', sign * 0)\n },\n\n decimalInteger () {\n switch (c) {\n case '.':\n buffer += read()\n lexState = 'decimalPoint'\n return\n\n case 'e':\n case 'E':\n buffer += read()\n lexState = 'decimalExponent'\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read()\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalPointLeading () {\n if (util.isDigit(c)) {\n buffer += read()\n lexState = 'decimalFraction'\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalPoint () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read()\n lexState = 'decimalExponent'\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read()\n lexState = 'decimalFraction'\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalFraction () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read()\n lexState = 'decimalExponent'\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read()\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalExponent () {\n switch (c) {\n case '+':\n case '-':\n buffer += read()\n lexState = 'decimalExponentSign'\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read()\n lexState = 'decimalExponentInteger'\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentSign () {\n if (util.isDigit(c)) {\n buffer += read()\n lexState = 'decimalExponentInteger'\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentInteger () {\n if (util.isDigit(c)) {\n buffer += read()\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n hexadecimal () {\n if (util.isHexDigit(c)) {\n buffer += read()\n lexState = 'hexadecimalInteger'\n return\n }\n\n throw invalidChar(read())\n },\n\n hexadecimalInteger () {\n if (util.isHexDigit(c)) {\n buffer += read()\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n string () {\n switch (c) {\n case '\\\\':\n read()\n buffer += escape()\n return\n\n case '\"':\n if (doubleQuote) {\n read()\n return newToken('string', buffer)\n }\n\n buffer += read()\n return\n\n case \"'\":\n if (!doubleQuote) {\n read()\n return newToken('string', buffer)\n }\n\n buffer += read()\n return\n\n case '\\n':\n case '\\r':\n throw invalidChar(read())\n\n case '\\u2028':\n case '\\u2029':\n separatorChar(c)\n break\n\n case undefined:\n throw invalidChar(read())\n }\n\n buffer += read()\n },\n\n start () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n // This code is unreachable since the default lexState handles eof.\n // case undefined:\n // return newToken('eof')\n }\n\n lexState = 'value'\n },\n\n beforePropertyName () {\n switch (c) {\n case '$':\n case '_':\n buffer = read()\n lexState = 'identifierName'\n return\n\n case '\\\\':\n read()\n lexState = 'identifierNameStartEscape'\n return\n\n case '}':\n return newToken('punctuator', read())\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"')\n lexState = 'string'\n return\n }\n\n if (util.isIdStartChar(c)) {\n buffer += read()\n lexState = 'identifierName'\n return\n }\n\n throw invalidChar(read())\n },\n\n afterPropertyName () {\n if (c === ':') {\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforePropertyValue () {\n lexState = 'value'\n },\n\n afterPropertyValue () {\n switch (c) {\n case ',':\n case '}':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforeArrayValue () {\n if (c === ']') {\n return newToken('punctuator', read())\n }\n\n lexState = 'value'\n },\n\n afterArrayValue () {\n switch (c) {\n case ',':\n case ']':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n end () {\n // This code is unreachable since it's handled by the default lexState.\n // if (c === undefined) {\n // read()\n // return newToken('eof')\n // }\n\n throw invalidChar(read())\n },\n}\n\nfunction newToken (type, value) {\n return {\n type,\n value,\n line,\n column,\n }\n}\n\nfunction literal (s) {\n for (const c of s) {\n const p = peek()\n\n if (p !== c) {\n throw invalidChar(read())\n }\n\n read()\n }\n}\n\nfunction escape () {\n const c = peek()\n switch (c) {\n case 'b':\n read()\n return '\\b'\n\n case 'f':\n read()\n return '\\f'\n\n case 'n':\n read()\n return '\\n'\n\n case 'r':\n read()\n return '\\r'\n\n case 't':\n read()\n return '\\t'\n\n case 'v':\n read()\n return '\\v'\n\n case '0':\n read()\n if (util.isDigit(peek())) {\n throw invalidChar(read())\n }\n\n return '\\0'\n\n case 'x':\n read()\n return hexEscape()\n\n case 'u':\n read()\n return unicodeEscape()\n\n case '\\n':\n case '\\u2028':\n case '\\u2029':\n read()\n return ''\n\n case '\\r':\n read()\n if (peek() === '\\n') {\n read()\n }\n\n return ''\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n throw invalidChar(read())\n\n case undefined:\n throw invalidChar(read())\n }\n\n return read()\n}\n\nfunction hexEscape () {\n let buffer = ''\n let c = peek()\n\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read()\n\n c = peek()\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read()\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nfunction unicodeEscape () {\n let buffer = ''\n let count = 4\n\n while (count-- > 0) {\n const c = peek()\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read()\n }\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nconst parseStates = {\n start () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push()\n },\n\n beforePropertyName () {\n switch (token.type) {\n case 'identifier':\n case 'string':\n key = token.value\n parseState = 'afterPropertyName'\n return\n\n case 'punctuator':\n // This code is unreachable since it's handled by the lexState.\n // if (token.value !== '}') {\n // throw invalidToken()\n // }\n\n pop()\n return\n\n case 'eof':\n throw invalidEOF()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterPropertyName () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator' || token.value !== ':') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n parseState = 'beforePropertyValue'\n },\n\n beforePropertyValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push()\n },\n\n beforeArrayValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n if (token.type === 'punctuator' && token.value === ']') {\n pop()\n return\n }\n\n push()\n },\n\n afterPropertyValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforePropertyName'\n return\n\n case '}':\n pop()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterArrayValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforeArrayValue'\n return\n\n case ']':\n pop()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n end () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'eof') {\n // throw invalidToken()\n // }\n },\n}\n\nfunction push () {\n let value\n\n switch (token.type) {\n case 'punctuator':\n switch (token.value) {\n case '{':\n value = {}\n break\n\n case '[':\n value = []\n break\n }\n\n break\n\n case 'null':\n case 'boolean':\n case 'numeric':\n case 'string':\n value = token.value\n break\n\n // This code is unreachable.\n // default:\n // throw invalidToken()\n }\n\n if (root === undefined) {\n root = value\n } else {\n const parent = stack[stack.length - 1]\n if (Array.isArray(parent)) {\n parent.push(value)\n } else {\n parent[key] = value\n }\n }\n\n if (value !== null && typeof value === 'object') {\n stack.push(value)\n\n if (Array.isArray(value)) {\n parseState = 'beforeArrayValue'\n } else {\n parseState = 'beforePropertyName'\n }\n } else {\n const current = stack[stack.length - 1]\n if (current == null) {\n parseState = 'end'\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue'\n } else {\n parseState = 'afterPropertyValue'\n }\n }\n}\n\nfunction pop () {\n stack.pop()\n\n const current = stack[stack.length - 1]\n if (current == null) {\n parseState = 'end'\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue'\n } else {\n parseState = 'afterPropertyValue'\n }\n}\n\n// This code is unreachable.\n// function invalidParseState () {\n// return new Error(`JSON5: invalid parse state '${parseState}'`)\n// }\n\n// This code is unreachable.\n// function invalidLexState (state) {\n// return new Error(`JSON5: invalid lex state '${state}'`)\n// }\n\nfunction invalidChar (c) {\n if (c === undefined) {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n }\n\n return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n}\n\nfunction invalidEOF () {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n}\n\n// This code is unreachable.\n// function invalidToken () {\n// if (token.type === 'eof') {\n// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n// }\n\n// const c = String.fromCodePoint(token.value.codePointAt(0))\n// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n// }\n\nfunction invalidIdentifier () {\n column -= 5\n return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)\n}\n\nfunction separatorChar (c) {\n console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)\n}\n\nfunction formatChar (c) {\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n }\n\n if (replacements[c]) {\n return replacements[c]\n }\n\n if (c < ' ') {\n const hexString = c.charCodeAt(0).toString(16)\n return '\\\\x' + ('00' + hexString).substring(hexString.length)\n }\n\n return c\n}\n\nfunction syntaxError (message) {\n const err = new SyntaxError(message)\n err.lineNumber = line\n err.columnNumber = column\n return err\n}\n","const util = require('./util')\n\nmodule.exports = function stringify (value, replacer, space) {\n const stack = []\n let indent = ''\n let propertyList\n let replacerFunc\n let gap = ''\n let quote\n\n if (\n replacer != null &&\n typeof replacer === 'object' &&\n !Array.isArray(replacer)\n ) {\n space = replacer.space\n quote = replacer.quote\n replacer = replacer.replacer\n }\n\n if (typeof replacer === 'function') {\n replacerFunc = replacer\n } else if (Array.isArray(replacer)) {\n propertyList = []\n for (const v of replacer) {\n let item\n\n if (typeof v === 'string') {\n item = v\n } else if (\n typeof v === 'number' ||\n v instanceof String ||\n v instanceof Number\n ) {\n item = String(v)\n }\n\n if (item !== undefined && propertyList.indexOf(item) < 0) {\n propertyList.push(item)\n }\n }\n }\n\n if (space instanceof Number) {\n space = Number(space)\n } else if (space instanceof String) {\n space = String(space)\n }\n\n if (typeof space === 'number') {\n if (space > 0) {\n space = Math.min(10, Math.floor(space))\n gap = ' '.substr(0, space)\n }\n } else if (typeof space === 'string') {\n gap = space.substr(0, 10)\n }\n\n return serializeProperty('', {'': value})\n\n function serializeProperty (key, holder) {\n let value = holder[key]\n if (value != null) {\n if (typeof value.toJSON5 === 'function') {\n value = value.toJSON5(key)\n } else if (typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n }\n }\n\n if (replacerFunc) {\n value = replacerFunc.call(holder, key, value)\n }\n\n if (value instanceof Number) {\n value = Number(value)\n } else if (value instanceof String) {\n value = String(value)\n } else if (value instanceof Boolean) {\n value = value.valueOf()\n }\n\n switch (value) {\n case null: return 'null'\n case true: return 'true'\n case false: return 'false'\n }\n\n if (typeof value === 'string') {\n return quoteString(value, false)\n }\n\n if (typeof value === 'number') {\n return String(value)\n }\n\n if (typeof value === 'object') {\n return Array.isArray(value) ? serializeArray(value) : serializeObject(value)\n }\n\n return undefined\n }\n\n function quoteString (value) {\n const quotes = {\n \"'\": 0.1,\n '\"': 0.2,\n }\n\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n }\n\n let product = ''\n\n for (let i = 0; i < value.length; i++) {\n const c = value[i]\n switch (c) {\n case \"'\":\n case '\"':\n quotes[c]++\n product += c\n continue\n\n case '\\0':\n if (util.isDigit(value[i + 1])) {\n product += '\\\\x00'\n continue\n }\n }\n\n if (replacements[c]) {\n product += replacements[c]\n continue\n }\n\n if (c < ' ') {\n let hexString = c.charCodeAt(0).toString(16)\n product += '\\\\x' + ('00' + hexString).substring(hexString.length)\n continue\n }\n\n product += c\n }\n\n const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)\n\n product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])\n\n return quoteChar + product + quoteChar\n }\n\n function serializeObject (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value)\n\n let stepback = indent\n indent = indent + gap\n\n let keys = propertyList || Object.keys(value)\n let partial = []\n for (const key of keys) {\n const propertyString = serializeProperty(key, value)\n if (propertyString !== undefined) {\n let member = serializeKey(key) + ':'\n if (gap !== '') {\n member += ' '\n }\n member += propertyString\n partial.push(member)\n }\n }\n\n let final\n if (partial.length === 0) {\n final = '{}'\n } else {\n let properties\n if (gap === '') {\n properties = partial.join(',')\n final = '{' + properties + '}'\n } else {\n let separator = ',\\n' + indent\n properties = partial.join(separator)\n final = '{\\n' + indent + properties + ',\\n' + stepback + '}'\n }\n }\n\n stack.pop()\n indent = stepback\n return final\n }\n\n function serializeKey (key) {\n if (key.length === 0) {\n return quoteString(key, true)\n }\n\n const firstChar = String.fromCodePoint(key.codePointAt(0))\n if (!util.isIdStartChar(firstChar)) {\n return quoteString(key, true)\n }\n\n for (let i = firstChar.length; i < key.length; i++) {\n if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {\n return quoteString(key, true)\n }\n }\n\n return key\n }\n\n function serializeArray (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value)\n\n let stepback = indent\n indent = indent + gap\n\n let partial = []\n for (let i = 0; i < value.length; i++) {\n const propertyString = serializeProperty(String(i), value)\n partial.push((propertyString !== undefined) ? propertyString : 'null')\n }\n\n let final\n if (partial.length === 0) {\n final = '[]'\n } else {\n if (gap === '') {\n let properties = partial.join(',')\n final = '[' + properties + ']'\n } else {\n let separator = ',\\n' + indent\n let properties = partial.join(separator)\n final = '[\\n' + indent + properties + ',\\n' + stepback + ']'\n }\n }\n\n stack.pop()\n indent = stepback\n return final\n }\n}\n","// This is a generated file. Do not edit.\nmodule.exports.Space_Separator = /[\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/\nmodule.exports.ID_Start = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-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CB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\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-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/\nmodule.exports.ID_Continue = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75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4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF9\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-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\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/\n","const unicode = require('../lib/unicode')\n\nmodule.exports = {\n isSpaceSeparator (c) {\n return typeof c === 'string' && unicode.Space_Separator.test(c)\n },\n\n isIdStartChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c === '$') || (c === '_') ||\n unicode.ID_Start.test(c)\n )\n },\n\n isIdContinueChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= '0' && c <= '9') ||\n (c === '$') || (c === '_') ||\n (c === '\\u200C') || (c === '\\u200D') ||\n unicode.ID_Continue.test(c)\n )\n },\n\n isDigit (c) {\n return typeof c === 'string' && /[0-9]/.test(c)\n },\n\n isHexDigit (c) {\n return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)\n },\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookpath = void 0;\nvar fs = __importStar(require(\"fs\"));\nvar path = __importStar(require(\"path\"));\nvar isWindows = /^win/i.test(process.platform);\n/**\n * Sometimes, people want to look for local executable files\n * which are specified with either relative or absolute file path.\n * @private\n * @param cmd\n * @return {string} An absolute path of given command, or undefined.\n */\nvar isFilepath = function (cmd) {\n return cmd.includes(path.sep) ? path.resolve(cmd) : undefined;\n};\n/**\n * Just promisifies \"fs.access\"\n * @private\n * @param {string} fpath An absolute file path with an applicable extension appended.\n * @return {Promise} Resolves absolute path or empty string.\n */\nvar access = function (fpath) {\n return new Promise(function (resolve) { return fs.access(fpath, fs.constants.X_OK, function (err) { return resolve(err ? undefined : fpath); }); });\n};\n/**\n * Resolves if the given file is executable or not, regarding \"PATHEXT\" to be applied.\n * @private\n * @param {string} abspath A file path to be checked.\n * @return {Promise} Resolves the absolute file path just checked, or undefined.\n */\nvar isExecutable = function (abspath, opt) {\n if (opt === void 0) { opt = {}; }\n return __awaiter(void 0, void 0, void 0, function () {\n var envvars, exts, bins;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n envvars = opt.env || process.env;\n exts = (envvars.PATHEXT || '').split(path.delimiter).concat('');\n return [4 /*yield*/, Promise.all(exts.map(function (ext) { return access(abspath + ext); }))];\n case 1:\n bins = _a.sent();\n return [2 /*return*/, bins.find(function (bin) { return !!bin; })];\n }\n });\n });\n};\n/**\n * Returns a list of directories on which the target command should be looked for.\n * @private\n * @param {string[]} opt.include Will be added to \"PATH\" env.\n * @param {string[]} opt.exclude Will be filtered from \"PATH\" env.\n * @return {string[]} Directories to dig into.\n */\nvar getDirsToWalkThrough = function (opt) {\n var envvars = opt.env || process.env;\n var envname = isWindows ? 'Path' : 'PATH';\n return (envvars[envname] || '').split(path.delimiter).concat(opt.include || []).filter(function (p) { return !(opt.exclude || []).includes(p); });\n};\n/**\n * Returns async promise with absolute file path of given command,\n * and resolves with undefined if the command not found.\n * @param {string} command Command name to look for.\n * @param {LookPathOption} opt Options for lookpath.\n * @return {Promise} Resolves absolute file path, or undefined if not found.\n */\nfunction lookpath(command, opt) {\n if (opt === void 0) { opt = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var directpath, dirs, bins;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n directpath = isFilepath(command);\n if (directpath)\n return [2 /*return*/, isExecutable(directpath, opt)];\n dirs = getDirsToWalkThrough(opt);\n return [4 /*yield*/, Promise.all(dirs.map(function (dir) { return isExecutable(path.join(dir, command), opt); }))];\n case 1:\n bins = _a.sent();\n return [2 /*return*/, bins.find(function (bin) { return !!bin; })];\n }\n });\n });\n}\nexports.lookpath = lookpath;\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n /* istanbul ignore if */\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport { SettingsProvider } from '../provider/settingsProvider';\nimport {\n\tfilesInDir,\n\tgetLanguage,\n\tisCppSourceFile,\n\tisCSourceFile,\n\tisSourceFile,\n\tmkdirRecursive,\n\tpathExists,\n} from '../utils/fileUtils';\nimport { Builds, Languages, OperatingSystems } from '../utils/types';\nimport { getProcessExecution } from '../utils/vscodeUtils';\n\nconst EXTENSION_NAME = 'C_Cpp_Runner';\n\nexport async function executeBuildTask(\n settingsProvider: SettingsProvider,\n activeFolder: string,\n buildMode: Builds,\n singleFileBuild: boolean,\n) {\n const appendSymbol = '&&';\n\n const language = getLanguage(activeFolder);\n\n let files: string[];\n if (!singleFileBuild) {\n files = filesInDir(activeFolder);\n } else {\n const currentFile = vscode.window.activeTextEditor?.document.fileName;\n if (!currentFile) return;\n\n const isSource = isSourceFile(path.extname(currentFile));\n if (!isSource) return;\n\n files = [path.basename(currentFile)];\n }\n\n const buildDir = path.join(activeFolder, 'build');\n const modeDir = path.join(buildDir, `${buildMode}`);\n\n if (!pathExists(modeDir)) {\n mkdirRecursive(modeDir);\n }\n\n const operatingSystem = settingsProvider.operatingSystem;\n\n let executableName: string;\n if (operatingSystem === OperatingSystems.windows) {\n executableName = `out${buildMode}.exe`;\n } else {\n executableName = `out${buildMode}`;\n }\n\n const executablePath = path.join(modeDir, executableName);\n\n let commandLine: string | undefined;\n if (\n operatingSystem === OperatingSystems.windows &&\n settingsProvider.useMsvc\n ) {\n commandLine = executeBuildTaskMsvcBased(\n settingsProvider,\n activeFolder,\n buildMode,\n language,\n files,\n modeDir,\n appendSymbol,\n executablePath,\n );\n } else {\n commandLine = executeBuildTaskUnixBased(\n settingsProvider,\n activeFolder,\n buildMode,\n language,\n files,\n modeDir,\n appendSymbol,\n executablePath,\n );\n }\n\n if (!commandLine) return;\n\n const task_name = 'Build';\n\n const definition = {\n type: 'shell',\n task: task_name,\n };\n\n const execution = getProcessExecution(\n operatingSystem,\n settingsProvider.useMsvc,\n commandLine,\n activeFolder,\n );\n\n const problemMatcher =\n operatingSystem === OperatingSystems.windows && settingsProvider.useMsvc\n ? ['$msCompile']\n : ['$gcc'];\n\n const task = new vscode.Task(\n definition,\n vscode.TaskScope.Workspace,\n task_name,\n EXTENSION_NAME,\n execution,\n problemMatcher,\n );\n\n await vscode.tasks.executeTask(task);\n}\n\nfunction executeBuildTaskUnixBased(\n settingsProvider: SettingsProvider,\n activeFolder: string,\n buildMode: Builds,\n language: Languages,\n files: string[],\n modeDir: string,\n appendSymbol: string,\n executablePath: string,\n) {\n let compiler: string | undefined;\n let standard: string | undefined;\n\n if (language === Languages.cpp) {\n compiler = settingsProvider.cppCompilerPath;\n standard = settingsProvider.cppStandard;\n } else {\n compiler = settingsProvider.cCompilerPath;\n standard = settingsProvider.cStandard;\n }\n\n const useWarnings = settingsProvider.enableWarnings;\n const warningsAsErrors = settingsProvider.warningsAsError;\n let warnings: string = '';\n if (useWarnings) {\n warnings = settingsProvider.warnings.join(' ');\n }\n if (useWarnings && warningsAsErrors) {\n warnings += ' -Werror';\n }\n const includePaths = settingsProvider.includePaths;\n const compilerArgs = settingsProvider.compilerArgs;\n const linkerArgs = settingsProvider.linkerArgs;\n\n let fullCompilerArgs = '';\n let fullLinkerArgs = '';\n\n if (warnings) {\n fullCompilerArgs += warnings;\n }\n if (standard) {\n fullCompilerArgs += ` --std=${standard}`;\n }\n if (buildMode === Builds.debug) {\n fullCompilerArgs += ' -g3 -O0';\n } else {\n fullCompilerArgs += ' -O3 -DNDEBUG';\n }\n if (compilerArgs && compilerArgs.length > 0) {\n fullCompilerArgs += ' ' + compilerArgs.join(' ');\n }\n if (includePaths && includePaths.length > 0) {\n for (const includePath of includePaths) {\n if (includePath.includes('$(default)')) continue;\n\n const hasSpace = includePath.includes(' ');\n\n if (hasSpace) {\n fullCompilerArgs += ` -I\"${includePath}\"`;\n } else {\n fullCompilerArgs += ` -I${includePath}`;\n }\n }\n }\n\n if (linkerArgs && linkerArgs.length > 0) {\n fullLinkerArgs += ' ' + linkerArgs.join(' ');\n }\n\n let commandLine: string = '';\n\n const objectFiles: string[] = [];\n\n let idx = -1;\n\n for (const file of files) {\n const fileExtension = path.parse(file).ext;\n\n if (language === Languages.c && !isCSourceFile(fileExtension)) {\n continue;\n } else if (language === Languages.cpp && !isCppSourceFile(fileExtension)) {\n continue;\n }\n\n idx++;\n\n const fileBaseName = path.parse(file).name;\n modeDir = modeDir.replace(activeFolder, '');\n\n let objectFilePath = path.join(modeDir, fileBaseName + '.o');\n if (!objectFilePath.startsWith('.')) {\n objectFilePath = '.' + objectFilePath;\n }\n\n objectFiles.push(objectFilePath);\n\n const hasSpace = file.includes(' ');\n let fullFileArgs;\n if (hasSpace) {\n fullFileArgs = `-c \"${file}\" -o \"${objectFilePath}\"`;\n } else {\n fullFileArgs = `-c ${file} -o ${objectFilePath}`;\n }\n\n if (idx === 0) {\n commandLine += `${compiler} ${fullCompilerArgs} ${fullFileArgs}`;\n } else {\n commandLine += ` ${appendSymbol} ${compiler} ${fullCompilerArgs} ${fullFileArgs}`;\n }\n }\n\n // Exe task\n let objectFilesStr: string = '';\n for (const objectfile of objectFiles) {\n objectFilesStr += ` ${objectfile}`;\n }\n\n if (objectFilesStr === '') return;\n\n executablePath = executablePath.replace(activeFolder, '');\n if (!executablePath.startsWith('.')) {\n executablePath = '.' + executablePath;\n }\n\n const fullObjectFileArgs = `${objectFilesStr} -o ${executablePath}`;\n\n commandLine += ` ${appendSymbol} ${compiler} ${fullCompilerArgs} ${fullObjectFileArgs}`;\n\n if (fullLinkerArgs && fullLinkerArgs !== '') {\n commandLine += fullLinkerArgs;\n }\n\n commandLine = commandLine.replace(' ', ' ');\n\n return commandLine;\n}\n\nfunction executeBuildTaskMsvcBased(\n settingsProvider: SettingsProvider,\n activeFolder: string,\n buildMode: Builds,\n language: Languages,\n files: string[],\n modeDir: string,\n appendSymbol: string,\n executablePath: string,\n) {\n let compiler: string | undefined;\n let standard: string | undefined;\n\n if (language === Languages.cpp) {\n compiler = SettingsProvider.MSVC_COMPILER_NAME;\n standard = settingsProvider.cppStandard;\n } else {\n compiler = SettingsProvider.MSVC_COMPILER_NAME;\n standard = settingsProvider.cStandard;\n }\n\n const useWarnings = settingsProvider.enableWarnings;\n const warningsAsErrors = settingsProvider.warningsAsError;\n let warnings: string = '';\n if (useWarnings) {\n warnings = settingsProvider.warnings.join(' ');\n }\n if (useWarnings && warningsAsErrors) {\n warnings += ' -WX';\n }\n const includePaths = settingsProvider.includePaths;\n const compilerArgs = settingsProvider.compilerArgs;\n const linkerArgs = settingsProvider.linkerArgs;\n\n let fullCompilerArgs = '';\n\n if (useWarnings && warnings !== '') {\n fullCompilerArgs += warnings;\n }\n\n // Note: The c standard in msvc is either c11 or c17\n const old_standard = ['c89', 'c99', 'gnu89', 'gnu99'].some(\n (ext) => settingsProvider.cStandard === ext,\n );\n\n if (standard && (language === Languages.cpp || !old_standard)) {\n fullCompilerArgs += ` /std:${standard}`;\n }\n if (language === Languages.c) {\n if (old_standard) {\n fullCompilerArgs += ' /D_CRT_SECURE_NO_WARNINGS';\n }\n }\n\n if (buildMode === Builds.debug) {\n fullCompilerArgs += ' /Od /Zi';\n } else {\n fullCompilerArgs += ' /Ox /GL /DNDEBUG';\n }\n fullCompilerArgs += ' /EHsc';\n\n if (includePaths && includePaths.length > 0) {\n for (const includePath of includePaths) {\n if (includePath.includes('$(default)')) continue;\n\n const hasSpace = includePath.includes(' ');\n\n if (hasSpace) {\n fullCompilerArgs += ` /I\"${includePath}\"`;\n } else {\n fullCompilerArgs += ` /I${includePath}`;\n }\n }\n }\n\n let fullLinkerArgs: string = '';\n if (linkerArgs && linkerArgs.length > 0) {\n fullLinkerArgs += ' ' + linkerArgs.join(' ');\n }\n fullCompilerArgs += fullLinkerArgs;\n\n if (compilerArgs && compilerArgs.length > 0) {\n fullCompilerArgs += ' ' + compilerArgs.join(' ');\n }\n\n let commandLine: string = `\"${settingsProvider.msvcBatchPath}\" ${settingsProvider.architecure} ${appendSymbol} `;\n\n modeDir = modeDir.replace(activeFolder, '.');\n executablePath = executablePath.replace(activeFolder, '.');\n const pathArgs = `/Fd${modeDir}\\\\ /Fo${modeDir}\\\\ /Fe${executablePath}`;\n\n let fullFileArgs: string = '';\n for (const file of files) {\n const fileExtension = path.parse(file).ext;\n\n if (language === Languages.c && !isCSourceFile(fileExtension)) {\n continue;\n } else if (language === Languages.cpp && !isCppSourceFile(fileExtension)) {\n continue;\n }\n\n const hasSpace = file.includes(' ');\n\n if (hasSpace) {\n fullFileArgs += ` .\\\\\"${file}\"`;\n } else {\n fullFileArgs += ` .\\\\${file}`;\n }\n }\n\n if (fullFileArgs === '') return;\n\n commandLine += ` cd ${activeFolder} &&`;\n commandLine += `${compiler} ${fullCompilerArgs} ${pathArgs} ${fullFileArgs}`;\n\n return commandLine;\n}\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport {\n\tpathExists,\n\treplaceBackslashes,\n\trmdirRecursive,\n} from '../utils/fileUtils';\nimport { Builds, OperatingSystems } from '../utils/types';\nimport { getProcessExecution } from '../utils/vscodeUtils';\n\nconst EXTENSION_NAME = 'C_Cpp_Runner';\n\nexport async function executeCleanTask(\n activeFolder: string,\n buildMode: Builds,\n workspaceFolder: string,\n operatingSystem: OperatingSystems,\n) {\n const buildDir = path.join(activeFolder, 'build');\n const modeDir = path.join(buildDir, `${buildMode}`);\n\n let relativeModeDir = modeDir.replace(workspaceFolder, '');\n relativeModeDir = replaceBackslashes(relativeModeDir);\n\n const commandLine = `echo Cleaning ${relativeModeDir}...`;\n\n if (!pathExists(modeDir)) return;\n\n rmdirRecursive(modeDir);\n if (!commandLine) return;\n\n const task_name = 'Clean';\n\n const execution = getProcessExecution(\n operatingSystem,\n false,\n commandLine,\n activeFolder,\n );\n\n const definition = {\n type: 'shell',\n task: task_name,\n };\n\n const task = new vscode.Task(\n definition,\n vscode.TaskScope.Workspace,\n task_name,\n EXTENSION_NAME,\n execution,\n );\n\n await vscode.tasks.executeTask(task);\n}\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport { pathExists, readJsonFile } from '../utils/fileUtils';\nimport { Builds, JsonLaunchConfig } from '../utils/types';\nimport { getLaunchConfigIndex } from '../utils/vscodeUtils';\n\nconst CONFIG_NAME = 'C/C++ Runner: Debug Session';\n\nexport async function runDebugger(\n activeFolder: string,\n workspaceFolder: string,\n buildMode: Builds,\n) {\n const uriWorkspaceFolder = vscode.Uri.file(workspaceFolder);\n const folder = vscode.workspace.getWorkspaceFolder(uriWorkspaceFolder);\n const launchPath = path.join(workspaceFolder, '.vscode', 'launch.json');\n\n const configJson: JsonLaunchConfig | undefined = readJsonFile(launchPath);\n\n if (!configJson) return;\n\n const configIdx = getLaunchConfigIndex(configJson, CONFIG_NAME);\n\n if (configIdx === undefined) return;\n\n const buildDir = path.join(activeFolder, 'build');\n const modeDir = path.join(buildDir, `${buildMode}`);\n\n if (!pathExists(modeDir)) return;\n\n if (\n !configJson.configurations === undefined ||\n !configJson.configurations[configIdx] === undefined\n )\n return;\n\n await vscode.debug.startDebugging(\n folder,\n configJson.configurations[configIdx] as vscode.DebugConfiguration,\n );\n}\n","import * as path from 'path';\r\nimport * as vscode from 'vscode';\r\n\r\nimport { pathExists } from '../utils/fileUtils';\r\nimport { Builds, OperatingSystems } from '../utils/types';\r\nimport { getProcessExecution } from '../utils/vscodeUtils';\r\n\r\nconst EXTENSION_NAME = 'C_Cpp_Runner';\r\n\r\nexport async function executeRunTask(\r\n activeFolder: string,\r\n buildMode: Builds,\r\n argumentsString: string | undefined,\r\n operatingSystem: OperatingSystems,\r\n) {\r\n const modeDir = path.join('build', buildMode);\r\n\r\n if (!pathExists(path.join(activeFolder, modeDir))) return;\r\n\r\n let executableName: string;\r\n let executablePath: string;\r\n\r\n if (operatingSystem === OperatingSystems.windows) {\r\n executableName = `out${buildMode}.exe`;\r\n executablePath = `.\\\\${path.join(modeDir, executableName)}`;\r\n } else {\r\n executableName = `out${buildMode}`;\r\n executablePath = `./${path.join(modeDir, executableName)}`;\r\n }\r\n\r\n let commandLine: string = '';\r\n const executablePathHasSpace = executablePath.includes(' ');\r\n\r\n if (executablePathHasSpace) {\r\n commandLine = `\"${executablePath}\"`;\r\n } else {\r\n commandLine = executablePath;\r\n }\r\n\r\n if (argumentsString) {\r\n commandLine += ` ${argumentsString.replace(/\"/g, '')}`;\r\n }\r\n\r\n if (!commandLine) return;\r\n\r\n const task_name = 'Run';\r\n\r\n const execution = getProcessExecution(\r\n operatingSystem,\r\n false,\r\n commandLine,\r\n activeFolder,\r\n );\r\n\r\n const definition = {\r\n type: 'shell',\r\n task: task_name,\r\n };\r\n\r\n const task = new vscode.Task(\r\n definition,\r\n vscode.TaskScope.Workspace,\r\n task_name,\r\n EXTENSION_NAME,\r\n execution,\r\n );\r\n\r\n await vscode.tasks.executeTask(task);\r\n}\r\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport { executeBuildTask } from './executor/builder';\nimport { executeCleanTask } from './executor/cleaner';\nimport { runDebugger } from './executor/debugger';\nimport { executeRunTask } from './executor/runner';\nimport { folderHandler } from './handler/folderHandler';\nimport { modeHandler } from './handler/modeHandler';\nimport {\n\tupdateBuildStatus,\n\tupdateCleanStatus,\n\tupdateDebugStatus,\n\tupdateFolderStatus,\n\tupdateModeStatus,\n\tupdateRunStatus,\n} from './items/statusBarItems';\nimport { LaunchProvider } from './provider/launchProvider';\nimport { PropertiesProvider } from './provider/propertiesProvider';\nimport { SettingsProvider } from './provider/settingsProvider';\nimport { foldersInDir, mkdirRecursive, pathExists } from './utils/fileUtils';\nimport { Builds } from './utils/types';\nimport {\n\tcreateStatusBarItem,\n\tdisposeItem,\n\tgetActivationState,\n\tisCmakeProject,\n\tsetContextValue,\n\tupdateActivationState,\n} from './utils/vscodeUtils';\n\nlet folderContextMenuDisposable: vscode.Disposable | undefined;\nlet commandHandlerDisposable: vscode.Disposable | undefined;\nlet commandToggleStateDisposable: vscode.Disposable | undefined;\nlet commandFolderDisposable: vscode.Disposable | undefined;\nlet commandModeDisposable: vscode.Disposable | undefined;\nlet commandBuildDisposable: vscode.Disposable | undefined;\nlet commandRunDisposable: vscode.Disposable | undefined;\nlet commandBuildSingleFileDisposable: vscode.Disposable | undefined;\nlet commandRunSingleFileDisposable: vscode.Disposable | undefined;\nlet commandDebugSingleFileDisposable: vscode.Disposable | undefined;\nlet commandDebugDisposable: vscode.Disposable | undefined;\nlet commandCleanDisposable: vscode.Disposable | undefined;\nlet commandArgumentDisposable: vscode.Disposable | undefined;\nlet commandResetDisposable: vscode.Disposable | undefined;\nlet eventConfigurationDisposable: vscode.Disposable | undefined;\nlet eventRenameFilesDisposable: vscode.Disposable | undefined;\nlet eventDeleteFilesDisposable: vscode.Disposable | undefined;\n\nlet settingsProvider: SettingsProvider | undefined;\nlet launchProvider: LaunchProvider | undefined;\nlet propertiesProvider: PropertiesProvider | undefined;\n\nlet folderStatusBar: vscode.StatusBarItem | undefined;\nlet modeStatusBar: vscode.StatusBarItem | undefined;\nlet buildStatusBar: vscode.StatusBarItem | undefined;\nlet runStatusBar: vscode.StatusBarItem | undefined;\nlet debugStatusBar: vscode.StatusBarItem | undefined;\nlet cleanStatusBar: vscode.StatusBarItem | undefined;\nlet argumentsString: string | undefined;\n\nlet workspaceFolder: string | undefined;\nlet activeFolder: string | undefined;\nlet buildMode: Builds = Builds.debug;\nlet showStatusBarItems: boolean = true;\nlet createExtensionFiles: boolean = true;\n\nconst EXTENSION_NAME = 'C_Cpp_Runner';\n\nexport let extensionContext: vscode.ExtensionContext | undefined;\nexport let extensionState: vscode.Memento | undefined;\nexport let extensionPath: string | undefined;\n\nexport function activate(context: vscode.ExtensionContext) {\n if (\n !vscode.workspace.workspaceFolders ||\n vscode.workspace.workspaceFolders.length === 0\n ) {\n return;\n }\n\n if (\n !vscode.workspace.workspaceFolders[0] ||\n !vscode.workspace.workspaceFolders[0].uri\n ) {\n return;\n }\n\n if (vscode.workspace.workspaceFolders.length === 1) {\n workspaceFolder = vscode.workspace.workspaceFolders[0].uri.fsPath;\n }\n\n const cmakeFileFound = isCmakeProject();\n\n if (cmakeFileFound) {\n showStatusBarItems = false;\n createExtensionFiles = false;\n }\n\n extensionContext = context;\n extensionPath = context.extensionPath;\n extensionState = context.workspaceState;\n\n setContextValue(`${EXTENSION_NAME}:activatedExtension`, true);\n updateActivationState(true);\n\n initFolderStatusBar();\n initModeStatusBar();\n initBuildStatusBar();\n initRunStatusBar();\n initDebugStatusBar();\n initCleanStatusBar();\n\n initBuildSingleFile();\n initRunSingleFile();\n initDebugSingleFile();\n\n initWorkspaceProvider();\n initWorkspaceDisposables();\n initEventListener();\n}\n\nexport function deactivate() {\n setContextValue(`${EXTENSION_NAME}:activatedExtension`, false);\n updateActivationState(false);\n\n disposeItem(folderStatusBar);\n disposeItem(modeStatusBar);\n disposeItem(buildStatusBar);\n disposeItem(runStatusBar);\n disposeItem(debugStatusBar);\n disposeItem(cleanStatusBar);\n disposeItem(folderContextMenuDisposable);\n disposeItem(commandHandlerDisposable);\n disposeItem(commandToggleStateDisposable);\n disposeItem(commandFolderDisposable);\n disposeItem(commandModeDisposable);\n disposeItem(commandBuildDisposable);\n disposeItem(commandRunDisposable);\n disposeItem(commandBuildSingleFileDisposable);\n disposeItem(commandRunSingleFileDisposable);\n disposeItem(commandDebugSingleFileDisposable);\n disposeItem(commandDebugDisposable);\n disposeItem(commandCleanDisposable);\n disposeItem(commandArgumentDisposable);\n disposeItem(commandResetDisposable);\n disposeItem(eventConfigurationDisposable);\n disposeItem(eventDeleteFilesDisposable);\n disposeItem(eventRenameFilesDisposable);\n}\n\nfunction initWorkspaceProvider() {\n if (!workspaceFolder || !createExtensionFiles || !activeFolder) return;\n\n if (!settingsProvider) {\n settingsProvider = new SettingsProvider(workspaceFolder, activeFolder);\n }\n\n if (!propertiesProvider) {\n propertiesProvider = new PropertiesProvider(\n settingsProvider,\n workspaceFolder,\n activeFolder,\n );\n }\n\n if (!launchProvider) {\n launchProvider = new LaunchProvider(\n settingsProvider,\n workspaceFolder,\n activeFolder,\n );\n }\n}\n\nfunction initWorkspaceDisposables() {\n initArgumentParser();\n initContextMenuDisposable();\n initReset();\n initToggleDisposable();\n}\n\nfunction initToggleDisposable() {\n if (commandToggleStateDisposable) return;\n\n commandToggleStateDisposable = vscode.commands.registerCommand(\n `${EXTENSION_NAME}.toggleExtensionState`,\n () => {\n showStatusBarItems = !showStatusBarItems;\n toggleStatusBarItems();\n createExtensionFiles = !createExtensionFiles;\n if (createExtensionFiles) {\n initWorkspaceProvider();\n initWorkspaceDisposables();\n\n settingsProvider?.createFileData();\n propertiesProvider?.createFileData();\n }\n\n const extensionIsDisabled = !showStatusBarItems && !createExtensionFiles;\n\n if (extensionIsDisabled) {\n setContextValue(\n `${EXTENSION_NAME}:activatedExtension`,\n !extensionIsDisabled,\n );\n updateActivationState(!extensionIsDisabled);\n } else {\n setContextValue(\n `${EXTENSION_NAME}:activatedExtension`,\n !extensionIsDisabled,\n );\n updateActivationState(!extensionIsDisabled);\n }\n },\n );\n\n extensionContext?.subscriptions.push(commandToggleStateDisposable);\n}\n\nfunction initContextMenuDisposable() {\n if (folderContextMenuDisposable) return;\n\n folderContextMenuDisposable = vscode.commands.registerCommand(\n `${EXTENSION_NAME}.folderContextMenu`,\n async (clickedUriItem: vscode.Uri, selectedUriItems: vscode.Uri[]) => {\n if (selectedUriItems.length > 1) return;\n\n const workspaceItem = vscode.workspace.getWorkspaceFolder(clickedUriItem);\n\n if (!workspaceItem) return;\n\n activeFolder = clickedUriItem.fsPath;\n workspaceFolder = workspaceItem.uri.fsPath;\n updateFolderData();\n },\n );\n\n extensionContext?.subscriptions.push(folderContextMenuDisposable);\n}\n\nfunction initEventListener() {\n initConfigurationChangeDisposable();\n initFileRenameDisposable();\n initFileDeleteDisposable();\n}\n\nfunction initConfigurationChangeDisposable() {\n if (eventConfigurationDisposable) return;\n\n eventConfigurationDisposable = vscode.workspace.onDidChangeConfiguration(\n (e: vscode.ConfigurationChangeEvent) => {\n const isChanged = e.affectsConfiguration(EXTENSION_NAME);\n const extensionIsActive = getActivationState();\n\n if (isChanged && extensionIsActive) {\n settingsProvider?.updateFileContent();\n propertiesProvider?.updateFileContent();\n launchProvider?.updateFileContent();\n }\n },\n );\n\n extensionContext?.subscriptions.push(eventConfigurationDisposable);\n}\n\nfunction initFileRenameDisposable() {\n if (eventRenameFilesDisposable) return;\n\n eventRenameFilesDisposable = vscode.workspace.onDidRenameFiles(\n (e: vscode.FileRenameEvent) => {\n const extensionIsActive = getActivationState();\n if (!extensionIsActive) return;\n\n e.files.forEach((file) => {\n const oldName = file.oldUri.fsPath;\n const newName = file.newUri.fsPath;\n\n if (workspaceFolder && oldName === workspaceFolder) {\n workspaceFolder = newName;\n updateFolderData();\n } else if (activeFolder && oldName === activeFolder) {\n activeFolder = newName;\n updateFolderData();\n }\n });\n },\n );\n\n extensionContext?.subscriptions.push(eventRenameFilesDisposable);\n}\n\nfunction initFileDeleteDisposable() {\n if (!eventDeleteFilesDisposable) return;\n\n eventDeleteFilesDisposable = vscode.workspace.onDidDeleteFiles(\n (e: vscode.FileDeleteEvent) => {\n const extensionIsActive = getActivationState();\n if (!extensionIsActive) return;\n\n e.files.forEach((file) => {\n const oldName = file.fsPath;\n\n if (workspaceFolder && oldName === workspaceFolder) {\n workspaceFolder = undefined;\n updateFolderData();\n updateFolderStatus(\n folderStatusBar,\n workspaceFolder,\n activeFolder,\n showStatusBarItems,\n );\n } else if (activeFolder && oldName === activeFolder) {\n activeFolder = undefined;\n updateFolderData();\n updateFolderStatus(\n folderStatusBar,\n workspaceFolder,\n activeFolder,\n showStatusBarItems,\n );\n }\n });\n },\n );\n\n extensionContext?.subscriptions.push(eventDeleteFilesDisposable);\n}\n\nfunction toggleStatusBarItems() {\n if (showStatusBarItems) {\n folderStatusBar?.show();\n modeStatusBar?.show();\n buildStatusBar?.show();\n runStatusBar?.show();\n debugStatusBar?.show();\n cleanStatusBar?.show();\n } else {\n folderStatusBar?.hide();\n modeStatusBar?.hide();\n buildStatusBar?.hide();\n runStatusBar?.hide();\n debugStatusBar?.hide();\n cleanStatusBar?.hide();\n }\n}\n\nfunction updateFolderData() {\n initWorkspaceProvider();\n initWorkspaceDisposables();\n argumentsString = '';\n\n if (workspaceFolder && activeFolder) {\n if (settingsProvider) {\n settingsProvider.updateFolderData(workspaceFolder);\n settingsProvider.updateFileContent();\n\n if (propertiesProvider) {\n propertiesProvider.updateFolderData(workspaceFolder);\n }\n\n if (launchProvider) {\n launchProvider.updateFolderData(workspaceFolder, activeFolder);\n launchProvider.updateModeData(buildMode);\n launchProvider?.updateArgumentsData(argumentsString);\n launchProvider.updateFileContent();\n }\n }\n }\n\n if (folderStatusBar) {\n updateFolderStatus(\n folderStatusBar,\n workspaceFolder,\n activeFolder,\n showStatusBarItems,\n );\n }\n if (modeStatusBar) {\n updateModeStatus(\n modeStatusBar,\n showStatusBarItems,\n activeFolder,\n buildMode,\n );\n }\n if (buildStatusBar) {\n updateBuildStatus(buildStatusBar, showStatusBarItems, activeFolder);\n }\n if (runStatusBar) {\n updateRunStatus(runStatusBar, showStatusBarItems, activeFolder);\n }\n if (cleanStatusBar) {\n updateCleanStatus(cleanStatusBar, showStatusBarItems, activeFolder);\n }\n if (debugStatusBar) {\n updateDebugStatus(debugStatusBar, showStatusBarItems, activeFolder);\n }\n}\n\nfunction initFolderStatusBar() {\n if (folderStatusBar) return;\n\n folderStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(folderStatusBar);\n\n const workspaceFolders = vscode.workspace.workspaceFolders;\n if (workspaceFolders) {\n if (workspaceFolders.length === 1) {\n if (!workspaceFolders[0] || !workspaceFolders[0].uri.fsPath) return;\n\n const workspaceFolderFs = workspaceFolders[0].uri.fsPath;\n const folders = foldersInDir(workspaceFolderFs);\n if (folders.length === 0) {\n workspaceFolder = workspaceFolderFs;\n activeFolder = workspaceFolderFs;\n updateFolderData();\n } else {\n updateFolderStatus(\n folderStatusBar,\n workspaceFolder,\n activeFolder,\n showStatusBarItems,\n );\n }\n } else {\n updateFolderStatus(\n folderStatusBar,\n workspaceFolder,\n activeFolder,\n showStatusBarItems,\n );\n }\n }\n\n if (commandFolderDisposable) return;\n\n const commandName = `${EXTENSION_NAME}.folder`;\n commandFolderDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n const ret = await folderHandler(settingsProvider);\n if (ret && ret.activeFolder && ret.workspaceFolder) {\n activeFolder = ret.activeFolder;\n workspaceFolder = ret.workspaceFolder;\n updateFolderData();\n }\n },\n );\n\n folderStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandFolderDisposable);\n}\n\nfunction initModeStatusBar() {\n if (modeStatusBar) return;\n\n modeStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(modeStatusBar);\n updateModeStatus(modeStatusBar, showStatusBarItems, activeFolder, buildMode);\n\n const commandName = `${EXTENSION_NAME}.mode`;\n commandModeDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n const pickedMode = await modeHandler();\n if (pickedMode) {\n buildMode = pickedMode;\n\n updateModeStatus(\n modeStatusBar,\n showStatusBarItems,\n activeFolder,\n buildMode,\n );\n\n if (!launchProvider) return;\n launchProvider.updateModeData(buildMode);\n launchProvider.updateFileContent();\n }\n },\n );\n\n modeStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandModeDisposable);\n}\n\nfunction initArgumentParser() {\n if (commandArgumentDisposable) return;\n\n const commandName = `${EXTENSION_NAME}.args`;\n\n commandArgumentDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n argumentsString = await vscode.window.showInputBox();\n launchProvider?.updateArgumentsData(argumentsString);\n launchProvider?.updateFileContent();\n },\n );\n\n extensionContext?.subscriptions.push(commandArgumentDisposable);\n}\n\nfunction initReset() {\n if (commandResetDisposable) return;\n\n const commandName = `${EXTENSION_NAME}.resetLocalSettings`;\n\n commandResetDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n settingsProvider?.reset();\n propertiesProvider?.updateFileContent();\n launchProvider?.updateFileContent();\n },\n );\n\n extensionContext?.subscriptions.push(commandResetDisposable);\n}\n\nfunction initBuildStatusBar() {\n if (buildStatusBar) return;\n\n buildStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(buildStatusBar);\n updateBuildStatus(buildStatusBar, showStatusBarItems, activeFolder);\n\n const commandName = `${EXTENSION_NAME}.build`;\n commandBuildDisposable = vscode.commands.registerCommand(\n commandName,\n async () => buildTaskCallback(false),\n );\n buildStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandBuildDisposable);\n}\n\nfunction initRunStatusBar() {\n if (runStatusBar) return;\n\n runStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(runStatusBar);\n updateRunStatus(runStatusBar, showStatusBarItems, activeFolder);\n\n const commandName = `${EXTENSION_NAME}.run`;\n commandRunDisposable = vscode.commands.registerCommand(\n commandName,\n async () => runTaskCallback(),\n );\n\n runStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandRunDisposable);\n}\n\nfunction initDebugStatusBar() {\n if (debugStatusBar) return;\n\n debugStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(debugStatusBar);\n updateDebugStatus(debugStatusBar, showStatusBarItems, activeFolder);\n\n const commandName = `${EXTENSION_NAME}.debug`;\n commandDebugDisposable = vscode.commands.registerCommand(commandName, () =>\n debugTaskCallback(),\n );\n\n debugStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandDebugDisposable);\n}\n\nasync function initCleanStatusBar() {\n if (cleanStatusBar) return;\n\n cleanStatusBar = createStatusBarItem();\n extensionContext?.subscriptions.push(cleanStatusBar);\n updateCleanStatus(cleanStatusBar, showStatusBarItems, activeFolder);\n\n const commandName = `${EXTENSION_NAME}.clean`;\n commandCleanDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n cleanTaskCallback();\n },\n );\n\n cleanStatusBar.command = commandName;\n extensionContext?.subscriptions.push(commandCleanDisposable);\n}\n\nfunction initProviderBasedOnSingleFile() {\n const currentFile = vscode.window.activeTextEditor?.document.fileName;\n if (!currentFile) return;\n const currentFolder = path.dirname(currentFile);\n if (activeFolder !== currentFolder) {\n activeFolder = currentFolder;\n initWorkspaceProvider();\n updateFolderData();\n }\n}\n\nfunction initBuildSingleFile() {\n const commandName = `${EXTENSION_NAME}.buildSingleFile`;\n commandBuildSingleFileDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n initProviderBasedOnSingleFile();\n buildTaskCallback(true);\n },\n );\n extensionContext?.subscriptions.push(commandBuildSingleFileDisposable);\n}\n\nfunction initRunSingleFile() {\n const commandName = `${EXTENSION_NAME}.runSingleFile`;\n commandRunSingleFileDisposable = vscode.commands.registerCommand(\n commandName,\n async () => {\n initProviderBasedOnSingleFile();\n runTaskCallback();\n },\n );\n extensionContext?.subscriptions.push(commandRunSingleFileDisposable);\n}\n\nfunction initDebugSingleFile() {\n const commandName = `${EXTENSION_NAME}.debugSingleFile`;\n commandDebugSingleFileDisposable = vscode.commands.registerCommand(\n commandName,\n () => {\n initProviderBasedOnSingleFile();\n debugTaskCallback();\n },\n );\n extensionContext?.subscriptions.push(commandDebugSingleFileDisposable);\n}\n\nasync function buildTaskCallback(singleFileBuild: boolean) {\n if (!activeFolder) return;\n\n const buildDir = path.join(activeFolder, 'build');\n const modeDir = path.join(buildDir, `${buildMode}`);\n\n if (!pathExists(modeDir)) mkdirRecursive(modeDir);\n\n if (!settingsProvider) return;\n\n await executeBuildTask(\n settingsProvider,\n activeFolder,\n buildMode,\n singleFileBuild,\n );\n}\n\nasync function runTaskCallback() {\n if (!activeFolder) return;\n\n const buildDir = path.join(activeFolder, 'build');\n const modeDir = path.join(buildDir, `${buildMode}`);\n\n if (!pathExists(modeDir)) return;\n\n if (!settingsProvider) {\n return;\n }\n\n await executeRunTask(\n activeFolder,\n buildMode,\n argumentsString,\n settingsProvider.operatingSystem,\n );\n}\n\nasync function cleanTaskCallback() {\n if (\n !settingsProvider ||\n !settingsProvider.operatingSystem ||\n !activeFolder ||\n !workspaceFolder\n ) {\n return;\n }\n\n await executeCleanTask(\n activeFolder,\n buildMode,\n workspaceFolder,\n settingsProvider.operatingSystem,\n );\n}\n\nfunction debugTaskCallback() {\n if (!activeFolder) return;\n if (!workspaceFolder) return;\n\n runDebugger(activeFolder, workspaceFolder, buildMode);\n}\n","import * as path from 'path';\r\nimport * as vscode from 'vscode';\r\n\r\nimport { SettingsProvider } from '../provider/settingsProvider';\r\nimport {\r\n\texcludePatternFromList,\r\n\tgetDirectoriesRecursive,\r\n\tincludePatternFromList,\r\n\tnaturalSort,\r\n\treplaceBackslashes,\r\n} from '../utils/fileUtils';\r\n\r\nexport async function folderHandler(\r\n settingsProvider: SettingsProvider | undefined,\r\n) {\r\n const workspacesFolders = vscode.workspace.workspaceFolders;\r\n\r\n if (!workspacesFolders) return;\r\n\r\n let foldersList: string[] = [];\r\n workspacesFolders.forEach((folder) => {\r\n const directories = [folder.name];\r\n const recursiveDirectories = getDirectoriesRecursive(folder.uri.fsPath);\r\n if (recursiveDirectories) {\r\n directories.push(...recursiveDirectories);\r\n }\r\n\r\n directories.forEach((dir) => {\r\n let text = dir.replace(folder.uri.fsPath, folder.name);\r\n text = replaceBackslashes(text);\r\n foldersList.push(text);\r\n });\r\n\r\n if (settingsProvider) {\r\n foldersList = includePatternFromList(\r\n settingsProvider.includeSearch,\r\n foldersList,\r\n );\r\n }\r\n\r\n if (settingsProvider) {\r\n foldersList = excludePatternFromList(\r\n settingsProvider.excludeSearch,\r\n foldersList,\r\n );\r\n } else {\r\n foldersList = excludePatternFromList(\r\n SettingsProvider.DEFAULT_EXCLUDE_SEARCH,\r\n foldersList,\r\n );\r\n }\r\n\r\n // XXX: Quick fix for double folder names due to include pattern\r\n const foldersSet = new Set(foldersList);\r\n foldersList = Array.from(foldersSet);\r\n foldersList = naturalSort(foldersList);\r\n });\r\n\r\n const activeFolderStr = await vscode.window.showQuickPick(foldersList, {\r\n placeHolder: 'Select folder to init the C/C++ Runner extension.',\r\n });\r\n let activeFolder: string | undefined;\r\n let workspaceFolder: string | undefined;\r\n\r\n if (activeFolderStr) {\r\n const folderSplit = activeFolderStr.split('/');\r\n const workspaceName = folderSplit[0];\r\n workspacesFolders.forEach((folder) => {\r\n if (folder.name === workspaceName) {\r\n workspaceFolder = folder.uri.fsPath;\r\n }\r\n });\r\n\r\n if (workspaceFolder) {\r\n activeFolder = path.join(workspaceFolder, ...folderSplit.slice(1));\r\n }\r\n }\r\n\r\n return { activeFolder, workspaceFolder };\r\n}\r\n","import * as vscode from 'vscode';\n\nimport { Builds } from '../utils/types';\n\nexport async function modeHandler() {\n const combinations = [Builds.debug, Builds.release];\n\n const pickedCombination = await vscode.window.showQuickPick(combinations, {\n placeHolder: 'Select a build mode',\n });\n\n if (!pickedCombination) return undefined;\n\n const pickedMode = pickedCombination.includes(Builds.debug)\n ? Builds.debug\n : Builds.release;\n\n return pickedMode;\n}\n","import * as path from 'path';\r\nimport * as vscode from 'vscode';\r\n\r\nimport { replaceBackslashes } from '../utils/fileUtils';\r\nimport { Builds } from '../utils/types';\r\n\r\nexport function updateFolderStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n workspaceFolder: string | undefined,\r\n activeFolder: string | undefined,\r\n showStatusBarItems: boolean,\r\n) {\r\n if (!status) return;\r\n\r\n if (workspaceFolder && activeFolder) {\r\n const workspaceName = path.basename(workspaceFolder);\r\n let text = activeFolder.replace(workspaceFolder, workspaceName);\r\n\r\n text = replaceBackslashes(text);\r\n const dirs = text.split('/');\r\n\r\n if (dirs.length > 2) {\r\n const lastElement = dirs.length - 1;\r\n text = `${dirs[0]}/.../${dirs[lastElement]}`;\r\n }\r\n\r\n status.color = '';\r\n status.text = `$(folder-active) ${text}`;\r\n } else {\r\n status.color = '#ffff00';\r\n status.text = '$(alert) Select folder.';\r\n }\r\n\r\n if (showStatusBarItems) {\r\n status.show();\r\n } else {\r\n status.hide();\r\n }\r\n}\r\n\r\nexport function updateModeStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n buildMode: Builds,\r\n) {\r\n if (!status) return;\r\n\r\n status.text = `$(tools) ${buildMode}`;\r\n toggleShow(status, showStatusBarItems, activeFolder);\r\n}\r\n\r\nexport function updateBuildStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n) {\r\n if (!status) return;\r\n\r\n status.text = `$(gear)`;\r\n toggleShow(status, showStatusBarItems, activeFolder);\r\n}\r\n\r\nexport function updateRunStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n) {\r\n if (!status) return;\r\n\r\n status.text = `$(play)`;\r\n toggleShow(status, showStatusBarItems, activeFolder);\r\n}\r\n\r\nexport function updateDebugStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n) {\r\n if (!status) return;\r\n\r\n status.text = `$(bug)`;\r\n toggleShow(status, showStatusBarItems, activeFolder);\r\n}\r\n\r\nexport function updateCleanStatus(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n) {\r\n if (!status) return;\r\n\r\n status.text = `$(trash)`;\r\n toggleShow(status, showStatusBarItems, activeFolder);\r\n}\r\n\r\nfunction toggleShow(\r\n status: vscode.StatusBarItem | undefined,\r\n showStatusBarItems: boolean,\r\n activeFolder: string | undefined,\r\n) {\r\n if (!status) return;\r\n\r\n if (showStatusBarItems && activeFolder) {\r\n status.show();\r\n } else {\r\n status.hide();\r\n }\r\n}\r\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport { getActivationState } from '../utils/vscodeUtils';\n\nexport abstract class CallbackProvider {\n protected _outputPath: string;\n protected _vscodeDirectory: string;\n protected _fileWatcherOnDelete: vscode.FileSystemWatcher | undefined;\n protected _fileWatcherOnChange: vscode.FileSystemWatcher | undefined;\n\n constructor(\n protected _workspaceFolder: string,\n protected templateFileName: string | undefined,\n protected outputFileName: string,\n ) {\n this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode');\n this._outputPath = path.join(this._vscodeDirectory, outputFileName);\n\n this.createFileWatcher();\n }\n\n protected createFileWatcher() {\n const filePattern = new vscode.RelativePattern(\n this._workspaceFolder,\n '.vscode/**',\n );\n\n this._fileWatcherOnDelete = vscode.workspace.createFileSystemWatcher(\n filePattern,\n true,\n true,\n false,\n );\n\n this._fileWatcherOnChange = vscode.workspace.createFileSystemWatcher(\n filePattern,\n true,\n false,\n true,\n );\n\n this._fileWatcherOnDelete.onDidDelete((e: vscode.Uri) => {\n const pathName = e.fsPath;\n if (pathName === this._vscodeDirectory || pathName === this._outputPath) {\n const extensionIsActive = getActivationState();\n if (extensionIsActive) this.deleteCallback();\n }\n });\n\n this._fileWatcherOnChange.onDidChange((e: vscode.Uri) => {\n const pathName = e.fsPath;\n if (pathName === this._outputPath) {\n this.changeCallback();\n }\n });\n\n return;\n }\n\n public abstract deleteCallback(): void;\n\n public abstract changeCallback(): void;\n}\n","import * as path from 'path';\n\nimport { extensionPath } from '../extension';\nimport { mkdirRecursive, pathExists } from '../utils/fileUtils';\nimport { getActivationState } from '../utils/vscodeUtils';\nimport { CallbackProvider } from './callbackProvider';\n\nexport abstract class FileProvider extends CallbackProvider {\n protected readonly templatePath: string | undefined;\n\n constructor(\n workspaceFolder: string,\n templateFileName: string | undefined,\n outputFileName: string,\n ) {\n super(workspaceFolder, templateFileName, outputFileName);\n\n const templateDirectory = path.join(\n extensionPath ? extensionPath : '',\n 'templates',\n );\n\n if (templateFileName) {\n this.templatePath = path.join(templateDirectory, templateFileName);\n }\n\n if (!pathExists(this._vscodeDirectory)) {\n mkdirRecursive(this._vscodeDirectory);\n }\n }\n\n protected abstract updateCheck(): boolean;\n\n public abstract writeFileData(): void;\n\n public createFileData() {\n if (!pathExists(this._vscodeDirectory)) {\n mkdirRecursive(this._vscodeDirectory);\n }\n\n this.writeFileData();\n }\n\n public updateFileContent() {\n this.writeFileData();\n }\n\n public deleteCallback() {\n const extensionIsActive = getActivationState();\n if (extensionIsActive) this.createFileData();\n }\n\n protected _updateFolderData(_workspaceFolder: string) {\n this._workspaceFolder = _workspaceFolder;\n this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode');\n this._outputPath = path.join(this._vscodeDirectory, this.outputFileName);\n this.createFileWatcher();\n }\n}\n","import * as path from 'path';\n\nimport {\n\tgetOccurenceIndicies,\n\tpathExists,\n\treadJsonFile,\n\treplaceBackslashes,\n\twriteJsonFile,\n} from '../utils/fileUtils';\nimport {\n\tArchitectures,\n\tBuilds,\n\tDebuggers,\n\tJsonLaunchConfig,\n\tOperatingSystems,\n} from '../utils/types';\nimport { getLaunchConfigIndex } from '../utils/vscodeUtils';\nimport { FileProvider } from './fileProvider';\nimport { SettingsProvider } from './settingsProvider';\n\nconst TEMPLATE_FILENAME = 'launch_template.json';\nconst OUTPUT_FILENAME = 'launch.json';\nconst CONFIG_NAME = 'C/C++ Runner: Debug Session';\n\nexport class LaunchProvider extends FileProvider {\n public buildMode: Builds = Builds.debug;\n public argumentsString: string[] | undefined;\n\n constructor(\n protected settings: SettingsProvider,\n public workspaceFolder: string,\n public activeFolder: string,\n ) {\n super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME);\n\n if (!this.activeFolder) {\n this.activeFolder = this.workspaceFolder;\n }\n\n const updateRequired = this.updateCheck();\n\n if (updateRequired && activeFolder) {\n this.createFileData();\n }\n }\n\n protected updateCheck() {\n if (!pathExists(this._outputPath)) {\n return true;\n } else {\n const configJson: JsonLaunchConfig = readJsonFile(this._outputPath);\n\n if (configJson) {\n configJson.configurations.forEach((config) => {\n const triplet: string = config.name;\n if (triplet.includes(this.settings.operatingSystem)) {\n return true;\n }\n });\n }\n }\n\n return false;\n }\n\n public writeFileData() {\n if (!this.workspaceFolder && !this.activeFolder) return;\n\n if (!this.activeFolder) {\n this.activeFolder = this.workspaceFolder;\n }\n\n if (!this.templatePath) return;\n\n const launchTemplate: JsonLaunchConfig | undefined = readJsonFile(\n this.templatePath,\n );\n\n if (!launchTemplate) return;\n\n if (\n this.settings.operatingSystem === OperatingSystems.windows &&\n (this.settings.useMsvc || this.settings.cCompilerPath.includes('clang'))\n ) {\n this.msvcBasedDebugger(launchTemplate);\n delete launchTemplate.configurations[0]?.externalConsole;\n } else if (\n this.settings.operatingSystem === OperatingSystems.windows &&\n launchTemplate.configurations[0]\n ) {\n this.unixBasedDebugger(launchTemplate);\n delete launchTemplate.configurations[0]?.console;\n launchTemplate.configurations[0].externalConsole = true;\n } else {\n this.unixBasedDebugger(launchTemplate);\n delete launchTemplate.configurations[0]?.console;\n }\n\n const launchLocal: JsonLaunchConfig | undefined = readJsonFile(\n this._outputPath,\n );\n\n if (!launchLocal) {\n writeJsonFile(this._outputPath, launchTemplate);\n return;\n }\n\n let configIdx = getLaunchConfigIndex(launchLocal, CONFIG_NAME);\n\n if (configIdx === undefined) {\n configIdx = launchLocal.configurations.length;\n }\n\n if (!launchTemplate.configurations[0]) return;\n\n if (launchLocal && launchLocal.configurations.length === configIdx) {\n launchLocal.configurations.push(launchTemplate.configurations[0]);\n } else {\n if (!launchLocal.configurations[configIdx]) return;\n\n launchLocal.configurations[configIdx] = launchTemplate.configurations[0];\n }\n\n writeJsonFile(this._outputPath, launchLocal);\n }\n\n public updateFolderData(workspaceFolder: string, activeFolder: string) {\n this.activeFolder = activeFolder;\n super._updateFolderData(workspaceFolder);\n }\n\n public updateModeData(buildMode: Builds) {\n this.buildMode = buildMode;\n }\n\n public updateArgumentsData(argumentsString: string | undefined) {\n if (argumentsString === undefined) return;\n\n if (argumentsString === '') {\n this.argumentsString = [];\n return;\n }\n\n if (!argumentsString.includes(' ')) {\n this.argumentsString = [argumentsString];\n }\n\n if (!argumentsString.includes('\"')) {\n this.argumentsString = argumentsString.split(' ');\n return;\n }\n\n const indicies = getOccurenceIndicies(argumentsString, '\"');\n this.argumentsString = [];\n\n const strsToReplace: string[] = [];\n if (!indicies || indicies.length < 2) return;\n\n for (let i = 0; i < indicies.length; i += 2) {\n const sub = argumentsString.slice(\n (indicies[i] as number) + 1,\n indicies[i + 1],\n );\n this.argumentsString.push(sub);\n strsToReplace.push(sub);\n }\n\n for (const strReplace of strsToReplace) {\n argumentsString = argumentsString.replace(strReplace, '');\n }\n\n argumentsString = argumentsString.replace(/\"/g, '');\n if (argumentsString.startsWith(' ')) {\n argumentsString = argumentsString.slice(1);\n }\n if (argumentsString.endsWith(' ')) {\n argumentsString = argumentsString.slice(0, argumentsString.length - 2);\n }\n\n this.argumentsString.push(\n ...argumentsString.split(' ').filter((str: string) => Boolean(str)),\n );\n\n this.argumentsString.map((str: string) => str.replace(/\"/g, ''));\n }\n\n public changeCallback() {\n const launchLocal: JsonLaunchConfig | undefined = readJsonFile(\n this._outputPath,\n );\n\n if (!launchLocal) return;\n\n const configIdx = getLaunchConfigIndex(launchLocal, CONFIG_NAME);\n\n if (configIdx !== undefined) {\n const currentConfig = launchLocal.configurations[configIdx];\n\n if (currentConfig === undefined) return;\n\n if (\n currentConfig.miDebuggerPath !== this.settings.debuggerPath &&\n currentConfig.miDebuggerPath\n ) {\n this.settings.debuggerPath = currentConfig.miDebuggerPath;\n\n if (\n currentConfig.miDebuggerPath.includes(Debuggers.gdb) ||\n currentConfig.miDebuggerPath.includes(Debuggers.lldb)\n ) {\n this.settings.debuggerPath = currentConfig.miDebuggerPath;\n }\n }\n } else {\n this.writeFileData();\n }\n }\n\n private msvcBasedDebugger(launchTemplate: JsonLaunchConfig) {\n if (launchTemplate.configurations[0] === undefined) return;\n\n launchTemplate.configurations[0].name = CONFIG_NAME;\n\n delete launchTemplate.configurations[0].MIMode;\n delete launchTemplate.configurations[0].miDebuggerPath;\n delete launchTemplate.configurations[0].setupCommands;\n\n launchTemplate.configurations[0].type = 'cppvsdbg';\n\n if (this.argumentsString) {\n launchTemplate.configurations[0].args = this.argumentsString;\n } else {\n launchTemplate.configurations[0].args = [];\n }\n\n launchTemplate.configurations[0].cwd = replaceBackslashes(\n this.activeFolder,\n );\n\n const debugPath = path.join(\n this.activeFolder,\n `build/${this.buildMode}/out${this.buildMode}`,\n );\n launchTemplate.configurations[0].program = replaceBackslashes(debugPath);\n\n return launchTemplate;\n }\n\n private unixBasedDebugger(launchTemplate: JsonLaunchConfig) {\n if (launchTemplate.configurations[0] === undefined) return;\n\n launchTemplate.configurations[0].name = CONFIG_NAME;\n if (this.settings.debuggerPath) {\n launchTemplate.configurations[0].MIMode =\n this.settings.debuggerPath.includes(Debuggers.gdb)\n ? Debuggers.gdb\n : Debuggers.lldb;\n launchTemplate.configurations[0].miDebuggerPath =\n this.settings.debuggerPath;\n } else {\n launchTemplate.configurations[0].MIMode =\n SettingsProvider.DEFAULT_DEBUGGER_PATH;\n launchTemplate.configurations[0].miDebuggerPath =\n SettingsProvider.DEFAULT_DEBUGGER_PATH;\n }\n\n if (OperatingSystems.mac === this.settings.operatingSystem) {\n launchTemplate.configurations[0].stopAtEntry = true;\n if (launchTemplate.configurations[0].setupCommands) {\n delete launchTemplate.configurations[0].setupCommands;\n }\n\n if (this.settings.architecure === Architectures.ARM64) {\n launchTemplate.configurations[0].type = 'lldb';\n\n if (launchTemplate.configurations[0].miDebuggerPath) {\n delete launchTemplate.configurations[0].miDebuggerPath;\n }\n }\n }\n\n if (this.argumentsString && this.argumentsString.length > 0) {\n launchTemplate.configurations[0].args = this.argumentsString;\n } else {\n launchTemplate.configurations[0].args = [];\n }\n\n if (this.settings.operatingSystem === OperatingSystems.windows) {\n launchTemplate.configurations[0].cwd = replaceBackslashes(\n this.activeFolder,\n );\n } else {\n launchTemplate.configurations[0].cwd = this.activeFolder;\n }\n\n const debugPath = path.join(\n this.activeFolder,\n `build/${this.buildMode}/out${this.buildMode}`,\n );\n if (this.settings.operatingSystem === OperatingSystems.windows) {\n launchTemplate.configurations[0].program = replaceBackslashes(debugPath);\n } else {\n launchTemplate.configurations[0].program = debugPath;\n }\n\n return launchTemplate;\n }\n}\n","import * as path from 'path';\n\nimport {\n\tpathExists,\n\treadJsonFile,\n\treplaceBackslashes,\n\twriteJsonFile,\n} from '../utils/fileUtils';\nimport { arraysEqual } from '../utils/general';\nimport { commandExists } from '../utils/systemUtils';\nimport {\n\tArchitectures,\n\tCompilerSystems,\n\tJsonPropertiesConfig,\n\tJsonPropertiesConfigEntry,\n\tOperatingSystems,\n} from '../utils/types';\nimport { FileProvider } from './fileProvider';\nimport { SettingsProvider } from './settingsProvider';\n\nconst TEMPLATE_FILENAME = 'properties_template.json';\nconst OUTPUT_FILENAME = 'c_cpp_properties.json';\nconst INCLUDE_PATTERN = '${workspaceFolder}/**';\n\nexport class PropertiesProvider extends FileProvider {\n protected lastConfig: JsonPropertiesConfig | undefined;\n constructor(\n protected settings: SettingsProvider,\n public workspaceFolder: string,\n public activeFolder: string | undefined,\n ) {\n super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME);\n\n const updateRequired = this.updateCheck();\n\n if (updateRequired && activeFolder) {\n this.createFileData();\n }\n\n if (pathExists(this._outputPath)) {\n this.lastConfig = readJsonFile(this._outputPath);\n }\n }\n\n protected updateCheck() {\n if (!pathExists(this._outputPath)) return true;\n\n const currentConfig: JsonPropertiesConfig = readJsonFile(this._outputPath);\n\n if (!currentConfig) return true;\n\n const currentConfigEntry = currentConfig.configurations[0];\n\n if (currentConfigEntry === undefined) return true;\n\n const triplet: string = currentConfigEntry.name;\n if (!triplet.includes(this.settings.operatingSystem)) return true;\n\n if (\n this.settings.useMsvc &&\n !currentConfigEntry.intelliSenseMode.includes('msvc')\n ) {\n return true;\n }\n\n return false;\n }\n\n public async writeFileData() {\n let configLocal: JsonPropertiesConfig | undefined;\n\n if (!this.templatePath) return;\n\n if (!pathExists(this._outputPath)) {\n configLocal = readJsonFile(this.templatePath);\n } else {\n configLocal = readJsonFile(this._outputPath);\n }\n\n if (!configLocal) return;\n\n if (!this.settings.cCompilerPath && !this.settings.useMsvc) return;\n\n const os = this.settings.operatingSystem.toLowerCase();\n\n let arch: string;\n if (!this.settings.architecure) {\n arch = Architectures.x64;\n } else {\n arch = this.settings.architecure.toLowerCase();\n }\n\n let compiler: CompilerSystems;\n if (this.settings.useMsvc) {\n compiler = CompilerSystems.msvc;\n } else if (this.settings.cCompilerPath) {\n compiler = this.settings.cCompilerPath.toLowerCase().includes('gcc')\n ? CompilerSystems.gcc\n : CompilerSystems.clang;\n } else {\n return;\n }\n\n const triplet = `${os}-${compiler}-${arch}`;\n\n const configLocalEntry = configLocal.configurations[0];\n\n if (configLocalEntry === undefined) return;\n\n if (this.settings.includePaths.length > 0) {\n configLocalEntry.includePath = [INCLUDE_PATTERN];\n for (const path of this.settings.includePaths) {\n const includePathSet = new Set(configLocalEntry.includePath);\n if (\n !includePathSet.has(path) &&\n path !== INCLUDE_PATTERN &&\n !path.includes('$(default)')\n ) {\n configLocalEntry.includePath.push(path);\n }\n }\n } else {\n configLocalEntry.includePath = [INCLUDE_PATTERN];\n }\n const old_standard = ['c89', 'c99', 'gnu89', 'gnu99'].some(\n (ext) => this.settings.cStandard === ext,\n );\n\n configLocalEntry.cStandard = this.settings.cStandard\n ? this.settings.cStandard\n : this.settings.useMsvc\n ? SettingsProvider.DEFAULT_C_STANDARD_MSVC\n : '${default}';\n\n if (\n this.settings.operatingSystem === OperatingSystems.windows &&\n this.settings.useMsvc &&\n old_standard\n ) {\n configLocalEntry.cStandard = 'c11';\n }\n\n configLocalEntry.cppStandard = this.settings.cppStandard\n ? this.settings.cppStandard\n : '${default}';\n\n if (this.settings.useMsvc) {\n configLocalEntry.compilerPath = path.join(\n this.settings.msvcToolsPath,\n SettingsProvider.MSVC_COMPILER_NAME,\n );\n } else {\n if (pathExists(this.settings.cCompilerPath)) {\n configLocalEntry.compilerPath = this.settings.cCompilerPath;\n } else {\n // non-absolute compiler path\n const ret = await commandExists(this.settings.cCompilerPath);\n\n if (\n !ret ||\n !ret.p ||\n ret.p.includes('perl') ||\n ret.p.includes('ruby')\n ) {\n configLocalEntry.compilerPath = this.settings.cCompilerPath;\n } else {\n configLocalEntry.compilerPath = replaceBackslashes(ret.p);\n }\n }\n }\n\n // Since C/C++ Extension Version 1.4.0 cygwin is a linux triplet\n if (\n this.settings.isCygwin &&\n !this.settings.useMsvc &&\n this.settings.operatingSystem === OperatingSystems.windows\n ) {\n configLocalEntry.name = triplet.replace('windows', 'windows-cygwin');\n configLocalEntry.intelliSenseMode = triplet.replace('windows', 'linux');\n } else {\n configLocalEntry.name = triplet;\n configLocalEntry.intelliSenseMode = triplet;\n }\n\n writeJsonFile(this._outputPath, configLocal);\n }\n\n public updateFolderData(workspaceFolder: string) {\n super._updateFolderData(workspaceFolder);\n }\n\n public changeCallback() {\n const currentConfig: JsonPropertiesConfig | undefined = readJsonFile(\n this._outputPath,\n );\n\n if (!this.lastConfig) {\n this.lastConfig = readJsonFile(this._outputPath);\n\n if (!this.lastConfig) return;\n }\n\n if (!currentConfig) return;\n\n const currentConfigEntry: JsonPropertiesConfigEntry | undefined =\n currentConfig.configurations[0];\n\n if (currentConfigEntry === undefined) return;\n\n const lastConfigEntry: JsonPropertiesConfigEntry | undefined =\n this.lastConfig.configurations[0];\n\n if (lastConfigEntry === undefined) return;\n\n let updated = false;\n\n if (currentConfigEntry.cStandard !== lastConfigEntry.cStandard) {\n this.settings.cStandard =\n currentConfigEntry.cStandard !== '${default}'\n ? currentConfigEntry.cStandard\n : '';\n updated = true;\n }\n\n if (currentConfigEntry.cppStandard !== lastConfigEntry.cppStandard) {\n this.settings.cppStandard =\n currentConfigEntry.cppStandard !== '${default}'\n ? currentConfigEntry.cppStandard\n : '';\n updated = true;\n }\n\n if (\n currentConfigEntry.compilerPath !== lastConfigEntry.compilerPath &&\n !currentConfigEntry.compilerPath.includes('cl.exe')\n ) {\n this.settings.cCompilerPath = currentConfigEntry.compilerPath;\n updated = true;\n }\n\n if (\n !arraysEqual(currentConfigEntry.includePath, lastConfigEntry.includePath)\n ) {\n this.settings.includePaths = currentConfigEntry.includePath.filter(\n (path: string) =>\n path !== INCLUDE_PATTERN && !path.includes('$(default)'),\n );\n updated = true;\n }\n\n if (updated) {\n this.settings.writeFileData();\n\n this.lastConfig = currentConfig;\n }\n }\n}\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport {\n\tfoldersInDir,\n\tlocalSettingExist,\n\tpathExists,\n\treadJsonFile,\n\treplaceBackslashes,\n\twriteJsonFile,\n} from '../utils/fileUtils';\nimport {\n\tgetCompilerArchitecture,\n\tgetOperatingSystem,\n} from '../utils/systemUtils';\nimport {\n\tArchitectures,\n\tCompilerSystems,\n\tJsonPropertiesConfig,\n\tJsonPropertiesConfigEntry,\n\tJsonSettings,\n\tOperatingSystems,\n} from '../utils/types';\nimport { FileProvider } from './fileProvider';\n\nconst OUTPUT_FILENAME = 'settings.json';\nconst EXTENSION_NAME = 'C_Cpp_Runner';\n\nexport class SettingsProvider extends FileProvider {\n static DEFAULT_C_COMPILER_PATH = 'gcc';\n static DEFAULT_CPP_COMPILER_PATH = 'g++';\n static DEFAULT_DEBUGGER_PATH = 'gdb';\n static DEFAULT_MSVC_BATCH_PATH =\n 'C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat';\n static DEFAULT_MSVC_TOOLS_PATH = '';\n static DEFAULT_C_STANDARD_UNIX = '';\n static DEFAULT_C_STANDARD_MSVC = 'c11';\n static DEFAULT_CPP_STANDARD = '';\n static DEFAULT_INCLUDE_SEARCH = ['*', '**/*'];\n static DEFAULT_EXCLUDE_SEARCH = [\n '**/build',\n '**/build/**',\n '**/.*',\n '**/.*/**',\n '**/.vscode',\n '**/.vscode/**',\n ];\n\n static DEFAULT_ENABLE_WARNINGS = true;\n static DEFAULT_WARNINGS_AS_ERRORS = false;\n\n static DEFAULT_WARNINGS_UNIX = ['-Wall', '-Wextra', '-Wpedantic'];\n static DEFAULT_WARNINGS_MSVC = ['/W4'];\n static DEFAULT_COMPILER_ARGS = [];\n static DEFAULT_LINKER_ARGS = [];\n static DEFAULT_INCLUDE_PATHS = [];\n\n static DEFAULT_USE_MSVC = false;\n static MSVC_COMPILER_NAME = 'cl.exe';\n\n // Workspace data\n private _configGlobal = vscode.workspace.getConfiguration(EXTENSION_NAME);\n\n // Machine information\n public operatingSystem = getOperatingSystem();\n public architecure: Architectures | undefined;\n public isCygwin: boolean = false;\n\n // Settings\n public cCompilerPath: string = SettingsProvider.DEFAULT_C_COMPILER_PATH;\n public cppCompilerPath: string = SettingsProvider.DEFAULT_CPP_COMPILER_PATH;\n public debuggerPath: string = SettingsProvider.DEFAULT_DEBUGGER_PATH;\n public msvcBatchPath: string = SettingsProvider.DEFAULT_MSVC_BATCH_PATH;\n public msvcToolsPath: string = SettingsProvider.DEFAULT_MSVC_TOOLS_PATH;\n public useMsvc: boolean = SettingsProvider.DEFAULT_USE_MSVC;\n public cStandard: string = SettingsProvider.DEFAULT_C_STANDARD_UNIX;\n public cppStandard: string = SettingsProvider.DEFAULT_CPP_STANDARD;\n public compilerArgs: string[] = SettingsProvider.DEFAULT_COMPILER_ARGS;\n public linkerArgs: string[] = SettingsProvider.DEFAULT_LINKER_ARGS;\n public includePaths: string[] = SettingsProvider.DEFAULT_INCLUDE_PATHS;\n public includeSearch: string[] = SettingsProvider.DEFAULT_INCLUDE_SEARCH;\n public excludeSearch: string[] = SettingsProvider.DEFAULT_EXCLUDE_SEARCH;\n public enableWarnings: boolean = SettingsProvider.DEFAULT_ENABLE_WARNINGS;\n public warningsAsError: boolean = SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS;\n public warnings: string[] = SettingsProvider.DEFAULT_WARNINGS_UNIX;\n\n constructor(public workspaceFolder: string, public activeFolder: string) {\n super(workspaceFolder, undefined, OUTPUT_FILENAME);\n\n const settingsFileMissing = this.localFileExist('settings.json');\n const settingsMissing = this.updateCheck();\n const propertiesFileMissing = this.localFileExist('c_cpp_properties.json');\n\n const allInfoMissing =\n settingsMissing && propertiesFileMissing && activeFolder;\n const onlySettingsMissing =\n settingsFileMissing && !propertiesFileMissing && activeFolder;\n\n if (allInfoMissing) {\n this.loadGlobalSettings();\n this.createFileData();\n this.getArchitecture();\n return;\n }\n\n if (onlySettingsMissing) {\n this.getSettingsFromProperties();\n this.createFileData();\n this.getArchitecture();\n return;\n }\n\n if (activeFolder) {\n this.loadLocalSettings();\n this.getArchitecture();\n return;\n }\n }\n\n protected updateCheck() {\n if (!pathExists(this._outputPath)) {\n return true;\n } else if (!this.commandsAlreadyStored()) {\n return true;\n }\n\n return false;\n }\n\n private localFileExist(name: string) {\n let settingsFileMissing = false;\n\n const settingsPath = path.join(this._vscodeDirectory, name);\n if (!pathExists(settingsPath)) {\n settingsFileMissing = true;\n }\n\n return settingsFileMissing;\n }\n\n private commandsAlreadyStored() {\n if (pathExists(this._outputPath)) {\n const settingsJson: JsonSettings | undefined = readJsonFile(\n this._outputPath,\n );\n\n if (!settingsJson) return false;\n\n if (\n localSettingExist(`${EXTENSION_NAME}.cCompilerPath`, settingsJson) &&\n localSettingExist(`${EXTENSION_NAME}.cppCompilerPath`, settingsJson) &&\n localSettingExist(`${EXTENSION_NAME}.debuggerPath`, settingsJson)\n ) {\n return true;\n }\n }\n\n return false;\n }\n\n /********************/\n /* MAIN FUNCTIONS */\n /********************/\n\n public writeFileData() {\n this.storeSettings();\n }\n\n public deleteCallback() {\n this.storeSettings();\n }\n\n public changeCallback() {\n this.loadLocalSettings();\n }\n\n public updateFolderData(workspaceFolder: string) {\n super._updateFolderData(workspaceFolder);\n }\n\n private loadLocalSettings() {\n const settingsLocal: JsonSettings | undefined = readJsonFile(\n this._outputPath,\n );\n\n // mandatory\n this.cCompilerPath = this.getSettingsValue(\n settingsLocal,\n 'cCompilerPath',\n SettingsProvider.DEFAULT_C_COMPILER_PATH,\n );\n this.cppCompilerPath = this.getSettingsValue(\n settingsLocal,\n 'cppCompilerPath',\n SettingsProvider.DEFAULT_CPP_COMPILER_PATH,\n );\n this.debuggerPath = this.getSettingsValue(\n settingsLocal,\n 'debuggerPath',\n SettingsProvider.DEFAULT_DEBUGGER_PATH,\n );\n\n // optional\n this.msvcBatchPath = this.getSettingsValue(\n settingsLocal,\n 'msvcBatchPath',\n SettingsProvider.DEFAULT_MSVC_BATCH_PATH,\n );\n if (this.msvcBatchPath === SettingsProvider.DEFAULT_MSVC_BATCH_PATH) {\n if (pathExists(this.msvcBatchPath.replace('VR_NR', '2022'))) {\n this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2022');\n this.update('msvcBatchPath', this.msvcBatchPath);\n } else if (pathExists(this.msvcBatchPath.replace('VR_NR', '2017'))) {\n this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2017');\n this.update('msvcBatchPath', this.msvcBatchPath);\n } else if (pathExists(this.msvcBatchPath.replace('VR_NR', '2015'))) {\n this.msvcBatchPath = this.msvcBatchPath.replace('VR_NR', '2015');\n this.update('msvcBatchPath', this.msvcBatchPath);\n } else {\n this.msvcBatchPath = '';\n this.update('msvcBatchPath', this.msvcBatchPath);\n }\n }\n this.useMsvc = this.getSettingsValue(\n settingsLocal,\n 'useMsvc',\n SettingsProvider.DEFAULT_USE_MSVC,\n );\n\n if (this.useMsvc) {\n this.searchMsvcToolsPath();\n }\n\n this.enableWarnings = this.getSettingsValue(\n settingsLocal,\n 'enableWarnings',\n SettingsProvider.DEFAULT_ENABLE_WARNINGS,\n );\n\n this.warnings = this.getSettingsValue(\n settingsLocal,\n 'warnings',\n SettingsProvider.DEFAULT_WARNINGS_UNIX,\n );\n\n const msvcWarnings = this.warnings.some((warning: string) =>\n warning.includes('/'),\n );\n\n if (this.useMsvc && !msvcWarnings) {\n this.warnings = SettingsProvider.DEFAULT_WARNINGS_MSVC;\n } else if (!this.useMsvc && msvcWarnings) {\n this.warnings = SettingsProvider.DEFAULT_WARNINGS_UNIX;\n }\n\n this.warningsAsError = this.getSettingsValue(\n settingsLocal,\n 'warningsAsError',\n SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS,\n );\n\n this.cStandard = this.getSettingsValue(\n settingsLocal,\n 'cStandard',\n SettingsProvider.DEFAULT_C_STANDARD_UNIX,\n );\n\n this.cppStandard = this.getSettingsValue(\n settingsLocal,\n 'cppStandard',\n SettingsProvider.DEFAULT_CPP_STANDARD,\n );\n\n this.compilerArgs = this.getSettingsValue(\n settingsLocal,\n 'compilerArgs',\n SettingsProvider.DEFAULT_COMPILER_ARGS,\n );\n this.linkerArgs = this.getSettingsValue(\n settingsLocal,\n 'linkerArgs',\n SettingsProvider.DEFAULT_LINKER_ARGS,\n );\n this.includePaths = this.getSettingsValue(\n settingsLocal,\n 'includePaths',\n SettingsProvider.DEFAULT_INCLUDE_PATHS,\n );\n\n this.includeSearch = this.getSettingsValue(\n settingsLocal,\n 'includeSearch',\n SettingsProvider.DEFAULT_INCLUDE_SEARCH,\n );\n this.excludeSearch = this.getSettingsValue(\n settingsLocal,\n 'excludeSearch',\n SettingsProvider.DEFAULT_EXCLUDE_SEARCH,\n );\n }\n\n private getSettingsFromProperties() {\n const propertiesPath = path.join(\n this._vscodeDirectory,\n 'c_cpp_properties.json',\n );\n const propertiesConfig: JsonPropertiesConfig | undefined =\n readJsonFile(propertiesPath);\n\n if (!propertiesConfig) return;\n\n const currentConfigEntry: JsonPropertiesConfigEntry | undefined =\n propertiesConfig.configurations[0];\n\n if (!currentConfigEntry) return;\n\n /* Mandatory in settings.json */\n this.cCompilerPath = this.getPropertiesValue(\n currentConfigEntry,\n 'compilerPath',\n this.cCompilerPath,\n );\n\n const isGccBased = this.cCompilerPath.includes(CompilerSystems.gcc);\n const isClangBased = this.cCompilerPath.includes(CompilerSystems.clang);\n\n if (isGccBased) {\n const cppPath = this.cCompilerPath.replace('gcc', 'g++');\n const dbgPath = this.cCompilerPath.replace('gcc', 'gdb');\n this.cppCompilerPath = cppPath;\n this.debuggerPath = dbgPath;\n } else if (isClangBased) {\n const cppPath = this.cCompilerPath.replace('clang', 'clang++');\n const dbgPath = this.cCompilerPath.replace('clang', 'lldb');\n this.cppCompilerPath = path.join(cppPath);\n this.debuggerPath = dbgPath;\n }\n\n /* Optional in settings.json */\n const _cStandard: string = this.getPropertiesValue(\n currentConfigEntry,\n 'cStandard',\n this.cStandard,\n );\n this.cStandard =\n _cStandard !== '${default}'\n ? _cStandard\n : SettingsProvider.DEFAULT_C_STANDARD_UNIX;\n\n const _cppStandard: string = this.getPropertiesValue(\n currentConfigEntry,\n 'cppStandard',\n this.cppStandard,\n );\n this.cppStandard =\n _cppStandard !== '${default}'\n ? _cppStandard\n : SettingsProvider.DEFAULT_CPP_STANDARD;\n\n const _includePaths: string[] = this.getPropertiesValue(\n currentConfigEntry,\n 'includePath',\n this.includePaths,\n );\n this.includePaths =\n _includePaths.length !== 0\n ? _includePaths\n : SettingsProvider.DEFAULT_INCLUDE_PATHS;\n }\n\n private searchMsvcToolsPath() {\n let msvcBasePath = this.msvcBatchPath.split('VC')[0];\n\n if (!msvcBasePath) return;\n\n msvcBasePath += 'VC/Tools/MSVC';\n\n const installed_versions = foldersInDir(msvcBasePath);\n const newst_version_path =\n installed_versions[installed_versions.length - 1];\n if (installed_versions.length === 0 || !newst_version_path) return;\n\n const newst_version_path_splitted = newst_version_path.split('\\\\');\n if (newst_version_path_splitted.length === 0) return;\n\n const versionNumber =\n newst_version_path_splitted[newst_version_path_splitted.length - 1];\n\n if (!versionNumber) return;\n\n let architecturePath: string;\n if (\n this.architecure === Architectures.x64 ||\n this.architecure === undefined\n ) {\n architecturePath = 'bin/Hostx64/x64';\n } else {\n architecturePath = 'bin/Hostx86/x86';\n }\n\n if (!pathExists(architecturePath)) return;\n\n this.msvcToolsPath = path.join(\n msvcBasePath,\n versionNumber,\n architecturePath,\n );\n }\n\n private getArchitecture() {\n if (this.useMsvc) {\n this.architecure = Architectures.x64;\n this.isCygwin = false;\n return;\n }\n\n if (this.cCompilerPath) {\n const ret = getCompilerArchitecture(this.cCompilerPath);\n this.architecure = ret.architecure;\n this.isCygwin = ret.isCygwin;\n return;\n }\n\n if (this.cppCompilerPath) {\n const ret = getCompilerArchitecture(this.cppCompilerPath);\n this.architecure = ret.architecure;\n this.isCygwin = ret.isCygwin;\n return;\n }\n\n this.architecure = Architectures.x64;\n this.isCygwin = false;\n }\n\n public reset() {\n this.loadGlobalSettings();\n this.storeSettings();\n }\n\n private loadGlobalSettings() {\n /* Mandatory in settings.json */\n this.cCompilerPath = this.getGlobalSettingsValue(\n 'cCompilerPath',\n SettingsProvider.DEFAULT_C_COMPILER_PATH,\n );\n this.cppCompilerPath = this.getGlobalSettingsValue(\n 'cppCompilerPath',\n SettingsProvider.DEFAULT_CPP_COMPILER_PATH,\n );\n this.debuggerPath = this.getGlobalSettingsValue(\n 'debuggerPath',\n SettingsProvider.DEFAULT_DEBUGGER_PATH,\n );\n this.msvcBatchPath = this.getGlobalSettingsValue(\n 'msvcBatchPath',\n SettingsProvider.DEFAULT_MSVC_BATCH_PATH,\n );\n this.msvcToolsPath = this.getGlobalSettingsValue(\n 'msvcToolsPath',\n SettingsProvider.DEFAULT_MSVC_TOOLS_PATH,\n );\n this.useMsvc = this.getGlobalSettingsValue(\n 'useMsvc',\n SettingsProvider.DEFAULT_USE_MSVC,\n );\n\n /* Optional in settings.json */\n this.enableWarnings = this.getGlobalSettingsValue(\n 'enableWarnings',\n SettingsProvider.DEFAULT_ENABLE_WARNINGS,\n );\n this.warnings = this.getGlobalSettingsValue(\n 'warnings',\n SettingsProvider.DEFAULT_WARNINGS_UNIX,\n );\n this.enableWarnings = this.getGlobalSettingsValue(\n 'enableWarnings',\n SettingsProvider.DEFAULT_ENABLE_WARNINGS,\n );\n this.warningsAsError = this.getGlobalSettingsValue(\n 'warningsAsError',\n SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS,\n );\n this.cStandard = this.getGlobalSettingsValue(\n 'cStandard',\n SettingsProvider.DEFAULT_C_STANDARD_UNIX,\n );\n this.cppStandard = this.getGlobalSettingsValue(\n 'cppStandard',\n SettingsProvider.DEFAULT_CPP_STANDARD,\n );\n this.compilerArgs = this.getGlobalSettingsValue(\n 'compilerArgs',\n SettingsProvider.DEFAULT_COMPILER_ARGS,\n );\n this.linkerArgs = this.getGlobalSettingsValue(\n 'linkerArgs',\n SettingsProvider.DEFAULT_LINKER_ARGS,\n );\n this.includePaths = this.getGlobalSettingsValue(\n 'includePaths',\n SettingsProvider.DEFAULT_INCLUDE_PATHS,\n );\n this.excludeSearch = this.getGlobalSettingsValue(\n 'excludeSearch',\n SettingsProvider.DEFAULT_EXCLUDE_SEARCH,\n );\n }\n\n private storeSettings() {\n this.updateBasedOnEnv('cCompilerPath', this.cCompilerPath);\n this.updateBasedOnEnv('cppCompilerPath', this.cppCompilerPath);\n this.updateBasedOnEnv('debuggerPath', this.debuggerPath);\n\n this.update('cStandard', this.cStandard);\n this.update('cppStandard', this.cppStandard);\n\n this.update('msvcBatchPath', this.msvcBatchPath);\n this.update('useMsvc', this.useMsvc);\n\n this.update('warnings', this.warnings);\n this.update('enableWarnings', this.enableWarnings);\n this.update('warningsAsError', this.warningsAsError);\n\n this.update('compilerArgs', this.compilerArgs);\n this.update('linkerArgs', this.linkerArgs);\n this.update('includePaths', this.includePaths);\n\n this.update('includeSearch', this.includeSearch);\n this.update('excludeSearch', this.excludeSearch);\n }\n\n /********************/\n /* HELPER FUNCTIONS */\n /********************/\n\n private getGlobalSettingsValue(name: string, defaultValue: any) {\n const fullSettingInfo = this._configGlobal.inspect(name);\n return fullSettingInfo?.globalValue\n ? fullSettingInfo.globalValue\n : defaultValue;\n }\n\n private getSettingsValue(\n settingsLocal: JsonSettings | undefined,\n name: string,\n defaultValue: any,\n ) {\n const settingName = `${EXTENSION_NAME}.${name}`;\n\n if (settingsLocal && settingsLocal[settingName] !== undefined) {\n return settingsLocal[settingName];\n }\n\n return this.getGlobalSettingsValue(name, defaultValue);\n }\n\n private getPropertiesValue(\n properties: JsonPropertiesConfigEntry | undefined,\n name: keyof JsonPropertiesConfigEntry,\n defaultValue: any,\n ) {\n if (properties && properties[name] !== undefined) {\n return properties[name];\n }\n\n return defaultValue;\n }\n\n public update(key: string, value: any) {\n let settingsJson: JsonSettings | undefined = readJsonFile(this._outputPath);\n\n if (!settingsJson) settingsJson = {};\n\n const settingName = `${EXTENSION_NAME}.${key}`;\n\n settingsJson[settingName] = value;\n\n writeJsonFile(this._outputPath, settingsJson);\n }\n\n private updateBasedOnEnv(settingsName: string, settingsValue: string) {\n if (this.operatingSystem === OperatingSystems.windows) {\n this.update(settingsName, replaceBackslashes(settingsValue));\n } else {\n this.update(settingsName, settingsValue);\n }\n }\n}\n","import * as fs from 'fs';\nimport * as JSON5 from 'json5';\nimport * as minimatch from 'minimatch';\nimport * as path from 'path';\n\nimport { JsonSettings, Languages } from './types';\n\nexport function replaceBackslashes(text: string) {\n return text.replace(/\\\\/g, '/');\n}\n\nexport function mkdirRecursive(dir: string) {\n try {\n fs.mkdirSync(dir, { recursive: true });\n } catch (err) {}\n}\n\nexport function rmdirRecursive(dir: string) {\n try {\n fs.rmdirSync(dir, { recursive: true });\n } catch (err) {}\n}\n\nexport function filterOnString(names: string[], filterName: string) {\n return names.filter((name) => !name.includes(filterName));\n}\n\nexport function pathExists(filepath: string) {\n try {\n fs.accessSync(filepath);\n } catch (err) {\n return false;\n }\n\n return true;\n}\n\nexport function isSourceFile(fileExt: string) {\n const fileExtLower = fileExt.toLowerCase();\n\n if (isHeaderFile(fileExtLower)) {\n return false;\n }\n\n if (!(isCSourceFile(fileExtLower) || isCppSourceFile(fileExtLower))) {\n return false;\n }\n\n return true;\n}\n\nexport function addFileExtensionDot(fileExt: string) {\n if (!fileExt.includes('.')) {\n fileExt = `.${fileExt}`;\n }\n\n return fileExt;\n}\n\nexport function isHeaderFile(fileExtLower: string) {\n fileExtLower = addFileExtensionDot(fileExtLower);\n return ['.hpp', '.hh', '.hxx', '.h'].some((ext) => fileExtLower === ext);\n}\n\nexport function isCppSourceFile(fileExtLower: string) {\n fileExtLower = addFileExtensionDot(fileExtLower);\n return ['.cpp', '.cc', '.cxx'].some((ext) => fileExtLower === ext);\n}\n\nexport function isCSourceFile(fileExtLower: string) {\n fileExtLower = addFileExtensionDot(fileExtLower);\n return fileExtLower === '.c';\n}\n\nexport function getLanguage(dir: string) {\n const files = filesInDir(dir);\n const anyCppFile = files.some((file) => isCppSourceFile(path.extname(file)));\n\n if (anyCppFile) {\n return Languages.cpp;\n } else {\n return Languages.c;\n }\n}\n\nexport function getDirectoriesRecursive(dir: fs.PathLike) {\n const directories = foldersInDir(dir);\n\n if (directories.length === 0) return;\n\n directories.forEach((dir) =>\n getDirectoriesRecursive(dir)?.forEach((newDir) => directories.push(newDir)),\n );\n\n return directories;\n}\n\nexport function readDir(dir: string | fs.PathLike) {\n try {\n return fs.readdirSync(dir, { withFileTypes: true });\n } catch (err) {}\n}\n\nexport function filesInDir(dir: string) {\n const fileDirents = readDir(dir);\n\n if (!fileDirents) return [];\n\n const files = fileDirents\n .filter((file) => file.isFile())\n .map((file) => file.name);\n\n return files;\n}\n\nexport function includePatternFromList(\n includeSearch: string[],\n foldersList: string[],\n) {\n const result: string[] = [];\n\n for (const pattern of includeSearch) {\n result.push(...foldersList.filter((folder) => minimatch(folder, pattern)));\n }\n\n return result;\n}\n\nexport function excludePatternFromList(\n excludeSearch: string[],\n foldersList: string[],\n) {\n for (const pattern of excludeSearch) {\n foldersList = foldersList.filter((folder) => !minimatch(folder, pattern));\n }\n\n return foldersList;\n}\n\nexport function foldersInDir(dir: fs.PathLike) {\n const fileDirents = readDir(dir);\n\n if (!fileDirents) return [];\n\n const folders = fileDirents.filter((folder: fs.Dirent) =>\n folder.isDirectory(),\n );\n const folderNames = folders.map((folder: fs.Dirent) =>\n path.join(dir.toString(), folder.name),\n );\n\n return folderNames;\n}\n\nexport function readJsonFile(filepath: string) {\n let configJson: any | undefined;\n\n try {\n const fileContent = fs.readFileSync(filepath, 'utf-8');\n configJson = JSON5.parse(fileContent);\n } catch (err) {}\n\n return configJson;\n}\n\nexport function writeJsonFile(outputFilePath: string, jsonContent: any) {\n if (jsonContent === undefined) return;\n\n const dirname = path.dirname(outputFilePath);\n\n if (!pathExists(dirname)) {\n mkdirRecursive(dirname);\n }\n\n const jsonString = JSON.stringify(jsonContent, null, 2);\n\n try {\n fs.writeFileSync(outputFilePath, jsonString);\n } catch (err) {}\n}\n\nexport function naturalSort(names: string[]) {\n return names.sort((a, b) =>\n a.localeCompare(b, undefined, {\n numeric: true,\n sensitivity: 'base',\n }),\n );\n}\n\nexport function localSettingExist(key: string, jsonData: JsonSettings) {\n const commandPath = jsonData[key];\n\n if (!commandPath) return false;\n\n if (!pathExists(commandPath)) return false;\n\n return true;\n}\n\nexport function hasPathSeperators(pathStr: string) {\n return pathStr.includes('/') || pathStr.includes('\\\\');\n}\n\nexport function removeExtension(pathStr: string, ext: string) {\n const extStr = addFileExtensionDot(ext);\n\n if (pathStr.includes(extStr)) {\n return pathStr.replace(extStr, '');\n }\n\n return pathStr;\n}\n\nexport function getBasename(pathStr: string) {\n if (hasPathSeperators(pathStr)) {\n return path.basename(pathStr);\n }\n\n return pathStr;\n}\n\nexport function getOccurenceIndicies(text: string, char: string) {\n const indices = [];\n for (let i = 0; i < text.length; i++) {\n if (text[i] === char) indices.push(i);\n }\n\n return indices;\n}\n","export function arraysEqual(a: any[], b: any[]) {\n if (a === b) return true;\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n","import { execSync } from 'child_process';\nimport { lookpath } from 'lookpath';\nimport { platform } from 'os';\n\nimport { Architectures, OperatingSystems } from './types';\n\nexport async function commandExists(command: string) {\n let commandPath = await lookpath(command);\n\n if (!commandPath) {\n return { f: false, p: commandPath };\n }\n\n if (commandPath.includes('.EXE')) {\n commandPath = commandPath.replace('.EXE', '.exe');\n }\n\n return { f: true, p: commandPath };\n}\n\nexport function getOperatingSystem() {\n const platformName = platform();\n let operatingSystem: OperatingSystems;\n\n if (platformName === 'win32') {\n operatingSystem = OperatingSystems.windows;\n } else if (platformName === 'darwin') {\n operatingSystem = OperatingSystems.mac;\n } else {\n operatingSystem = OperatingSystems.linux;\n }\n\n return operatingSystem;\n}\n\nexport function getCompilerArchitecture(compiler: string) {\n const command = `${compiler} -dumpmachine`;\n let byteArray: Buffer | undefined;\n\n try {\n byteArray = execSync(command);\n } catch (err) {\n byteArray = Buffer.from('x64', 'utf-8');\n }\n\n const str = String.fromCharCode(...byteArray);\n let architecure = Architectures.x64;\n let isCygwin = false;\n\n if (str.toLowerCase().includes('arm')) {\n architecure = Architectures.ARM64;\n } else if (str.includes('64')) {\n architecure = Architectures.x64;\n } else {\n architecure = Architectures.x86;\n }\n\n if (str.includes('cygwin')) {\n isCygwin = true;\n }\n\n return { architecure: architecure, isCygwin: isCygwin };\n}\n","import * as vscode from 'vscode';\n\nexport interface JsonSettings {\n [name: string]: string;\n}\n\nexport interface JsonPropertiesConfigEntry {\n name: string;\n includePath: string[];\n compilerPath: string;\n cStandard: string;\n cppStandard: string;\n intelliSenseMode: string;\n compilerArgs: string[];\n}\n\nexport interface JsonPropertiesConfig {\n configurations: JsonPropertiesConfigEntry[];\n}\n\nexport interface JsonLaunchConfigEntry extends vscode.DebugConfiguration {\n type: string;\n request: string;\n args: string[];\n stopAtEntry: boolean;\n console?: string;\n externalConsole?: boolean;\n cwd: string;\n environment: string[];\n program: string;\n MIMode?: string;\n miDebuggerPath?: string;\n setupCommands?: any[];\n}\n\nexport interface JsonLaunchConfig {\n configurations: JsonLaunchConfigEntry[];\n}\n\nexport class Task extends vscode.Task {\n override execution?: vscode.ProcessExecution;\n}\n\nexport enum Languages {\n c = 'C',\n cpp = 'Cpp',\n}\n\nexport enum CompilerSystems {\n gcc = 'gcc',\n clang = 'clang',\n msvc = 'msvc'\n}\n\nexport enum Debuggers {\n lldb = 'lldb',\n gdb = 'gdb',\n}\n\nexport enum OperatingSystems {\n windows = 'windows',\n linux = 'linux',\n mac = 'macos',\n}\n\nexport enum Architectures {\n x86 = 'x86',\n x64 = 'x64',\n ARM64 = 'ARM64'\n}\n\nexport enum Builds {\n debug = 'Debug',\n release = 'Release',\n}\n","import * as path from 'path';\nimport * as vscode from 'vscode';\n\nimport { extensionState } from '../extension';\nimport { filesInDir, pathExists, readJsonFile } from './fileUtils';\nimport { JsonLaunchConfig, JsonSettings, OperatingSystems } from './types';\n\nconst STATUS_BAR_ALIGN = vscode.StatusBarAlignment.Left;\nconst STATUS_BAR_PRIORITY = 50;\n\nexport function disposeItem(disposableItem: vscode.Disposable | undefined) {\n disposableItem?.dispose();\n}\n\nexport function createStatusBarItem() {\n return vscode.window.createStatusBarItem(\n STATUS_BAR_ALIGN,\n STATUS_BAR_PRIORITY,\n );\n}\n\nexport function setContextValue(key: string, value: any) {\n return vscode.commands.executeCommand('setContext', key, value);\n}\n\nexport function getLaunchConfigIndex(\n configJson: JsonLaunchConfig,\n configName: string,\n) {\n let configIdx = 0;\n\n if (configJson) {\n for (const config of configJson.configurations) {\n if (config.name !== configName) {\n configIdx++;\n } else {\n return configIdx;\n }\n }\n }\n\n return undefined;\n}\n\nexport function updateActivationState(newState: boolean) {\n extensionState?.update('activatedExtension', newState);\n}\n\nexport function getActivationState() {\n if (extensionState) {\n return extensionState.get('activatedExtension');\n }\n\n return false;\n}\n\nexport function isCmakeProject() {\n let cmakeFileFound = false;\n\n const workspaceFodlers = vscode.workspace.workspaceFolders;\n const cmakeExtensionName = 'cmake';\n const cmakeSettingName = 'sourceDirectory';\n\n if (workspaceFodlers) {\n workspaceFodlers.forEach((folder) => {\n if (!cmakeFileFound) {\n const files = filesInDir(folder.uri.fsPath);\n files.forEach((file) => {\n if (file.toLowerCase() === 'CMakeLists.txt'.toLowerCase()) {\n cmakeFileFound = true;\n }\n });\n\n const settingsPath = path.join(\n folder.uri.fsPath,\n '.vscode',\n 'settings.json',\n );\n\n if (pathExists(settingsPath)) {\n const configLocal: JsonSettings | undefined =\n readJsonFile(settingsPath);\n\n if (\n configLocal &&\n configLocal[`${cmakeExtensionName}.${cmakeSettingName}`]\n ) {\n cmakeFileFound = true;\n }\n }\n }\n });\n }\n\n if (!cmakeFileFound) {\n const config = vscode.workspace.getConfiguration(cmakeExtensionName);\n const cmakeSetting = config.get(cmakeSettingName);\n\n if (cmakeSetting && cmakeSetting !== '${workspaceFolder}') {\n cmakeFileFound = true;\n }\n }\n\n return cmakeFileFound;\n}\n\nexport function getProcessExecution(\n operatingSystem: OperatingSystems,\n isMsvcBuildTask: boolean,\n commandLine: string,\n activeFolder: string,\n) {\n const options = {\n cwd: activeFolder,\n };\n\n if (operatingSystem === OperatingSystems.windows) {\n return winProcessExecution(isMsvcBuildTask, commandLine, options);\n } else {\n return unixProcessExecution(commandLine, options);\n }\n}\n\nfunction winProcessExecution(\n isMsvcBuildTask: boolean,\n commandLine: string,\n options: { cwd: string },\n) {\n const drive = process.env['SystemDrive'] ? process.env['SystemDrive'] : 'C:';\n if (isMsvcBuildTask) {\n const shellOptions: vscode.ShellExecutionOptions = {\n executable: drive + '/Windows/System32/cmd.exe',\n shellArgs: ['/d', '/c'],\n };\n return new vscode.ShellExecution(commandLine, shellOptions);\n } else {\n return new vscode.ProcessExecution(\n drive + '/Windows/System32/cmd.exe',\n ['/d', '/c', commandLine],\n options,\n );\n }\n}\n\nfunction unixProcessExecution(commandLine: string, options: { cwd: string }) {\n const standard_shell = process.env['SHELL']\n ? process.env['SHELL']\n : '/bin/bash';\n return new vscode.ProcessExecution(\n standard_shell,\n ['-c', commandLine],\n options,\n );\n}\n","module.exports = require(\"vscode\");","module.exports = require(\"child_process\");","module.exports = require(\"fs\");","module.exports = require(\"os\");","module.exports = require(\"path\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/extension.ts\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js new file mode 100644 index 0000000..6e45f12 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeBuildTask = void 0; +const path = require("path"); +const vscode = require("vscode"); +const fileUtils_1 = require("../utils/fileUtils"); +const types_1 = require("../utils/types"); +async function executeBuildTask(task, settingsProvider, activeFolder, buildMode) { + const language = fileUtils_1.getLanguage(activeFolder); + const files = fileUtils_1.filesInDir(activeFolder); + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!fileUtils_1.pathExists(modeDir)) { + fileUtils_1.mkdirRecursive(modeDir); + } + let executableName; + if (settingsProvider.operatingSystem === types_1.OperatingSystems.windows) { + executableName = `out${buildMode}.exe`; + } + else { + executableName = `out${buildMode}`; + } + const executablePath = path.join(modeDir, executableName); + let compiler; + let standard; + if (language === types_1.Languages.cpp) { + compiler = settingsProvider.cppCompilerPath; + standard = settingsProvider.cppStandard; + } + else { + compiler = settingsProvider.cCompilerPath; + standard = settingsProvider.cStandard; + } + const useWarnings = settingsProvider.enableWarnings; + const warningsAsErrors = settingsProvider.warningsAsError; + let warnings = ''; + if (useWarnings) { + warnings = settingsProvider.warnings.join(' '); + } + if (useWarnings && warningsAsErrors) { + warnings += ' -Werror'; + } + const includePaths = settingsProvider.includePaths; + const includes = includePaths.join(' -I '); + const compilerArgs = settingsProvider.compilerArgs; + const linkerArgs = settingsProvider.linkerArgs; + let fullCompilerArgs = ''; + if (warnings) { + fullCompilerArgs += `${warnings}`; + } + if (standard) { + fullCompilerArgs += ` --std=${standard}`; + } + if (buildMode === types_1.Builds.debug) { + fullCompilerArgs += ' -g3 -O0'; + } + else { + fullCompilerArgs += ' -O3 -DNDEBUG'; + } + if (compilerArgs) { + fullCompilerArgs += compilerArgs; + } + if (linkerArgs) { + fullCompilerArgs += linkerArgs; + } + if (includes) { + fullCompilerArgs += includes; + } + let commandLine = ''; + const objectFiles = []; + for (const file of files) { + const fileExtension = path.parse(file).ext; + if (language === types_1.Languages.c && !fileUtils_1.isCSourceFile(fileExtension)) { + continue; + } + else if (language === types_1.Languages.cpp && !fileUtils_1.isCppSourceFile(fileExtension)) { + continue; + } + const fileBaseName = path.parse(file).name; + const filePath = path.join(activeFolder, file); + const objectFilePath = path.join(modeDir, fileBaseName + '.o'); + objectFiles.push(objectFilePath); + const fullFileArgs = `-c ${filePath} -o ${objectFilePath}`; + if (commandLine.length === 0) { + commandLine += `${compiler} ${fullCompilerArgs} ${fullFileArgs}`; + } + else { + commandLine += ` && ${compiler} ${fullCompilerArgs} ${fullFileArgs}`; + } + } + const objectFilesStr = objectFiles.join(' '); + const fullObjectFileArgs = `${objectFilesStr} -o ${executablePath}`; + if (task && task.execution) { + commandLine += ` && ${compiler} ${fullCompilerArgs} ${fullObjectFileArgs}`; + task.execution.commandLine = commandLine; + await vscode.tasks.executeTask(task); + } +} +exports.executeBuildTask = executeBuildTask; +//# sourceMappingURL=builder.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js.map new file mode 100644 index 0000000..5c3ec83 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/builder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../src/executor/builder.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAGjC,kDAO4B;AAC5B,0CAA2E;AAEpE,KAAK,UAAU,gBAAgB,CACpC,IAAU,EACV,gBAAkC,EAClC,YAAoB,EACpB,SAAiB;IAEjB,MAAM,QAAQ,GAAG,uBAAW,CAAC,YAAY,CAAC,CAAC;IAE3C,MAAM,KAAK,GAAG,sBAAU,CAAC,YAAY,CAAC,CA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C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC,CAAC;QAE/D,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAEjC,MAAM,YAAY,GAAG,MAAM,QAAQ,OAAO,cAAc,EAAE,CAAC;QAE3D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,WAAW,IAAI,GAAG,QAAQ,IAAI,gBAAgB,IAAI,YAAY,EAAE,CAAC;SAClE;aAAM;YACL,WAAW,IAAI,OAAO,QAAQ,IAAI,gBAAgB,IAAI,YAAY,EAAE,CAAC;SACtE;KACF;IAGD,MAAM,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,kBAAkB,GAAG,GAAG,cAAc,OAAO,cAAc,EAAE,CAAC;IACpE,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;QAC1B,WAAW,IAAI,OAAO,QAAQ,IAAI,gBAAgB,IAAI,kBAAkB,EAAE,CAAC;QAC3E,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;QACzC,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACtC;AACH,CAAC;AA1GD,4CA0GC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js new file mode 100644 index 0000000..63a8979 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runDebugger = void 0; +const path = require("path"); +const vscode = require("vscode"); +const fileUtils_1 = require("../utils/fileUtils"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +const CONFIG_NAME = 'C/C++ Runner: Debug Session'; +async function runDebugger(activeFolder, workspaceFolder, buildMode) { + if (!activeFolder) + return; + if (!workspaceFolder) + return; + const uriWorkspaceFolder = vscode.Uri.file(workspaceFolder); + const folder = vscode.workspace.getWorkspaceFolder(uriWorkspaceFolder); + const launchPath = path.join(workspaceFolder, '.vscode', 'launch.json'); + const configJson = fileUtils_1.readJsonFile(launchPath); + if (!configJson) + return; + const configIdx = vscodeUtils_1.getLaunchConfigIndex(configJson, CONFIG_NAME); + if (configIdx === undefined) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!fileUtils_1.pathExists(modeDir)) + return; + await vscode.debug.startDebugging(folder, configJson.configurations[configIdx]); +} +exports.runDebugger = runDebugger; +//# sourceMappingURL=debugger.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js.map new file mode 100644 index 0000000..7cc3d95 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/debugger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debugger.js","sourceRoot":"","sources":["../../../src/executor/debugger.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,kDAA8D;AAE9D,sDAA4D;AAE5D,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAE3C,KAAK,UAAU,WAAW,CAC/B,YAAgC,EAChC,eAAmC,EACnC,SAAiB;IAEjB,IAAI,CAAC,YAAY;QAAE,OAAO;IAC1B,IAAI,CAAC,eAAe;QAAE,OAAO;IAE7B,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAExE,MAAM,UAAU,GAAkC,wBAAY,CAAC,UAAU,CAAC,CAAC;IAE3E,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,MAAM,SAAS,GAAG,kCAAoB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAEhE,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO;IAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,sBAAU,CAAC,OAAO,CAAC;QAAE,OAAO;IAEjC,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAC/B,MAAM,EACN,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,CACrC,CAAC;AACJ,CAAC;AA5BD,kCA4BC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js new file mode 100644 index 0000000..73a2d47 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeRunTask = void 0; +const path = require("path"); +const vscode = require("vscode"); +const fileUtils_1 = require("../utils/fileUtils"); +const types_1 = require("../utils/types"); +async function executeRunTask(task, activeFolder, buildMode, argumentsString, operatingSystem) { + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!fileUtils_1.pathExists(modeDir)) + return; + let executableName; + if (operatingSystem === types_1.OperatingSystems.windows) { + executableName = `out${buildMode}.exe`; + } + else { + executableName = `./out${buildMode}`; + } + if (argumentsString) { + executableName += argumentsString; + } + const executablePath = path.join(modeDir, executableName); + if (!fileUtils_1.pathExists(executablePath)) + return; + if (task && task.execution) { + const commandLine = `${executablePath}`; + task.execution.commandLine = commandLine; + await vscode.tasks.executeTask(task); + } +} +exports.executeRunTask = executeRunTask; +//# sourceMappingURL=runner.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js.map new file mode 100644 index 0000000..0c8a0c7 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/executor/runner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../src/executor/runner.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,kDAAgD;AAChD,0CAAgE;AAEzD,KAAK,UAAU,cAAc,CAClC,IAAU,EACV,YAAoB,EACpB,SAAiB,EACjB,eAAmC,EACnC,eAAiC;IAEjC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,sBAAU,CAAC,OAAO,CAAC;QAAE,OAAO;IAEjC,IAAI,cAAsB,CAAC;IAC3B,IAAI,eAAe,KAAK,wBAAgB,CAAC,OAAO,EAAE;QAChD,cAAc,GAAG,MAAM,SAAS,MAAM,CAAC;KACxC;SAAM;QACL,cAAc,GAAG,QAAQ,SAAS,EAAE,CAAC;KACtC;IAED,IAAI,eAAe,EAAE;QACnB,cAAc,IAAI,eAAe,CAAC;KACnC;IAED,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAE1D,IAAI,CAAC,sBAAU,CAAC,cAAc,CAAC;QAAE,OAAO;IAExC,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;QAC1B,MAAM,WAAW,GAAG,GAAG,cAAc,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;QACzC,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACtC;AACH,CAAC;AA/BD,wCA+BC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js new file mode 100644 index 0000000..f4051ea --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js @@ -0,0 +1,581 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.deactivate = exports.activate = exports.experimentalExecutionEnabled = exports.loggingActive = exports.extensionPath = exports.extensionState = exports.extensionContext = void 0; +const path = require("path"); +const vscode = require("vscode"); +const builder_1 = require("./executor/builder"); +const debugger_1 = require("./executor/debugger"); +const runner_1 = require("./executor/runner"); +const folderHandler_1 = require("./handler/folderHandler"); +const modeHandler_1 = require("./handler/modeHandler"); +const statusBarItems_1 = require("./items/statusBarItems"); +const launchProvider_1 = require("./provider/launchProvider"); +const propertiesProvider_1 = require("./provider/propertiesProvider"); +const settingsProvider_1 = require("./provider/settingsProvider"); +const taskProvider_1 = require("./provider/taskProvider"); +const fileUtils_1 = require("./utils/fileUtils"); +const logger = require("./utils/logger"); +const types_1 = require("./utils/types"); +const vscodeUtils_1 = require("./utils/vscodeUtils"); +let folderContextMenuDisposable; +let taskProviderDisposable; +let commandHandlerDisposable; +let commandToggleStateDisposable; +let commandFolderDisposable; +let commandModeDisposable; +let commandBuildDisposable; +let commandRunDisposable; +let commandDebugDisposable; +let commandCleanDisposable; +let commandArgumentDisposable; +let commandResetDisposable; +let eventConfigurationDisposable; +let eventRenameFilesDisposable; +let eventDeleteFilesDisposable; +let settingsProvider; +let launchProvider; +let propertiesProvider; +let taskProvider; +let folderStatusBar; +let modeStatusBar; +let buildStatusBar; +let runStatusBar; +let debugStatusBar; +let cleanStatusBar; +let argumentsString; +let workspaceFolder; +let activeFolder; +let buildMode = types_1.Builds.debug; +let showStatusBarItems = true; +let createExtensionFiles = true; +const EXTENSION_NAME = 'C_Cpp_Runner'; +exports.loggingActive = false; +exports.experimentalExecutionEnabled = false; +function activate(context) { + if (!vscode.workspace.workspaceFolders || + vscode.workspace.workspaceFolders.length === 0) { + return; + } + if (!vscode.workspace.workspaceFolders[0] || + !vscode.workspace.workspaceFolders[0].uri) { + return; + } + if (vscode.workspace.workspaceFolders.length === 1) { + workspaceFolder = vscode.workspace.workspaceFolders[0].uri.fsPath; + } + vscodeUtils_1.setContextValue(`${EXTENSION_NAME}:activatedExtension`, true); + vscodeUtils_1.updateActivationState(true); + const courseMakefileFound = vscodeUtils_1.isCourseProject(); + if (courseMakefileFound) { + const infoMessage = `Course Makefile found. Exiting extension.`; + logger.log(exports.loggingActive, infoMessage); + deactivate(); + return; + } + const cmakeFileFound = vscodeUtils_1.isCmakeProject(); + if (cmakeFileFound) { + showStatusBarItems = false; + createExtensionFiles = false; + const infoMessage = `CMake Project found. UI disabled.`; + logger.log(exports.loggingActive, infoMessage); + } + exports.extensionContext = context; + exports.extensionPath = context.extensionPath; + exports.extensionState = context.workspaceState; + vscodeUtils_1.updateLoggingState(); + exports.loggingActive = vscodeUtils_1.getLoggingState(); + exports.experimentalExecutionEnabled = vscodeUtils_1.getExperimentalExecutionState(); + initFolderStatusBar(); + initModeStatusBar(); + initBuildStatusBar(); + initRunStatusBar(); + initDebugStatusBar(); + initCleanStatusBar(); + initWorkspaceProvider(); + initWorkspaceDisposables(); + initEventListener(); +} +exports.activate = activate; +function deactivate() { + vscodeUtils_1.setContextValue(`${EXTENSION_NAME}:activatedExtension`, false); + vscodeUtils_1.updateActivationState(false); + vscodeUtils_1.disposeItem(folderStatusBar); + vscodeUtils_1.disposeItem(modeStatusBar); + vscodeUtils_1.disposeItem(buildStatusBar); + vscodeUtils_1.disposeItem(runStatusBar); + vscodeUtils_1.disposeItem(debugStatusBar); + vscodeUtils_1.disposeItem(cleanStatusBar); + vscodeUtils_1.disposeItem(taskProviderDisposable); + vscodeUtils_1.disposeItem(folderContextMenuDisposable); + vscodeUtils_1.disposeItem(commandHandlerDisposable); + vscodeUtils_1.disposeItem(commandToggleStateDisposable); + vscodeUtils_1.disposeItem(commandFolderDisposable); + vscodeUtils_1.disposeItem(commandModeDisposable); + vscodeUtils_1.disposeItem(commandBuildDisposable); + vscodeUtils_1.disposeItem(commandRunDisposable); + vscodeUtils_1.disposeItem(commandDebugDisposable); + vscodeUtils_1.disposeItem(commandCleanDisposable); + vscodeUtils_1.disposeItem(commandArgumentDisposable); + vscodeUtils_1.disposeItem(commandResetDisposable); + vscodeUtils_1.disposeItem(eventConfigurationDisposable); + vscodeUtils_1.disposeItem(eventDeleteFilesDisposable); + vscodeUtils_1.disposeItem(eventRenameFilesDisposable); +} +exports.deactivate = deactivate; +function initWorkspaceProvider() { + if (!workspaceFolder || !createExtensionFiles || !activeFolder) + return; + if (!settingsProvider) { + settingsProvider = new settingsProvider_1.SettingsProvider(workspaceFolder, activeFolder); + } + if (!propertiesProvider) { + propertiesProvider = new propertiesProvider_1.PropertiesProvider(settingsProvider, workspaceFolder, activeFolder); + } + if (!launchProvider) { + launchProvider = new launchProvider_1.LaunchProvider(settingsProvider, workspaceFolder, activeFolder); + } + if (!taskProvider) { + taskProvider = new taskProvider_1.TaskProvider(settingsProvider, workspaceFolder, activeFolder, buildMode, argumentsString); + } +} +function initWorkspaceDisposables() { + initTaskProviderDisposable(); + initArgumentParser(); + initContextMenuDisposable(); + initReset(); + initToggleDisposable(); +} +function initTaskProviderDisposable() { + if (!taskProvider || taskProviderDisposable) + return; + taskProviderDisposable = vscode.tasks.registerTaskProvider(EXTENSION_NAME, taskProvider); + exports.extensionContext?.subscriptions.push(taskProviderDisposable); +} +function initToggleDisposable() { + if (commandToggleStateDisposable) + return; + commandToggleStateDisposable = vscode.commands.registerCommand(`${EXTENSION_NAME}.toggleExtensionState`, () => { + showStatusBarItems = !showStatusBarItems; + toggleStatusBarItems(); + createExtensionFiles = !createExtensionFiles; + if (createExtensionFiles) { + initWorkspaceProvider(); + initWorkspaceDisposables(); + settingsProvider?.createFileData(); + propertiesProvider?.createFileData(); + } + const extensionIsDisabled = !showStatusBarItems && !createExtensionFiles; + if (extensionIsDisabled) { + vscodeUtils_1.setContextValue(`${EXTENSION_NAME}:activatedExtension`, !extensionIsDisabled); + vscodeUtils_1.updateActivationState(!extensionIsDisabled); + } + else { + vscodeUtils_1.setContextValue(`${EXTENSION_NAME}:activatedExtension`, !extensionIsDisabled); + vscodeUtils_1.updateActivationState(!extensionIsDisabled); + } + const infoMessage = `Called toggleExtensionState.`; + logger.log(exports.loggingActive, infoMessage); + }); + exports.extensionContext?.subscriptions.push(commandToggleStateDisposable); +} +function initContextMenuDisposable() { + if (folderContextMenuDisposable) + return; + folderContextMenuDisposable = vscode.commands.registerCommand(`${EXTENSION_NAME}.folderContextMenu`, async (clickedUriItem, selectedUriItems) => { + if (selectedUriItems.length > 1) + return; + const workspaceItem = vscode.workspace.getWorkspaceFolder(clickedUriItem); + if (!workspaceItem) + return; + activeFolder = clickedUriItem.fsPath; + workspaceFolder = workspaceItem.uri.fsPath; + updateFolderData(); + const infoMessage = `Called folderContextMenu.`; + logger.log(exports.loggingActive, infoMessage); + }); + exports.extensionContext?.subscriptions.push(folderContextMenuDisposable); +} +function initEventListener() { + initConfigurationChangeDisposable(); + initFileRenameDisposable(); + initFileDeleteDisposable(); +} +function initConfigurationChangeDisposable() { + if (eventConfigurationDisposable) + return; + eventConfigurationDisposable = vscode.workspace.onDidChangeConfiguration((e) => { + const isChanged = e.affectsConfiguration(EXTENSION_NAME); + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (isChanged && extensionIsActive) { + settingsProvider?.updateFileContent(); + propertiesProvider?.updateFileContent(); + launchProvider?.updateFileContent(); + taskProvider?.getTasks(); + } + }); + exports.extensionContext?.subscriptions.push(eventConfigurationDisposable); +} +function initFileRenameDisposable() { + if (eventRenameFilesDisposable) + return; + eventRenameFilesDisposable = vscode.workspace.onDidRenameFiles((e) => { + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (!extensionIsActive) + return; + e.files.forEach((file) => { + const oldName = file.oldUri.fsPath; + const newName = file.newUri.fsPath; + const infoMessage = `Renaming: ${oldName} -> ${newName}.`; + logger.log(exports.loggingActive, infoMessage); + if (workspaceFolder && oldName === workspaceFolder) { + workspaceFolder = newName; + updateFolderData(); + } + else if (activeFolder && oldName === activeFolder) { + activeFolder = newName; + updateFolderData(); + } + }); + }); + exports.extensionContext?.subscriptions.push(eventRenameFilesDisposable); +} +function initFileDeleteDisposable() { + if (!eventDeleteFilesDisposable) + return; + eventDeleteFilesDisposable = vscode.workspace.onDidDeleteFiles((e) => { + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (!extensionIsActive) + return; + e.files.forEach((file) => { + const oldName = file.fsPath; + const infoMessage = `Deleting: ${oldName}.`; + logger.log(exports.loggingActive, infoMessage); + if (workspaceFolder && oldName === workspaceFolder) { + workspaceFolder = undefined; + updateFolderData(); + statusBarItems_1.updateFolderStatus(folderStatusBar, taskProvider, showStatusBarItems); + } + else if (activeFolder && oldName === activeFolder) { + activeFolder = undefined; + updateFolderData(); + statusBarItems_1.updateFolderStatus(folderStatusBar, taskProvider, showStatusBarItems); + } + }); + }); + exports.extensionContext?.subscriptions.push(eventDeleteFilesDisposable); +} +function toggleStatusBarItems() { + if (showStatusBarItems) { + folderStatusBar?.show(); + modeStatusBar?.show(); + buildStatusBar?.show(); + runStatusBar?.show(); + debugStatusBar?.show(); + cleanStatusBar?.show(); + } + else { + folderStatusBar?.hide(); + modeStatusBar?.hide(); + buildStatusBar?.hide(); + runStatusBar?.hide(); + debugStatusBar?.hide(); + cleanStatusBar?.hide(); + } +} +function updateFolderData() { + initWorkspaceProvider(); + initWorkspaceDisposables(); + argumentsString = ''; + if (taskProvider) { + taskProvider.updateFolderData(workspaceFolder, activeFolder); + taskProvider.updateArguments(argumentsString); + taskProvider.updateModeData(buildMode); + } + if (workspaceFolder && activeFolder) { + if (settingsProvider) { + settingsProvider.updateFolderData(workspaceFolder); + settingsProvider.updateFileContent(); + if (propertiesProvider) { + propertiesProvider.updateFolderData(workspaceFolder); + } + if (launchProvider) { + launchProvider.updateFolderData(workspaceFolder, activeFolder); + launchProvider.updateModeData(buildMode); + launchProvider.updateFileContent(); + } + } + } + if (folderStatusBar) { + statusBarItems_1.updateFolderStatus(folderStatusBar, taskProvider, showStatusBarItems); + } + if (modeStatusBar) { + statusBarItems_1.updateModeStatus(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + } + if (buildStatusBar) { + statusBarItems_1.updateBuildStatus(buildStatusBar, showStatusBarItems, activeFolder); + } + if (runStatusBar) { + statusBarItems_1.updateRunStatus(runStatusBar, showStatusBarItems, activeFolder); + } + if (cleanStatusBar) { + statusBarItems_1.updateCleanStatus(cleanStatusBar, showStatusBarItems, activeFolder); + } + if (debugStatusBar) { + statusBarItems_1.updateDebugStatus(debugStatusBar, showStatusBarItems, activeFolder); + } +} +function initFolderStatusBar() { + if (folderStatusBar) + return; + folderStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(folderStatusBar); + const workspaceFolders = vscode.workspace.workspaceFolders; + if (workspaceFolders) { + if (workspaceFolders.length === 1) { + if (!workspaceFolders[0] || !workspaceFolders[0].uri.fsPath) + return; + const workspaceFolderFs = workspaceFolders[0].uri.fsPath; + const folders = fileUtils_1.foldersInDir(workspaceFolderFs); + if (folders.length === 0) { + workspaceFolder = workspaceFolderFs; + activeFolder = workspaceFolderFs; + updateFolderData(); + } + else { + statusBarItems_1.updateFolderStatus(folderStatusBar, taskProvider, showStatusBarItems); + } + } + else { + statusBarItems_1.updateFolderStatus(folderStatusBar, taskProvider, showStatusBarItems); + } + } + if (commandFolderDisposable) + return; + const commandName = `${EXTENSION_NAME}.folder`; + commandFolderDisposable = vscode.commands.registerCommand(commandName, async () => { + const ret = await folderHandler_1.folderHandler(settingsProvider); + if (ret && ret.activeFolder && ret.workspaceFolder) { + activeFolder = ret.activeFolder; + workspaceFolder = ret.workspaceFolder; + updateFolderData(); + } + else { + const infoMessage = `Folder callback aborted.`; + logger.log(exports.loggingActive, infoMessage); + } + }); + folderStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandFolderDisposable); +} +function initModeStatusBar() { + if (modeStatusBar) + return; + modeStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(modeStatusBar); + statusBarItems_1.updateModeStatus(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + const commandName = `${EXTENSION_NAME}.mode`; + commandModeDisposable = vscode.commands.registerCommand(commandName, async () => { + const pickedMode = await modeHandler_1.modeHandler(); + if (pickedMode) { + buildMode = pickedMode; + if (taskProvider) { + taskProvider.updateModeData(buildMode); + } + statusBarItems_1.updateModeStatus(modeStatusBar, showStatusBarItems, activeFolder, buildMode); + if (!taskProvider) + return; + taskProvider.updateModeData(buildMode); + if (!launchProvider) + return; + launchProvider.updateModeData(buildMode); + launchProvider.updateFileContent(); + } + else { + const infoMessage = `Mode callback aborted.`; + logger.log(exports.loggingActive, infoMessage); + } + }); + modeStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandModeDisposable); +} +function initArgumentParser() { + if (commandResetDisposable) + return; + const commandName = `${EXTENSION_NAME}.args`; + commandResetDisposable = vscode.commands.registerCommand(commandName, async () => { + argumentsString = await vscode.window.showInputBox(); + if (taskProvider) { + taskProvider.updateArguments(argumentsString); + } + }); + exports.extensionContext?.subscriptions.push(commandResetDisposable); +} +function initReset() { + if (commandArgumentDisposable) + return; + const commandName = `${EXTENSION_NAME}.resetLocalSettings`; + commandArgumentDisposable = vscode.commands.registerCommand(commandName, async () => { + if (!settingsProvider) + return; + settingsProvider.reset(); + propertiesProvider?.updateFileContent(); + taskProvider?.getTasks(); + launchProvider?.updateFileContent(); + }); + exports.extensionContext?.subscriptions.push(commandArgumentDisposable); +} +function initBuildStatusBar() { + if (buildStatusBar) + return; + buildStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(buildStatusBar); + statusBarItems_1.updateBuildStatus(buildStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.build`; + commandBuildDisposable = vscode.commands.registerCommand(commandName, async () => { + if (!taskProvider || !taskProvider.tasks) { + const infoMessage = `buildCallback failed`; + logger.log(exports.loggingActive, infoMessage); + return; + } + taskProvider.getTasks(); + const projectFolder = taskProvider.getProjectFolder(); + if (!projectFolder) + return; + const buildTaskIndex = 0; + const buildTask = taskProvider.tasks[buildTaskIndex]; + if (!buildTask) + return; + if (!buildTask.execution || + !(buildTask.execution instanceof vscode.ShellExecution) || + !buildTask.execution.commandLine) { + return; + } + buildTask.execution.commandLine = buildTask.execution.commandLine.replace('FILE_DIR', projectFolder); + if (!activeFolder) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!fileUtils_1.pathExists(modeDir)) + fileUtils_1.mkdirRecursive(modeDir); + if (!settingsProvider) + return; + const hasNoneExtendedAsciiChars = [...buildDir].some((char) => char.charCodeAt(0) > 255); + if (exports.experimentalExecutionEnabled || + buildDir.includes(' ') || + hasNoneExtendedAsciiChars) { + await builder_1.executeBuildTask(buildTask, settingsProvider, activeFolder, buildMode); + } + else { + await vscode.tasks.executeTask(buildTask); + } + }); + buildStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandBuildDisposable); +} +function initRunStatusBar() { + if (runStatusBar) + return; + runStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(runStatusBar); + statusBarItems_1.updateRunStatus(runStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.run`; + commandRunDisposable = vscode.commands.registerCommand(commandName, async () => { + if (!taskProvider || !taskProvider.tasks) { + const infoMessage = `runCallback failed`; + logger.log(exports.loggingActive, infoMessage); + return; + } + taskProvider.getTasks(); + const projectFolder = taskProvider.getProjectFolder(); + if (!projectFolder) + return; + const runTaskIndex = 1; + const runTask = taskProvider.tasks[runTaskIndex]; + if (!runTask) + return; + if (!runTask.execution || + !(runTask.execution instanceof vscode.ShellExecution) || + !runTask.execution.commandLine) { + return; + } + runTask.execution.commandLine = runTask.execution.commandLine.replace('FILE_DIR', projectFolder); + if (!activeFolder) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!fileUtils_1.pathExists(modeDir)) + return; + if (!settingsProvider) { + return; + } + const hasNoneExtendedAsciiChars = [...buildDir].some((char) => char.charCodeAt(0) > 255); + if (exports.experimentalExecutionEnabled || + buildDir.includes(' ') || + hasNoneExtendedAsciiChars) { + await runner_1.executeRunTask(runTask, activeFolder, buildMode, argumentsString, settingsProvider.operatingSystem); + } + else { + await vscode.tasks.executeTask(runTask); + } + }); + runStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandRunDisposable); +} +function initDebugStatusBar() { + if (debugStatusBar) + return; + debugStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(debugStatusBar); + statusBarItems_1.updateDebugStatus(debugStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.debug`; + commandDebugDisposable = vscode.commands.registerCommand(commandName, () => { + if (!activeFolder || !workspaceFolder) { + const infoMessage = `debugCallback failed`; + logger.log(exports.loggingActive, infoMessage); + return; + } + if (taskProvider) + debugger_1.runDebugger(activeFolder, workspaceFolder, buildMode); + }); + debugStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandDebugDisposable); +} +function initCleanStatusBar() { + if (cleanStatusBar) + return; + cleanStatusBar = vscodeUtils_1.createStatusBarItem(); + exports.extensionContext?.subscriptions.push(cleanStatusBar); + statusBarItems_1.updateCleanStatus(cleanStatusBar, showStatusBarItems, activeFolder); + const commandName = `${EXTENSION_NAME}.clean`; + commandCleanDisposable = vscode.commands.registerCommand(commandName, async () => { + if (!taskProvider || + !taskProvider.tasks || + !activeFolder || + !workspaceFolder) { + const infoMessage = `cleanCallback failed`; + logger.log(exports.loggingActive, infoMessage); + return; + } + const cleanTaskIndex = 2; + const cleanTask = taskProvider.tasks[cleanTaskIndex]; + if (!cleanTask) + return; + const buildDir = path.join(activeFolder, 'build'); + const modeDir = path.join(buildDir, `${buildMode}`); + if (!cleanTask.execution || + !(cleanTask.execution instanceof vscode.ShellExecution) || + !cleanTask.execution.commandLine) { + return; + } + let relativeModeDir = modeDir.replace(workspaceFolder, ''); + relativeModeDir = fileUtils_1.replaceBackslashes(relativeModeDir); + cleanTask.execution.commandLine = `echo Cleaning ${relativeModeDir}...`; + if (!fileUtils_1.pathExists(modeDir)) + return; + fileUtils_1.rmdirRecursive(modeDir); + await vscode.tasks.executeTask(cleanTask); + }); + cleanStatusBar.command = commandName; + exports.extensionContext?.subscriptions.push(commandCleanDisposable); +} +//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js.map new file mode 100644 index 0000000..478ac87 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/extension.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,gDAAsD;AACtD,kDAAkD;AAClD,8CAAmD;AACnD,2DAAwD;AACxD,uDAAoD;AACpD,2DAOgC;AAChC,8DAA2D;AAC3D,sEAAmE;AACnE,kEAA+D;AAC/D,0DAAuD;AACvD,iDAM2B;AAC3B,yCAAyC;AACzC,yCAAuC;AACvC,qDAW6B;AAE7B,IAAI,2BAA0D,CAAC;AAC/D,IAAI,sBAA+D,CAAC;AACpE,IAAI,wBAAuD,CAAC;AAC5D,IAAI,4BAA2D,CAAC;AAChE,IAAI,uBAAsD,CAAC;AAC3D,IAAI,qBAAoD,CAAC;AACzD,IAAI,sBAAqD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C,WAAW,GAAG,iBAAiB,eAAe,KAAK,CAAC;QAExE,IAAI,CAAC,sBAAU,CAAC,OAAO,CAAC;YAAE,OAAO;QAEjC,0BAAc,CAAC,OAAO,CAAC,CAAC;QACxB,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC,CACF,CAAC;IAEF,cAAc,CAAC,OAAO,GAAG,WAAW,CAAC;IACrC,wBAAgB,EAAE,aAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js new file mode 100644 index 0000000..af88006 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.folderHandler = void 0; +const path = require("path"); +const vscode = require("vscode"); +const fileUtils_1 = require("../utils/fileUtils"); +async function folderHandler(settingsProvider) { + const workspacesFolders = vscode.workspace.workspaceFolders; + if (!workspacesFolders) + return; + let foldersList = []; + workspacesFolders.forEach((folder) => { + const directories = [folder.name]; + const recursiveDirectories = fileUtils_1.getDirectoriesRecursive(folder.uri.fsPath); + if (recursiveDirectories) { + directories.push(...recursiveDirectories); + } + directories.forEach((dir) => { + let text = dir.replace(folder.uri.fsPath, folder.name); + text = fileUtils_1.replaceBackslashes(text); + foldersList.push(text); + }); + if (settingsProvider) { + foldersList = fileUtils_1.excludePatternFromList(settingsProvider.excludeSearch, foldersList); + } + foldersList = fileUtils_1.naturalSort(foldersList); + }); + const activeFolderStr = await vscode.window.showQuickPick(foldersList, { + placeHolder: 'Select folder to init the C/C++ Runner extension.', + }); + let activeFolder; + let workspaceFolder; + if (activeFolderStr) { + const folderSplit = activeFolderStr.split('/'); + const workspaceName = folderSplit[0]; + workspacesFolders.forEach((folder) => { + if (folder.name === workspaceName) { + workspaceFolder = folder.uri.fsPath; + } + }); + if (workspaceFolder) { + activeFolder = path.join(workspaceFolder, ...folderSplit.slice(1)); + } + } + return { activeFolder, workspaceFolder }; +} +exports.folderHandler = folderHandler; +//# sourceMappingURL=folderHandler.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js.map new file mode 100644 index 0000000..b914a93 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/folderHandler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"folderHandler.js","sourceRoot":"","sources":["../../../src/handler/folderHandler.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAGjC,kDAK4B;AAErB,KAAK,UAAU,aAAa,CACjC,gBAA8C;IAE9C,MAAM,iBAAiB,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAE5D,IAAI,CAAC,iBAAiB;QAAE,OAAO;IAE/B,IAAI,WAAW,GAAa,EAAE,CAAC;IAC/B,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACnC,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,oBAAoB,GAAG,mCAAuB,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxE,IAAI,oBAAoB,EAAE;YACxB,WAAW,CAAC,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC;SAC3C;QAED,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC1B,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YACvD,IAAI,GAAG,8BAAkB,CAAC,IAAI,CAAC,CAAC;YAChC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,IAAI,gBAAgB,EAAE;YACpB,WAAW,GAAG,kCAAsB,CAClC,gBAAgB,CAAC,aAAa,EAC9B,WAAW,CACZ,CAAC;SACH;QAED,WAAW,GAAG,uBAAW,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE;QACrE,WAAW,EAAE,mDAAmD;KACjE,CAAC,CAAC;IACH,IAAI,YAAgC,CAAC;IACrC,IAAI,eAAmC,CAAC;IAExC,IAAI,eAAe,EAAE;QACnB,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QACrC,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACnC,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE;gBACjC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;aACrC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,eAAe,EAAE;YACnB,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACpE;KACF;IAED,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAC3C,CAAC;AApDD,sCAoDC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js new file mode 100644 index 0000000..6738055 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.modeHandler = void 0; +const vscode = require("vscode"); +const types_1 = require("../utils/types"); +async function modeHandler() { + const combinations = [types_1.Builds.debug, types_1.Builds.release]; + const pickedCombination = await vscode.window.showQuickPick(combinations, { + placeHolder: 'Select a build mode', + }); + if (!pickedCombination) + return undefined; + const pickedMode = pickedCombination.includes(types_1.Builds.debug) + ? types_1.Builds.debug + : types_1.Builds.release; + return pickedMode; +} +exports.modeHandler = modeHandler; +//# sourceMappingURL=modeHandler.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js.map new file mode 100644 index 0000000..f8f7571 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/handler/modeHandler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modeHandler.js","sourceRoot":"","sources":["../../../src/handler/modeHandler.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,0CAAwC;AAEjC,KAAK,UAAU,WAAW;IAC/B,MAAM,YAAY,GAAG,CAAC,cAAM,CAAC,KAAK,EAAE,cAAM,CAAC,OAAO,CAAC,CAAC;IAEpD,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE;QACxE,WAAW,EAAE,qBAAqB;KACnC,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB;QAAE,OAAO,SAAS,CAAC;IAEzC,MAAM,UAAU,GAAG,iBAAiB,CAAC,QAAQ,CAAC,cAAM,CAAC,KAAK,CAAC;QACzD,CAAC,CAAC,cAAM,CAAC,KAAK;QACd,CAAC,CAAC,cAAM,CAAC,OAAO,CAAC;IAEnB,OAAO,UAAU,CAAC;AACpB,CAAC;AAdD,kCAcC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js new file mode 100644 index 0000000..39df360 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.updateCleanStatus = exports.updateDebugStatus = exports.updateRunStatus = exports.updateBuildStatus = exports.updateModeStatus = exports.updateFolderStatus = void 0; +const path = require("path"); +const fileUtils_1 = require("../utils/fileUtils"); +function updateFolderStatus(status, taskProvider, showStatusBarItems) { + if (!status) + return; + if (taskProvider && + taskProvider.workspaceFolder && + taskProvider.activeFolder) { + const workspaceFolder = taskProvider.workspaceFolder; + const workspaceName = path.basename(workspaceFolder); + let text = taskProvider.activeFolder.replace(workspaceFolder, workspaceName); + text = fileUtils_1.replaceBackslashes(text); + const dirs = text.split('/'); + if (dirs.length > 2) { + const lastElement = dirs.length - 1; + text = `${dirs[0]}/.../${dirs[lastElement]}`; + } + status.color = ''; + status.text = `$(folder-active) ${text}`; + } + else { + status.color = '#ffff00'; + status.text = '$(alert) Select folder.'; + } + if (showStatusBarItems) { + status.show(); + } + else { + status.hide(); + } +} +exports.updateFolderStatus = updateFolderStatus; +function updateModeStatus(status, showStatusBarItems, activeFolder, buildMode) { + if (!status) + return; + status.text = `$(tools) ${buildMode}`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateModeStatus = updateModeStatus; +function updateBuildStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(gear)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateBuildStatus = updateBuildStatus; +function updateRunStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(play)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateRunStatus = updateRunStatus; +function updateDebugStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(bug)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateDebugStatus = updateDebugStatus; +function updateCleanStatus(status, showStatusBarItems, activeFolder) { + if (!status) + return; + status.text = `$(trash)`; + toggleShow(status, showStatusBarItems, activeFolder); +} +exports.updateCleanStatus = updateCleanStatus; +function toggleShow(status, showStatusBarItems, activeFolder) { + if (!status) + return; + if (showStatusBarItems && activeFolder) { + status.show(); + } + else { + status.hide(); + } +} +//# sourceMappingURL=statusBarItems.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js.map new file mode 100644 index 0000000..c9550fb --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/items/statusBarItems.js.map @@ -0,0 +1 @@ +{"version":3,"file":"statusBarItems.js","sourceRoot":"","sources":["../../../src/items/statusBarItems.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAI7B,kDAAwD;AAGxD,SAAgB,kBAAkB,CAChC,MAAwC,EACxC,YAAsC,EACtC,kBAA2B;IAE3B,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,IACE,YAAY;QACZ,YAAY,CAAC,eAAe;QAC5B,YAAY,CAAC,YAAY,EACzB;QACA,MAAM,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC;QACrD,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,IAAI,GAAG,YAAY,CAAC,YAAY,CAAC,OAAO,CAC1C,eAAe,EACf,aAAa,CACd,CAAC;QAEF,IAAI,GAAG,8BAAkB,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE7B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YACpC,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;SAC9C;QAED,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;QA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AATD,8CASC;AAED,SAAgB,iBAAiB,CAC/B,MAAwC,EACxC,kBAA2B,EAC3B,YAAgC;IAEhC,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,UAAU,CAAC,MAAM,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC;AACvD,CAAC;AATD,8CASC;AAED,SAAS,UAAU,CACjB,MAAwC,EACxC,kBAA2B,EAC3B,YAAgC;IAEhC,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,IAAI,kBAAkB,IAAI,YAAY,EAAE;QACtC,MAAM,CAAC,IAAI,EAAE,CAAC;KACf;SAAM;QACL,MAAM,CAAC,IAAI,EAAE,CAAC;KACf;AACH,CAAC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js new file mode 100644 index 0000000..a0d7759 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallbackProvider = void 0; +const path = require("path"); +const vscode = require("vscode"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +class CallbackProvider { + constructor(_workspaceFolder, templateFileName, outputFileName) { + this._workspaceFolder = _workspaceFolder; + this.templateFileName = templateFileName; + this.outputFileName = outputFileName; + this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode'); + this._outputPath = path.join(this._vscodeDirectory, outputFileName); + this.createFileWatcher(); + } + createFileWatcher() { + const filePattern = new vscode.RelativePattern(this._workspaceFolder, '.vscode/**'); + this._fileWatcherOnDelete = vscode.workspace.createFileSystemWatcher(filePattern, true, true, false); + this._fileWatcherOnChange = vscode.workspace.createFileSystemWatcher(filePattern, true, false, true); + this._fileWatcherOnDelete.onDidDelete((e) => { + const pathName = e.fsPath; + if (pathName === this._vscodeDirectory || pathName === this._outputPath) { + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (extensionIsActive) + this.deleteCallback(); + } + }); + this._fileWatcherOnChange.onDidChange((e) => { + const pathName = e.fsPath; + if (pathName === this._outputPath) { + this.changeCallback(); + } + }); + return; + } +} +exports.CallbackProvider = CallbackProvider; +//# sourceMappingURL=callbackProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js.map new file mode 100644 index 0000000..7848bc5 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/callbackProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"callbackProvider.js","sourceRoot":"","sources":["../../../src/provider/callbackProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,sDAA0D;AAE1D,MAAsB,gBAAgB;IAMpC,YACY,gBAAwB,EACxB,gBAAwB,EACxB,cAAsB;QAFtB,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,mBAAc,GAAd,cAAc,CAAQ;QAEhC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAEpE,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAES,iBAAiB;QACzB,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,eAAe,CAC5C,IAAI,CAAC,gBAAgB,EACrB,YAAY,CACb,CAAC;QAEF,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAClE,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,KAAK,CACN,CAAC;QAEF,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAClE,WAAW,EACX,IAAI,EACJ,KAAK,EACL,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAa,EAAE,EAAE;YACtD,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;YAC1B,IAAI,QAAQ,KAAK,IAAI,CAAC,gBAAgB,IAAI,QAAQ,KAAK,IAAI,CAAC,WAAW,EAAE;gBACvE,MAAM,iBAAiB,GAAG,gCAAkB,EAAE,CAAC;gBAC/C,IAAI,iBAAiB;oBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;aAC9C;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAa,EAAE,EAAE;YACtD,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;YAC1B,IAAI,QAAQ,KAAK,IAAI,CAAC,WAAW,EAAE;gBACjC,IAAI,CAAC,cAAc,EAAE,CAAC;aACvB;QACH,CAAC,CAAC,CAAC;QAEH,OAAO;IACT,CAAC;CAKF;AA1DD,4CA0DC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js new file mode 100644 index 0000000..5439f2c --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileProvider = void 0; +const path = require("path"); +const extension_1 = require("../extension"); +const fileUtils_1 = require("../utils/fileUtils"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +const callbackProvider_1 = require("./callbackProvider"); +class FileProvider extends callbackProvider_1.CallbackProvider { + constructor(workspaceFolder, templateFileName, outputFileName) { + super(workspaceFolder, templateFileName, outputFileName); + const templateDirectory = path.join(extension_1.extensionPath ? extension_1.extensionPath : '', 'templates'); + this.templatePath = path.join(templateDirectory, templateFileName); + if (!fileUtils_1.pathExists(this._vscodeDirectory)) { + fileUtils_1.mkdirRecursive(this._vscodeDirectory); + } + } + createFileData() { + if (!fileUtils_1.pathExists(this._vscodeDirectory)) { + fileUtils_1.mkdirRecursive(this._vscodeDirectory); + } + this.writeFileData(); + } + updateFileContent() { + this.writeFileData(); + } + deleteCallback() { + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (extensionIsActive) + this.createFileData(); + } + _updateFolderData(_workspaceFolder) { + this._workspaceFolder = _workspaceFolder; + this._vscodeDirectory = path.join(this._workspaceFolder, '.vscode'); + this._outputPath = path.join(this._vscodeDirectory, this.outputFileName); + this.createFileWatcher(); + } +} +exports.FileProvider = FileProvider; +//# sourceMappingURL=fileProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js.map new file mode 100644 index 0000000..f81ee1e --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/fileProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fileProvider.js","sourceRoot":"","sources":["../../../src/provider/fileProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAE7B,4CAA6C;AAC7C,kDAAgE;AAChE,sDAA0D;AAC1D,yDAAsD;AAEtD,MAAsB,YAAa,SAAQ,mCAAgB;IAGzD,YACE,eAAuB,EACvB,gBAAwB,EACxB,cAAsB;QAEtB,KAAK,CAAC,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAEzD,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CACjC,yBAAa,CAAC,CAAC,CAAC,yBAAa,CAAC,CAAC,CAAC,EAAE,EAClC,WAAW,CACZ,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QAEnE,IAAI,CAAC,sBAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;YACtC,0BAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACvC;IACH,CAAC;IAMM,cAAc;QACnB,IAAI,CAAC,sBAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;YACtC,0BAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACvC;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEM,iBAAiB;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEe,cAAc;QAC5B,MAAM,iBAAiB,GAAG,gCAAkB,EAAE,CAAC;QAC/C,IAAI,iBAAiB;YAAE,IAAI,CAAC,cAAc,EAAE,CAAC;IAC/C,CAAC;IAES,iBAAiB,CAAC,gBAAwB;QAClD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACzE,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;CACF;AAhDD,oCAgDC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js new file mode 100644 index 0000000..eefb444 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LaunchProvider = void 0; +const path = require("path"); +const fileUtils_1 = require("../utils/fileUtils"); +const types_1 = require("../utils/types"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +const fileProvider_1 = require("./fileProvider"); +const settingsProvider_1 = require("./settingsProvider"); +const TEMPLATE_FILENAME = 'launch_template.json'; +const OUTPUT_FILENAME = 'launch.json'; +const CONFIG_NAME = 'C/C++ Runner: Debug Session'; +class LaunchProvider extends fileProvider_1.FileProvider { + constructor(settings, workspaceFolder, activeFolder) { + super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME); + this.settings = settings; + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + this.buildMode = types_1.Builds.debug; + if (!this.activeFolder) { + this.activeFolder = this.workspaceFolder; + } + const updateRequired = this.updateCheck(); + if (updateRequired) { + this.createFileData(); + } + } + updateCheck() { + let doUpdate = false; + if (!fileUtils_1.pathExists(this._outputPath)) { + doUpdate = true; + } + else { + const configJson = fileUtils_1.readJsonFile(this._outputPath); + if (configJson) { + let foundConfig = false; + configJson.configurations.forEach((config) => { + const triplet = config.name; + if (triplet.includes(this.settings.operatingSystem)) { + foundConfig = true; + } + }); + if (!foundConfig) { + doUpdate = true; + } + } + } + return doUpdate; + } + writeFileData() { + if (!this.workspaceFolder && !this.activeFolder) + return; + if (!this.activeFolder) { + this.activeFolder = this.workspaceFolder; + } + const launchTemplate = fileUtils_1.readJsonFile(this.templatePath); + if (!launchTemplate) + return; + launchTemplate.configurations[0].name = CONFIG_NAME; + if (this.settings.debugger) { + launchTemplate.configurations[0].MIMode = this.settings.debugger; + launchTemplate.configurations[0].miDebuggerPath = this.settings.debuggerPath; + if (types_1.OperatingSystems.windows === this.settings.operatingSystem && + this.settings.isCygwin) { + launchTemplate.configurations[0].externalConsole = true; + } + } + else { + launchTemplate.configurations[0].MIMode = + settingsProvider_1.SettingsProvider.DEFAULT_DEBUGGER_PATH; + launchTemplate.configurations[0].miDebuggerPath = + settingsProvider_1.SettingsProvider.DEFAULT_DEBUGGER_PATH; + } + launchTemplate.configurations[0].cwd = this.activeFolder; + const debugPath = path.join(this.activeFolder, `build/${this.buildMode}/out${this.buildMode}`); + launchTemplate.configurations[0].program = debugPath; + const launchLocal = fileUtils_1.readJsonFile(this._outputPath); + if (!launchLocal) { + fileUtils_1.writeJsonFile(this._outputPath, launchTemplate); + return; + } + let configIdx = vscodeUtils_1.getLaunchConfigIndex(launchLocal, CONFIG_NAME); + if (configIdx === undefined) { + configIdx = launchLocal.configurations.length; + } + if (launchLocal && launchLocal.configurations.length === configIdx) { + launchLocal.configurations.push(launchTemplate.configurations[0]); + } + else { + launchLocal.configurations[configIdx] = launchTemplate.configurations[0]; + } + fileUtils_1.writeJsonFile(this._outputPath, launchLocal); + } + updateFolderData(workspaceFolder, activeFolder) { + this.activeFolder = activeFolder; + super._updateFolderData(workspaceFolder); + } + updateModeData(buildMode) { + this.buildMode = buildMode; + } + changeCallback() { + const launchLocal = fileUtils_1.readJsonFile(this._outputPath); + if (!launchLocal) + return; + const configIdx = vscodeUtils_1.getLaunchConfigIndex(launchLocal, CONFIG_NAME); + if (configIdx !== undefined) { + const currentConfig = launchLocal.configurations[configIdx]; + if (currentConfig.miDebuggerPath !== this.settings.debuggerPath) { + this.settings.debuggerPath = currentConfig.miDebuggerPath; + if (currentConfig.miDebuggerPath.includes(types_1.Debuggers.gdb)) { + this.settings.setGDB(currentConfig.miDebuggerPath); + } + else if (currentConfig.miDebuggerPath.includes(types_1.Debuggers.lldb)) { + this.settings.setLLDB(currentConfig.miDebuggerPath); + } + } + } + else { + this.writeFileData(); + } + } +} +exports.LaunchProvider = LaunchProvider; +//# sourceMappingURL=launchProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js.map new file mode 100644 index 0000000..8cd8494 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/launchProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"launchProvider.js","sourceRoot":"","sources":["../../../src/provider/laun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AAC,WAAW,CACjB,CAAC;QAEF,IAAI,CAAC,WAAW;YAAE,OAAO;QAEzB,MAAM,SAAS,GAAG,kCAAoB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAEjE,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,MAAM,aAAa,GAAG,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAE5D,IAAI,aAAa,CAAC,cAAc,KAAK,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;gBAC/D,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC;gBAE1D,IAAI,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,iBAAS,CAAC,GAAG,CAAC,EAAE;oBACxD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;iBACpD;qBAAM,IAAI,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,iBAAS,CAAC,IAAI,CAAC,EAAE;oBAChE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;iBACrD;aACF;SACF;aAAM;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;IACH,CAAC;CACF;AAhJD,wCAgJC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js new file mode 100644 index 0000000..5e114d1 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js @@ -0,0 +1,153 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PropertiesProvider = void 0; +const fileUtils_1 = require("../utils/fileUtils"); +const types_1 = require("../utils/types"); +const fileProvider_1 = require("./fileProvider"); +const TEMPLATE_FILENAME = 'properties_template.json'; +const OUTPUT_FILENAME = 'c_cpp_properties.json'; +const INCLUDE_PATTERN = '${workspaceFolder}/**'; +class PropertiesProvider extends fileProvider_1.FileProvider { + constructor(settings, workspaceFolder, activeFolder) { + super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME); + this.settings = settings; + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + const updateRequired = this.updateCheck(); + if (updateRequired && activeFolder) { + this.createFileData(); + } + } + updateCheck() { + let doUpdate = false; + if (!fileUtils_1.pathExists(this._outputPath)) { + doUpdate = true; + } + else { + const configLocal = fileUtils_1.readJsonFile(this._outputPath); + if (configLocal) { + const triplet = configLocal.configurations[0].name; + if (!triplet.includes(this.settings.operatingSystem)) { + doUpdate = true; + } + } + } + return doUpdate; + } + writeFileData() { + let configLocal; + if (!fileUtils_1.pathExists(this._outputPath)) { + configLocal = fileUtils_1.readJsonFile(this.templatePath); + } + else { + configLocal = fileUtils_1.readJsonFile(this._outputPath); + } + if (!configLocal) + return; + const triplet = `${this.settings.operatingSystem}-` + + `${this.settings.cCompiler}-` + + `${this.settings.architecure}`; + const currentConfig = configLocal.configurations[0]; + currentConfig.compilerArgs = []; + if (this.settings.warnings) { + for (const warning of this.settings.warnings) { + const compilerArgsSet = new Set(currentConfig.compilerArgs); + if (!compilerArgsSet.has(warning)) { + currentConfig.compilerArgs.push(warning); + } + } + } + if (this.settings.compilerArgs) { + for (const arg of this.settings.compilerArgs) { + const compilerArgsSet = new Set(currentConfig.compilerArgs); + if (!compilerArgsSet.has(arg)) { + currentConfig.compilerArgs.push(arg); + } + } + } + if (this.settings.includePaths) { + currentConfig.includePath = [INCLUDE_PATTERN]; + for (const path of this.settings.includePaths) { + const includePathSet = new Set(currentConfig.includePath); + if (path !== INCLUDE_PATTERN && !includePathSet.has(path)) { + currentConfig.includePath.push(path); + } + } + } + else { + currentConfig.includePath = [INCLUDE_PATTERN]; + } + if (this.settings.cStandard) { + currentConfig.cStandard = this.settings.cStandard; + } + else { + currentConfig.cStandard = '${default}'; + } + if (this.settings.cppStandard) { + currentConfig.cppStandard = this.settings.cppStandard; + } + else { + currentConfig.cppStandard = '${default}'; + } + currentConfig.compilerPath = this.settings.cCompilerPath; + if (this.settings.isCygwin && + this.settings.operatingSystem === types_1.OperatingSystems.windows) { + currentConfig.name = triplet.replace('windows', 'windows-cygwin'); + currentConfig.intelliSenseMode = triplet.replace('windows', 'linux'); + } + else { + currentConfig.name = triplet; + currentConfig.intelliSenseMode = triplet; + } + fileUtils_1.writeJsonFile(this._outputPath, configLocal); + } + updateFolderData(workspaceFolder) { + super._updateFolderData(workspaceFolder); + } + changeCallback() { + const configLocal = fileUtils_1.readJsonFile(this._outputPath); + if (!configLocal) + return; + const currentConfig = configLocal.configurations[0]; + if (currentConfig.compilerPath !== this.settings.cCompilerPath && + currentConfig.compilerPath !== this.settings.cppCompilerPath) { + let compilerName = currentConfig.compilerPath; + this.settings.cCompilerPath = currentConfig.compilerPath; + compilerName = fileUtils_1.getBasename(compilerName); + compilerName = fileUtils_1.removeExtension(compilerName, 'exe'); + if (compilerName.includes(types_1.Compilers.clang)) { + this.settings.setClang(currentConfig.compilerPath); + } + else if (compilerName.includes(types_1.Compilers.clangpp)) { + this.settings.setClangpp(currentConfig.compilerPath); + } + else if (compilerName.includes(types_1.Compilers.gcc)) { + this.settings.setGcc(currentConfig.compilerPath); + } + else if (compilerName.includes(types_1.Compilers.gpp)) { + this.settings.setGpp(currentConfig.compilerPath); + } + } + if (currentConfig.cStandard !== '${default}' && + currentConfig.cStandard !== this.settings.cStandard) { + this.settings.cStandard = currentConfig.cStandard; + this.settings.update('cStandard', currentConfig.cStandard); + } + if (currentConfig.cppStandard !== '${default}' && + currentConfig.cppStandard !== this.settings.cppStandard) { + this.settings.cppStandard = currentConfig.cppStandard; + this.settings.update('cppStandard', currentConfig.cppStandard); + } + const argsSet = new Set(currentConfig.compilerArgs); + const args = [...argsSet]; + const warningArgs = args.filter((arg) => arg.includes('-W')); + const compilerArgs = args.filter((arg) => !arg.includes('-W')); + const includeArgs = currentConfig.includePath.filter((path) => path !== INCLUDE_PATTERN); + this.settings.warnings = warningArgs; + this.settings.compilerArgs = compilerArgs; + this.settings.includePaths = includeArgs; + this.settings.setOtherSettings(); + } +} +exports.PropertiesProvider = PropertiesProvider; +//# sourceMappingURL=propertiesProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js.map new file mode 100644 index 0000000..3341873 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/propertiesProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"propertiesProvider.js","sourceRoot":"","sources":["../../../src/provider/propertiesProvider.ts"],"names":[],"mappings":";;;AAAA,kDAM4B;AAC5B,0CAAgF;AAChF,iDAA8C;AAG9C,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAChD,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAEhD,MAAa,kBAAmB,SAAQ,2BAAY;IAClD,YACY,QAA0B,EAC7B,eAAuB,EACvB,YAAgC;QAEvC,KAAK,CAAC,eAAe,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC;QAJjD,aAAQ,GAAR,QAAQ,CAAkB;QAC7B,oBAAe,GAAf,eAAe,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAoB;QAIvC,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAE1C,IAAI,cAAc,IAAI,YAAY,EAAE;YAClC,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;IACH,CAAC;IAES,WAAW;QACnB,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,IAAI,CAAC,sBAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACjC,QAAQ,GAAG,IAAI,CAAC;SACjB;aAAM;YACL,MAAM,WAAW,GAAsB,wBAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CA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AY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC,MAAM,CAClD,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,KAAK,eAAe,CAC3C,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,WAAW,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,WAAW,CAAC;QAEzC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AAhLD,gDAgLC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js new file mode 100644 index 0000000..022397d --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js @@ -0,0 +1,481 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SettingsProvider = void 0; +const path = require("path"); +const vscode = require("vscode"); +const fileUtils_1 = require("../utils/fileUtils"); +const systemUtils_1 = require("../utils/systemUtils"); +const types_1 = require("../utils/types"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +const fileProvider_1 = require("./fileProvider"); +const TEMPLATE_FILENAME = 'settings_template.json'; +const OUTPUT_FILENAME = 'settings.json'; +const EXTENSION_NAME = 'C_Cpp_Runner'; +class SettingsProvider extends fileProvider_1.FileProvider { + constructor(workspaceFolder, activeFolder) { + super(workspaceFolder, TEMPLATE_FILENAME, OUTPUT_FILENAME); + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + this._configGlobal = vscode.workspace.getConfiguration(EXTENSION_NAME); + this.operatingSystem = systemUtils_1.getOperatingSystem(); + this.isCygwin = false; + this._cCompilerFound = false; + this._cppCompilerFound = false; + this._makeFound = false; + this._debuggerFound = false; + this._commands = new types_1.Commands(); + this.cCompilerPath = SettingsProvider.DEFAULT_C_COMPILER_PATH; + this.cppCompilerPath = SettingsProvider.DEFAULT_CPP_COMPILER_PATH; + this.debuggerPath = SettingsProvider.DEFAULT_DEBUGGER_PATH; + this.makePath = SettingsProvider.DEFAULT_MAKE_PATH; + this.cStandard = SettingsProvider.DEFAULT_C_STANDARD; + this.cppStandard = SettingsProvider.DEFAULT_CPP_STANDARD; + this.compilerArgs = SettingsProvider.DEFAULT_COMPILER_ARGS; + this.linkerArgs = SettingsProvider.DEFAULT_LINKER_ARGS; + this.includePaths = SettingsProvider.DEFAULT_INCLUDE_PATHS; + this.excludeSearch = SettingsProvider.DEFAULT_EXCLUDE_SEARCH; + this.enableWarnings = SettingsProvider.DEFAULT_ENABLE_WARNINGS; + this.warningsAsError = SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS; + this.warnings = SettingsProvider.DEFAULT_WARNINGS; + const updateRequired = this.updateCheck(); + if (updateRequired && activeFolder) { + this.createFileData(); + } + else if (activeFolder) { + this.getSettings(); + this.getCommandTypes(); + this.getArchitecture(); + } + } + updateCheck() { + let doUpdate = false; + if (!fileUtils_1.pathExists(this._outputPath)) { + doUpdate = true; + } + else if (!this.commandsStored()) { + doUpdate = true; + } + return doUpdate; + } + commandsStored() { + if (fileUtils_1.pathExists(this._outputPath)) { + const settingsJson = fileUtils_1.readJsonFile(this._outputPath); + if (!settingsJson) + return false; + if (fileUtils_1.commandCheck(`${EXTENSION_NAME}.cCompilerPath`, settingsJson) && + fileUtils_1.commandCheck(`${EXTENSION_NAME}.cppCompilerPath`, settingsJson) && + fileUtils_1.commandCheck(`${EXTENSION_NAME}.debuggerPath`, settingsJson) && + fileUtils_1.commandCheck(`${EXTENSION_NAME}.makePath`, settingsJson)) { + return true; + } + if (this._cCompilerFound && + this._cppCompilerFound && + this._makeFound && + this._debuggerFound) { + return true; + } + } + return false; + } + writeFileData() { + this.getSettings(); + if (!this.commandsStored()) { + this.getCommands(); + this.setCommands(); + this.getCommandTypes(); + this.getArchitecture(); + } + } + deleteCallback() { + const extensionIsActive = vscodeUtils_1.getActivationState(); + if (extensionIsActive) + this.writeFileData(); + } + changeCallback() { + this.getSettings(); + } + updateFolderData(workspaceFolder) { + super._updateFolderData(workspaceFolder); + } + getSettings() { + const settingsLocal = fileUtils_1.readJsonFile(this._outputPath); + this.cCompilerPath = this.getSettingsValue(settingsLocal, 'cCompilerPath', SettingsProvider.DEFAULT_C_COMPILER_PATH); + this.cppCompilerPath = this.getSettingsValue(settingsLocal, 'cppCompilerPath', SettingsProvider.DEFAULT_CPP_COMPILER_PATH); + this.debuggerPath = this.getSettingsValue(settingsLocal, 'debuggerPath', SettingsProvider.DEFAULT_DEBUGGER_PATH); + this.makePath = this.getSettingsValue(settingsLocal, 'makePath', SettingsProvider.DEFAULT_MAKE_PATH); + this.enableWarnings = this.getSettingsValue(settingsLocal, 'enableWarnings', SettingsProvider.DEFAULT_ENABLE_WARNINGS); + this.warnings = this.getSettingsValue(settingsLocal, 'warnings', SettingsProvider.DEFAULT_WARNINGS); + this.warningsAsError = this.getSettingsValue(settingsLocal, 'warningsAsError', SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS); + this.cStandard = this.getSettingsValue(settingsLocal, 'cStandard', SettingsProvider.DEFAULT_C_STANDARD); + this.cppStandard = this.getSettingsValue(settingsLocal, 'cppStandard', SettingsProvider.DEFAULT_CPP_STANDARD); + this.compilerArgs = this.getSettingsValue(settingsLocal, 'compilerArgs', SettingsProvider.DEFAULT_COMPILER_ARGS); + this.linkerArgs = this.getSettingsValue(settingsLocal, 'linkerArgs', SettingsProvider.DEFAULT_LINKER_ARGS); + this.includePaths = this.getSettingsValue(settingsLocal, 'includePaths', SettingsProvider.DEFAULT_INCLUDE_PATHS); + this.excludeSearch = this.getSettingsValue(settingsLocal, 'excludeSearch', SettingsProvider.DEFAULT_EXCLUDE_SEARCH); + } + getCommands() { + this.searchPathVariables(); + this.searchCommands(); + } + async searchCommands() { + if (!this._commands.foundGcc) { + ({ + f: this._commands.foundGcc, + p: this._commands.pathGcc, + } = await systemUtils_1.commandExists(types_1.Compilers.gcc)); + if (!this._commands.foundGcc) { + ({ + f: this._commands.foundClang, + p: this._commands.pathClang, + } = await systemUtils_1.commandExists(types_1.Compilers.clang)); + } + } + if (!this._commands.foundGpp) { + ({ + f: this._commands.foundGpp, + p: this._commands.pathGpp, + } = await systemUtils_1.commandExists(types_1.Compilers.gpp)); + if (!this._commands.foundGpp) { + ({ + f: this._commands.foundClangpp, + p: this._commands.pathClangpp, + } = await systemUtils_1.commandExists(types_1.Compilers.clangpp)); + } + } + if (!this._commands.foundGDB) { + ({ + f: this._commands.foundGDB, + p: this._commands.pathGDB, + } = await systemUtils_1.commandExists(types_1.Debuggers.gdb)); + if (!this._commands.foundGDB) { + ({ + f: this._commands.foundLLDB, + p: this._commands.pathLLDB, + } = await systemUtils_1.commandExists(types_1.Debuggers.lldb)); + } + } + if (!this._commands.foundMake) { + ({ + f: this._commands.foundMake, + p: this._commands.pathMake, + } = await systemUtils_1.commandExists(types_1.Makefiles.make)); + if (!this._commands.foundMake && + this.operatingSystem === types_1.OperatingSystems.windows) { + ({ + f: this._commands.foundMake, + p: this._commands.pathMake, + } = await systemUtils_1.commandExists(types_1.Makefiles.make_mingw)); + } + } + } + searchPathVariables() { + this._commands = new types_1.Commands(); + const env = process.env; + if (env['PATH']) { + let paths = []; + if (this.operatingSystem === types_1.OperatingSystems.windows) { + paths = env['PATH'].split(';'); + } + else { + paths = env['PATH'].split(':'); + } + for (const envPath of paths) { + if ((this._commands.foundGcc && + this._commands.foundGpp && + this._commands.foundGDB) || + (this._commands.foundClang && + this._commands.foundClangpp && + this._commands.foundLLDB)) { + break; + } + if (this.operatingSystem === types_1.OperatingSystems.windows) { + if (this.skipCheckWindows(envPath)) + continue; + } + else if (this.operatingSystem === types_1.OperatingSystems.linux) { + if (this.skipCheckLinux(envPath)) + continue; + } + else if (this.operatingSystem === types_1.OperatingSystems.mac) { + if (this.skipCheckMac(envPath)) + continue; + } + if (this.operatingSystem === types_1.OperatingSystems.windows) { + this.searchPathVariablesWindows(envPath); + } + else if (this.operatingSystem === types_1.OperatingSystems.linux) { + this.searchPathVariablesLinux(envPath); + } + else if (this.operatingSystem === types_1.OperatingSystems.mac) { + this.searchPathVariablesMac(envPath); + } + } + } + } + skipCheckWindows(envPath) { + if (!envPath.toLowerCase().includes('bin') && + !envPath.toLowerCase().includes('mingw') && + !envPath.toLowerCase().includes('msys') && + !envPath.toLowerCase().includes('cygwin')) { + return true; + } + return false; + } + skipCheckLinux(envPath) { + if (!envPath.toLowerCase().startsWith('/bin') && + !envPath.toLowerCase().startsWith('/usr/bin')) { + return true; + } + return false; + } + skipCheckMac(envPath) { + if (!envPath.toLowerCase().includes('bin')) { + return true; + } + return false; + } + searchPathVariablesWindows(envPath) { + const lower_path = envPath.toLocaleLowerCase(); + if (lower_path.includes(types_1.CompilerSystems.cygwin) || + lower_path.includes(types_1.CompilerSystems.mingw) || + lower_path.includes(types_1.CompilerSystems.msys2)) { + this._commands.pathGcc = path.join(envPath, types_1.Compilers.gcc + '.exe'); + this._commands.pathGpp = path.join(envPath, types_1.Compilers.gpp + '.exe'); + this._commands.pathGDB = path.join(envPath, types_1.Debuggers.gdb + '.exe'); + this._commands.pathMake = path.join(envPath, types_1.Makefiles.make + '.exe'); + if (fileUtils_1.pathExists(this._commands.pathGcc)) { + this._commands.foundGcc = true; + } + if (fileUtils_1.pathExists(this._commands.pathGpp)) { + this._commands.foundGpp = true; + } + if (fileUtils_1.pathExists(this._commands.pathGDB)) { + this._commands.foundGDB = true; + } + if (fileUtils_1.pathExists(this._commands.pathMake)) { + this._commands.foundMake = true; + } + else { + const altPathMake = path.join(envPath, types_1.Makefiles.make_mingw + '.exe'); + if (fileUtils_1.pathExists(altPathMake)) { + this._commands.foundMake = true; + } + } + } + } + searchPathVariablesLinux(envPath) { + this._commands.pathGcc = path.join(envPath, types_1.Compilers.gcc); + this._commands.pathGpp = path.join(envPath, types_1.Compilers.gpp); + this._commands.pathGDB = path.join(envPath, types_1.Debuggers.gdb); + this._commands.pathMake = path.join(envPath, types_1.Makefiles.make); + if (fileUtils_1.pathExists(this._commands.pathGcc)) { + this._commands.foundGcc = true; + } + if (fileUtils_1.pathExists(this._commands.pathGpp)) { + this._commands.foundGpp = true; + } + if (fileUtils_1.pathExists(this._commands.pathGDB)) { + this._commands.foundGDB = true; + } + if (fileUtils_1.pathExists(this._commands.pathMake)) { + this._commands.foundMake = true; + } + } + searchPathVariablesMac(envPath) { + this._commands.pathClang = path.join(envPath, types_1.Compilers.clang); + this._commands.pathClangpp = path.join(envPath, types_1.Compilers.clangpp); + this._commands.pathLLDB = path.join(envPath, types_1.Debuggers.lldb); + this._commands.pathMake = path.join(envPath, types_1.Makefiles.make); + if (fileUtils_1.pathExists(this._commands.pathClang)) { + this._commands.foundClang = true; + } + if (fileUtils_1.pathExists(this._commands.pathClangpp)) { + this._commands.foundClangpp = true; + } + if (fileUtils_1.pathExists(this._commands.pathLLDB)) { + this._commands.foundLLDB = true; + } + if (fileUtils_1.pathExists(this._commands.pathMake)) { + this._commands.foundMake = true; + } + } + setCommands() { + if (this._commands.foundGcc && this._commands.pathGcc) { + this.setGcc(this._commands.pathGcc); + } + else if (this._commands.foundClang && this._commands.pathClang) { + this.setClang(this._commands.pathClang); + } + else { + this.cCompiler = undefined; + } + if (this._commands.foundGpp && this._commands.pathGpp) { + this.setGpp(this._commands.pathGpp); + } + else if (this._commands.foundClangpp && this._commands.pathClangpp) { + this.setClangpp(this._commands.pathClangpp); + } + else { + this.cppCompiler = undefined; + } + if (this._commands.foundGDB && this._commands.pathGDB) { + this.setGDB(this._commands.pathGDB); + } + else if (this._commands.foundLLDB && this._commands.pathLLDB) { + this.setLLDB(this._commands.pathLLDB); + } + else { + this.debugger = undefined; + } + if (this._commands.foundMake && this._commands.pathMake) { + this.setMake(this._commands.pathMake); + } + else { + this._makeFound = false; + } + this.setOtherSettings(); + } + getCommandTypes() { + let cBasename = this.cCompilerPath; + let cppBasename = this.cppCompilerPath; + cBasename = fileUtils_1.getBasename(cBasename); + cBasename = fileUtils_1.removeExtension(cBasename, 'exe'); + cppBasename = fileUtils_1.getBasename(cppBasename); + cppBasename = fileUtils_1.removeExtension(cppBasename, 'exe'); + if (cBasename) { + if (cBasename.includes(types_1.Compilers.clang)) { + this.cCompiler = types_1.Compilers.clang; + this.debugger = types_1.Debuggers.lldb; + } + else { + this.cCompiler = types_1.Compilers.gcc; + this.debugger = types_1.Debuggers.gdb; + } + } + if (cppBasename) { + if (cppBasename.includes(types_1.Compilers.clangpp)) { + this.cppCompiler = types_1.Compilers.clangpp; + this.debugger = types_1.Debuggers.lldb; + } + else { + this.cppCompiler = types_1.Compilers.gpp; + this.debugger = types_1.Debuggers.gdb; + } + } + } + getArchitecture() { + if (this.cCompiler) { + const ret = systemUtils_1.getCompilerArchitecture(this.cCompiler); + this.architecure = ret.architecure; + this.isCygwin = ret.isCygwin; + } + else if (this.cppCompiler) { + const ret = systemUtils_1.getCompilerArchitecture(this.cppCompiler); + this.architecure = ret.architecure; + this.isCygwin = ret.isCygwin; + } + else { + this.architecure = types_1.Architectures.x64; + this.isCygwin = false; + } + } + reset() { + this.cCompilerPath = SettingsProvider.DEFAULT_C_COMPILER_PATH; + this.cppCompilerPath = SettingsProvider.DEFAULT_CPP_COMPILER_PATH; + this.debuggerPath = SettingsProvider.DEFAULT_DEBUGGER_PATH; + this.makePath = SettingsProvider.DEFAULT_MAKE_PATH; + this.enableWarnings = SettingsProvider.DEFAULT_ENABLE_WARNINGS; + this.warnings = SettingsProvider.DEFAULT_WARNINGS; + this.warningsAsError = SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS; + this.cStandard = SettingsProvider.DEFAULT_C_STANDARD; + this.cppStandard = SettingsProvider.DEFAULT_CPP_STANDARD; + this.compilerArgs = SettingsProvider.DEFAULT_COMPILER_ARGS; + this.linkerArgs = SettingsProvider.DEFAULT_LINKER_ARGS; + this.includePaths = SettingsProvider.DEFAULT_INCLUDE_PATHS; + this.excludeSearch = SettingsProvider.DEFAULT_EXCLUDE_SEARCH; + this.setGcc(this.cCompilerPath); + this.setGpp(this.cppCompilerPath); + this.setGDB(this.debuggerPath); + this.setMake(this.makePath); + this.setOtherSettings(); + } + getSettingsValue(settingsLocal, name, defaultValue) { + const settingName = `${EXTENSION_NAME}.${name}`; + if (settingsLocal && settingsLocal[settingName] !== undefined) { + return settingsLocal[settingName]; + } + if (this._configGlobal.has(name)) { + return this._configGlobal.get(name, defaultValue); + } + return defaultValue; + } + update(key, value) { + let settingsJson = fileUtils_1.readJsonFile(this._outputPath); + if (!settingsJson) { + settingsJson = {}; + } + const settingName = `${EXTENSION_NAME}.${key}`; + settingsJson[settingName] = value; + fileUtils_1.writeJsonFile(this._outputPath, settingsJson); + } + setGcc(pathGcc) { + this.update('cCompilerPath', pathGcc); + this.cCompiler = types_1.Compilers.gcc; + this._cCompilerFound = true; + } + setClang(pathClang) { + this.update('cCompilerPath', pathClang); + this.cCompiler = types_1.Compilers.clang; + this._cCompilerFound = true; + } + setGpp(pathGpp) { + this.update('cppCompilerPath', pathGpp); + this.cppCompiler = types_1.Compilers.gpp; + this._cppCompilerFound = true; + } + setClangpp(pathClangpp) { + this.update('cppCompilerPath', pathClangpp); + this.cppCompiler = types_1.Compilers.clangpp; + this._cppCompilerFound = true; + } + setLLDB(pathLLDB) { + this.update('debuggerPath', pathLLDB); + this.debugger = types_1.Debuggers.lldb; + this._debuggerFound = true; + } + setGDB(pathGDB) { + this.update('debuggerPath', pathGDB); + this.debugger = types_1.Debuggers.gdb; + this._debuggerFound = true; + } + setMake(pathMake) { + this.update('makePath', pathMake); + this._makeFound = true; + } + setOtherSettings() { + this.update('warnings', this.warnings); + this.update('compilerArgs', this.compilerArgs); + this.update('includePaths', this.includePaths); + this.update('linkerArgs', this.linkerArgs); + this.update('cStandard', this.cStandard); + this.update('cppStandard', this.cppStandard); + this.update('excludeSearch', this.excludeSearch); + this.update('enableWarnings', this.enableWarnings); + this.update('warningsAsError', this.warningsAsError); + } +} +exports.SettingsProvider = SettingsProvider; +SettingsProvider.DEFAULT_C_COMPILER_PATH = 'gcc'; +SettingsProvider.DEFAULT_CPP_COMPILER_PATH = 'g++'; +SettingsProvider.DEFAULT_DEBUGGER_PATH = 'gdb'; +SettingsProvider.DEFAULT_MAKE_PATH = 'make'; +SettingsProvider.DEFAULT_C_STANDARD = ''; +SettingsProvider.DEFAULT_CPP_STANDARD = ''; +SettingsProvider.DEFAULT_EXCLUDE_SEARCH = []; +SettingsProvider.DEFAULT_ENABLE_WARNINGS = true; +SettingsProvider.DEFAULT_WARNINGS_AS_ERRORS = false; +SettingsProvider.DEFAULT_WARNINGS = ['-Wall', '-Wextra', '-Wpedantic']; +SettingsProvider.DEFAULT_COMPILER_ARGS = []; +SettingsProvider.DEFAULT_LINKER_ARGS = []; +SettingsProvider.DEFAULT_INCLUDE_PATHS = []; +//# sourceMappingURL=settingsProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js.map new file mode 100644 index 0000000..978055d --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/settingsProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"settingsProvider.js","sourceRoot":"","sources":["../../../src/provider/settingsProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,kDAO4B;AAC5B,sDAI8B;AAC9B,0CASwB;AACxB,sDAA0D;AAC1D,iDAA8C;AAE9C,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AACnD,MAAM,eAAe,GAAG,eAAe,CAAC;AACxC,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,MAAa,gBAAiB,SA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CAAqB,GAAG,EAAE,CAAC;AAC3B,oCAAmB,GAAG,EAAE,CAAC;AACzB,sCAAqB,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js new file mode 100644 index 0000000..40284cf --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js @@ -0,0 +1,228 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TaskProvider = void 0; +const path = require("path"); +const vscode = require("vscode"); +const extension_1 = require("../extension"); +const fileUtils_1 = require("../utils/fileUtils"); +const types_1 = require("../utils/types"); +const vscodeUtils_1 = require("../utils/vscodeUtils"); +const settingsProvider_1 = require("./settingsProvider"); +const EXTENSION_NAME = 'C_Cpp_Runner'; +const CONFIG_NAME = 'C/C++ Runner: Debug Session'; +class TaskProvider { + constructor(_settingsProvider, _workspaceFolder, _activeFolder, _buildMode, _argumentsString) { + this._settingsProvider = _settingsProvider; + this._workspaceFolder = _workspaceFolder; + this._activeFolder = _activeFolder; + this._buildMode = _buildMode; + this._argumentsString = _argumentsString; + const templateDirectory = path.join(extension_1.extensionPath ? extension_1.extensionPath : '', 'templates'); + this._tasksFile = path.join(templateDirectory, 'tasks_template.json'); + this._makefileFile = path.join(templateDirectory, 'Makefile'); + this.getTasks(); + } + async resolveTask(task) { + return task; + } + provideTasks() { + return this.getTasks(); + } + getTasks() { + if (!this.activeFolder) + return []; + const language = fileUtils_1.getLanguage(this.activeFolder); + this.setTasksDefinition(language); + if (!this.tasks) + return []; + return this.tasks; + } + setTasksDefinition(language) { + const taskType = 'shell'; + const configJson = fileUtils_1.readJsonFile(this._tasksFile); + if (!configJson) { + return []; + } + this.tasks = []; + for (const taskJson of configJson.tasks) { + if (taskJson.type !== taskType) { + continue; + } + if (taskJson.options) { + if (taskJson.options.hide) { + continue; + } + } + this.updateTaskBasedOnSettings(taskJson, language); + const shellCommand = `${taskJson.command} ${taskJson.args.join(' ')}`; + const definition = { + type: taskType, + task: taskJson.label, + }; + const problemMatcher = '$gcc'; + const scope = vscode.TaskScope.Workspace; + const execution = new vscode.ShellExecution(shellCommand); + const task = new types_1.Task(definition, scope, taskJson.label, EXTENSION_NAME, execution, problemMatcher); + this.tasks.push(task); + } + this.addDebugTask(); + return this.tasks; + } + updateTaskBasedOnSettings(taskJson, language) { + if (!this.workspaceFolder || !this.activeFolder) + return; + const settings = this._settingsProvider; + const activeFolder = this.activeFolder; + const workspaceFolder = this.workspaceFolder; + const folder = activeFolder.replace(workspaceFolder, path.basename(workspaceFolder)); + taskJson.label = taskJson.label.replace(taskJson.label.split(': ')[1], folder); + taskJson.label = fileUtils_1.replaceBackslashes(taskJson.label); + taskJson.command = settings.makePath; + taskJson.args[1] = `--file=${this._makefileFile}`; + const isRunTask = taskJson.label.includes(types_1.Tasks.run); + taskJson.args.push(`COMPILATION_MODE=${this.buildMode}`); + if (this._settingsProvider.operatingSystem === types_1.OperatingSystems.windows) { + taskJson.args.push(`EXECUTABLE_NAME=out${this.buildMode}.exe`); + } + else { + taskJson.args.push(`EXECUTABLE_NAME=out${this.buildMode}`); + } + taskJson.args.push(`LANGUAGE_MODE=${language}`); + if (!isRunTask) { + if (language === types_1.Languages.c) { + taskJson.args.push(`C_COMPILER=${settings.cCompilerPath}`); + if (settings.cStandard && + settings.cStandard !== settingsProvider_1.SettingsProvider.DEFAULT_C_STANDARD) { + taskJson.args.push(`C_STANDARD=${settings.cStandard}`); + } + } + else { + taskJson.args.push(`CPP_COMPILER=${settings.cppCompilerPath}`); + if (settings.cppStandard && + settings.cppStandard !== settingsProvider_1.SettingsProvider.DEFAULT_CPP_STANDARD) { + taskJson.args.push(`CPP_STANDARD=${settings.cppStandard}`); + } + } + taskJson.args.push(`ENABLE_WARNINGS=${+settings.enableWarnings}`); + taskJson.args.push(`WARNINGS_AS_ERRORS=${+settings.warningsAsError}`); + if (settings.warnings && settings.warnings.length > 0) { + const warningsStr = settings.warnings.join(' '); + taskJson.args.push(`WARNINGS="${warningsStr}"`); + } + if (settings.compilerArgs && settings.compilerArgs.length > 0) { + const compilerArgsStr = settings.compilerArgs.join(' '); + taskJson.args.push(`COMPILER_ARGS="${compilerArgsStr}"`); + } + if (settings.linkerArgs && settings.linkerArgs.length > 0) { + const linkerArgsStr = settings.linkerArgs.join(' '); + taskJson.args.push(`LINKER_ARGS="${linkerArgsStr}"`); + } + if (settings.includePaths && settings.includePaths.length > 0) { + const includePathsStr = settings.includePaths.join(' '); + taskJson.args.push(`INCLUDE_PATHS="${includePathsStr}"`); + } + } + if (isRunTask) { + if (this.argumentsString) { + taskJson.args.push(`ARGUMENTS=${this.argumentsString}`); + } + } + } + updateModeData(buildMode) { + this.buildMode = buildMode; + } + updateArguments(argumentsString) { + this.argumentsString = argumentsString; + if (this.workspaceFolder) { + const launchPath = path.join(this.workspaceFolder, '.vscode', 'launch.json'); + const configJson = fileUtils_1.readJsonFile(launchPath); + if (!configJson) + return; + const configIdx = vscodeUtils_1.getLaunchConfigIndex(configJson, CONFIG_NAME); + if (configIdx === undefined) + return; + if (this.argumentsString) { + configJson.configurations[configIdx].args.push(this.argumentsString); + } + else { + configJson.configurations[configIdx].args = []; + } + fileUtils_1.writeJsonFile(launchPath, configJson); + } + } + updateFolderData(workspaceFolder, activeFolder) { + this.resetArguments(); + this.workspaceFolder = workspaceFolder; + this.activeFolder = activeFolder; + } + resetArguments() { + if (this.workspaceFolder) { + const launchPath = path.join(this.workspaceFolder, '.vscode', 'launch.json'); + const configJson = fileUtils_1.readJsonFile(launchPath); + if (configJson) { + const configIdx = vscodeUtils_1.getLaunchConfigIndex(configJson, CONFIG_NAME); + if (configIdx === undefined) + return; + configJson.configurations[configIdx].args = []; + fileUtils_1.writeJsonFile(launchPath, configJson); + } + } + this.argumentsString = undefined; + } + getProjectFolder() { + if (this.activeFolder) { + return this.activeFolder; + } + if (this.workspaceFolder) { + return this.workspaceFolder; + } + return undefined; + } + addDebugTask() { + if (!this.tasks) + return; + if (!this.workspaceFolder || !this.activeFolder) + return; + const folder = this.activeFolder.replace(this.workspaceFolder, path.basename(this.workspaceFolder)); + let label = `Debug: ${this.activeFolder}`; + const splitted = label.split(': '); + if (!splitted[1]) + return; + label = label.replace(splitted[1], folder); + label = fileUtils_1.replaceBackslashes(label); + const definition = { + type: 'shell', + task: label, + }; + const problemMatcher = '$gcc'; + const scope = vscode.TaskScope.Workspace; + const task = new types_1.Task(definition, scope, label, EXTENSION_NAME, undefined, problemMatcher); + this.tasks.push(task); + } + get buildMode() { + return this._buildMode; + } + set buildMode(value) { + this._buildMode = value; + } + get activeFolder() { + return this._activeFolder; + } + set activeFolder(value) { + this._activeFolder = value; + } + get workspaceFolder() { + return this._workspaceFolder; + } + set workspaceFolder(value) { + this._workspaceFolder = value; + } + get argumentsString() { + return this._argumentsString; + } + set argumentsString(value) { + this._argumentsString = value; + } +} +exports.TaskProvider = TaskProvider; +//# sourceMappingURL=taskProvider.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js.map new file mode 100644 index 0000000..56dbc41 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/provider/taskProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"taskProvider.js","sourceRoot":"","sources":["../../../src/provider/taskProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,4CAA6C;AAC7C,kDAK4B;AAC5B,0CASwB;AACxB,sDAA4D;AAC5D,yDAAsD;AAEtD,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAElD,MAAa,YAAY;IAKvB,YACmB,iBAAmC,EAC5C,gBAAoC,EACpC,aAAiC,EACjC,UAAkB,EAClB,gBAAoC;QAJ3B,sBAAiB,GAAjB,iB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O,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,IAAW,eAAe,CAAC,KAAyB;QAClD,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAChC,CAAC;CACF;AAxTD,oCAwTC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js new file mode 100644 index 0000000..d676460 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js @@ -0,0 +1,209 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getBasename = exports.removeExtension = exports.hasPathSeperators = exports.commandCheck = exports.naturalSort = exports.writeJsonFile = exports.readJsonFile = exports.foldersInDir = exports.excludePatternFromList = exports.filesInDir = exports.readDir = exports.getDirectoriesRecursive = exports.getLanguage = exports.isCSourceFile = exports.isCppSourceFile = exports.isHeaderFile = exports.addFileExtensionDot = exports.isSourceFile = exports.pathExists = exports.filterOnString = exports.rmdirRecursive = exports.mkdirRecursive = exports.replaceBackslashes = void 0; +const fs = require("fs"); +const JSON5 = require("json5"); +const minimatch = require("minimatch"); +const path = require("path"); +const extension_1 = require("../extension"); +const logger = require("./logger"); +const types_1 = require("./types"); +function replaceBackslashes(text) { + return text.replace(/\\/g, '/'); +} +exports.replaceBackslashes = replaceBackslashes; +function mkdirRecursive(dir) { + try { + fs.mkdirSync(dir, { recursive: true }); + } + catch (err) { + const errorMessage = `mkdirRecursive: ${err}`; + logger.log(extension_1.loggingActive, errorMessage); + } +} +exports.mkdirRecursive = mkdirRecursive; +function rmdirRecursive(dir) { + try { + fs.rmdirSync(dir, { recursive: true }); + } + catch (err) { + const errorMessage = `rmdirSync: ${err}`; + logger.log(extension_1.loggingActive, errorMessage); + } +} +exports.rmdirRecursive = rmdirRecursive; +function filterOnString(names, filterName) { + return names.filter((name) => !name.includes(filterName)); +} +exports.filterOnString = filterOnString; +function pathExists(filepath) { + try { + fs.accessSync(filepath); + } + catch (err) { + return false; + } + return true; +} +exports.pathExists = pathExists; +function isSourceFile(fileExt) { + const fileExtLower = fileExt.toLowerCase(); + if (isHeaderFile(fileExtLower)) { + return false; + } + if (!(isCSourceFile(fileExtLower) || isCppSourceFile(fileExtLower))) { + return false; + } + return true; +} +exports.isSourceFile = isSourceFile; +function addFileExtensionDot(fileExt) { + if (!fileExt.includes('.')) { + fileExt = `.${fileExt}`; + } + return fileExt; +} +exports.addFileExtensionDot = addFileExtensionDot; +function isHeaderFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return ['.hpp', '.hh', '.hxx', '.h'].some((ext) => fileExtLower === ext); +} +exports.isHeaderFile = isHeaderFile; +function isCppSourceFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return ['.cpp', '.cc', '.cxx'].some((ext) => fileExtLower === ext); +} +exports.isCppSourceFile = isCppSourceFile; +function isCSourceFile(fileExtLower) { + fileExtLower = addFileExtensionDot(fileExtLower); + return fileExtLower === '.c'; +} +exports.isCSourceFile = isCSourceFile; +function getLanguage(dir) { + const files = filesInDir(dir); + const anyCppFile = files.some((file) => isCppSourceFile(path.extname(file))); + if (anyCppFile) { + return types_1.Languages.cpp; + } + else { + return types_1.Languages.c; + } +} +exports.getLanguage = getLanguage; +function getDirectoriesRecursive(dir) { + const directories = foldersInDir(dir); + if (directories.length === 0) + return; + directories.forEach((dir) => getDirectoriesRecursive(dir)?.forEach((newDir) => directories.push(newDir))); + return directories; +} +exports.getDirectoriesRecursive = getDirectoriesRecursive; +function readDir(dir) { + try { + return fs.readdirSync(dir, { withFileTypes: true }); + } + catch (err) { + const errorMessage = `readDir: ${err}`; + logger.log(extension_1.loggingActive, errorMessage); + return undefined; + } +} +exports.readDir = readDir; +function filesInDir(dir) { + const fileDirents = readDir(dir); + if (!fileDirents) + return []; + const files = fileDirents + .filter((file) => file.isFile()) + .map((file) => file.name); + return files; +} +exports.filesInDir = filesInDir; +function excludePatternFromList(excludeSearch, foldersList) { + for (const pattern of excludeSearch) { + foldersList = foldersList.filter((folder) => !minimatch(folder, pattern)); + } + return foldersList; +} +exports.excludePatternFromList = excludePatternFromList; +function foldersInDir(dir) { + const fileDirents = readDir(dir); + if (!fileDirents) + return []; + let folders = fileDirents.filter((folder) => folder.isDirectory()); + folders = folders.filter((folder) => !folder.name.includes('.')); + folders = folders.filter((folder) => !folder.name.includes('__')); + folders = folders.filter((folder) => !(folder.name === 'build')); + folders = folders.filter((folder) => !folder.name.includes('CMake'.toLowerCase())); + const folderNames = folders.map((folder) => path.join(dir.toString(), folder.name)); + return folderNames; +} +exports.foldersInDir = foldersInDir; +function readJsonFile(filepath) { + let configJson; + try { + const fileContent = fs.readFileSync(filepath, 'utf-8'); + configJson = JSON5.parse(fileContent); + } + catch (err) { + const errorMessage = `readJsonFile: ${err}`; + logger.log(extension_1.loggingActive, errorMessage); + return undefined; + } + return configJson; +} +exports.readJsonFile = readJsonFile; +function writeJsonFile(outputFilePath, jsonContent) { + if (jsonContent === undefined) + return; + const dirname = path.dirname(outputFilePath); + if (!pathExists(dirname)) { + mkdirRecursive(dirname); + } + const jsonString = JSON.stringify(jsonContent, null, 2); + try { + fs.writeFileSync(outputFilePath, jsonString); + } + catch (err) { + const errorMessage = `writeJsonFile: ${err}`; + logger.log(extension_1.loggingActive, errorMessage); + return; + } +} +exports.writeJsonFile = writeJsonFile; +function naturalSort(names) { + return names.sort((a, b) => a.localeCompare(b, undefined, { + numeric: true, + sensitivity: 'base', + })); +} +exports.naturalSort = naturalSort; +function commandCheck(key, jsonData) { + const commandPath = jsonData[key]; + if (!commandPath) + return false; + if (!pathExists(commandPath)) + return false; + return true; +} +exports.commandCheck = commandCheck; +function hasPathSeperators(pathStr) { + return pathStr.includes('/') || pathStr.includes('\\'); +} +exports.hasPathSeperators = hasPathSeperators; +function removeExtension(pathStr, ext) { + const extStr = addFileExtensionDot(ext); + if (pathStr.includes(extStr)) { + return pathStr.replace(extStr, ''); + } + return pathStr; +} +exports.removeExtension = removeExtension; +function getBasename(pathStr) { + if (hasPathSeperators(pathStr)) { + return path.basename(pathStr); + } + return pathStr; +} +exports.getBasename = getBasename; +//# sourceMappingURL=fileUtils.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js.map new file mode 100644 index 0000000..84b16c6 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/fileUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fileUtils.js","sourceRoot":"","sources":["../../../src/utils/fileUtils.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,+BAA+B;AAC/B,uCAAuC;AACvC,6BAA6B;AAE7B,4CAA6C;AAC7C,mCAAmC;AACnC,mCAAkD;AAElD,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAFD,gDAEC;AAED,SAAgB,cAAc,CAAC,GAAW;IACxC,IAAI;QACF,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KACxC;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,YAAY,GAAG,mBAAmB,GAAG,EAAE,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,yBAAa,EAAE,YAAY,CAAC,CAAC;KACzC;AACH,CAAC;AAPD,wCAOC;AAED,SAAgB,cAAc,CAAC,GAAW;IACxC,IAAI;QACF,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KACxC;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,YAAY,GAAG,cAAc,GAAG,EAAE,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,yBAAa,EAAE,YAAY,CAAC,CAAC;KACz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M,CAAC,EAAE;QAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KACpC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AARD,0CAQC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;KAC/B;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js new file mode 100644 index 0000000..2895545 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.log = exports.getOutputChannelLogger = exports.showOutputChannel = exports.getOutputChannel = exports.Logger = void 0; +const os = require("os"); +const vscode = require("vscode"); +let outputChannel; +let outputChannelLogger; +class Logger { + constructor(writer) { + this.writer = writer; + } + append(message) { + this.writer(message); + } + appendLine(message) { + this.writer(message + os.EOL); + } + showInformationMessage(message, items) { + this.appendLine(message); + if (!items) { + return vscode.window.showInformationMessage(message); + } + return vscode.window.showInformationMessage(message, ...items); + } + showWarningMessage(message, items) { + this.appendLine(message); + if (!items) { + return vscode.window.showWarningMessage(message); + } + return vscode.window.showWarningMessage(message, ...items); + } + showErrorMessage(message, items) { + this.appendLine(message); + if (!items) { + return vscode.window.showErrorMessage(message); + } + return vscode.window.showErrorMessage(message, ...items); + } +} +exports.Logger = Logger; +function getOutputChannel() { + if (!outputChannel) { + outputChannel = vscode.window.createOutputChannel('C/C++ Runner'); + } + return outputChannel; +} +exports.getOutputChannel = getOutputChannel; +function showOutputChannel() { + getOutputChannel().show(true); +} +exports.showOutputChannel = showOutputChannel; +function getOutputChannelLogger() { + if (!outputChannelLogger) { + outputChannelLogger = new Logger((message) => getOutputChannel().append(message)); + } + return outputChannelLogger; +} +exports.getOutputChannelLogger = getOutputChannelLogger; +function log(loggingActive, message) { + if (loggingActive) { + getOutputChannel().appendLine(message); + showOutputChannel(); + } +} +exports.log = log; +//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js.map new file mode 100644 index 0000000..14f37c5 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,iCAAiC;AAEjC,IAAI,aAA+C,CAAC;AACpD,IAAI,mBAAuC,CAAC;AAE5C,MAAa,MAAM;IAGjB,YAAY,MAAiC;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,OAAe;QAC3B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAEM,UAAU,CAAC,OAAe;QAC/B,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,sBAAsB,CAC3B,OAAe,EACf,KAAgB;QAEhB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEzB,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;SACtD;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC;IACjE,CAAC;IAEM,kBAAkB,CACvB,OAAe,EACf,KAAgB;QAEhB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEzB,IAAI,CAAC,KAAK,E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dist/src/utils/systemUtils.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/systemUtils.js new file mode 100644 index 0000000..ff10c54 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/systemUtils.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCompilerArchitecture = exports.getOperatingSystem = exports.commandExists = void 0; +const child_process_1 = require("child_process"); +const lookpath_1 = require("lookpath"); +const os_1 = require("os"); +const types_1 = require("./types"); +async function commandExists(command) { + let commandPath = await lookpath_1.lookpath(command); + if (!commandPath) { + return { f: false, p: commandPath }; + } + if (commandPath.includes('.EXE')) { + commandPath = commandPath.replace('.EXE', '.exe'); + } + return { f: true, p: commandPath }; +} +exports.commandExists = commandExists; +function getOperatingSystem() { + const platformName = os_1.platform(); + let operatingSystem; + if (platformName === 'win32') { + operatingSystem = types_1.OperatingSystems.windows; + } + else if (platformName === 'darwin') { + operatingSystem = types_1.OperatingSystems.mac; + } + else { + operatingSystem = types_1.OperatingSystems.linux; + } + return operatingSystem; +} +exports.getOperatingSystem = getOperatingSystem; +function getCompilerArchitecture(compiler) { + const command = `${compiler} -dumpmachine`; + let byteArray; + try { + byteArray = child_process_1.execSync(command); + } + catch (err) { + byteArray = Buffer.from('x64', 'utf-8'); + } + const str = String.fromCharCode(...byteArray); + let architecure = types_1.Architectures.x86; + let isCygwin = false; + if (str.includes('64')) { + architecure = types_1.Architectures.x64; + } + if (str.includes('cygwin')) { + isCygwin = true; + } + return { architecure: architecure, isCygwin: isCygwin }; +} +exports.getCompilerArchitecture = getCompilerArchitecture; +//# sourceMappingURL=systemUtils.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/systemUtils.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/systemUtils.js.map new file mode 100644 index 0000000..059db0f --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/systemUtils.js.map @@ -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ACzC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC;IAC9C,IAAI,WAAW,GAAG,qBAAa,CAAC,GAAG,CAAC;IACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACtB,WAAW,GAAG,qBAAa,CAAC,GAAG,CAAC;KACjC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC1B,QAAQ,GAAG,IAAI,CAAC;KACjB;IAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC1D,CAAC;AAvBD,0DAuBC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js new file mode 100644 index 0000000..d7b3ce5 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Tasks = exports.Builds = exports.Architectures = exports.OperatingSystems = exports.CompilerSystems = exports.Makefiles = exports.Debuggers = exports.Compilers = exports.Languages = exports.Commands = exports.Task = void 0; +const vscode = require("vscode"); +class Task extends vscode.Task { +} +exports.Task = Task; +class Commands { + constructor() { + this.foundGcc = false; + this.foundGpp = false; + this.foundClang = false; + this.foundClangpp = false; + this.foundGDB = false; + this.foundLLDB = false; + this.foundMake = false; + } +} +exports.Commands = Commands; +var Languages; +(function (Languages) { + Languages["c"] = "C"; + Languages["cpp"] = "Cpp"; +})(Languages = exports.Languages || (exports.Languages = {})); +var Compilers; +(function (Compilers) { + Compilers["gcc"] = "gcc"; + Compilers["gpp"] = "g++"; + Compilers["clang"] = "clang"; + Compilers["clangpp"] = "clang++"; +})(Compilers = exports.Compilers || (exports.Compilers = {})); +var Debuggers; +(function (Debuggers) { + Debuggers["lldb"] = "lldb"; + Debuggers["gdb"] = "gdb"; +})(Debuggers = exports.Debuggers || (exports.Debuggers = {})); +var Makefiles; +(function (Makefiles) { + Makefiles["make"] = "make"; + Makefiles["make_mingw"] = "mingw32-make"; +})(Makefiles = exports.Makefiles || (exports.Makefiles = {})); +var CompilerSystems; +(function (CompilerSystems) { + CompilerSystems["cygwin"] = "cygwin"; + CompilerSystems["mingw"] = "mingw"; + CompilerSystems["msys2"] = "msys2"; + CompilerSystems["clang"] = "clang"; +})(CompilerSystems = exports.CompilerSystems || (exports.CompilerSystems = {})); +var OperatingSystems; +(function (OperatingSystems) { + OperatingSystems["windows"] = "windows"; + OperatingSystems["linux"] = "linux"; + OperatingSystems["mac"] = "macos"; +})(OperatingSystems = exports.OperatingSystems || (exports.OperatingSystems = {})); +var Architectures; +(function (Architectures) { + Architectures["x86"] = "x86"; + Architectures["x64"] = "x64"; +})(Architectures = exports.Architectures || (exports.Architectures = {})); +var Builds; +(function (Builds) { + Builds["debug"] = "Debug"; + Builds["release"] = "Release"; +})(Builds = exports.Builds || (exports.Builds = {})); +var Tasks; +(function (Tasks) { + Tasks["build"] = "Build"; + Tasks["run"] = "Run"; + Tasks["clean"] = "Clean"; + Tasks["debug"] = "Debug"; +})(Tasks = exports.Tasks || (exports.Tasks = {})); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js.map new file mode 100644 index 0000000..48e8ad6 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAsBjC,MAAa,IAAK,SAAQ,MAAM,CAAC,IAAI;CAEpC;AAFD,oBAEC;AAED,MAAa,QAAQ;IAArB;QACE,aAAQ,GAAY,K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BAAa,QAGxB;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,6BAAmB,CAAA;AACrB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB;AAED,IAAY,KAKX;AALD,WAAY,KAAK;IACf,wBAAe,CAAA;IACf,oBAAW,CAAA;IACX,wBAAe,CAAA;IACf,wBAAe,CAAA;AACjB,CAAC,EALW,KAAK,GAAL,aAAK,KAAL,aAAK,QAKhB"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js new file mode 100644 index 0000000..ec99bc7 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js @@ -0,0 +1,117 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCourseProject = exports.isCmakeProject = exports.getActivationState = exports.getLoggingState = exports.getExperimentalExecutionState = exports.updateActivationState = exports.updateLoggingState = exports.getLaunchConfigIndex = exports.setContextValue = exports.createStatusBarItem = exports.disposeItem = void 0; +const path = require("path"); +const vscode = require("vscode"); +const extension_1 = require("../extension"); +const fileUtils_1 = require("./fileUtils"); +const STATUS_BAR_ALIGN = vscode.StatusBarAlignment.Left; +const STATUS_BAR_PRIORITY = 50; +function disposeItem(disposableItem) { + disposableItem?.dispose(); +} +exports.disposeItem = disposeItem; +function createStatusBarItem() { + return vscode.window.createStatusBarItem(STATUS_BAR_ALIGN, STATUS_BAR_PRIORITY); +} +exports.createStatusBarItem = createStatusBarItem; +function setContextValue(key, value) { + return vscode.commands.executeCommand('setContext', key, value); +} +exports.setContextValue = setContextValue; +function getLaunchConfigIndex(configJson, configName) { + let configIdx = 0; + if (configJson) { + for (const config of configJson.configurations) { + if (config.name !== configName) { + configIdx++; + } + else { + return configIdx; + } + } + } + return undefined; +} +exports.getLaunchConfigIndex = getLaunchConfigIndex; +function updateLoggingState() { + extension_1.extensionState?.update('loggingActive', vscode.workspace + .getConfiguration('C_Cpp_Runner') + .get('loggingActive', false)); +} +exports.updateLoggingState = updateLoggingState; +function updateActivationState(newState) { + extension_1.extensionState?.update('activatedExtension', newState); +} +exports.updateActivationState = updateActivationState; +function getExperimentalExecutionState() { + return vscode.workspace + .getConfiguration('C_Cpp_Runner') + .get('experimentalExecution', false); +} +exports.getExperimentalExecutionState = getExperimentalExecutionState; +function getLoggingState() { + if (extension_1.extensionState) { + const loggingActive = extension_1.extensionState.get('loggingActive'); + return loggingActive; + } + return false; +} +exports.getLoggingState = getLoggingState; +function getActivationState() { + if (extension_1.extensionState) { + return extension_1.extensionState.get('activatedExtension'); + } + return false; +} +exports.getActivationState = getActivationState; +function isCmakeProject() { + let cmakeFileFound = false; + const workspaceFodlers = vscode.workspace.workspaceFolders; + const cmakeExtensionName = 'cmake'; + const cmakeSettingName = 'sourceDirectory'; + if (workspaceFodlers) { + workspaceFodlers.forEach((folder) => { + if (!cmakeFileFound) { + const files = fileUtils_1.filesInDir(folder.uri.fsPath); + files.forEach((file) => { + if (file.toLowerCase() === 'CMakeLists.txt'.toLowerCase()) { + cmakeFileFound = true; + } + }); + const settingsPath = path.join(folder.uri.fsPath, '.vscode', 'settings.json'); + if (fileUtils_1.pathExists(settingsPath)) { + const configLocal = fileUtils_1.readJsonFile(settingsPath); + if (configLocal && + configLocal[`${cmakeExtensionName}.${cmakeSettingName}`]) { + cmakeFileFound = true; + } + } + } + }); + } + if (!cmakeFileFound) { + const config = vscode.workspace.getConfiguration(cmakeExtensionName); + const cmakeSetting = config.get(cmakeSettingName); + if (cmakeSetting && cmakeSetting !== '${workspaceFolder}') { + cmakeFileFound = true; + } + } + return cmakeFileFound; +} +exports.isCmakeProject = isCmakeProject; +function isCourseProject() { + const workspaceFodlers = vscode.workspace.workspaceFolders; + if (workspaceFodlers) { + workspaceFodlers.forEach((folder) => { + const vscodePath = path.join(folder.uri.fsPath, '.vscode'); + const makefilePath = path.join(vscodePath, 'Makefile'); + if (fileUtils_1.pathExists(makefilePath)) { + return true; + } + }); + } + return false; +} +exports.isCourseProject = isCourseProject; +//# sourceMappingURL=vscodeUtils.js.map \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js.map b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js.map new file mode 100644 index 0000000..cab64d5 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/dist/src/utils/vscodeUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vscodeUtils.js","sourceRoot":"","sources":["../../../src/utils/vscodeUtils.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,4CAA8C;AAC9C,2CAAmE;AAGnE,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACxD,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,SAAgB,WAAW,CAAC,cAA6C;IACvE,cAAc,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC;AAFD,kCAEC;AAED,SAAgB,mBAAmB;IACjC,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CACtC,gBAAgB,EAChB,mBAAmB,CACpB,CAAC;AACJ,CAAC;AALD,kDAKC;AAED,SAAgB,eAAe,CAAC,GAAW,EAAE,KAAU;IACrD,OAAO,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAClE,CAAC;AAFD,0CAEC;AAED,SAAgB,oBAAoB,CAClC,UAA6B,EAC7B,UAAkB;IAElB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,IAAI,UAAU,EAAE;QACd,KAAK,MAAM,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;YAC9C,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE;gBAC9B,SAAS,EAAE,CAAC;aACb;iBAAM;gBACL,OA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AC;YAC3D,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAEvD,IAAI,sBAAU,CAAC,YAAY,CAAC,EAAE;gBAC5B,OAAO,IAAI,CAAC;aACb;QACH,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAfD,0CAeC"} \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/extension.vsixmanifest b/src/franneck94.c-cpp-runner-4.1.2/extension.vsixmanifest new file mode 100644 index 0000000..f12dcde --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/extension.vsixmanifest @@ -0,0 +1,44 @@ + + + + + C/C++ Runner + 🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀 + keybindings,c,cpp,c++ + Programming Languages,Debuggers,Snippets + Public + + + + + + + + + + + + + + + + + + + + + extension/LICENSE.txt + extension/icon.png + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/franneck94.c-cpp-runner-4.1.2/icon.png b/src/franneck94.c-cpp-runner-4.1.2/icon.png new file mode 100644 index 0000000..7296d22 Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/icon.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/ExecuteTasks.gif b/src/franneck94.c-cpp-runner-4.1.2/media/ExecuteTasks.gif new file mode 100644 index 0000000..7d3f9de Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/ExecuteTasks.gif differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/FolderStatusBar.png b/src/franneck94.c-cpp-runner-4.1.2/media/FolderStatusBar.png new file mode 100644 index 0000000..b329a11 Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/FolderStatusBar.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/ModeStatusBar.png b/src/franneck94.c-cpp-runner-4.1.2/media/ModeStatusBar.png new file mode 100644 index 0000000..1583a0c Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/ModeStatusBar.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/Properties.png b/src/franneck94.c-cpp-runner-4.1.2/media/Properties.png new file mode 100644 index 0000000..a29f4f4 Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/Properties.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/Settings.png b/src/franneck94.c-cpp-runner-4.1.2/media/Settings.png new file mode 100644 index 0000000..3f67a6c Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/Settings.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/TaskStatusBar.png b/src/franneck94.c-cpp-runner-4.1.2/media/TaskStatusBar.png new file mode 100644 index 0000000..bd87af0 Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/TaskStatusBar.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/arguments.png b/src/franneck94.c-cpp-runner-4.1.2/media/arguments.png new file mode 100644 index 0000000..fe1633a Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/arguments.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/argumentsDebug.png b/src/franneck94.c-cpp-runner-4.1.2/media/argumentsDebug.png new file mode 100644 index 0000000..8e3ff6a Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/argumentsDebug.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths1.png b/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths1.png new file mode 100644 index 0000000..31b014d Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths1.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths2.png b/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths2.png new file mode 100644 index 0000000..cafcddc Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/excludePaths2.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/excludePattern.png b/src/franneck94.c-cpp-runner-4.1.2/media/excludePattern.png new file mode 100644 index 0000000..0fc693f Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/excludePattern.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/media/fullBar.png b/src/franneck94.c-cpp-runner-4.1.2/media/fullBar.png new file mode 100644 index 0000000..a296e7f Binary files /dev/null and b/src/franneck94.c-cpp-runner-4.1.2/media/fullBar.png differ diff --git a/src/franneck94.c-cpp-runner-4.1.2/package.json b/src/franneck94.c-cpp-runner-4.1.2/package.json new file mode 100644 index 0000000..751db68 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/package.json @@ -0,0 +1,378 @@ +{ + "name": "c-cpp-runner", + "displayName": "C/C++ Runner", + "description": "🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀", + "version": "4.1.2", + "publisher": "franneck94", + "license": "MIT", + "icon": "icon.png", + "galleryBanner": { + "color": "#9c9c9c", + "theme": "dark" + }, + "engines": { + "vscode": "^1.71.0" + }, + "categories": [ + "Programming Languages", + "Debuggers", + "Snippets" + ], + "tags": [ + "c", + "c++", + "run", + "compile", + "build", + "debug" + ], + "repository": { + "type": "git", + "url": "https://github.com/franneck94/vscode-c-cpp-runner.git" + }, + "homepage": "https://github.com/franneck94/vscode-c-cpp-runner/README.md", + "bugs": { + "url": "https://github.com/franneck94/vscode-c-cpp-runner/issues" + }, + "activationEvents": [ + "onLanguage:c", + "onLanguage:cpp", + "workspaceContains:*.h", + "workspaceContains:*.c", + "workspaceContains:*.hh", + "workspaceContains:*.cc", + "workspaceContains:*.hxx", + "workspaceContains:*.cxx", + "workspaceContains:*.hpp", + "workspaceContains:*.cpp" + ], + "main": "./dist/main", + "contributes": { + "taskDefinitions": [ + { + "type": "C_Cpp_Runner" + } + ], + "commands": [ + { + "command": "C_Cpp_Runner.folder", + "title": "Select Folder", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.mode", + "title": "Select Mode", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.build", + "title": "Build Folder", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.run", + "title": "Run Folder", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.debug", + "title": "Debug Folder", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.clean", + "title": "Clean Folder", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.folderContextMenu", + "title": "Select folder from context menu", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.resetLocalSettings", + "title": "Reset local settings", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.toggleExtensionState", + "title": "Activate/Deactivate the extension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.args", + "title": "Commandline Arguments", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.buildSingleFile", + "title": "Build Single File", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.runSingleFile", + "title": "Run Single File", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + }, + { + "command": "C_Cpp_Runner.debugSingleFile", + "title": "Debug Single File", + "when": "C_Cpp_Runner:activatedExtension", + "category": "C/C++ Runner" + } + ], + "keybindings": [ + { + "command": "C_Cpp_Runner.toggleExtensionState", + "key": "ctrl+alt+t", + "mac": "ctrl+alt+t" + }, + { + "command": "C_Cpp_Runner.folder", + "key": "ctrl+alt+f", + "mac": "ctrl+alt+f", + "when": "C_Cpp_Runner:activatedExtension" + }, + { + "command": "C_Cpp_Runner.mode", + "key": "ctrl+alt+g", + "mac": "ctrl+alt+g", + "when": "C_Cpp_Runner:activatedExtension" + }, + { + "command": "C_Cpp_Runner.buildSingleFile", + "key": "ctrl+alt+b", + "mac": "ctrl+alt+b", + "when": "C_Cpp_Runner:activatedExtension" + }, + { + "command": "C_Cpp_Runner.runSingleFile", + "key": "ctrl+alt+r", + "mac": "ctrl+alt+r", + "when": "C_Cpp_Runner:activatedExtension" + }, + { + "command": "C_Cpp_Runner.debugSingleFile", + "key": "ctrl+alt+d", + "mac": "ctrl+alt+d", + "when": "C_Cpp_Runner:activatedExtension" + }, + { + "command": "C_Cpp_Runner.args", + "key": "ctrl+alt+a", + "mac": "ctrl+alt+a", + "when": "C_Cpp_Runner:activatedExtension" + } + ], + "menus": { + "explorer/context": [ + { + "command": "C_Cpp_Runner.folderContextMenu", + "when": "explorerResourceIsFolder", + "group": "cCppRunnerGroup@1" + } + ] + }, + "configuration": { + "type": "object", + "title": "C/C++ Runner", + "properties": { + "C_Cpp_Runner.enableWarnings": { + "type": "boolean", + "default": true, + "description": "Whether to enable checking warnings or not.", + "scope": "resource" + }, + "C_Cpp_Runner.warnings": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "-Wall", + "-Wextra", + "-Wpedantic" + ], + "description": "Warnings to check by the compiler.", + "scope": "resource" + }, + "C_Cpp_Runner.warningsAsError": { + "type": "boolean", + "default": false, + "description": "Whether to treat warnings as compiler errors or not.", + "scope": "resource" + }, + "C_Cpp_Runner.cCompilerPath": { + "type": "string", + "default": "gcc", + "description": "The path to the C Compiler (either gcc or clang).", + "scope": "resource" + }, + "C_Cpp_Runner.cppCompilerPath": { + "type": "string", + "default": "g++", + "description": "The path to the C++ Compiler (either g++ or clang++).", + "scope": "resource" + }, + "C_Cpp_Runner.debuggerPath": { + "type": "string", + "default": "gdb", + "description": "The path to the debugger (either gdb or lldb).", + "scope": "resource" + }, + "C_Cpp_Runner.msvcBatchPath": { + "type": "string", + "default": "", + "description": "The path to the MSVC batch file (Needed to use the Visual Studio Compiler).", + "scope": "resource" + }, + "C_Cpp_Runner.useMsvc": { + "type": "boolean", + "default": false, + "description": "Whether to use MSVC compiler or to use GCC/LLDB instead.", + "scope": "resource" + }, + "C_Cpp_Runner.cStandard": { + "type": "string", + "enum": [ + "", + "c89", + "c99", + "c11", + "c17", + "gnu89", + "gnu99", + "gnu11", + "gnu17" + ], + "default": "", + "description": "C-Standard for the C Compiler. (If empty, compiler's default is used)", + "scope": "resource" + }, + "C_Cpp_Runner.cppStandard": { + "type": "string", + "enum": [ + "", + "c++98", + "c++03", + "c++11", + "c++14", + "c++17", + "c++20", + "c++23", + "gnu++98", + "gnu++03", + "gnu++11", + "gnu++14", + "gnu++17", + "gnu++20", + "gnu++23" + ], + "default": "", + "description": "C++ Standard for the C++ Compiler. (If empty, compiler's default is used)", + "scope": "resource" + }, + "C_Cpp_Runner.compilerArgs": { + "type": "array", + "default": [], + "items": { + "type": "string" + }, + "description": "Additional compiler arguments.", + "scope": "resource" + }, + "C_Cpp_Runner.linkerArgs": { + "type": "array", + "default": [], + "items": { + "type": "string" + }, + "description": "Additional linker arguments.", + "scope": "resource" + }, + "C_Cpp_Runner.includePaths": { + "type": "array", + "default": [], + "items": { + "type": "string" + }, + "description": "Additional include paths.", + "scope": "resource" + }, + "C_Cpp_Runner.includeSearch": { + "type": "array", + "default": [ + "*", + "**/*" + ], + "items": { + "type": "string" + }, + "description": "Include glob patterns for folder selection. (Ran before exlcude pattern)", + "scope": "resource" + }, + "C_Cpp_Runner.excludeSearch": { + "type": "array", + "default": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "items": { + "type": "string" + }, + "description": "Exclude glob patterns for folder selection. (Ran after include pattern)", + "scope": "resource" + } + } + } + }, + "scripts": { + "webpack": "webpack --mode development", + "webpack-watch": "webpack --mode development --watch", + "vscode:prepublish": "npm run webpack", + "compile": "npm run webpack", + "compile-watch": "npm run webpack-watch", + "watch": "tsc -watch -p ./" + }, + "devDependencies": { + "@types/minimatch": "^3.0.5", + "@types/node": "^14.0.27", + "@types/vscode": "^1.53.0", + "@typescript-eslint/eslint-plugin": "^4.1.1", + "@typescript-eslint/eslint-plugin-tslint": "^4.20.0", + "@typescript-eslint/parser": "^4.1.1", + "eslint": "^7.9.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsdoc": "^32.3.0", + "prettier": "^2.2.1", + "typescript": "^4.0.2", + "webpack": "^5.28.0", + "webpack-cli": "^4.6.0" + }, + "dependencies": { + "json5": "^2.2.0", + "lookpath": "^1.2.0", + "minimatch": "^3.0.4", + "ts-loader": "^8.1.0", + "vsce": "^1.87.1" + }, + "extensionDependencies": [ + "ms-vscode.cpptools", + "vadimcn.vscode-lldb" + ] +} diff --git a/src/franneck94.c-cpp-runner-4.1.2/templates/launch_template.json b/src/franneck94.c-cpp-runner-4.1.2/templates/launch_template.json new file mode 100644 index 0000000..fa10dfa --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/templates/launch_template.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "console": "externalTerminal", + "externalConsole": false, + "cwd": "${fileDirname}", + "program": "${fileDirname}/build/Debug/outDebug", + "MIMode": "", + "miDebuggerPath": "", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} diff --git a/src/franneck94.c-cpp-runner-4.1.2/templates/properties_template.json b/src/franneck94.c-cpp-runner-4.1.2/templates/properties_template.json new file mode 100644 index 0000000..89d4bc2 --- /dev/null +++ b/src/franneck94.c-cpp-runner-4.1.2/templates/properties_template.json @@ -0,0 +1,14 @@ +{ + "configurations": [ + { + "name": "", + "includePath": ["${workspaceFolder}/**"], + "compilerPath": "", + "cStandard": "", + "cppStandard": "", + "intelliSenseMode": "", + "compilerArgs": [""] + } + ], + "version": 4 +}