diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 89368735ab..422d32c697 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -8,13 +8,12 @@ - Run tests: `ctest --preset windows-ci --output-on-failure` ### Windows local development -- Use `Win-arm64-Debug-WithArtifacts` on Windows Arm64 hosts. -- Use `Win-x64-Debug-WithArtifacts` on Windows x64 hosts. -- Prefer these host-matching `WithArtifacts` presets for normal local configure, build, and test workflows instead of `windows-ci`. +- Use `Win-arm64-Debug` on Windows Arm64 hosts. +- Use `Win-x64-Debug` on Windows x64 hosts. ### Run a single test -- Run one CTest target: `ctest --preset Win-arm64-Debug-WithArtifacts -R "^vcpkg-test$" --output-on-failure` or `ctest --preset Win-x64-Debug-WithArtifacts -R "^vcpkg-test$" --output-on-failure` -- Run specific Catch2 tests directly: `.\out\build\Win-arm64-Debug-WithArtifacts\vcpkg-test.exe [tag-or-filter]` or `.\out\build\Win-x64-Debug-WithArtifacts\vcpkg-test.exe [tag-or-filter]` +- Run one CTest target: `ctest --preset Win-arm64-Debug -R "^vcpkg-test$" --output-on-failure` or `ctest --preset Win-x64-Debug -R "^vcpkg-test$" --output-on-failure` +- Run specific Catch2 tests directly: `.\out\build\Win-arm64-Debug\vcpkg-test.exe [tag-or-filter]` or `.\out\build\Win-x64-Debug\vcpkg-test.exe [tag-or-filter]` - Tags follow the source filename convention (for example `[arguments]`). - Run one e2e suite: `pwsh azure-pipelines/end-to-end-tests.ps1 -Filter ""` @@ -26,13 +25,8 @@ ### Formatting / checks - C++ format check path used in PR workflow: `pwsh .\azure-pipelines\Format-CxxCode.ps1` -- Regenerate message map: `cmake --build --preset Win-arm64-Debug-WithArtifacts --target generate-message-map -- -k0` or `cmake --build --preset Win-x64-Debug-WithArtifacts --target generate-message-map -- -k0` -- Verify message usage: `cmake --build --preset Win-arm64-Debug-WithArtifacts --target verify-messages -- -k0` or `cmake --build --preset Win-x64-Debug-WithArtifacts --target verify-messages -- -k0` - -### vcpkg-artifacts (TypeScript) checks -- Install deps: `npm --prefix .\vcpkg-artifacts ci` -- Lint: `npm --prefix .\vcpkg-artifacts run eslint` -- Unit tests: `npm --prefix .\vcpkg-artifacts test` +- Regenerate message map: `cmake --build --preset Win-arm64-Debug --target generate-message-map -- -k0` or `cmake --build --preset Win-x64-Debug --target generate-message-map -- -k0` +- Verify message usage: `cmake --build --preset Win-arm64-Debug --target verify-messages -- -k0` or `cmake --build --preset Win-x64-Debug --target verify-messages -- -k0` ## High-level architecture @@ -40,7 +34,6 @@ - Command dispatch is tiered: `basic_commands` run without `VcpkgPaths`, `paths_commands` require initialized paths, and `triplet_commands` additionally resolve default/host triplets before executing. - Core implementation lives in the `vcpkglib` object library built from `src/vcpkg/*.cpp` and `src/vcpkg/base/*.cpp`, with public headers in `include/vcpkg/**`. - Tests are built into `vcpkg-test` from `src/vcpkg-test/*.cpp` (Catch2), plus small helper executables (`reads-stdin`, `test-editor`, etc.) used by tests. -- The `vcpkg-artifacts` TypeScript code is bundled into `vcpkg-artifacts.mjs` during CMake builds only when `VCPKG_ARTIFACTS_DEVELOPMENT=ON` (enabled by CI presets). - Localization is a first-class pipeline: message declarations in `include/vcpkg/base/message-data.inc.h`, generated maps in `locales/messages.json`, and enforcement via `generate-message-map` + `verify-messages`. ## Key conventions diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9b4efc01e7..fccfb493df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,18 +24,13 @@ jobs: timeout-minutes: 120 steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24.x" - cache: 'npm' - cache-dependency-path: vcpkg-artifacts/package-lock.json - name: Enable Problem Matchers run: echo "::add-matcher::.github/workflows/matchers.json" - name: '[CI Only] Initialize CodeQL' if: inputs.codeql && matrix.preset != 'linux-arm64-ci' && matrix.preset != 'macos-ci' uses: github/codeql-action/init@v4 with: - languages: javascript-typescript, c-cpp + languages: c-cpp - name: Configure and Build if: matrix.preset != 'windows-ci' run: | @@ -56,7 +51,7 @@ jobs: - name: '[CI Only] Perform CodeQL Analysis' if: inputs.codeql && matrix.preset != 'linux-arm64-ci' && matrix.preset != 'macos-ci' uses: github/codeql-action/analyze@v4 - - name: Run vcpkg and vcpkg-artifacts unit tests + - name: Run vcpkg unit tests run: ctest --preset ${{ matrix.preset }} --output-on-failure 2>&1 - name: Get microsoft/vcpkg pinned sha into VCPKG_SHA id: vcpkg_sha @@ -83,6 +78,6 @@ jobs: shell: pwsh run: | cd out/build/${{ matrix.preset }} - ${{ github.workspace }}/azure-pipelines/end-to-end-tests.ps1 -RunArtifactsTests + ${{ github.workspace }}/azure-pipelines/end-to-end-tests.ps1 env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg-root diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ae727d95ba..21519c958e 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -19,11 +19,6 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24.x" - cache: 'npm' - cache-dependency-path: vcpkg-artifacts/package-lock.json - uses: lukka/get-cmake@v3.31.0 with: cmakeVersion: 3.22.1 # ubuntu 22.04 @@ -51,7 +46,6 @@ jobs: shell: pwsh run: | git add -u - git restore --staged vcpkg-artifacts/.npmrc git diff --cached --stat --exit-code if ($LASTEXITCODE -ne 0) { git config user.name $(git log -1 --pretty=format:'%an') diff --git a/.gitignore b/.gitignore index 72e3522942..32bf2df170 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,5 @@ CMakeLists.txt.user /build* /cmake-build-* /out -/vcpkg-artifacts/node_modules/ /vcpkg-root /work diff --git a/CMakeLists.txt b/CMakeLists.txt index 6865952203..534ae2a7a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,13 @@ option(VCPKG_BUILD_FUZZING "Build vcpkg fuzz tests" OFF) option(VCPKG_FUZZER_INSTRUMENTATION "Build vcpkg with fuzzing instrumentation. Not generally useful without VCPKG_BUILD_FUZZING turned on" OFF) option(VCPKG_EMBED_GIT_SHA "Option for to fill in the Git SHA version; off by default to avoid privacy concerns out of official builds" OFF) option(VCPKG_ADD_SOURCELINK "Option for enabling SourceLink in debug information on Windows/MSVC builds" "${VCPKG_EMBED_GIT_SHA}") -option(VCPKG_ARTIFACTS_DEVELOPMENT "Hard code path to artifacts TypeScript. Requires node.js and npm." OFF) option(VCPKG_OFFICIAL_BUILD "Option to cause immediate failure if variables required for official builds are unset." OFF) set(VCPKG_PDB_SUFFIX "" CACHE STRING "Append this string to the name of the PDB for shipping vcpkg binaries.") +if(VCPKG_ARTIFACTS_DEVELOPMENT) + message(FATAL_ERROR "vcpkg-artifacts has been removed.") +endif() + CMAKE_DEPENDENT_OPTION(VCPKG_BUILD_BENCHMARKING "Option for enabling benchmarking" OFF "BUILD_TESTING" OFF) @@ -285,118 +288,6 @@ elseif(VCPKG_OFFICIAL_BUILD) message(FATAL_ERROR "VCPKG_STANDALONE_BUNDLE_SHA is required for official builds.") endif() -if(VCPKG_ARTIFACTS_SHA) - target_compile_definitions(vcpkglib PUBLIC - "VCPKG_ARTIFACTS_SHA=${VCPKG_ARTIFACTS_SHA}" - ) -elseif(VCPKG_OFFICIAL_BUILD) - message(FATAL_ERROR "VCPKG_ARTIFACTS_SHA is required for official builds.") -endif() - -file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg-artifacts" VCPKG_ARTIFACTS_SOURCE_DIR) -if (VCPKG_ARTIFACTS_DEVELOPMENT) - # The directory constructed by this portion of the build script needs to be kept in sync with - # that created by azure-pipelines/signing.yml - - if (WIN32) - set(NPM_SUFFIX ".cmd") - else() - set(NPM_SUFFIX "") - endif() - - find_program(NODEJS "node") - find_program(NPM "npm${NPM_SUFFIX}") - if (NOT NODEJS OR NOT NPM) - message(FATAL_ERROR "node.js and npm must be installed when VCPKG_ARTIFACTS_DEVELOPMENT is set") - endif() - - add_custom_command( - OUTPUT - "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules" - COMMAND "${NPM}" ARGS "ci" "--include=dev" - WORKING_DIRECTORY - "${VCPKG_ARTIFACTS_SOURCE_DIR}" - COMMENT - "Running npm install..." - MAIN_DEPENDENCY - "${VCPKG_ARTIFACTS_SOURCE_DIR}/package-lock.json" - VERBATIM - ) - - add_custom_target(npm-restore - ALL - DEPENDS - "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules" - ) - set_target_properties(npm-restore - PROPERTIES - ADDITIONAL_CLEAN_FILES "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules" - ) - -# === Target: vcpkg-artifacts-target === -# The suffix "-target" is added to avoid a conflict in CMake with the directory named vcpkg-artifacts and the target named vcpkg-artifacts. - file(GLOB VCPKG_ARTIFACTS_ROOT_SOURCES LIST_DIRECTORIES false RELATIVE "${VCPKG_ARTIFACTS_SOURCE_DIR}" CONFIGURE_DEPENDS "${VCPKG_ARTIFACTS_SOURCE_DIR}/*.ts") - file(GLOB_RECURSE VCPKG_ARTIFACTS_NESTED_SOURCES LIST_DIRECTORIES false RELATIVE "${VCPKG_ARTIFACTS_SOURCE_DIR}" CONFIGURE_DEPENDS - "${VCPKG_ARTIFACTS_SOURCE_DIR}/amf/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/archivers/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/artifacts/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/cli/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/fs/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/installers/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/interfaces/*.ts" - # "${VCPKG_ARTIFACTS_SOURCE_DIR}/locales/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/mediaquery/*.ts" - # "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/registries/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/test/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/test-resources/*" # Note no *.ts - "${VCPKG_ARTIFACTS_SOURCE_DIR}/util/*.ts" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/yaml/*.ts" - ) - set(VCPKG_ARTIFACTS_SOURCES ${VCPKG_ARTIFACTS_ROOT_SOURCES} ${VCPKG_ARTIFACTS_NESTED_SOURCES}) - list(TRANSFORM VCPKG_ARTIFACTS_SOURCES PREPEND "${VCPKG_ARTIFACTS_SOURCE_DIR}/") - - set(VCPKG_ARTIFACTS_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/vcpkg-artifacts-build") - set(VCPKG_ARTIFACTS_BINARY "${CMAKE_CURRENT_BINARY_DIR}/vcpkg-artifacts.mjs") - add_custom_command( - OUTPUT "${VCPKG_ARTIFACTS_SOURCE_DIR}/locales/messages.json" - COMMAND "${NODEJS}" ARGS "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules/translate-strings/dist/main.js" "." "--json" - DEPENDS - ${VCPKG_ARTIFACTS_SOURCES} - "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules" - WORKING_DIRECTORY "${VCPKG_ARTIFACTS_SOURCE_DIR}" - COMMENT "Running artifacts translate-strings..." - VERBATIM - ) - - add_custom_command( - OUTPUT - ${VCPKG_ARTIFACTS_BINARY} - COMMAND - "${NODEJS}" ARGS "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules/@vercel/ncc/dist/ncc/cli.js" - build "main.ts" - --out "${VCPKG_ARTIFACTS_BUILD_DIR}" - COMMAND - "${CMAKE_COMMAND}" ARGS -E copy "${VCPKG_ARTIFACTS_BUILD_DIR}/index.js" "${VCPKG_ARTIFACTS_BINARY}" - WORKING_DIRECTORY - "${VCPKG_ARTIFACTS_SOURCE_DIR}" - DEPENDS - npm-restore - ${VCPKG_ARTIFACTS_SOURCES} - "${VCPKG_ARTIFACTS_SOURCE_DIR}/tsconfig.json" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/package.json" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/package-lock.json" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/.npmrc" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/.mocharc.json" - "${VCPKG_ARTIFACTS_SOURCE_DIR}/locales/messages.json" - COMMENT - "Building vcpkg-artifacts..." - VERBATIM - ) - - add_custom_target(vcpkg-artifacts-target ALL DEPENDS "${VCPKG_ARTIFACTS_BINARY}") -endif() - set(CPP_ATOMIC_LIBRARY "") include(CheckCXXSourceCompiles) if(NOT MSVC) @@ -464,18 +355,6 @@ if(MINGW) target_link_libraries(vcpkglib PUBLIC winhttp bcrypt version ole32 uuid) endif() -# === Target: vcpkg-ps1 === -add_custom_command( - OUTPUT - "${CMAKE_CURRENT_BINARY_DIR}/vcpkg-shell.ps1" - COMMAND - "${CMAKE_COMMAND}" ARGS -E copy "${CMAKE_CURRENT_SOURCE_DIR}/src/vcpkg-in-development.ps1" "${CMAKE_CURRENT_BINARY_DIR}/vcpkg-shell.ps1" - DEPENDS - "${CMAKE_CURRENT_SOURCE_DIR}/src/vcpkg-in-development.ps1" - VERBATIM -) -add_custom_target(vcpkg-ps1 ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/vcpkg-shell.ps1") - # === Target: vcpkg === add_executable(vcpkg ${VCPKG_SOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/src/vcpkg.manifest") @@ -494,14 +373,9 @@ endif() set_property(TARGET vcpkg PROPERTY PDB_NAME "vcpkg${VCPKG_PDB_SUFFIX}") # === Target: generate-message-map === -set(GENERATE_MESSAGE_MAP_DEPENDENCIES vcpkg) -if (VCPKG_ARTIFACTS_DEVELOPMENT) - list(APPEND GENERATE_MESSAGE_MAP_DEPENDENCIES "${VCPKG_ARTIFACTS_SOURCE_DIR}/locales/messages.json") -endif() - add_custom_target(generate-message-map - COMMAND "$" z-generate-default-message-map locales/messages.json "${VCPKG_ARTIFACTS_SOURCE_DIR}/locales/messages.json" - DEPENDS ${GENERATE_MESSAGE_MAP_DEPENDENCIES} + COMMAND "$" z-generate-default-message-map locales/messages.json + DEPENDS vcpkg WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" COMMENT "Update locales/messages.json" VERBATIM @@ -535,9 +409,6 @@ if (BUILD_TESTING) if(VCPKG_BUILD_BENCHMARKING) target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING) endif() - if(VCPKG_ARTIFACTS_DEVELOPMENT) - add_test(NAME artifacts COMMAND "${NODEJS}" "${VCPKG_ARTIFACTS_SOURCE_DIR}/node_modules/mocha/bin/mocha.js" "--import=tsx" WORKING_DIRECTORY "${VCPKG_ARTIFACTS_SOURCE_DIR}") - endif() endif() # === Target: vcpkg-fuzz-utf8-decoder === diff --git a/CMakePresets.json b/CMakePresets.json index e769fc1540..bf336ab4bd 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,8 +7,7 @@ "cacheVariables": { "VCPKG_OFFICIAL_BUILD": true, "VCPKG_BASE_VERSION": "2025-12-16", - "VCPKG_STANDALONE_BUNDLE_SHA": "23c77d1dd70bf861328a8e35203aed2db0deb9a83aa924cadaf96ffaae42e8629363184b99168e33158b819d695c748bd7cb9eb39528bd374f8b7e2ab6d4f6de", - "VCPKG_ARTIFACTS_SHA": "def65b1f4a710c0b521603a275ff6bae31ad8c5b938cd4445fb69c4d0da97c21d753c274c9b9b1cc2f8a86ba694759d4f3f4f325f88be02a5d8ad10c8f56e5df" + "VCPKG_STANDALONE_BUNDLE_SHA": "23c77d1dd70bf861328a8e35203aed2db0deb9a83aa924cadaf96ffaae42e8629363184b99168e33158b819d695c748bd7cb9eb39528bd374f8b7e2ab6d4f6de" } }, { @@ -44,6 +43,9 @@ "cacheVariables": { "VCPKG_BUILD_TLS12_DOWNLOADER": true }, + "inherits": [ + "base" + ], "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ @@ -52,13 +54,6 @@ } } }, - { - "name": "artifacts", - "hidden": true, - "cacheVariables": { - "VCPKG_ARTIFACTS_DEVELOPMENT": true - } - }, { "name": "windows-x64", "hidden": true, @@ -86,7 +81,6 @@ { "name": "Win-x64-Debug", "inherits": [ - "base", "windows-x64", "debug" ] @@ -94,7 +88,6 @@ { "name": "Win-arm64-Debug", "inherits": [ - "base", "windows-arm64", "debug" ] @@ -109,7 +102,6 @@ { "name": "Win-x64-Fuzzing", "inherits": [ - "base", "windows-x64", "release" ], @@ -117,20 +109,6 @@ "VCPKG_FUZZER_INSTRUMENTATION": true } }, - { - "name": "Win-x64-Debug-WithArtifacts", - "inherits": [ - "Win-x64-Debug", - "artifacts" - ] - }, - { - "name": "Win-arm64-Debug-WithArtifacts", - "inherits": [ - "Win-arm64-Debug", - "artifacts" - ] - }, { "name": "Win-x64-Debug-NoAnalyze", "inherits": "Win-x64-Debug", @@ -148,7 +126,6 @@ { "name": "Win-x64-Release", "inherits": [ - "base", "windows-x64", "release" ] @@ -162,7 +139,7 @@ }, { "name": "windows-ci", - "inherits": "Win-x64-Debug-WithArtifacts", + "inherits": "Win-x64-Debug", "cacheVariables": { "VCPKG_WARNINGS_AS_ERRORS": true } @@ -170,6 +147,9 @@ { "name": "linux", "hidden": true, + "inherits": [ + "base" + ], "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ @@ -178,18 +158,9 @@ } } }, - { - "name": "linux-with-artifacts", - "inherits": [ - "base", - "linux", - "artifacts" - ] - }, { "name": "linux-debug", "inherits": [ - "base", "debug", "linux" ], @@ -200,7 +171,6 @@ { "name": "linux-fuzzing", "inherits": [ - "base", "linux" ], "cacheVariables": { @@ -211,9 +181,7 @@ { "name": "linux-ci", "inherits": [ - "base", "debug", - "artifacts", "linux" ], "cacheVariables": { @@ -233,9 +201,7 @@ { "name": "linux-codespaces", "inherits": [ - "base", "debug", - "artifacts", "linux" ], "cacheVariables": { @@ -251,14 +217,15 @@ "macOS" ] } - } + }, + "inherits": [ + "base" + ] }, { "name": "macos-ci", "inherits": [ - "base", "debug", - "artifacts", "macos" ], "cacheVariables": { @@ -312,12 +279,12 @@ "configurePreset": "macos-ci" }, { - "name": "Win-x64-Debug-WithArtifacts", - "configurePreset": "Win-x64-Debug-WithArtifacts" + "name": "Win-x64-Debug", + "configurePreset": "Win-x64-Debug" }, { - "name": "Win-arm64-Debug-WithArtifacts", - "configurePreset": "Win-arm64-Debug-WithArtifacts" + "name": "Win-arm64-Debug", + "configurePreset": "Win-arm64-Debug" } ], "testPresets": [ @@ -346,12 +313,12 @@ "configurePreset": "macos-ci" }, { - "name": "Win-x64-Debug-WithArtifacts", - "configurePreset": "Win-x64-Debug-WithArtifacts" + "name": "Win-x64-Debug", + "configurePreset": "Win-x64-Debug" }, { - "name": "Win-arm64-Debug-WithArtifacts", - "configurePreset": "Win-arm64-Debug-WithArtifacts" + "name": "Win-arm64-Debug", + "configurePreset": "Win-arm64-Debug" } ] } diff --git a/NOTICE.txt b/NOTICE.txt index 3d26b1b4b5..a0cf6e00ec 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -100,869 +100,6 @@ in this Software without prior written authorization of the copyright holder. ========================================= END OF curl NOTICES, INFORMATION, AND LICENSE -The following third party software is incorporated into vcpkg-artifacts: - ---------------------------------------------------------- - -@snyk/nuget-semver 1.3.0 - Apache-2.0 -https://github.com/snyk/nuget-semver#readme - -Copyright 2016 Snyk Ltd. - -Copyright 2016 Snyk Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---------------------------------------------------------- - ---------------------------------------------------------- - -ieee754 1.2.1 - BSD-3-Clause -https://github.com/feross/ieee754#readme - -Copyright 2008 Fair Oaks Labs, Inc. -Copyright (c) 2008, Fair Oaks Labs, Inc. - -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -inherits 2.0.4 - ISC -https://github.com/isaacs/inherits#readme - -Copyright (c) Isaac Z. Schlueter - -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - - ---------------------------------------------------------- - ---------------------------------------------------------- - -lru-cache 6.0.0 - ISC -https://github.com/isaacs/node-lru-cache#readme - -Copyright (c) Isaac Z. Schlueter and Contributors - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -once 1.4.0 - ISC -https://github.com/isaacs/once#readme - -Copyright (c) Isaac Z. Schlueter and Contributors - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -semver 7.3.5 - ISC -https://github.com/npm/node-semver#readme - -Copyright Isaac Z. Schlueter -Copyright (c) Isaac Z. Schlueter and Contributors - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -wrappy 1.0.2 - ISC -https://github.com/npm/wrappy - -Copyright (c) Isaac Z. Schlueter and Contributors - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -yallist 4.0.0 - ISC -https://github.com/isaacs/yallist#readme - -Copyright (c) Isaac Z. Schlueter and Contributors - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -yaml 2.0.0-10 - ISC -https://eemeli.org/yaml/ - -Copyright (c) Microsoft Corporation. -Copyright Eemeli Aro - -Copyright Eemeli Aro - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -ansi-regex 4.1.1 - MIT -https://github.com/chalk/ansi-regex#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -ansi-regex 5.0.1 - MIT -https://github.com/chalk/ansi-regex#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -ansi-styles 4.3.0 - MIT -https://github.com/chalk/ansi-styles#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -base64-js 1.5.1 - MIT -https://github.com/beatgammit/base64-js - -Copyright (c) 2014 Jameson Little - -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -buffer 5.7.1 - MIT -https://github.com/feross/buffer - -Copyright (c) Feross Aboukhadijeh, and other contributors -Copyright (c) Feross Aboukhadijeh (http://feross.org), and other contributors - -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -chalk 4.1.2 - MIT -https://github.com/chalk/chalk#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -cli-progress 3.11.1 - MIT -https://github.com/npkgz/cli-progress - - -The MIT License (X11 License) - -Copyright (c) 2015-2022 Andi Dittrich - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -color-convert 2.0.1 - MIT -https://github.com/Qix-/color-convert#readme - -Copyright (c) 2011-2016, Heather Arthur and Josh Junon -Copyright (c) 2011-2016 Heather Arthur - -Copyright (c) 2011-2016 Heather Arthur - -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. - - - ---------------------------------------------------------- - ---------------------------------------------------------- - -color-name 1.1.4 - MIT -https://github.com/colorjs/color-name - -Copyright (c) 2015 Dmitry Ivanov - -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -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. - ---------------------------------------------------------- - ---------------------------------------------------------- - -emoji-regex 8.0.0 - MIT -https://mths.be/emoji-regex - -Copyright Mathias Bynens - -Copyright Mathias Bynens - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -end-of-stream 1.4.4 - MIT -https://github.com/mafintosh/end-of-stream - -Copyright (c) 2014 Mathias Buus - -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -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. - ---------------------------------------------------------- - ---------------------------------------------------------- - -fs-constants 1.0.0 - MIT -https://github.com/mafintosh/fs-constants - -Copyright (c) 2018 Mathias Buus - -The MIT License (MIT) - -Copyright (c) 2018 Mathias Buus - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -has-flag 4.0.0 - MIT -https://github.com/sindresorhus/has-flag#readme - -(c) Sindre Sorhus (https://sindresorhus.com) -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -is-fullwidth-code-point 3.0.0 - MIT -https://github.com/sindresorhus/is-fullwidth-code-point#readme - -(c) Sindre Sorhus (https://sindresorhus.com) -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -sed-lite 0.8.4 - MIT -https://github.com/kawanet/sed-lite#readme - - -MIT License - -Copyright (c) 2020 Yusuke Kawasaki - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -sorted-btree 1.6.0 - MIT -https://github.com/qwertie/btree-typescript#readme - -Copyright (c) 2018 David Piepgrass - -MIT License - -Copyright (c) 2018 David Piepgrass - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -string-width 4.2.3 - MIT -https://github.com/sindresorhus/string-width#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -strip-ansi 5.2.0 - MIT -https://github.com/chalk/strip-ansi#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -strip-ansi 6.0.1 - MIT -https://github.com/chalk/strip-ansi#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -supports-color 7.2.0 - MIT -https://github.com/chalk/supports-color#readme - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -through 2.3.8 - MIT -https://github.com/dominictarr/through - -Copyright (c) 2011 Dominic Tarr - -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -unbzip2-stream 1.4.3 - MIT -https://github.com/regular/unbzip2-stream#readme - -Copyright (c) 2017 by Jan Boelsche (jan@lagomorph.de) -Copyright 2011 by antimatter15 (antimatter15@gmail.com) -Copyright (c) 2011 by antimatter15 (antimatter15@gmail.com) - -Copyright (c) 2017 by Jan Boelsche (jan@lagomorph.de) - -based on bzip2.js - a small bzip2 decompression implementation -Copyright 2011 by antimatter15 (antimatter15@gmail.com) - -Based on micro-bunzip by Rob Landley (rob@landley.net). - -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. - - ---------------------------------------------------------- - ---------------------------------------------------------- - -vscode-uri 3.0.3 - MIT -https://github.com/microsoft/vscode-uri#readme - -Copyright (c) Microsoft -Copyright (c) Microsoft Corporation. -Copyright Joyent, Inc. and other Node contributors. - -The MIT License (MIT) - -Copyright (c) Microsoft - -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. - ---------------------------------------------------------- - ---------------------------------------------------------- - -xml-writer 1.7.0 - MIT -http://github.com/touv/node-xml-writer - -Copyright 2011 Nicolas Thouvenin - -Copyright 2011 Nicolas Thouvenin - -This project is free software released under the MIT/X11 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. - - --------------------------------------------------------- The following third party software is used in vcpkg's tests: diff --git a/azure-pipelines/Create-PRDiff.ps1 b/azure-pipelines/Create-PRDiff.ps1 index 0f89a08b1d..1055adfb99 100644 --- a/azure-pipelines/Create-PRDiff.ps1 +++ b/azure-pipelines/Create-PRDiff.ps1 @@ -4,7 +4,7 @@ Param( [String]$DiffFile ) -& git diff --output $DiffFile -- ':!vcpkg-artifacts/.npmrc' +& git diff --output $DiffFile if (0 -ne (Get-Item -LiteralPath $DiffFile).Length) { Write-Error 'The formatting of the files in the repo were not what we expected, or you forgot to regenerate messages files. Please access the diff from format.diff in the build artifacts, and apply the patch with `git apply`' diff --git a/azure-pipelines/arch-independent-signing.signproj b/azure-pipelines/arch-independent-signing.signproj index 981b7924d1..6d5f082fae 100644 --- a/azure-pipelines/arch-independent-signing.signproj +++ b/azure-pipelines/arch-independent-signing.signproj @@ -11,9 +11,6 @@ - - Microsoft400 - Microsoft400 diff --git a/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 b/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 index 5d9aebe4e4..51c19f4969 100644 --- a/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 +++ b/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 @@ -26,23 +26,69 @@ BeforeAll { $VcpkgPredefined = @{ CommandList = @( - 'acquire_project', 'acquire', 'activate', 'add', 'create', 'deactivate', 'depend-info', 'edit', 'env' - 'export', 'fetch', 'find', 'format-feature-baseline', 'format-manifest', 'hash', 'help', 'install', 'integrate', - 'license-report', 'list', 'new', 'owns', 'portsdiff', 'remove', 'search', 'update', 'upgrade', 'use', 'version', - 'x-add-version', 'x-check-support', 'x-init-registry', 'x-package-info', 'x-regenerate', 'x-set-installed', - 'x-test-features', 'x-update-baseline', 'x-update-registry', 'x-vsinstances' + 'add' + 'create' + 'depend-info' + 'edit' + 'env' + 'export' + 'fetch' + 'find' + 'format-feature-baseline' + 'format-manifest' + 'hash' + 'help' + 'install' + 'integrate' + 'license-report' + 'list' + 'new' + 'owns' + 'portsdiff' + 'remove' + 'search' + 'update' + 'upgrade' + 'version' + 'x-add-version' + 'x-check-support' + 'x-init-registry' + 'x-package-info' + 'x-set-installed' + 'x-test-features' + 'x-update-baseline' + 'x-vsinstances' ) CommonParameterList = @() CommandOptionList = @{ install = @( - '--allow-unsupported', '--clean-after-build', '--clean-buildtrees-after-build' - '--clean-downloads-after-build', '--clean-packages-after-build', '--dry-run', '--editable' - '--enforce-port-checks', '--head', '--keep-going', '--no-downloads', '--no-print-usage' - '--only-binarycaching', '--only-downloads', '--recurse', '--x-feature', '--x-no-default-features' - '--x-prohibit-backcompat-features', '--x-write-nuget-packages-config', '--x-xunit', '--skip-install-if-cached' + '--allow-unsupported' + '--clean-after-build' + '--clean-buildtrees-after-build' + '--clean-downloads-after-build' + '--clean-packages-after-build' + '--dry-run' + '--editable' + '--enforce-port-checks' + '--head' + '--keep-going' + '--no-downloads' + '--no-print-usage' + '--only-binarycaching' + '--only-downloads' + '--recurse' + '--x-feature' + '--x-no-default-features' + '--x-prohibit-backcompat-features' + '--x-write-nuget-packages-config' + '--x-xunit' + '--skip-install-if-cached' ) remove = @( - '--dry-run', '--outdated', '--purge', '--recurse' + '--dry-run' + '--outdated' + '--purge' + '--recurse' ) } } diff --git a/azure-pipelines/end-to-end-tests-dir/artifacts.ps1 b/azure-pipelines/end-to-end-tests-dir/artifacts.ps1 deleted file mode 100644 index 01193fcaab..0000000000 --- a/azure-pipelines/end-to-end-tests-dir/artifacts.ps1 +++ /dev/null @@ -1,253 +0,0 @@ -. "$PSScriptRoot/../end-to-end-tests-prelude.ps1" - -if (-Not $RunArtifactsTests) { - return -} - -# Testing interaction between use + activate + deactivate -# https://github.com/microsoft/vcpkg/issues/29978 - -function Reset-VcpkgConfiguration { - @{ - registries = @(@{ - 'name' = 'artifacts-test'; - 'kind' = 'artifact'; - 'location' = (Get-Item "$PSScriptRoot/../e2e-artifacts-registry").FullName; - }) - } | ConvertTo-JSON | Out-File -Encoding ascii 'vcpkg-configuration.json' | Out-Null -} - -function Test-Activation { - Param( - [Parameter(Mandatory=$true)] - [int]$Number, - [Parameter(Mandatory=$true)] - [bool]$Expected - ) - - [string]$combined = [System.Environment]::GetEnvironmentVariable('VCPKG_TEST_ARTIFACTS_PATHS') - if ($combined -eq $null) { - $combined = '' - } - - # This is technically depending on the implementation detail that the artifact name ends up in - # in the resulting path; if this is a problem in the future the test artifacts could be changed - # to install real content which would be disinguishable directly. - [bool]$combinedActivated = $combined.Contains("vcpkg.test.artifact.$($Number)") - $singleActivationName = "VCPKG_TEST_ARTIFACT_$($Number)_ACTIVATED" - $single = [System.Environment]::GetEnvironmentVariable($singleActivationName) - [bool]$singleActivated = $single -eq 'YES' - - if ($combinedActivated -ne $singleActivated) { - throw "When testing activation of vcpkg-test-artifact-$($Number), the combined variable and single variable disagreed on the activation status`n" ` - + "VCPKG_TEST_ARTIFACTS_PATHS: $combined`n" ` - + "$($singleActivationName): $single`n"; - } - - if ($Expected -And -Not $combinedActivated) { - throw "Expected vcpkg-test-artifact-$($Number) to be activated" - } elseif(-Not $Expected -And $combinedActivated) { - throw "Expected vcpkg-test-artifact-$($Number) to be deactivated" - } -} - -function Test-Activations { - Param( - [switch]$One, - [switch]$Two, - [switch]$Three - ) - - Test-Activation -Number 1 -Expected $One.ToBool() - Test-Activation -Number 2 -Expected $Two.ToBool() - Test-Activation -Number 3 -Expected $Three.ToBool() -} - -function Test-Match { - Param( - [string]$Output, - [string]$Regex - ) - - if (-Not ($Output -Match $Regex)) { - throw "Expected output: $Regex" - } -} - -function Test-NoMatch { - Param( - [string]$Output, - [string]$Regex - ) - - if ($Output -Match $Regex) { - throw "Unxpected output: $Regex" - } -} - -function Test-DeactivationWarning { - Param( - [string]$Output - ) - - Test-Match $Output 'warning: nothing is activated, no changes have been made' - Test-NoMatch $Output 'Deactivating:' - Test-Activations -} - -function Test-NoDeactivationWarning { - Param( - [string]$Output, - [string]$StackMatch - ) - - Test-NoMatch $Output 'warning: nothing is activated, no changes have been made' - Test-Match $Output "Deactivating: $StackMatch" - Test-Activations -} - -Refresh-TestRoot - -$Project = Join-Path $TestingRoot 'artifacts-project' -$ProjectRegex = [System.Text.RegularExpressions.Regex]::Escape($Project) -New-Item -Path $Project -Type Directory -Force -Push-Location $Project -try { - Run-VcpkgShell deactivate - Throw-IfFailed - Test-Activations - Run-Vcpkg new --application - Throw-IfFailed - - # deactivated-- no effects, issue warning -->deactivated - $output = Run-VcpkgShellAndCaptureOutput deactivate - Throw-IfFailed - Test-DeactivationWarning $output - - # deactivated-- activate -->activated - Reset-VcpkgConfiguration - Run-Vcpkg add artifact artifacts-test:vcpkg-test-artifact-1 - Throw-IfFailed - $output = Run-VcpkgShellAndCaptureOutput activate - Throw-IfFailed - Test-Match $output "Activating: $ProjectRegex" - Test-Activations -One - - # environment_changed-- deactivate -->deactivated - # activated -> deactivated - $output = Run-VcpkgShellAndCaptureOutput deactivate - Throw-IfFailed - Test-NoDeactivationWarning $output $ProjectRegex - - # deactivated-- use -->used - $output = Run-VcpkgShellAndCaptureOutput use artifacts-test:vcpkg-test-artifact-1 - Test-Match $output "Activating: artifacts-test:vcpkg-test-artifact-1" - Test-Activations -One - # used-- use, stacks -->used - $output = Run-VcpkgShellAndCaptureOutput use vcpkg-test-artifact-2 - # Note that we just remember what the user said, we don't try to resolve what it means - Test-Match $output "Activating: artifacts-test:vcpkg-test-artifact-1 \+ vcpkg-test-artifact-2" - Test-Activations -One -Two - - # environment_changed-- deactivate -->deactivated - # used -> deactivated - $output = Run-VcpkgShellAndCaptureOutput deactivate - Throw-IfFailed - Test-NoDeactivationWarning $output "artifacts-test:vcpkg-test-artifact-1 \+ vcpkg-test-artifact-2" - - # activated-- activate, deactivates first -->activated - $output = Run-VcpkgShellAndCaptureOutput activate - Throw-IfFailed - Test-Match $output "Activating: $ProjectRegex" - Test-Activations -One - Reset-VcpkgConfiguration - Run-Vcpkg add artifact artifacts-test:vcpkg-test-artifact-3 - Throw-IfFailed - Test-Activations -One - $output = Run-VcpkgShellAndCaptureOutput activate - Throw-IfFailed - Test-Activations -Three - Test-Match $output "Deactivating: $ProjectRegex" - Test-Match $output "Activating: $ProjectRegex" - - # activated-- use -->activate_use_stacked - $output = Run-VcpkgShellAndCaptureOutput use artifacts-test:vcpkg-test-artifact-1 - Test-Match $output "Activating: $ProjectRegex \+ artifacts-test:vcpkg-test-artifact-1" - Test-Activations -One -Three - - # activate_use_stacked-- use, stacks -->activate_use_stacked - $output = Run-VcpkgShellAndCaptureOutput use artifacts-test:vcpkg-test-artifact-2 - Test-Match $output "Activating: $ProjectRegex \+ artifacts-test:vcpkg-test-artifact-1 \+ artifacts-test:vcpkg-test-artifact-2" - Test-Activations -One -Two -Three - - # activate_use_stacked-- activate, deactivates first -->activated - $output = Run-VcpkgShellAndCaptureOutput activate - Throw-IfFailed - Test-Activations -Three - Test-Match $output "Deactivating: $ProjectRegex \+ artifacts-test:vcpkg-test-artifact-1 \+ artifacts-test:vcpkg-test-artifact-2" - Test-Match $output "Activating: $ProjectRegex" - - # environment_changed-- deactivate -->deactivated - # activated_stacked -> deactivated - $output = Run-VcpkgShellAndCaptureOutput use artifacts-test:vcpkg-test-artifact-1 - Test-Match $output "Activating: $ProjectRegex \+ artifacts-test:vcpkg-test-artifact-1" - Test-Activations -One -Three - $output = Run-VcpkgShellAndCaptureOutput deactivate - Throw-IfFailed - Test-NoDeactivationWarning $output "$ProjectRegex \+ artifacts-test:vcpkg-test-artifact-1" - - # used-- activate, deactivates first-->activated - $output = Run-VcpkgShellAndCaptureOutput use artifacts-test:vcpkg-test-artifact-1 - Test-Match $output "Activating: artifacts-test:vcpkg-test-artifact-1" - Test-Activations -One - $output = Run-VcpkgShellAndCaptureOutput activate - Throw-IfFailed - Test-Activations -Three - Test-Match $output "Deactivating: artifacts-test:vcpkg-test-artifact-1" - Test-Match $output "Activating: $ProjectRegex" - - # test "no postscript" warning: - # can't deactivate without postscript: - $output = Run-VcpkgAndCaptureOutput deactivate - Throw-IfNotFailed - Test-Match $output "no postscript file: run vcpkg-shell with the same arguments" - - $output = Run-VcpkgShellAndCaptureOutput deactivate - Throw-IfFailed - Test-NoDeactivationWarning $output $ProjectRegex - - # can't activate without the shell function: - $output = Run-VcpkgAndCaptureOutput activate - Throw-IfNotFailed - Test-Match $output "no postscript file: run vcpkg-shell with the same arguments" - Test-Activations - - # unless --json passed - $output = Run-VcpkgAndCaptureOutput activate --json (Join-Path $Project 'result.json') - Throw-IfFailed - Test-Match $output "Activating: $ProjectRegex" - Test-NoMatch $output "no postscript file: run vcpkg-shell with the same arguments" - Test-Activations # no shell activation - - # or --msbuild-props passed - $output = Run-VcpkgAndCaptureOutput activate --msbuild-props (Join-Path $Project 'result.props') - Throw-IfFailed - Test-Match $output "Activating: $ProjectRegex" - Test-NoMatch $output "no postscript file: run vcpkg-shell with the same arguments" - Test-Activations # no shell activation -} finally { - Run-Vcpkg deactivate - Pop-Location -} - -$output = Run-VcpkgAndCaptureOutput x-update-registry microsoft -Throw-IfFailed -Test-Match $output "Updating registry data from microsoft" - -$output = Run-VcpkgAndCaptureOutput x-update-registry https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip -Throw-IfFailed -Test-Match $output "Updating registry data from microsoft" - -$output = Run-VcpkgAndCaptureOutput x-update-registry https://example.com -Throw-IfNotFailed -Test-Match $output "\[https://example.com/\] could not be updated; it could be malformed\." diff --git a/azure-pipelines/end-to-end-tests-dir/bundles.ps1 b/azure-pipelines/end-to-end-tests-dir/bundles.ps1 index b62a328a79..d8de431810 100644 --- a/azure-pipelines/end-to-end-tests-dir/bundles.ps1 +++ b/azure-pipelines/end-to-end-tests-dir/bundles.ps1 @@ -13,10 +13,8 @@ if ($IsWindows) { } $OriginalVcpkgExe = $VcpkgExe -$OriginalVcpkgPs1 = $VcpkgPs1 $deployment = Join-Path $TestingRoot "deploy" $VcpkgExe = Join-Path $deployment (Get-Item $VcpkgExe).Name -$VcpkgPs1 = Join-Path $deployment (Get-Item $VcpkgPs1).Name $bundle = Join-Path $deployment "vcpkg-bundle.json" $manifestdir = Join-Path $TestingRoot "manifest" $commonArgs = @( @@ -28,7 +26,6 @@ function Refresh-Deploy { Refresh-TestRoot New-Item -ItemType Directory -Force $deployment | Out-Null Copy-Item $OriginalVcpkgExe $VcpkgExe - Copy-Item $OriginalVcpkgPs1 $VcpkgPs1 } Refresh-Deploy diff --git a/azure-pipelines/end-to-end-tests-prelude.ps1 b/azure-pipelines/end-to-end-tests-prelude.ps1 index 8acd8007a6..fb81618eea 100644 --- a/azure-pipelines/end-to-end-tests-prelude.ps1 +++ b/azure-pipelines/end-to-end-tests-prelude.ps1 @@ -187,14 +187,6 @@ function Run-VcpkgAndCaptureBoth { return $result.Replace("`r`n", "`n") } -function Run-VcpkgShell { - Param( - [Parameter(ValueFromRemainingArguments)] - [string[]]$TestArgs - ) - Run-VcpkgShellAndCaptureOutput @TestArgs | Out-Null -} - function Run-Vcpkg { Param( [Parameter(ValueFromRemainingArguments)] diff --git a/azure-pipelines/end-to-end-tests.ps1 b/azure-pipelines/end-to-end-tests.ps1 index 30f7c0414a..0ad3b4e854 100755 --- a/azure-pipelines/end-to-end-tests.ps1 +++ b/azure-pipelines/end-to-end-tests.ps1 @@ -30,9 +30,7 @@ Param( [Parameter(Mandatory = $false)] [string]$StartAt, [Parameter(Mandatory = $false)] - [string]$VcpkgExe, - [Parameter(Mandatory = $false, HelpMessage="Run artifacts tests, only usable when vcpkg was built with VCPKG_ARTIFACTS_DEVELOPMENT=ON")] - [switch]$RunArtifactsTests + [string]$VcpkgExe ) $ErrorActionPreference = "Stop" @@ -95,7 +93,6 @@ if ([string]::IsNullOrEmpty($VcpkgExe)) $VcpkgItem = Get-Item $VcpkgExe $VcpkgExe = $VcpkgItem.FullName -$VcpkgPs1 = Join-Path $VcpkgItem.Directory "vcpkg-shell.ps1" $TestScriptAssetCacheExe = Join-Path $VcpkgItem.Directory "test-script-asset-cache" $TestSuitesDir = Join-Path $PSScriptRoot "end-to-end-tests-dir" diff --git a/azure-pipelines/signing.yml b/azure-pipelines/signing.yml index 851d333c6c..ecd8233020 100644 --- a/azure-pipelines/signing.yml +++ b/azure-pipelines/signing.yml @@ -31,7 +31,7 @@ extends: displayName: 'Build and Sign vcpkg' jobs: - job: arch_independent - displayName: 'Build and Sign Arch-Independent Scripts and vcpkg-artifacts' + displayName: 'Build and Sign Arch-Independent Scripts' # The first job records VCPKG_INITIAL_BASE_VERSION as VCPKG_BASE_VERSION so that all subsequent stages agree # on the value; AzureDevOps appears to repeat evaluation of variables such that crossing UTC's day start # would make subsequent pipeline stages use a different day producing a broken build. @@ -47,10 +47,6 @@ extends: pool: name: 'VSEng-MicroBuildVSStable' templateContext: - sdl: - codeql: - language: javascript-typescript - buildIdentifier: vcpkg_ECMAScript mb: signing: enabled: true @@ -81,28 +77,8 @@ extends: pwsh: true filePath: vcpkg-init/lock-versions.ps1 arguments: '-Destination "$(Build.BinariesDirectory)" -VcpkgBaseVersion $(VCPKG_INITIAL_BASE_VERSION)' - - task: UseNode@1 - displayName: Use Node 18 or later - inputs: - version: "18.x" - - task: Npm@1 - inputs: - command: 'custom' - workingDir: 'vcpkg-artifacts' - customCommand: 'ci' - customRegistry: 'useFeed' - customFeed: '0bdbc590-a062-4c3f-b0f6-9383f67865ee/105b4584-173c-41aa-8061-612294abe099' - displayName: Restore vcpkg-artifacts Dev Dependencies - - task: ComponentGovernanceComponentDetection@0 - displayName: Detect Components - inputs: - sourceScanPath: vcpkg-artifacts - script: | mkdir "$(Build.BinariesDirectory)" - node "$(Build.SourcesDirectory)\vcpkg-artifacts\node_modules\@vercel\ncc\dist\ncc\cli.js" build "$(Build.SourcesDirectory)\vcpkg-artifacts\main.ts" --out "$(Build.BinariesDirectory)\vcpkg-artifacts-build" - move "$(Build.BinariesDirectory)\vcpkg-artifacts-build\index.js" "$(Build.BinariesDirectory)\vcpkg-artifacts.js" - displayName: 'Build vcpkg-artifacts' - - script: | mkdir "$(Build.BinariesDirectory)\scripts" xcopy /F /E "$(Build.SourcesDirectory)\scripts" "$(Build.BinariesDirectory)\scripts" displayName: Collect PowerShell Scripts for Signing @@ -124,7 +100,6 @@ extends: # Note that signing must happen before packing steps because the packs contain files that are themselves signed. - script: | copy "$(Build.BinariesDirectory)\vcpkg-init.ps1" "$(Build.BinariesDirectory)\vcpkg-init.cmd" - move "$(Build.BinariesDirectory)\vcpkg-artifacts.js" "$(Build.BinariesDirectory)\vcpkg-artifacts.mjs" displayName: 'Arrange Signed Bits' - task: Powershell@2 displayName: 'Build One-Liner vcpkg-standalone-bundle.tar.gz' @@ -143,10 +118,9 @@ extends: move "$(Build.BinariesDirectory)\scripts\addPoshVcpkgToPowershellProfile.ps1" "$(Build.ArtifactStagingDirectory)\staging\scripts\addPoshVcpkgToPowershellProfile.ps1" move "$(Build.BinariesDirectory)\scripts\posh-vcpkg.psm1" "$(Build.ArtifactStagingDirectory)\staging\scripts\posh-vcpkg.psm1" move "$(Build.BinariesDirectory)\scripts\posh-vcpkg.psd1" "$(Build.ArtifactStagingDirectory)\staging\scripts\posh-vcpkg.psd1" - move "$(Build.BinariesDirectory)\vcpkg-artifacts.mjs" "$(Build.ArtifactStagingDirectory)\staging\vcpkg-artifacts.mjs" displayName: 'Arrange Architecture-independent Files for Staging' - task: Powershell@2 - displayName: Generate Arch-independent SHA512s + displayName: Generate Arch-independent SHA512 name: shas inputs: pwsh: true @@ -154,8 +128,6 @@ extends: script: | $standaloneBundleSha = (Get-FileHash "$(Build.ArtifactStagingDirectory)\staging\vcpkg-standalone-bundle.tar.gz" -Algorithm SHA512).Hash.ToLowerInvariant() Write-Host "##vso[task.setvariable variable=VCPKG_STANDALONE_BUNDLE_SHA;isOutput=true]$standaloneBundleSha" - $vcpkgArtifactsSha = (Get-FileHash "$(Build.ArtifactStagingDirectory)\staging\vcpkg-artifacts.mjs" -Algorithm SHA512).Hash.ToLowerInvariant() - Write-Host "##vso[task.setvariable variable=VCPKG_ARTIFACTS_SHA;isOutput=true]$vcpkgArtifactsSha" - job: macos_build displayName: 'MacOS Build' dependsOn: @@ -167,7 +139,6 @@ extends: variables: VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ] VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ] - VCPKG_ARTIFACTS_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_ARTIFACTS_SHA'] ] templateContext: sdl: codeql: @@ -188,7 +159,7 @@ extends: inputs: failOnStderr: true script: | - cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" "-DVCPKG_ARTIFACTS_SHA=$VCPKG_ARTIFACTS_SHA" -B "$(Build.BinariesDirectory)/build" 2>&1 + cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" -B "$(Build.BinariesDirectory)/build" 2>&1 make -j 8 -C "$(Build.BinariesDirectory)/build" zip -j "$(Build.ArtifactStagingDirectory)/vcpkg-macos.zip" "$(Build.BinariesDirectory)/build/vcpkg" - job: glibc_build @@ -201,7 +172,6 @@ extends: variables: VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ] VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ] - VCPKG_ARTIFACTS_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_ARTIFACTS_SHA'] ] templateContext: sdl: codeql: @@ -226,7 +196,7 @@ extends: inlineScript: | az acr login --name vcpkgpmeofficialbuilders --resource-group vcpkg-tool-official-builds --subscription c0f11a1f-38f5-4908-8698-1aa5df75baf3 mkdir -p "$(Agent.TempDirectory)/build" - docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-linux-amd64:2025-07-28 sh -c "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/source/azure-pipelines/vcpkg-linux/toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_LIBCURL_URL=$(curl-tarball-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_ARTIFACTS_SHA=$(VCPKG_ARTIFACTS_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" + docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-linux-amd64:2025-07-28 sh -c "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/source/azure-pipelines/vcpkg-linux/toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_LIBCURL_URL=$(curl-tarball-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" mv "$(Agent.TempDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc" - job: muslc_build displayName: 'muslc (Alpine) Build' @@ -238,7 +208,6 @@ extends: variables: VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ] VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ] - VCPKG_ARTIFACTS_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_ARTIFACTS_SHA'] ] templateContext: sdl: codeql: @@ -263,7 +232,7 @@ extends: inlineScript: | az acr login --name vcpkgpmeofficialbuilders --resource-group vcpkg-tool-official-builds --subscription c0f11a1f-38f5-4908-8698-1aa5df75baf3 mkdir -p "$(Agent.TempDirectory)/build" - docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-alpine:3.16 sh -c "cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS=\"-s -static-libgcc -static-libstdc++\" -DVCPKG_LIBCURL_URL=$(curl-tarball-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_ARTIFACTS_SHA=$(VCPKG_ARTIFACTS_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" + docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-alpine:3.16 sh -c "cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS=\"-s -static-libgcc -static-libstdc++\" -DVCPKG_LIBCURL_URL=$(curl-tarball-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" mv "$(Agent.TempDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-muslc" - job: glibc_arm64_build displayName: 'glibc Arm64 Build' @@ -276,7 +245,6 @@ extends: variables: VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ] VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ] - VCPKG_ARTIFACTS_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_ARTIFACTS_SHA'] ] templateContext: sdl: codeql: @@ -301,7 +269,7 @@ extends: inlineScript: | az acr login --name vcpkgpmeofficialbuilders --resource-group vcpkg-tool-official-builds --subscription c0f11a1f-38f5-4908-8698-1aa5df75baf3 mkdir -p "$(Agent.TempDirectory)/build" - docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-linux-arm64:2025-07-28 sh -c "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/source/azure-pipelines/vcpkg-arm64/toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_LIBCURL_URL=$(curl-tarball-new-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_ARTIFACTS_SHA=$(VCPKG_ARTIFACTS_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" + docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgpmeofficialbuilders-c7ajd0chdtfugffn.azurecr.io/vcpkg/vcpkg-build-linux-arm64:2025-07-28 sh -c "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/source/azure-pipelines/vcpkg-arm64/toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_LIBCURL_URL=$(curl-tarball-new-url) -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build" mv "$(Agent.TempDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc-arm64" - job: windows_and_sign displayName: 'Build Windows binaries and Sign' @@ -318,7 +286,6 @@ extends: VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ] VCPKG_FULL_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_FULL_VERSION'] ] VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ] - VCPKG_ARTIFACTS_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_ARTIFACTS_SHA'] ] templateContext: sdl: codeql: @@ -383,7 +350,7 @@ extends: call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 cmake.exe --version set X_VCPKG_ASSET_SOURCES=x-script,$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\trt\TerrapinRetrievalTool.exe -b https://vcpkg.storage.devpackages.microsoft.io/artifacts/ -a true -u Environment -p {url} -s {sha512} -d {dst};x-block-origin - cmake.exe -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\tools\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-release -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" "-DVCPKG_ARTIFACTS_SHA=$(VCPKG_ARTIFACTS_SHA)" -B "$(Build.BinariesDirectory)\amd64" 2>&1 + cmake.exe -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\tools\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-release -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\amd64" 2>&1 ninja.exe -C "$(Build.BinariesDirectory)\amd64" - task: CmdLine@2 displayName: "Build vcpkg arm64 with CMake" @@ -393,7 +360,7 @@ extends: call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 cmake.exe --version set X_VCPKG_ASSET_SOURCES=x-script,$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\trt\TerrapinRetrievalTool.exe -b https://vcpkg.storage.devpackages.microsoft.io/artifacts/ -a true -u Environment -p {url} -s {sha512} -d {dst};x-block-origin - cmake.exe -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\tools\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=arm64-windows-static-release -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" "-DVCPKG_ARTIFACTS_SHA=$(VCPKG_ARTIFACTS_SHA)" -B "$(Build.BinariesDirectory)\arm64" 2>&1 + cmake.exe -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(Build.BinariesDirectory)\Microsoft.Build.Vcpkg\tools\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=arm64-windows-static-release -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\arm64" 2>&1 ninja.exe -C "$(Build.BinariesDirectory)\arm64" - task: NuGetCommand@2 displayName: 'NuGet Restore MicroBuild Signing Extension' @@ -460,7 +427,6 @@ extends: move "$(Build.ArtifactStagingDirectory)\stagingGlibcArm64\vcpkg-glibc-arm64" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-glibc-arm64" move "$(Build.ArtifactStagingDirectory)\stagingMuslc\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc" move "$(Build.ArtifactStagingDirectory)\stagingArchIndependent\vcpkg-standalone-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-standalone-bundle.tar.gz" - move "$(Build.ArtifactStagingDirectory)\stagingArchIndependent\vcpkg-artifacts.mjs" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-artifacts.mjs" move "$(Build.BinariesDirectory)\amd64\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe" copy "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\vs-insertion\staging\vcpkg.exe" diff --git a/docs/vcpkg_tool_release_process.md b/docs/vcpkg_tool_release_process.md index 88a8054895..4148b3e693 100644 --- a/docs/vcpkg_tool_release_process.md +++ b/docs/vcpkg_tool_release_process.md @@ -19,9 +19,6 @@ such as https://github.com/microsoft/vcpkg/pull/23757 localization tools which will start with `* LEGO: Pull request from juno/`. 1. Publish that draft release as "pre-release". 1. Clean up a machine for the following tests: - * Delete `VCPKG_DOWNLOADS/artifacts` (Windows) `HOME/.cache/vcpkg/downloads` (non-Windows) - (which forces artifacts to be reacquired). (This is the path calculated in `VcpkgPaths` with - `get_platform_cache_vcpkg().value_or_exit(VCPKG_LINE_INFO) / "downloads";`) * Delete `LOCALAPPDATA/vcpkg` (Windows) `HOME/.cache/vcpkg` (non-Windows) (which forces registries to be reacquired) 1. Smoke test the 'one liner' installer. Run these in an environment with VCPKG_ROOT unset; @@ -197,17 +194,3 @@ flowchart TD build_msvc\program.exe ``` and check that a reasonable zlib version is printed. -1. Back in the developer command prompt, verify that the copy of CMake can be customized by running: - ``` - vcpkg-shell use microsoft:cmake - cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" -S . -B build_artifact - ninja -C build_artifact - build_artifact\program.exe - ``` - and check that the cmake version acquired by artifacts is printed during the cmake configure, and that a reasonable zlib version is printed. -1. Close Visual Studio. -1. Back in the developer command prompt, run: - ``` - vcpkg add artifact microsoft:cmake - ``` -1. Open Visual Studio and use "Open Folder" on the directory containing the vcxproj. Verify that vcpkg activation happens in the terminal. diff --git a/include/vcpkg/base/contractual-constants.h b/include/vcpkg/base/contractual-constants.h index 8d40675b46..df4384aad7 100644 --- a/include/vcpkg/base/contractual-constants.h +++ b/include/vcpkg/base/contractual-constants.h @@ -176,12 +176,9 @@ namespace vcpkg inline constexpr StringLiteral SwitchAbiToolsUseExactVersions = "abi-tools-use-exact-versions"; inline constexpr StringLiteral SwitchAddInitialBaseline = "add-initial-baseline"; inline constexpr StringLiteral SwitchAll = "all"; - inline constexpr StringLiteral SwitchAllLanguages = "all-languages"; inline constexpr StringLiteral SwitchAllowUnexpectedPassing = "allow-unexpected-passing"; inline constexpr StringLiteral SwitchAllowUnsupported = "allow-unsupported"; inline constexpr StringLiteral SwitchApplication = "application"; - inline constexpr StringLiteral SwitchArm = "arm"; - inline constexpr StringLiteral SwitchArm64 = "arm64"; inline constexpr StringLiteral SwitchAssetSources = "asset-sources"; inline constexpr StringLiteral SwitchBaseline = "baseline"; inline constexpr StringLiteral SwitchBin = "bin"; @@ -219,9 +216,7 @@ namespace vcpkg inline constexpr StringLiteral SwitchFeatureFlags = "feature-flags"; inline constexpr StringLiteral SwitchFix = "fix"; inline constexpr StringLiteral SwitchForMergeWith = "for-merge-with"; - inline constexpr StringLiteral SwitchForce = "force"; inline constexpr StringLiteral SwitchFormat = "format"; - inline constexpr StringLiteral SwitchFreeBsd = "freebsd"; inline constexpr StringLiteral SwitchHead = "head"; inline constexpr StringLiteral SwitchHeader = "header"; inline constexpr StringLiteral SwitchHostTriplet = "host-triplet"; @@ -232,8 +227,6 @@ namespace vcpkg inline constexpr StringLiteral SwitchJson = "json"; inline constexpr StringLiteral SwitchKeepGoing = "keep-going"; inline constexpr StringLiteral SwitchKnownFailuresFrom = "known-failures-from"; - inline constexpr StringLiteral SwitchLinux = "linux"; - inline constexpr StringLiteral SwitchMSBuildProps = "msbuild-props"; inline constexpr StringLiteral SwitchManifestRoot = "manifest-root"; inline constexpr StringLiteral SwitchMaxRecurse = "max-recurse"; inline constexpr StringLiteral SwitchName = "name"; @@ -245,7 +238,6 @@ namespace vcpkg inline constexpr StringLiteral SwitchNoOutputComments = "no-output-comments"; inline constexpr StringLiteral SwitchNoPrintUsage = "no-print-usage"; inline constexpr StringLiteral SwitchNoSeparated = "no-separated"; - inline constexpr StringLiteral SwitchNormalize = "normalize"; inline constexpr StringLiteral SwitchNuGet = "nuget"; inline constexpr StringLiteral SwitchNuGetDescription = "nuget-description"; inline constexpr StringLiteral SwitchNuGetId = "nuget-id"; @@ -253,7 +245,6 @@ namespace vcpkg inline constexpr StringLiteral SwitchOnlyBinarycaching = "only-binarycaching"; inline constexpr StringLiteral SwitchOnlyDownloads = "only-downloads"; inline constexpr StringLiteral SwitchOnlyWithName = "only-with-name"; - inline constexpr StringLiteral SwitchOsx = "osx"; inline constexpr StringLiteral SwitchOutdated = "outdated"; inline constexpr StringLiteral SwitchOutput = "output"; inline constexpr StringLiteral SwitchOutputDir = "output-dir"; @@ -284,11 +275,7 @@ namespace vcpkg inline constexpr StringLiteral SwitchStore = "store"; inline constexpr StringLiteral SwitchStrip = "strip"; inline constexpr StringLiteral SwitchTLogFile = "tlog-file"; - inline constexpr StringLiteral SwitchTargetArm = "target:arm"; - inline constexpr StringLiteral SwitchTargetArm64 = "target:arm64"; inline constexpr StringLiteral SwitchTargetBinary = "target-binary"; - inline constexpr StringLiteral SwitchTargetX64 = "target:x64"; - inline constexpr StringLiteral SwitchTargetX86 = "target:x86"; inline constexpr StringLiteral SwitchToolDataFile = "tool-data-file"; inline constexpr StringLiteral SwitchTools = "tools"; inline constexpr StringLiteral SwitchTriplet = "triplet"; @@ -301,9 +288,6 @@ namespace vcpkg inline constexpr StringLiteral SwitchVersionRelaxed = "version-relaxed"; inline constexpr StringLiteral SwitchVersionString = "version-string"; inline constexpr StringLiteral SwitchWaitForLock = "wait-for-lock"; - inline constexpr StringLiteral SwitchWindows = "windows"; - inline constexpr StringLiteral SwitchX64 = "x64"; - inline constexpr StringLiteral SwitchX86 = "x86"; inline constexpr StringLiteral SwitchXAllInstalled = "x-all-installed"; inline constexpr StringLiteral SwitchXFeature = "x-feature"; inline constexpr StringLiteral SwitchXFullDesc = "x-full-desc"; diff --git a/include/vcpkg/base/message-data.inc.h b/include/vcpkg/base/message-data.inc.h index 1ff76720e5..2b1eda866a 100644 --- a/include/vcpkg/base/message-data.inc.h +++ b/include/vcpkg/base/message-data.inc.h @@ -14,8 +14,7 @@ DECLARE_MESSAGE(ADemandObject, DECLARE_MESSAGE(AString, (), "", "a string") DECLARE_MESSAGE(ASha512, (), "", "a SHA-512 hash") DECLARE_MESSAGE(ADateVersionString, (), "", "a date version string") -DECLARE_MESSAGE(AddArtifactOnlyOne, (msg::command_line), "", "'{command_line}' can only add one artifact at a time.") -DECLARE_MESSAGE(AddCommandFirstArg, (), "", "The first parameter to add must be 'artifact' or 'port'.") +DECLARE_MESSAGE(AddCommandFirstArg, (), "", "The first parameter to add must be 'port'.") DECLARE_MESSAGE(AddingCompletionEntry, (msg::path), "", "Adding vcpkg completion entry to {path}.") DECLARE_MESSAGE(AdditionalPackagesToExport, (), @@ -37,10 +36,6 @@ DECLARE_MESSAGE(AddTripletExpressionNotAllowed, "", "triplet expressions are not allowed here. You may want to change " "`{package_name}:{triplet}` to `{package_name}` instead.") -DECLARE_MESSAGE(AddVersionArtifactsOnly, - (), - "'--version', and 'vcpkg add port' are command lines that must not be localized", - "--version is artifacts only and can't be used with vcpkg add port") DECLARE_MESSAGE(AddVersionAddedVersionToFile, (msg::version, msg::path), "", "added version {version} to {path}") DECLARE_MESSAGE(AddVersionCommitChangesReminder, (), "", "Did you remember to commit your changes?") DECLARE_MESSAGE(AddVersionFormatPortSuggestion, (msg::command_line), "", "Run `{command_line}` to format the file") @@ -188,47 +183,6 @@ DECLARE_MESSAGE( (), "", "one or more ports requested to be installed were not present in the action plan. (Probably a vcpkg bug)") -DECLARE_MESSAGE(ArtifactsBootstrapFailed, (), "", "vcpkg-artifacts is not installed and could not be bootstrapped.") -DECLARE_MESSAGE(ArtifactsOptionIncompatibility, (msg::option), "", "--{option} has no effect on find artifact.") -DECLARE_MESSAGE(ArtifactsOptionJson, - (), - "", - "Full path to JSON file where environment variables and other properties are recorded") -DECLARE_MESSAGE(ArtifactsOptionMSBuildProps, - (), - "", - "Full path to the file in which MSBuild properties will be written") -DECLARE_MESSAGE(ArtifactsOptionVersion, (), "", "A version or version range to match; only valid for artifacts") -DECLARE_MESSAGE(ArtifactsOptionVersionMismatch, - (), - "--version is a command line switch and must not be localized", - "The number of --version switches must match the number of named artifacts") -DECLARE_MESSAGE(ArtifactsSwitchAllLanguages, (), "", "Acquires all language files when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchARM, (), "", "Forces host detection to ARM when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchARM64, (), "", "Forces host detection to ARM64 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchForce, (), "", "Forces reacquire if an artifact is already acquired") -DECLARE_MESSAGE(ArtifactsSwitchFreebsd, (), "", "Forces host detection to FreeBSD when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchLinux, (), "", "Forces host detection to Linux when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchTargetARM, (), "", "Sets target detection to ARM when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchTargetARM64, (), "", "Sets target detection to ARM64 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchTargetX64, (), "", "Sets target detection to x64 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchTargetX86, (), "", "Sets target to x86 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchOnlyOneOperatingSystem, - (), - "The words after -- are command line switches and must not be localized.", - "Only one operating system (--windows, --osx, --linux, --freebsd) may be set.") -DECLARE_MESSAGE(ArtifactsSwitchOnlyOneHostPlatform, - (), - "The words after -- are command line switches and must not be localized.", - "Only one host platform (--x64, --x86, --arm, --arm64) may be set.") -DECLARE_MESSAGE(ArtifactsSwitchOnlyOneTargetPlatform, - (), - "The words after -- are command line switches and must not be localized.", - "Only one target platform (--target:x64, --target:x86, --target:arm, --target:arm64) may be set.") -DECLARE_MESSAGE(ArtifactsSwitchOsx, (), "", "Forces host detection to MacOS when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchX64, (), "", "Forces host detection to x64 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchX86, (), "", "Forces host detection to x86 when acquiring artifacts") -DECLARE_MESSAGE(ArtifactsSwitchWindows, (), "", "Forces host detection to Windows when acquiring artifacts") DECLARE_MESSAGE(AssetCacheConsult, (msg::path, msg::url), "", "Trying to download {path} using asset cache {url}") DECLARE_MESSAGE(AssetCacheConsultScript, (msg::path), "", "Trying to download {path} using asset cache script") DECLARE_MESSAGE(AssetCacheHit, (), "", "Download successful! Asset cache hit.") @@ -569,15 +523,7 @@ DECLARE_MESSAGE(CMakeUsingExportedLibs, (msg::value), "{value} is a CMake command line switch of the form -DFOO=BAR", "To use exported libraries in CMake projects, add {value} to your CMake command line.") -DECLARE_MESSAGE(CmdAcquireExample1, - (), - "This is a command line, only the <>s part should be localized", - "vcpkg acquire ") -DECLARE_MESSAGE(CmdAcquireProjectSynopsis, (), "", "Acquires all artifacts referenced by a manifest") -DECLARE_MESSAGE(CmdAcquireSynopsis, (), "", "Acquires the named artifact") -DECLARE_MESSAGE(CmdActivateSynopsis, (), "", "Activates artifacts from a manifest") DECLARE_MESSAGE(CmdAddExample1, (), "", "vcpkg add port ") -DECLARE_MESSAGE(CmdAddExample2, (), "", "vcpkg add artifact ") DECLARE_MESSAGE(CmdAddSynopsis, (), "", "Adds dependency to manifest") DECLARE_MESSAGE(CmdAddVersionSynopsis, (), "", "Adds a version to the version database") DECLARE_MESSAGE(CmdAddVersionExample1, @@ -636,7 +582,6 @@ DECLARE_MESSAGE(CmdCreateExample3, (), "This is a command line, only the <>s part should be localized", "vcpkg create ") -DECLARE_MESSAGE(CmdDeactivateSynopsis, (), "", "Removes all artifact activations from the current shell") DECLARE_MESSAGE(CmdDependInfoExample1, (), "This is a command line, only the <>s part should be localized", @@ -724,11 +669,7 @@ DECLARE_MESSAGE(CmdFindExample1, (), "This is a command line, only the <>s part should be localized", "vcpkg find port ") -DECLARE_MESSAGE(CmdFindExample2, - (), - "This is a command line, only the <>s part should be localized", - "vcpkg find artifact ") -DECLARE_MESSAGE(CmdFindSynopsis, (), "", "Finds a port or artifact that may be installed or activated") +DECLARE_MESSAGE(CmdFindSynopsis, (), "", "Finds a port that may be installed") DECLARE_MESSAGE(CmdFormatFeatureBaselineSynopsis, (), "", "Formats a feature baseline file") DECLARE_MESSAGE(CmdFormatFeatureBaselineExample, (), @@ -746,19 +687,6 @@ DECLARE_MESSAGE( "", "Excludes comments when generating the message map (useful for generating the English localization file)") DECLARE_MESSAGE(CmdFormatManifestSynopsis, (), "", "Prettyfies vcpkg.json") -DECLARE_MESSAGE(CmdGenerateMSBuildPropsExample1, - (), - "This is a command line, only the part should be localized", - "vcpkg generate-msbuild-props --msbuild-props ") -DECLARE_MESSAGE(CmdGenerateMSBuildPropsExample2, - (), - "This is a command line, only the word 'out' should be localized", - "vcpkg generate-msbuild-props --msbuild-props out.props") -DECLARE_MESSAGE( - CmdGenerateMSBuildPropsSynopsis, - (), - "", - "Generates msbuild .props files as if activating a manifest's artifact dependencies, without acquiring them") DECLARE_MESSAGE(CmdHashExample1, (), "This is a command line, only the part should be localized", @@ -822,9 +750,6 @@ DECLARE_MESSAGE(CmdPortsdiffExample2, "This is a command line, only the parts in <>s should be localized", "vcpkg portsdiff ") DECLARE_MESSAGE(CmdPortsdiffSynopsis, (), "", "Diffs changes in port versions between commits") -DECLARE_MESSAGE(CmdRegenerateOptDryRun, (), "", "Does not actually perform the action, shows only what would be done") -DECLARE_MESSAGE(CmdRegenerateOptForce, (), "", "Proceeds with the (potentially dangerous) action without confirmation") -DECLARE_MESSAGE(CmdRegenerateOptNormalize, (), "", "Applies any deprecation fixes") DECLARE_MESSAGE(CmdRemoveExample1, (), "This is a command line, only the part should be localized.", @@ -878,27 +803,8 @@ DECLARE_MESSAGE(CmdUpdateBaselineSynopsis, (), "", "Updates baselines of git registries in a manifest to those registries' HEAD commit") -DECLARE_MESSAGE(CmdUpdateRegistryAll, (), "", "Updates all known artifact registries") -DECLARE_MESSAGE(CmdUpdateRegistryAllExcludesTargets, - (), - "", - "Update registry --all cannot be used with a list of artifact registries") -DECLARE_MESSAGE(CmdUpdateRegistryExample3, - (), - "This is a command line, only the part should be localized.", - "vcpkg x-update-registry ") -DECLARE_MESSAGE(CmdUpdateRegistrySynopsis, (), "", "Re-downloads an artifact registry") -DECLARE_MESSAGE(CmdUpdateRegistryAllOrTargets, - (), - "", - "Update registry requires either a list of artifact registry names or URiIs to update, or --all.") DECLARE_MESSAGE(CmdUpgradeOptNoDryRun, (), "", "Actually upgrade") DECLARE_MESSAGE(CmdUpgradeOptNoKeepGoing, (), "", "Stop installing packages on failure") -DECLARE_MESSAGE(CmdUseExample1, - (), - "This is a command line, only the part should be localized.", - "vcpkg use ") -DECLARE_MESSAGE(CmdUseSynopsis, (), "", "Activate a single artifact in this shell") DECLARE_MESSAGE(CmdVSInstancesSynopsis, (), "", "Lists detected Visual Studio instances") DECLARE_MESSAGE(CmdXDownloadOptHeader, (), "", "Additional header to use when fetching from URLs") DECLARE_MESSAGE(CmdXDownloadOptSha, (), "", "The hash of the file to be downloaded") @@ -1398,10 +1304,6 @@ DECLARE_MESSAGE(FilesContainAbsolutePathPkgconfigNote, (), "", "Adding a call to `vcpkg_fixup_pkgconfig()` may fix absolute paths in .pc files") -DECLARE_MESSAGE(FindVersionArtifactsOnly, - (), - "'--version', 'vcpkg search', and 'vcpkg find port' are command lines that must not be localized", - "--version can't be used with vcpkg search or vcpkg find port") DECLARE_MESSAGE(FieldKindDidNotHaveExpectedValue, (msg::expected, msg::actual), "{expected} is a list of literal kinds the user must type, separated by commas, {actual} is what " @@ -1424,8 +1326,8 @@ DECLARE_MESSAGE(FileSeekFailed, DECLARE_MESSAGE(FilesExported, (msg::path), "", "Files exported at: {path}") DECLARE_MESSAGE(FindCommandFirstArg, (), - "'find', 'artifact', and 'port' are vcpkg specific terms and should not be translated.", - "The first argument to 'find' must be 'artifact' or 'port' .") + "'find' and 'port' are vcpkg specific terms and should not be translated.", + "The first argument to 'find' must be 'port' .") DECLARE_MESSAGE(FishCompletion, (msg::path), "", "vcpkg fish completion is already added at \"{path}\".") DECLARE_MESSAGE(FixedEntriesInFile, (msg::count, msg::path), "", "Fixed {count} entries in {path}.") DECLARE_MESSAGE(FloatingPointConstTooBig, (msg::count), "", "Floating point constant too big: {count}") @@ -2689,7 +2591,6 @@ DECLARE_MESSAGE(ProvideExportType, "", "At least one of the following options are required: --raw --nuget --zip --7zip.") DECLARE_MESSAGE(RegistryCreated, (msg::path), "", "Successfully created registry at {path}") -DECLARE_MESSAGE(RegeneratesArtifactRegistry, (), "", "Regenerates an artifact registry") DECLARE_MESSAGE(RegistryValueWrongType, (msg::path), "", "The registry value {path} was an unexpected type.") DECLARE_MESSAGE(RemoveDependencies, (), @@ -3149,10 +3050,10 @@ DECLARE_MESSAGE(UserWideIntegrationDeleted, (), "", "User-wide integration is no DECLARE_MESSAGE(UserWideIntegrationRemoved, (), "", "User-wide integration was removed.") DECLARE_MESSAGE(UsingManifestAt, (msg::path), "", "Using manifest file at {path}.") DECLARE_MESSAGE(Utf8ConversionFailed, (), "", "Failed to convert to UTF-8") -DECLARE_MESSAGE(VcpkgCeIsExperimental, +DECLARE_MESSAGE(VcpkgArtifactsHasBeenRemoved, (), - "The name of the feature is 'vcpkg-artifacts' and should be singular despite ending in s", - "vcpkg artifacts will be removed shortly after July 1, 2026.") + "The name of the feature is 'vcpkg artifacts' and should be singular despite ending in s", + "vcpkg artifacts has been removed") DECLARE_MESSAGE( VcpkgCompletion, (msg::value, msg::path), diff --git a/include/vcpkg/commands.acquire-project.h b/include/vcpkg/commands.acquire-project.h deleted file mode 100644 index f048c2868e..0000000000 --- a/include/vcpkg/commands.acquire-project.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandAcquireProjectMetadata; - void command_acquire_project_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.acquire.h b/include/vcpkg/commands.acquire.h deleted file mode 100644 index 7ff7f9907d..0000000000 --- a/include/vcpkg/commands.acquire.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandAcquireMetadata; - void command_acquire_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.activate.h b/include/vcpkg/commands.activate.h deleted file mode 100644 index b6c0d41260..0000000000 --- a/include/vcpkg/commands.activate.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandActivateMetadata; - void command_activate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.deactivate.h b/include/vcpkg/commands.deactivate.h deleted file mode 100644 index 7b71dffbfe..0000000000 --- a/include/vcpkg/commands.deactivate.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandDeactivateMetadata; - void command_deactivate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.generate-msbuild-props.h b/include/vcpkg/commands.generate-msbuild-props.h deleted file mode 100644 index 9ddcad38b3..0000000000 --- a/include/vcpkg/commands.generate-msbuild-props.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandGenerateMsbuildPropsMetadata; - void command_generate_msbuild_props_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.h b/include/vcpkg/commands.h index 15673d0c55..3f30cfba6c 100644 --- a/include/vcpkg/commands.h +++ b/include/vcpkg/commands.h @@ -26,6 +26,7 @@ namespace vcpkg T function; }; + extern const View removed_artifacts_commands; extern const View> basic_commands; extern const View> paths_commands; extern const View> triplet_commands; diff --git a/include/vcpkg/commands.regenerate.h b/include/vcpkg/commands.regenerate.h deleted file mode 100644 index 48acfe156f..0000000000 --- a/include/vcpkg/commands.regenerate.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandRegenerateMetadata; - void command_regenerate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.update-registry.h b/include/vcpkg/commands.update-registry.h deleted file mode 100644 index 9f41872888..0000000000 --- a/include/vcpkg/commands.update-registry.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandUpdateRegistryMetadata; - void command_update_registry_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.use.h b/include/vcpkg/commands.use.h deleted file mode 100644 index f3ee828bbe..0000000000 --- a/include/vcpkg/commands.use.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandUseMetadata; - void command_use_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/commands.z-ce.h b/include/vcpkg/commands.z-ce.h deleted file mode 100644 index ce0e2b5edf..0000000000 --- a/include/vcpkg/commands.z-ce.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - extern const CommandMetadata CommandZCEMetadata; - void command_z_ce_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} diff --git a/include/vcpkg/configure-environment.h b/include/vcpkg/configure-environment.h deleted file mode 100644 index 6259b83cb3..0000000000 --- a/include/vcpkg/configure-environment.h +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include - -namespace vcpkg -{ - Optional provision_node_component(DiagnosticContext& context, - Path exe_path, - const AssetCachingSettings& asset_cache_settings, - const Filesystem& fs, - const Path& download_root, - StringLiteral script_name, - const Optional& script_sha512); - - int run_configure_environment_command(const VcpkgPaths& paths, View args); - - constexpr CommandSwitch CommonAcquireArtifactSwitches[] = { - {SwitchWindows, msgArtifactsSwitchWindows}, - {SwitchOsx, msgArtifactsSwitchOsx}, - {SwitchLinux, msgArtifactsSwitchLinux}, - {SwitchFreeBsd, msgArtifactsSwitchFreebsd}, - {SwitchX86, msgArtifactsSwitchX86}, - {SwitchX64, msgArtifactsSwitchX64}, - {SwitchArm, msgArtifactsSwitchARM}, - {SwitchArm64, msgArtifactsSwitchARM64}, - {SwitchTargetX86, msgArtifactsSwitchTargetX86}, - {SwitchTargetX64, msgArtifactsSwitchTargetX64}, - {SwitchTargetArm, msgArtifactsSwitchTargetARM}, - {SwitchTargetArm64, msgArtifactsSwitchTargetARM64}, - {SwitchForce, msgArtifactsSwitchForce}, - {SwitchAllLanguages, msgArtifactsSwitchAllLanguages}, - }; - - constexpr CommandSetting CommonSelectArtifactVersionSettings[] = { - {SwitchVersion, msgArtifactsOptionVersion}, - }; - - // Copies the switches and settings, but not multisettings from parsed to appended_to, and checks that the switches - // that apply to artifacts meet semantic rules like only one operating system being selected. - void forward_common_artifacts_arguments(std::vector& appended_to, const ParsedArguments& parsed); -} diff --git a/include/vcpkg/metrics.h b/include/vcpkg/metrics.h index e81ea0c95b..d9cc0638a7 100644 --- a/include/vcpkg/metrics.h +++ b/include/vcpkg/metrics.h @@ -55,8 +55,6 @@ namespace vcpkg enum class StringMetric { - AcquiredArtifacts, - ActivatedArtifacts, CiOwnerId, CiProjectId, CommandArgs, diff --git a/locales/messages.json b/locales/messages.json index b2db8c8c8f..8d95dced64 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -52,9 +52,7 @@ "AVersionDatabaseEntry": "a version database entry", "AVersionObject": "a version object", "AVersionOfAnyType": "a version of any type", - "AddArtifactOnlyOne": "'{command_line}' can only add one artifact at a time.", - "_AddArtifactOnlyOne.comment": "An example of {command_line} is vcpkg install zlib.", - "AddCommandFirstArg": "The first parameter to add must be 'artifact' or 'port'.", + "AddCommandFirstArg": "The first parameter to add must be 'port'.", "AddPortRequiresManifest": "'{command_line}' requires an active manifest file.", "_AddPortRequiresManifest.comment": "An example of {command_line} is vcpkg install zlib.", "AddPortSucceeded": "Succeeded in adding ports to vcpkg.json file.", @@ -63,8 +61,6 @@ "_AddTripletExpressionNotAllowed.comment": "An example of {package_name} is zlib. An example of {triplet} is x64-windows.", "AddVersionAddedVersionToFile": "added version {version} to {path}", "_AddVersionAddedVersionToFile.comment": "An example of {version} is 1.3.8. An example of {path} is /foo/bar.", - "AddVersionArtifactsOnly": "--version is artifacts only and can't be used with vcpkg add port", - "_AddVersionArtifactsOnly.comment": "'--version', and 'vcpkg add port' are command lines that must not be localized", "AddVersionCommitChangesReminder": "Did you remember to commit your changes?", "AddVersionFormatPortSuggestion": "Run `{command_line}` to format the file", "_AddVersionFormatPortSuggestion.comment": "An example of {command_line} is vcpkg install zlib.", @@ -143,34 +139,6 @@ "ArchiveHere": "the archive is here", "ArchiverFailedToExtractExitCode": "failed to extract with exit code {exit_code}", "_ArchiverFailedToExtractExitCode.comment": "An example of {exit_code} is 127.", - "ArtifactsBootstrapFailed": "vcpkg-artifacts is not installed and could not be bootstrapped.", - "ArtifactsOptionIncompatibility": "--{option} has no effect on find artifact.", - "_ArtifactsOptionIncompatibility.comment": "An example of {option} is editable.", - "ArtifactsOptionJson": "Full path to JSON file where environment variables and other properties are recorded", - "ArtifactsOptionMSBuildProps": "Full path to the file in which MSBuild properties will be written", - "ArtifactsOptionVersion": "A version or version range to match; only valid for artifacts", - "ArtifactsOptionVersionMismatch": "The number of --version switches must match the number of named artifacts", - "_ArtifactsOptionVersionMismatch.comment": "--version is a command line switch and must not be localized", - "ArtifactsSwitchARM": "Forces host detection to ARM when acquiring artifacts", - "ArtifactsSwitchARM64": "Forces host detection to ARM64 when acquiring artifacts", - "ArtifactsSwitchAllLanguages": "Acquires all language files when acquiring artifacts", - "ArtifactsSwitchForce": "Forces reacquire if an artifact is already acquired", - "ArtifactsSwitchFreebsd": "Forces host detection to FreeBSD when acquiring artifacts", - "ArtifactsSwitchLinux": "Forces host detection to Linux when acquiring artifacts", - "ArtifactsSwitchOnlyOneHostPlatform": "Only one host platform (--x64, --x86, --arm, --arm64) may be set.", - "_ArtifactsSwitchOnlyOneHostPlatform.comment": "The words after -- are command line switches and must not be localized.", - "ArtifactsSwitchOnlyOneOperatingSystem": "Only one operating system (--windows, --osx, --linux, --freebsd) may be set.", - "_ArtifactsSwitchOnlyOneOperatingSystem.comment": "The words after -- are command line switches and must not be localized.", - "ArtifactsSwitchOnlyOneTargetPlatform": "Only one target platform (--target:x64, --target:x86, --target:arm, --target:arm64) may be set.", - "_ArtifactsSwitchOnlyOneTargetPlatform.comment": "The words after -- are command line switches and must not be localized.", - "ArtifactsSwitchOsx": "Forces host detection to MacOS when acquiring artifacts", - "ArtifactsSwitchTargetARM": "Sets target detection to ARM when acquiring artifacts", - "ArtifactsSwitchTargetARM64": "Sets target detection to ARM64 when acquiring artifacts", - "ArtifactsSwitchTargetX64": "Sets target detection to x64 when acquiring artifacts", - "ArtifactsSwitchTargetX86": "Sets target to x86 when acquiring artifacts", - "ArtifactsSwitchWindows": "Forces host detection to Windows when acquiring artifacts", - "ArtifactsSwitchX64": "Forces host detection to x64 when acquiring artifacts", - "ArtifactsSwitchX86": "Forces host detection to x86 when acquiring artifacts", "AssetCacheConsult": "Trying to download {path} using asset cache {url}", "_AssetCacheConsult.comment": "An example of {path} is /foo/bar. An example of {url} is https://github.com/microsoft/vcpkg.", "AssetCacheConsultScript": "Trying to download {path} using asset cache script", @@ -326,13 +294,7 @@ "_ClearingContents.comment": "An example of {path} is /foo/bar.", "CmakeTargetsExcluded": "{count} additional targets are not displayed.", "_CmakeTargetsExcluded.comment": "An example of {count} is 42.", - "CmdAcquireExample1": "vcpkg acquire ", - "_CmdAcquireExample1.comment": "This is a command line, only the <>s part should be localized", - "CmdAcquireProjectSynopsis": "Acquires all artifacts referenced by a manifest", - "CmdAcquireSynopsis": "Acquires the named artifact", - "CmdActivateSynopsis": "Activates artifacts from a manifest", "CmdAddExample1": "vcpkg add port ", - "CmdAddExample2": "vcpkg add artifact ", "CmdAddSynopsis": "Adds dependency to manifest", "CmdAddVersionExample1": "vcpkg x-add-version ", "_CmdAddVersionExample1.comment": "This is a command line, only the <>s part should be localized", @@ -368,7 +330,6 @@ "_CmdCreateExample2.comment": "This is a command line, 'my-fancy-port' and 'sources.zip' should probably be localized", "CmdCreateExample3": "vcpkg create ", "_CmdCreateExample3.comment": "This is a command line, only the <>s part should be localized", - "CmdDeactivateSynopsis": "Removes all artifact activations from the current shell", "CmdDependInfoExample1": "vcpkg depend-info ", "_CmdDependInfoExample1.comment": "This is a command line, only the <>s part should be localized", "CmdDependInfoFormatConflict": "Conflicting formats specified. Only one of --format, --dgml, or --dot are accepted.", @@ -415,9 +376,7 @@ "CmdFetchSynopsis": "Fetches something from the system or the internet", "CmdFindExample1": "vcpkg find port ", "_CmdFindExample1.comment": "This is a command line, only the <>s part should be localized", - "CmdFindExample2": "vcpkg find artifact ", - "_CmdFindExample2.comment": "This is a command line, only the <>s part should be localized", - "CmdFindSynopsis": "Finds a port or artifact that may be installed or activated", + "CmdFindSynopsis": "Finds a port that may be installed", "CmdFormatFeatureBaselineExample": "vcpkg format-feature-baseline ", "_CmdFormatFeatureBaselineExample.comment": "This is a command line, only the s part should be localized", "CmdFormatFeatureBaselineSynopsis": "Formats a feature baseline file", @@ -426,11 +385,6 @@ "CmdFormatManifestOptAll": "Formats all ports' manifest files", "CmdFormatManifestOptConvertControl": "Converts CONTROL files to manifest files", "CmdFormatManifestSynopsis": "Prettyfies vcpkg.json", - "CmdGenerateMSBuildPropsExample1": "vcpkg generate-msbuild-props --msbuild-props ", - "_CmdGenerateMSBuildPropsExample1.comment": "This is a command line, only the part should be localized", - "CmdGenerateMSBuildPropsExample2": "vcpkg generate-msbuild-props --msbuild-props out.props", - "_CmdGenerateMSBuildPropsExample2.comment": "This is a command line, only the word 'out' should be localized", - "CmdGenerateMSBuildPropsSynopsis": "Generates msbuild .props files as if activating a manifest's artifact dependencies, without acquiring them", "CmdGenerateMessageMapOptNoOutputComments": "Excludes comments when generating the message map (useful for generating the English localization file)", "CmdHashExample1": "vcpkg hash ", "_CmdHashExample1.comment": "This is a command line, only the part should be localized", @@ -474,9 +428,6 @@ "CmdPortsdiffExample2": "vcpkg portsdiff ", "_CmdPortsdiffExample2.comment": "This is a command line, only the parts in <>s should be localized", "CmdPortsdiffSynopsis": "Diffs changes in port versions between commits", - "CmdRegenerateOptDryRun": "Does not actually perform the action, shows only what would be done", - "CmdRegenerateOptForce": "Proceeds with the (potentially dangerous) action without confirmation", - "CmdRegenerateOptNormalize": "Applies any deprecation fixes", "CmdRemoveExample1": "vcpkg remove ...", "_CmdRemoveExample1.comment": "This is a command line, only the part should be localized.", "CmdRemoveOptDryRun": "Prints the packages to be removed, but does not remove them", @@ -505,17 +456,8 @@ "CmdUpdateBaselineOptDryRun": "Prints out plan without execution", "CmdUpdateBaselineOptInitial": "Adds a `builtin-baseline` to a vcpkg.json that doesn't already have it", "CmdUpdateBaselineSynopsis": "Updates baselines of git registries in a manifest to those registries' HEAD commit", - "CmdUpdateRegistryAll": "Updates all known artifact registries", - "CmdUpdateRegistryAllExcludesTargets": "Update registry --all cannot be used with a list of artifact registries", - "CmdUpdateRegistryAllOrTargets": "Update registry requires either a list of artifact registry names or URiIs to update, or --all.", - "CmdUpdateRegistryExample3": "vcpkg x-update-registry ", - "_CmdUpdateRegistryExample3.comment": "This is a command line, only the part should be localized.", - "CmdUpdateRegistrySynopsis": "Re-downloads an artifact registry", "CmdUpgradeOptNoDryRun": "Actually upgrade", "CmdUpgradeOptNoKeepGoing": "Stop installing packages on failure", - "CmdUseExample1": "vcpkg use ", - "_CmdUseExample1.comment": "This is a command line, only the part should be localized.", - "CmdUseSynopsis": "Activate a single artifact in this shell", "CmdVSInstancesSynopsis": "Lists detected Visual Studio instances", "CmdXDownloadOptHeader": "Additional header to use when fetching from URLs", "CmdXDownloadOptSha": "The hash of the file to be downloaded", @@ -842,10 +784,8 @@ "_FilesExported.comment": "An example of {path} is /foo/bar.", "FilesRelativeToTheBuildDirectoryHere": "the files are relative to the build directory here", "FilesRelativeToThePackageDirectoryHere": "the files are relative to ${{CURRENT_PACKAGES_DIR}} here", - "FindCommandFirstArg": "The first argument to 'find' must be 'artifact' or 'port' .", - "_FindCommandFirstArg.comment": "'find', 'artifact', and 'port' are vcpkg specific terms and should not be translated.", - "FindVersionArtifactsOnly": "--version can't be used with vcpkg search or vcpkg find port", - "_FindVersionArtifactsOnly.comment": "'--version', 'vcpkg search', and 'vcpkg find port' are command lines that must not be localized", + "FindCommandFirstArg": "The first argument to 'find' must be 'port' .", + "_FindCommandFirstArg.comment": "'find' and 'port' are vcpkg specific terms and should not be translated.", "FishCompletion": "vcpkg fish completion is already added at \"{path}\".", "_FishCompletion.comment": "An example of {path} is /foo/bar.", "FixedEntriesInFile": "Fixed {count} entries in {path}.", @@ -1390,7 +1330,6 @@ "ProgramReturnedNonzeroExitCode": "{tool_name} failed with exit code: ({exit_code}).", "_ProgramReturnedNonzeroExitCode.comment": "The program's console output is appended after this. An example of {tool_name} is signtool. An example of {exit_code} is 127.", "ProvideExportType": "At least one of the following options are required: --raw --nuget --zip --7zip.", - "RegeneratesArtifactRegistry": "Regenerates an artifact registry", "RegistryCreated": "Successfully created registry at {path}", "_RegistryCreated.comment": "An example of {path} is /foo/bar.", "RegistryValueWrongType": "The registry value {path} was an unexpected type.", @@ -1639,8 +1578,8 @@ "VSExaminedInstances": "The following Visual Studio instances were considered:", "VSExaminedPaths": "The following paths were examined for Visual Studio instances:", "VSNoInstances": "Could not locate a complete Visual Studio instance", - "VcpkgCeIsExperimental": "vcpkg artifacts will be removed shortly after July 1, 2026.", - "_VcpkgCeIsExperimental.comment": "The name of the feature is 'vcpkg-artifacts' and should be singular despite ending in s", + "VcpkgArtifactsHasBeenRemoved": "vcpkg artifacts has been removed", + "_VcpkgArtifactsHasBeenRemoved.comment": "The name of the feature is 'vcpkg artifacts' and should be singular despite ending in s", "VcpkgCompletion": "vcpkg {value} completion is already imported to your \"{path}\" file.\nThe following entries were found:", "_VcpkgCompletion.comment": "'{value}' is the subject for completion. i.e. bash, zsh, etc. An example of {path} is /foo/bar.", "VcpkgDisallowedClassicMode": "Could not locate a manifest (vcpkg.json) above the current working directory.\nThis vcpkg distribution does not have a classic mode instance.", @@ -1772,238 +1711,5 @@ "_WindowsEnvMustAlwaysBePresent.comment": "An example of {env_var} is VCPKG_DEFAULT_TRIPLET.", "WindowsOnlyCommand": "This command only supports Windows.", "WroteNuGetPkgConfInfo": "Wrote NuGet package config information to {path}", - "_WroteNuGetPkgConfInfo.comment": "An example of {path} is /foo/bar.", - "FatalTheRootFolder$CannotBeCreated": "Fatal: The root folder '${p0}' cannot be created", - "_FatalTheRootFolder$CannotBeCreated.comment": "\n'${p0}' (aka 'this.homeFolder.fsPath') is a parameter of type 'string'\n", - "FatalTheGlobalConfigurationFile$CannotBeCreated": "Fatal: The global configuration file '${p0}' cannot be created", - "_FatalTheGlobalConfigurationFile$CannotBeCreated.comment": "\n'${p0}' (aka 'this.globalConfig.fsPath') is a parameter of type 'string'\n", - "VCPKGCOMMANDWasNotSet": "VCPKG_COMMAND was not set", - "RunningVcpkgInternallyReturnedANonzeroExitCode$": "Running vcpkg internally returned a nonzero exit code: ${p0}", - "_RunningVcpkgInternallyReturnedANonzeroExitCode$.comment": "\n'${p0}' is a parameter of type 'number'\n", - "failedToDownloadFrom$": "failed to download from ${p0}", - "_failedToDownloadFrom$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "failedToDownload$FromAnySource": "failed to download ${p0} from any source", - "_failedToDownload$FromAnySource.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ErrorParsingConditionalDemand$$": "Error parsing conditional demand '${p0}'- ${p1}", - "_ErrorParsingConditionalDemand$$.comment": "\n'${p0}' is a parameter of type 'any'\n\n'${p1}' (aka 'query.error?.message') is a parameter of type 'string'\n", - "MissingIdentity$": "Missing identity '${p0}'", - "_MissingIdentity$.comment": "\n'${p0}' (aka ''info.id'') is a parameter of type 'string'\n", - "infoidShouldBeOfTypestringFound$": "info.id should be of type 'string', found '${p0}'", - "_infoidShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "MissingVersion$": "Missing version '${p0}'", - "_MissingVersion$.comment": "\n'${p0}' (aka ''info.version'') is a parameter of type 'string'\n", - "infoversionShouldBeOfTypestringFound$": "info.version should be of type 'string', found '${p0}'", - "_infoversionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infosummaryShouldBeOfTypestringFound$": "info.summary should be of type 'string', found '${p0}'", - "_infosummaryShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infodescriptionShouldBeOfTypestringFound$": "info.description should be of type 'string', found '${p0}'", - "_infodescriptionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infooptionsShouldBeASequenceFound$": "info.options should be a sequence, found '${p0}'", - "_infooptionsShouldBeASequenceFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TheInfoBlockIsDeprecatedForConsistencyWithVcpkgjsonMoveInfoMembersToTheOutside": "The info block is deprecated for consistency with vcpkg.json; move info members to the outside.", - "idShouldBeOfTypestringFound$": "id should be of type 'string', found '${p0}'", - "_idShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "versionShouldBeOfTypestringFound$": "version should be of type 'string', found '${p0}'", - "_versionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "summaryShouldBeOfTypestringFound$": "summary should be of type 'string', found '${p0}'", - "_summaryShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "descriptionShouldBeOfTypestringFound$": "description should be of type 'string', found '${p0}'", - "_descriptionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "optionsShouldBeASequenceFound$": "options should be a sequence, found '${p0}'", - "_optionsShouldBeASequenceFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateKeysDetectedInManifest$": "Duplicate keys detected in manifest: '${p0}'", - "_DuplicateKeysDetectedInManifest$.comment": "\n'${p0}' is a parameter of type 'any'\n", - "noPostscriptFileRunVcpkgshellWithTheSameArguments": "no postscript file: run vcpkg-shell with the same arguments", - "DuplicateDefine$DuringActivationNewValueWillReplaceOld": "Duplicate define ${p0} during activation. New value will replace old.", - "_DuplicateDefine$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateToolDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate tool declared ${p0} during activation. New value will replace old.", - "_DuplicateToolDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateAliasDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate alias declared ${p0} during activation. New value will replace old.", - "_DuplicateAliasDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateLocationDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate location declared ${p0} during activation. New value will replace old.", - "_DuplicateLocationDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "CircularVariableReferenceDetected$": "Circular variable reference detected: ${p0}", - "_CircularVariableReferenceDetected$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "CircularVariableReferenceDetected$$": "Circular variable reference detected: ${p0} - ${p1}", - "_CircularVariableReferenceDetected$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "VariableReferenceFound$$$ThatIsReferencingAnUnknownBaseObject": "Variable reference found '$${p0}.${p1}' that is referencing an unknown base object.", - "_VariableReferenceFound$$$ThatIsReferencingAnUnknownBaseObject.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnresolvedVariableReferenceFound$$$DuringVariableSubstitution": "Unresolved variable reference found ($${p0}.${p1}) during variable substitution.", - "_UnresolvedVariableReferenceFound$$$DuringVariableSubstitution.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "InvalidPathDoesNotExist$": "Invalid path - does not exist: ${p0}", - "_InvalidPathDoesNotExist$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Activating$": "Activating: ${p0}", - "_Activating$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Deactivating$": "Deactivating: ${p0}", - "_Deactivating$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "nothingIsActivatedNoChangesHaveBeenMade": "nothing is activated, no changes have been made", - "InvalidArtifactId$": "Invalid artifact id '${p0}'", - "_InvalidArtifactId$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnknownInstallerType$": "Unknown installer type ${p0}", - "_UnknownInstallerType$.comment": "\n'${p0}' (aka 'installInfo!.installerKind') is a parameter of type 'string'\n", - "WhileResolvingDependenciesOf$$In$CouldNotBeResolvedToARegistry": "While resolving dependencies of ${p0}, ${p1} in ${p2} could not be resolved to a registry.", - "_WhileResolvingDependenciesOf$$In$CouldNotBeResolvedToARegistry.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string | undefined'\n\n'${p2}' is a parameter of type 'any'\n", - "WhileResolvingDependenciesOfTheProjectFile$$DidNotSpecifyARegistry": "While resolving dependencies of the project file ${p0}, ${p1} did not specify a registry.", - "_WhileResolvingDependenciesOfTheProjectFile$$DidNotSpecifyARegistry.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'any'\n", - "UnableToResolveDependency$In$": "Unable to resolve dependency ${p0} in ${p1}.", - "_UnableToResolveDependency$In$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "Artifact": "Artifact", - "Version": "Version", - "Status": "Status", - "Dependency": "Dependency", - "Summary": "Summary", - "progressUnknown": "(progress unknown)", - "verifying": "verifying", - "downloading$$": "downloading ${p0} -> ${p1}", - "_downloading$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "unpacking$": "unpacking ${p0}", - "_unpacking$.comment": "\n'${p0}' (aka 'archiveUri.fsPath') is a parameter of type 'string'\n", - "Installing$": "Installing ${p0}...", - "_Installing$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$AlreadyInstalled": "${p0} already installed.", - "_$AlreadyInstalled.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Downloading$": "Downloading ${p0}...", - "_Downloading$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Unpacking$": "Unpacking ${p0}...", - "_Unpacking$.comment": "\n'${p0}' (aka 'archiveUri.fsPath') is a parameter of type 'string'\n", - "ErrorInstalling$$": "Error installing ${p0} - ${p1}", - "_ErrorInstalling$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'any'\n", - "error": "error:", - "warning": "warning:", - "ExpectedASingleValueFor$FoundMultiple": "Expected a single value for ${p0} - found multiple", - "_ExpectedASingleValueFor$FoundMultiple.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedASingleValueFor$": "Expected a single value for '--${p0}'.", - "_ExpectedASingleValueFor$.comment": "\n'${p0}' (aka 'this.switch') is a parameter of type 'string'\n", - "Assuming$IsCorrectSupplyAHashInTheArtifactMetadataToSuppressThisMessage": "Assuming '${p0}' is correct; supply a hash in the artifact metadata to suppress this message.", - "_Assuming$IsCorrectSupplyAHashInTheArtifactMetadataToSuppressThisMessage.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DownloadedFile$DidNotHaveTheCorrectHash$$": "Downloaded file '${p0}' did not have the correct hash (${p1}: ${p2}) ", - "_DownloadedFile$DidNotHaveTheCorrectHash$$.comment": "\n'${p0}' (aka 'outputFile.fsPath') is a parameter of type 'string'\n\n'${p1}' (aka 'options.algorithm') is a parameter of type 'string'\n\n'${p2}' (aka 'options.value') is a parameter of type 'string'\n", - "packageReference$IsNotAValidNuGetPackageReferencenameversion": "package reference '${p0}' is not a valid NuGet package reference ({name}/{version})", - "_packageReference$IsNotAValidNuGetPackageReferencenameversion.comment": "\n'${p0}' is a parameter of type 'string'\n", - "statsMayNotBeUndefined": "stats may not be undefined", - "CannotRenameFilesAcrossFilesystems": "Cannot rename files across filesystems", - "CopyFailedSource$IsAFolderTarget$IsAFile": "Copy failed: source (${p0}) is a folder, target (${p1}) is a file", - "_CopyFailedSource$IsAFolderTarget$IsAFile.comment": "\n'${p0}' (aka 'source.fsPath') is a parameter of type 'string'\n\n'${p1}' (aka 'target.fsPath') is a parameter of type 'string'\n", - "UriMayNotBeEmpty": "Uri may not be empty", - "scheme$AlreadyRegistered": "scheme '${p0}' already registered", - "_scheme$AlreadyRegistered.comment": "\n'${p0}' is a parameter of type 'string'\n", - "uri$HasNoScheme": "uri ${p0} has no scheme", - "_uri$HasNoScheme.comment": "\n'${p0}' is a parameter of type 'string'\n", - "scheme$HasNoFilesystemAssociatedWithIt": "scheme ${p0} has no filesystem associated with it", - "_scheme$HasNoFilesystemAssociatedWithIt.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n", - "mayNotRenameAcrossFilesystems": "may not rename across filesystems", - "CouldNotActivateEspidfPythonWasNotFound": "Could not activate esp-idf: python was not found.", - "GitIsNotInstalled": "Git is not installed", - "InitializingRepositoryFolder": "Initializing repository folder", - "FailedToInitializeGitRepositoryFolder$": "Failed to initialize git repository folder (${p0})", - "_FailedToInitializeGitRepositoryFolder$.comment": "\n'${p0}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "AddingRemote$ToGitRepositoryFolder": "Adding remote ${p0} to git repository folder", - "_AddingRemote$ToGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "FailedToSetGitOrigin$InFolder$": "Failed to set git origin (${p0}) in folder (${p1})", - "_FailedToSetGitOrigin$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "FetchingRemote$ForGitRepositoryFolder": "Fetching remote ${p0} for git repository folder", - "_FetchingRemote$ForGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFetchGitDataFor$InFolder$": "Unable to fetch git data for (${p0}) in folder (${p1})", - "_UnableToFetchGitDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "CheckingOutCommit$For$ToGitRepositoryFolder": "Checking out commit ${p0} for ${p1} to git repository folder", - "_CheckingOutCommit$For$ToGitRepositoryFolder.comment": "\n'${p0}' (aka 'install.commit') is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnableToCheckoutDataFor$InFolder$": "Unable to checkout data for (${p0}) in folder (${p1})", - "_UnableToCheckoutDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "UpdatingSubmodulesForRepository$InTheGitRepositoryFolder": "Updating submodules for repository ${p0} in the git repository folder", - "_UpdatingSubmodulesForRepository$InTheGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToSetSubmoduleShallowDataFor$InFolder$": "Unable to set submodule shallow data for (${p0}) in folder (${p1})", - "_UnableToSetSubmoduleShallowDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "UnableUpdateSubmodulesFor$InFolder$": "Unable update submodules for (${p0}) in folder (${p1})", - "_UnableUpdateSubmodulesFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "ExpectedCommaFound$": "Expected comma, found ${p0}", - "_ExpectedCommaFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedOneOfNumberBooleanIdentifierStringFoundToken$": "Expected one of {Number, Boolean, Identifier, String}, found token ${p0}", - "_ExpectedOneOfNumberBooleanIdentifierStringFoundToken$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpressionSpecifiedNOTTwice": "Expression specified NOT twice", - "ExpectedCloseParenthesisForExpressionFound$": "Expected close parenthesis for expression, found ${p0}", - "_ExpectedCloseParenthesisForExpressionFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedExpressionFound$": "Expected expression, found ${p0}", - "_ExpectedExpressionFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ParseErrorDigitExpected": "ParseError: Digit expected (0-9)", - "ParseErrorHexDigitExpectedFf": "ParseError: Hex Digit expected (0-F,0-f)", - "ParseErrorBinaryDigitExpected": "ParseError: Binary Digit expected (0,1)", - "UnexpectedEndOfFileWhileSearchingFor$": "Unexpected end of file while searching for '${p0}'", - "_UnexpectedEndOfFileWhileSearchingFor$.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n", - "InvalidEscapeSequence": "Invalid escape sequence", - "FailedToDeserializeIndex$": "Failed to deserialize index ${p0}", - "_FailedToDeserializeIndex$.comment": "\n'${p0}' is a parameter of type 'any'\n", - "$MatchedMoreThanOneResult$": "'${p0}' matched more than one result (${p1}).", - "_$MatchedMoreThanOneResult$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnsupportedRegistryScheme$": "Unsupported registry scheme '${p0}'", - "_UnsupportedRegistryScheme$.comment": "\n'${p0}' (aka 'locationUri.scheme') is a parameter of type 'string'\n", - "TriedToAdd$As$But$IsAlready$": "Tried to add ${p0} as ${p1}, but ${p2} is already ${p3}.", - "_TriedToAdd$As$But$IsAlready$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string | undefined'\n", - "UnknownRegistry$in$TheFollowingAreKnown$": "Unknown registry ${p0} (in ${p1}). The following are known: ${p2}", - "_UnknownRegistry$in$TheFollowingAreKnown$.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n", - "UpdatingRegistryDataFrom$": "Updating registry data from ${p0}", - "_UpdatingRegistryDataFrom$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeAString": "${p0} must be a string", - "_$MustBeAString.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeABool": "${p0} must be a bool", - "_$MustBeABool.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeAnArrayOfStringsOrUnset": "${p0} must be an array of strings, or unset", - "_$MustBeAnArrayOfStringsOrUnset.comment": "\n'${p0}' is a parameter of type 'string'\n", - "FoundAMismatched$In$ForALiteral$Use$$Instead": "Found a mismatched ${p0} in '${p1}'. For a literal ${p2}, use ${p3}${p4} instead.", - "_FoundAMismatched$In$ForALiteral$Use$$Instead.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string'\n\n'${p4}' is a parameter of type 'string'\n", - "CouldNotFindAValueFor$In$ToWriteTheLiteralValueUse$Instead": "Could not find a value for {${p0}} in '${p1}'. To write the literal value, use '{{${p2}}}' instead.", - "_CouldNotFindAValueFor$In$ToWriteTheLiteralValueUse$Instead.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n", - "MatchedMoreThanOneInstallBlock$": "Matched more than one install block [${p0}]", - "_MatchedMoreThanOneInstallBlock$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFindProjectInFolderorParentFoldersFor$": "Unable to find project in folder (or parent folders) for ${p0}", - "_UnableToFindProjectInFolderorParentFoldersFor$.comment": "\n'${p0}' (aka 'session.currentDirectory.fsPath') is a parameter of type 'string'\n", - "UnableToAcquireProject": "Unable to acquire project", - "NoArtifactsSpecified": "No artifacts specified", - "NoArtifactsAreAcquired": "No artifacts are acquired", - "AllArtifactsAreAlreadyInstalled": "All artifacts are already installed", - "$ArtifactsInstalledSuccessfully": "${p0} artifacts installed successfully", - "_$ArtifactsInstalledSuccessfully.comment": "\n'${p0}' is a parameter of type 'number'\n", - "InstallationFailedStopping": "Installation failed -- stopping", - "MultipleArtifactsSpecifiedButNotAnEqualNumberOf$Switches": "Multiple artifacts specified, but not an equal number of ${p0} switches", - "_MultipleArtifactsSpecifiedButNotAnEqualNumberOf$Switches.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TriedToAddAnArtifact$$ButCouldNotDetermineTheRegistryToUse": "Tried to add an artifact [${p0}]:${p1} but could not determine the registry to use.", - "_TriedToAddAnArtifact$$ButCouldNotDetermineTheRegistryToUse.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'artifact.id') is a parameter of type 'string'\n", - "TriedToAddRegistry$As$ButItWasAlready$PleaseAdd$ToThisProjectManuallyAndReattempt": "Tried to add registry ${p0} as ${p1}, but it was already ${p2}. Please add ${p3} to this project manually and reattempt.", - "_TriedToAddRegistry$As$ButItWasAlready$PleaseAdd$ToThisProjectManuallyAndReattempt.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string'\n", - "RunvcpkgshellActivateToApplyToTheCurrentTerminal": "Run \\`vcpkg-shell activate\\` to apply to the current terminal", - "DownloadsFolderCleared$": "Downloads folder cleared (${p0}) ", - "_DownloadsFolderCleared$.comment": "\n'${p0}' (aka 'session.downloads.fsPath') is a parameter of type 'string'\n", - "InstalledArtifactFolderCleared$": "Installed Artifact folder cleared (${p0}) ", - "_InstalledArtifactFolderCleared$.comment": "\n'${p0}' (aka 'session.installFolder.fsPath') is a parameter of type 'string'\n", - "CacheFolderCleared$": "Cache folder cleared (${p0}) ", - "_CacheFolderCleared$.comment": "\n'${p0}' (aka 'session.downloads.fsPath') is a parameter of type 'string'\n", - "DeletingArtifact$From$": "Deleting artifact ${p0} from ${p1}", - "_DeletingArtifact$From$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'folder.fsPath') is a parameter of type 'string'\n", - "NoArtifactsFoundMatchingCriteria$": "No artifacts found matching criteria: ${p0}", - "_NoArtifactsFoundMatchingCriteria$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToActivateProject": "Unable to activate project", - "RegeneratingIndexFor$": "Regenerating index for ${p0}", - "_RegeneratingIndexFor$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "RegenerationCompleteIndexContains$MetadataFiles": "Regeneration complete. Index contains ${p0} metadata files", - "_RegenerationCompleteIndexContains$MetadataFiles.comment": "\n'${p0}' is a parameter of type 'number'\n", - "Registry$ContainsNoArtifacts": "Registry: '${p0}' contains no artifacts.", - "_Registry$ContainsNoArtifacts.comment": "\n'${p0}' is a parameter of type 'string'\n", - "error$": "error ${p0}: ", - "_error$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Removing$FromProjectManifest": "Removing ${p0} from project manifest", - "_Removing$FromProjectManifest.comment": "\n'${p0}' is a parameter of type 'string'\n", - "unableToFindArtifact$InTheProjectManifest": "unable to find artifact ${p0} in the project manifest", - "_unableToFindArtifact$InTheProjectManifest.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Updated$ItContains$MetadataFiles": "Updated ${p0}. It contains ${p1} metadata files.", - "_Updated$ItContains$MetadataFiles.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnableToDownload$": "Unable to download ${p0}.", - "_UnableToDownload$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$CouldNotBeUpdatedItCouldBeMalformed": "${p0} could not be updated; it could be malformed.", - "_$CouldNotBeUpdatedItCouldBeMalformed.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TheXupdateregistryCommandDownloadsNewRegistryInformationAndThusCannotBeUsedWithLocalRegistriesDidYouMeanXregenerate$": "The x-update-registry command downloads new registry information and thus cannot be used with local registries. Did you mean x-regenerate ${p0}?", - "_TheXupdateregistryCommandDownloadsNewRegistryInformationAndThusCannotBeUsedWithLocalRegistriesDidYouMeanXregenerate$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFindRegistry$": "Unable to find registry ${p0}.", - "_UnableToFindRegistry$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "NoArtifactsAreBeingAcquired": "No artifacts are being acquired", - "UnableToFindProjectEnvironment$": "Unable to find project environment ${p0}", - "_UnableToFindProjectEnvironment$.comment": "\n'${p0}' is a parameter of type 'string'\n" + "_WroteNuGetPkgConfInfo.comment": "An example of {path} is /foo/bar." } diff --git a/scripts/verifyMessages.ps1 b/scripts/verifyMessages.ps1 index 2b938345f6..d5acaa963e 100644 --- a/scripts/verifyMessages.ps1 +++ b/scripts/verifyMessages.ps1 @@ -3,7 +3,6 @@ # Define paths relative to the script's directory $SEARCH_DIR = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath "..\") $CPP_MESSAGES = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath "..\locales\messages.json") -$ARITFACT_MESSAGES = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath "..\vcpkg-artifacts\locales\messages.json") Write-Host "Processing message declarations..." @@ -11,13 +10,6 @@ Write-Host "Processing message declarations..." $jsonContent = Get-Content $CPP_MESSAGES -Raw | ConvertFrom-Json -AsHashTable $declared_messages = @($jsonContent.Keys) | Where-Object { -not $_.EndsWith('.comment') } -# Read the JSON file with messages to remove into another hashtable -$jsonToRemove = Get-Content $ARITFACT_MESSAGES -Raw | ConvertFrom-Json -AsHashTable -$messages_to_remove = @($jsonToRemove.Keys) | Where-Object { -not $_.EndsWith('.comment') } - -# Subtract the artifact messages -$declared_messages = Compare-Object -ReferenceObject $declared_messages -DifferenceObject $messages_to_remove -PassThru - # Find all instances of 'msg' prefixed variables in .cpp and .h files and store them in an array $used_messages = Get-ChildItem -Path $SEARCH_DIR -Include @('*.cpp', '*.h') -Recurse | Select-String -Pattern '\bmsg[A-Za-z0-9_]+\b' -AllMatches | diff --git a/src/vcpkg-in-development.ps1 b/src/vcpkg-in-development.ps1 deleted file mode 100644 index 5259477b07..0000000000 --- a/src/vcpkg-in-development.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -$ENV:NODE_OPTIONS="--enable-source-maps" - -# setup the postscript file -# Generate 31 bits of randomness, to avoid clashing with concurrent executions. -$env:Z_VCPKG_POSTSCRIPT = Join-Path ([System.IO.Path]::GetTempPath()) "VCPKG_tmp_$(Get-Random -SetSeed $PID).ps1" - -[string]$VCPKG = "$PSScriptRoot/vcpkg" -# The variable:IsWindows test is a workaround for $IsWindows not existing in Windows PowerShell -if (-Not (Test-Path variable:IsWindows) -Or $IsWindows) { - $VCPKG += ".exe" -} - -& $VCPKG @args - -# dot-source the postscript file to modify the environment -if (Test-Path $env:Z_VCPKG_POSTSCRIPT) { - $postscr = Get-Content -Raw $env:Z_VCPKG_POSTSCRIPT - if( $postscr ) { - iex $postscr - } - - Remove-Item -Force -ea 0 $env:Z_VCPKG_POSTSCRIPT -} - -Remove-Item env:Z_VCPKG_POSTSCRIPT diff --git a/src/vcpkg.cpp b/src/vcpkg.cpp index b696e08221..353148196b 100644 --- a/src/vcpkg.cpp +++ b/src/vcpkg.cpp @@ -131,6 +131,14 @@ namespace Checks::exit_fail(VCPKG_LINE_INFO); } + for (const auto& removed_command : removed_artifacts_commands) + { + if (Strings::case_insensitive_ascii_equals(removed_command, args.get_command())) + { + Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgVcpkgArtifactsHasBeenRemoved); + } + } + if (const auto command_function = choose_command(args.get_command(), basic_commands)) { get_global_metrics_collector().track_string(StringMetric::CommandName, command_function->metadata.name); diff --git a/src/vcpkg/commands.acquire-project.cpp b/src/vcpkg/commands.acquire-project.cpp deleted file mode 100644 index bee23eb8a9..0000000000 --- a/src/vcpkg/commands.acquire-project.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -#include -#include -#include - -namespace vcpkg -{ - constexpr CommandMetadata CommandAcquireProjectMetadata{ - "acquire_project", - msgCmdAcquireProjectSynopsis, - {"vcpkg acquire-project"}, - Undocumented, - AutocompletePriority::Public, - 0, - 0, - {CommonAcquireArtifactSwitches}, - nullptr, - }; - - void command_acquire_project_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandAcquireProjectMetadata); - std::vector ecmascript_args; - ecmascript_args.emplace_back("acquire-project"); - forward_common_artifacts_arguments(ecmascript_args, parsed); - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.acquire.cpp b/src/vcpkg/commands.acquire.cpp deleted file mode 100644 index d4f1bde4aa..0000000000 --- a/src/vcpkg/commands.acquire.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandMultiSetting AcquireMultiOptions[] = { - {SwitchVersion, msgArtifactsOptionVersion}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandAcquireMetadata{ - "acquire", - msgCmdAcquireSynopsis, - {msgCmdAcquireExample1, "vcpkg acquire cmake"}, - Undocumented, - AutocompletePriority::Public, - 1, - SIZE_MAX, - {CommonAcquireArtifactSwitches, {}, AcquireMultiOptions}, - nullptr, - }; - - void command_acquire_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandAcquireMetadata); - std::vector ecmascript_args; - ecmascript_args.emplace_back("acquire"); - forward_common_artifacts_arguments(ecmascript_args, parsed); - if (const auto* versions = Util::lookup_value(parsed.multisettings, SwitchVersion)) - { - if (versions->size() != parsed.command_arguments.size()) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsOptionVersionMismatch); - } - - for (auto&& version : *versions) - { - ecmascript_args.push_back("--version"); - ecmascript_args.push_back(version); - } - } - - ecmascript_args.insert(ecmascript_args.end(), - std::make_move_iterator(parsed.command_arguments.begin()), - std::make_move_iterator(parsed.command_arguments.end())); - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); - } -} diff --git a/src/vcpkg/commands.activate.cpp b/src/vcpkg/commands.activate.cpp deleted file mode 100644 index 29e48b6fba..0000000000 --- a/src/vcpkg/commands.activate.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include - -#include -#include -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandSetting ActivateOptions[] = { - {SwitchMSBuildProps, msgArtifactsOptionMSBuildProps}, - {SwitchJson, msgArtifactsOptionJson}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandActivateMetadata{ - "activate", - msgCmdActivateSynopsis, - {"vcpkg-shell activate", "vcpkg activate --msbuild-props file.targets"}, - Undocumented, - AutocompletePriority::Public, - 0, - 0, - {CommonAcquireArtifactSwitches, ActivateOptions}, - nullptr, - }; - - void command_activate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandActivateMetadata); - std::vector ecmascript_args; - ecmascript_args.emplace_back("activate"); - forward_common_artifacts_arguments(ecmascript_args, parsed); - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.add.cpp b/src/vcpkg/commands.add.cpp index c2b17a58aa..92d6524a7e 100644 --- a/src/vcpkg/commands.add.cpp +++ b/src/vcpkg/commands.add.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include #include @@ -8,7 +9,6 @@ #include #include -#include #include #include #include @@ -22,12 +22,12 @@ namespace vcpkg constexpr CommandMetadata CommandAddMetadata{ "add", msgCmdAddSynopsis, - {msgCmdAddExample1, "vcpkg add port png", msgCmdAddExample2, "vcpkg add artifact cmake"}, + {msgCmdAddExample1, "vcpkg add port png"}, Undocumented, AutocompletePriority::Public, 2, SIZE_MAX, - {{}, CommonSelectArtifactVersionSettings}, + {}, nullptr, }; @@ -39,27 +39,7 @@ namespace vcpkg if (selector == "artifact") { - Checks::msg_check_exit(VCPKG_LINE_INFO, - parsed.command_arguments.size() <= 2, - msgAddArtifactOnlyOne, - msg::command_line = "vcpkg add artifact"); - - auto& artifact_name = parsed.command_arguments[1]; - auto artifact_hash = Hash::get_string_hash(artifact_name, Hash::Algorithm::Sha256); - metrics.track_string(StringMetric::CommandContext, "artifact"); - metrics.track_string(StringMetric::CommandArgs, artifact_hash); - get_global_metrics_collector().track_submission(std::move(metrics)); - - std::vector ecmascript_args; - ecmascript_args.emplace_back("add"); - ecmascript_args.emplace_back(artifact_name); - if (const auto* version = Util::lookup_value(parsed.settings, SwitchVersion)) - { - ecmascript_args.emplace_back("--version"); - ecmascript_args.emplace_back(*version); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); + Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgVcpkgArtifactsHasBeenRemoved); } if (selector == "port") @@ -74,11 +54,6 @@ namespace vcpkg .append(msgSeeURL, msg::url = docs::add_command_url)); } - if (Util::Maps::contains(parsed.settings, SwitchVersion)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgAddVersionArtifactsOnly); - } - std::vector specs; specs.reserve(parsed.command_arguments.size() - 1); for (std::size_t idx = 1; idx < parsed.command_arguments.size(); ++idx) diff --git a/src/vcpkg/commands.cpp b/src/vcpkg/commands.cpp index 325b3830a5..f1b6d1a335 100644 --- a/src/vcpkg/commands.cpp +++ b/src/vcpkg/commands.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include #include #include @@ -13,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -23,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -36,20 +31,16 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include @@ -61,37 +52,45 @@ namespace vcpkg { + static constexpr StringLiteral removed_artifacts_commands_storage[] = { + "acquire", + "acquire_project", + "activate", + "deactivate", + "generate-msbuild-props", + "use", + "x-regenerate", + "x-update-registry", + }; + + constexpr View removed_artifacts_commands = removed_artifacts_commands_storage; + static constexpr CommandRegistration basic_commands_storage[] = { {CommandBootstrapStandaloneMetadata, command_bootstrap_standalone_and_exit}, + {CommandCheckToolsShaMetadata, command_check_tools_sha_and_exit}, {CommandContactMetadata, command_contact_and_exit}, {CommandDownloadMetadata, command_download_and_exit}, {CommandFormatFeatureBaselineMetadata, command_format_feature_baseline_and_exit}, {CommandHashMetadata, command_hash_and_exit}, - {CommandCheckToolsShaMetadata, command_check_tools_sha_and_exit}, {CommandInitRegistryMetadata, command_init_registry_and_exit}, {CommandVersionMetadata, command_version_and_exit}, - {CommandZUploadMetricsMetadata, command_z_upload_metrics_and_exit}, {CommandZApplocalMetadata, command_z_applocal_and_exit}, {CommandZGenerateDefaultMessageMapMetadata, command_z_generate_default_message_map_and_exit}, {CommandZPreregisterTelemetryMetadata, command_z_preregister_telemetry_and_exit}, + {CommandZUploadMetricsMetadata, command_z_upload_metrics_and_exit}, }; constexpr View> basic_commands = basic_commands_storage; static constexpr CommandRegistration paths_commands_storage[] = { - {CommandAcquireMetadata, command_acquire_and_exit}, - {CommandAcquireProjectMetadata, command_acquire_project_and_exit}, - {CommandActivateMetadata, command_activate_and_exit}, {CommandAddMetadata, command_add_and_exit}, {CommandAddVersionMetadata, command_add_version_and_exit}, {CommandAutocompleteMetadata, command_autocomplete_and_exit}, {CommandCiCleanMetadata, command_ci_clean_and_exit}, {CommandCiVerifyVersionsMetadata, command_ci_verify_versions_and_exit}, {CommandCreateMetadata, command_create_and_exit}, - {CommandDeactivateMetadata, command_deactivate_and_exit}, {CommandEditMetadata, command_edit_and_exit}, {CommandFetchMetadata, command_fetch_and_exit}, - {CommandGenerateMsbuildPropsMetadata, command_generate_msbuild_props_and_exit}, {CommandFindMetadata, command_find_and_exit}, {CommandFormatManifestMetadata, command_format_manifest_and_exit}, {CommandHelpMetadata, command_help_and_exit}, @@ -102,16 +101,12 @@ namespace vcpkg {CommandOwnsMetadata, command_owns_and_exit}, {CommandPackageInfoMetadata, command_package_info_and_exit}, {CommandPortsdiffMetadata, command_portsdiff_and_exit}, - {CommandRegenerateMetadata, command_regenerate_and_exit}, {CommandSearchMetadata, command_search_and_exit}, - {CommandUpdateMetadata, command_update_and_exit}, {CommandUpdateBaselineMetadata, command_update_baseline_and_exit}, - {CommandUpdateRegistryMetadata, command_update_registry_and_exit}, - {CommandUseMetadata, command_use_and_exit}, + {CommandUpdateMetadata, command_update_and_exit}, {CommandVsInstancesMetadata, command_vs_instances_and_exit}, - {CommandZCEMetadata, command_z_ce_and_exit}, - {CommandZExtractMetadata, command_z_extract_and_exit}, {CommandZChangelogMetadata, command_z_changelog_and_exit}, + {CommandZExtractMetadata, command_z_extract_and_exit}, }; constexpr View> paths_commands = paths_commands_storage; diff --git a/src/vcpkg/commands.deactivate.cpp b/src/vcpkg/commands.deactivate.cpp deleted file mode 100644 index 3cc3fd3a4c..0000000000 --- a/src/vcpkg/commands.deactivate.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#include -#include -#include - -namespace vcpkg -{ - constexpr CommandMetadata CommandDeactivateMetadata{ - "deactivate", - msgCmdDeactivateSynopsis, - {"vcpkg deactivate"}, - Undocumented, - AutocompletePriority::Public, - 0, - 0, - {}, - nullptr, - }; - - void command_deactivate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - (void)args.parse_arguments(CommandDeactivateMetadata); - const std::string deactivate = "deactivate"; - Checks::exit_with_code(VCPKG_LINE_INFO, - run_configure_environment_command(paths, View{&deactivate, 1})); - } -} diff --git a/src/vcpkg/commands.find.cpp b/src/vcpkg/commands.find.cpp index e0a3365385..d163f9ad83 100644 --- a/src/vcpkg/commands.find.cpp +++ b/src/vcpkg/commands.find.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -104,26 +103,6 @@ namespace {SwitchXFullDesc, msgHelpTextOptFullDesc}, {SwitchXJson, msgJsonSwitch}, }; - - void perform_find_artifact_and_exit(const VcpkgPaths& paths, - Optional filter, - Optional version) - { - std::vector ce_args; - ce_args.emplace_back("find"); - if (auto* filter_str = filter.get()) - { - ce_args.emplace_back(filter_str->data(), filter_str->size()); - } - - if (auto v = version.get()) - { - ce_args.emplace_back("--version"); - ce_args.emplace_back(*v); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ce_args)); - } } // unnamed namespace namespace vcpkg @@ -210,17 +189,12 @@ namespace vcpkg constexpr CommandMetadata CommandFindMetadata{ "find", msgCmdFindSynopsis, - { - msgCmdFindExample1, - "vcpkg find port png", - msgCmdFindExample2, - "vcpkg find artifact cmake", - }, + {msgCmdFindExample1, "vcpkg find port png"}, Undocumented, AutocompletePriority::Public, 1, 2, - {FindSwitches, CommonSelectArtifactVersionSettings}, + {FindSwitches}, nullptr, }; @@ -239,42 +213,11 @@ namespace vcpkg if (selector == "artifact") { - if (full_description) - { - msg::write_unlocalized_text_to_stderr( - Color::warning, - msg::format_warning(msgArtifactsOptionIncompatibility, msg::option = SwitchXFullDesc) - .append_raw('\n')); - } - - if (enable_json) - { - msg::write_unlocalized_text_to_stderr( - Color::warning, - msg::format_warning(msgArtifactsOptionIncompatibility, msg::option = "x-json").append_raw('\n')); - } - - Optional filter_hash = filter.map(Hash::get_string_sha256); - MetricsSubmission metrics; - metrics.track_string(StringMetric::CommandContext, "artifact"); - if (auto p_filter_hash = filter_hash.get()) - { - metrics.track_string(StringMetric::CommandArgs, *p_filter_hash); - } - - get_global_metrics_collector().track_submission(std::move(metrics)); - const auto* version_ptr = Util::lookup_value(options.settings, SwitchVersion); - perform_find_artifact_and_exit( - paths, filter, version_ptr ? Optional(*version_ptr) : Optional{}); + Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgVcpkgArtifactsHasBeenRemoved); } if (selector == "port") { - if (Util::Maps::contains(options.settings, SwitchVersion)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgFindVersionArtifactsOnly); - } - Optional filter_hash = filter.map(Hash::get_string_sha256); MetricsSubmission metrics; metrics.track_string(StringMetric::CommandContext, "port"); diff --git a/src/vcpkg/commands.generate-msbuild-props.cpp b/src/vcpkg/commands.generate-msbuild-props.cpp deleted file mode 100644 index 123c1f283e..0000000000 --- a/src/vcpkg/commands.generate-msbuild-props.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandSetting GenerateMSBuildPropsOptions[] = { - {SwitchMSBuildProps, msgArtifactsOptionMSBuildProps}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandGenerateMsbuildPropsMetadata{ - "generate-msbuild-props", - msgCmdGenerateMSBuildPropsSynopsis, - {msgCmdGenerateMSBuildPropsExample1, msgCmdGenerateMSBuildPropsExample2}, - Undocumented, - AutocompletePriority::Internal, - 0, - 0, - {CommonAcquireArtifactSwitches, GenerateMSBuildPropsOptions}, - nullptr, - }; - - void command_generate_msbuild_props_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandGenerateMsbuildPropsMetadata); - std::vector ecmascript_args; - ecmascript_args.emplace_back("generate-msbuild-props"); - - forward_common_artifacts_arguments(ecmascript_args, parsed); - - if (!Util::Maps::contains(parsed.settings, SwitchMSBuildProps)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgOptionRequiresAValue, msg::option = SwitchMSBuildProps); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.regenerate.cpp b/src/vcpkg/commands.regenerate.cpp deleted file mode 100644 index b83f7ec673..0000000000 --- a/src/vcpkg/commands.regenerate.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandSwitch command_switches[] = { - {SwitchForce, msgCmdRegenerateOptForce}, - {SwitchDryRun, msgCmdRegenerateOptDryRun}, - {SwitchNormalize, msgCmdRegenerateOptNormalize}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandRegenerateMetadata{ - "x-regenerate", - msgRegeneratesArtifactRegistry, - {"vcpkg x-regenerate"}, - Undocumented, - AutocompletePriority::Public, - 1, - 1, - {command_switches}, - nullptr, - }; - - void command_regenerate_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - std::vector forwarded_args; - forwarded_args.emplace_back("regenerate"); - const auto parsed = args.parse_arguments(CommandRegenerateMetadata); - forwarded_args.push_back(parsed.command_arguments[0]); - - if (Util::Sets::contains(parsed.switches, SwitchForce)) - { - forwarded_args.emplace_back("--force"); - } - - if (Util::Sets::contains(parsed.switches, SwitchDryRun)) - { - forwarded_args.emplace_back("--what-if"); - } - - if (Util::Sets::contains(parsed.switches, SwitchNormalize)) - { - forwarded_args.emplace_back("--normalize"); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, forwarded_args)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.update-registry.cpp b/src/vcpkg/commands.update-registry.cpp deleted file mode 100644 index b3ff4b9a19..0000000000 --- a/src/vcpkg/commands.update-registry.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandSwitch UpdateRegistrySwitches[] = { - {SwitchAll, msgCmdUpdateRegistryAll}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandUpdateRegistryMetadata{ - "x-update-registry", - msgCmdUpdateRegistrySynopsis, - { - "vcpkg x-update-registry ", - "vcpkg x-update-registry https://example.com", - msgCmdUpdateRegistryExample3, - "vcpkg x-update-registry microsoft", - }, - Undocumented, - AutocompletePriority::Public, - 0, - SIZE_MAX, - {UpdateRegistrySwitches}, - nullptr, - }; - - void command_update_registry_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandUpdateRegistryMetadata); - const bool all = Util::Sets::contains(parsed.switches, SwitchAll); - auto&& command_arguments = parsed.command_arguments; - if (all) - { - if (command_arguments.empty()) - { - command_arguments.emplace_back("update"); - command_arguments.emplace_back("--all"); - } - else - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgCmdUpdateRegistryAllExcludesTargets); - } - } - else - { - if (command_arguments.empty()) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgCmdUpdateRegistryAllOrTargets); - } - else - { - command_arguments.emplace(command_arguments.begin(), "update"); - } - } - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, command_arguments)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.use.cpp b/src/vcpkg/commands.use.cpp deleted file mode 100644 index 184324f33d..0000000000 --- a/src/vcpkg/commands.use.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -#include - -using namespace vcpkg; - -namespace -{ - constexpr CommandSetting UseOptions[] = { - {SwitchMSBuildProps, msgArtifactsOptionMSBuildProps}, - }; - - constexpr CommandMultiSetting UseMultiOptions[] = { - {SwitchVersion, msgArtifactsOptionVersion}, - }; -} // unnamed namespace - -namespace vcpkg -{ - constexpr CommandMetadata CommandUseMetadata{ - "use", - msgCmdUseSynopsis, - {msgCmdUseExample1, "vcpkg-shell use cmake"}, - Undocumented, - AutocompletePriority::Public, - 1, - SIZE_MAX, - {CommonAcquireArtifactSwitches, UseOptions, UseMultiOptions}, - nullptr, - }; - - void command_use_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - auto parsed = args.parse_arguments(CommandUseMetadata); - std::vector ecmascript_args; - ecmascript_args.emplace_back("use"); - - forward_common_artifacts_arguments(ecmascript_args, parsed); - - if (const auto* versions = Util::lookup_value(parsed.multisettings, SwitchVersion)) - { - if (versions->size() != parsed.command_arguments.size()) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsOptionVersionMismatch); - } - - for (auto&& version : *versions) - { - ecmascript_args.push_back("--version"); - ecmascript_args.push_back(version); - } - } - - ecmascript_args.insert(ecmascript_args.end(), - std::make_move_iterator(parsed.command_arguments.begin()), - std::make_move_iterator(parsed.command_arguments.end())); - - Checks::exit_with_code(VCPKG_LINE_INFO, run_configure_environment_command(paths, ecmascript_args)); - } -} // namespace vcpkg diff --git a/src/vcpkg/commands.z-ce.cpp b/src/vcpkg/commands.z-ce.cpp deleted file mode 100644 index ad76f518f8..0000000000 --- a/src/vcpkg/commands.z-ce.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include - -#include -#include -#include - -namespace vcpkg -{ - constexpr CommandMetadata CommandZCEMetadata{ - "z-ce", - {/*intentionally undocumented*/}, - {}, - Undocumented, - AutocompletePriority::Never, - 0, - SIZE_MAX, - {}, - nullptr, - }; - - void command_z_ce_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Checks::exit_with_code(VCPKG_LINE_INFO, - run_configure_environment_command(paths, args.get_forwardable_arguments())); - } -} diff --git a/src/vcpkg/commands.z-generate-message-map.cpp b/src/vcpkg/commands.z-generate-message-map.cpp index ce80cfc80a..fe7f22799c 100644 --- a/src/vcpkg/commands.z-generate-message-map.cpp +++ b/src/vcpkg/commands.z-generate-message-map.cpp @@ -32,8 +32,8 @@ namespace vcpkg {}, Undocumented, AutocompletePriority::Never, - 2, - 2, + 1, + 1, {GENERATE_MESSAGE_MAP_SWITCHES}, nullptr, }; @@ -229,18 +229,6 @@ namespace vcpkg Checks::exit_fail(VCPKG_LINE_INFO); } - // get the path to artifacts messages.json - Path path_to_artifact_messages = parsed_args.command_arguments[1]; - - // parse file to get json obj - auto artifact_messages_content = fs.try_read_contents(path_to_artifact_messages).value_or_exit(VCPKG_LINE_INFO); - auto artifact_obj = Json::parse_object(artifact_messages_content.content, artifact_messages_content.origin) - .value_or_exit(VCPKG_LINE_INFO); - for (auto&& it : artifact_obj) - { - obj.insert(it.first, it.second); - } - auto stringified = Json::stringify(obj); Path filepath = fs.current_path(VCPKG_LINE_INFO) / parsed_args.command_arguments[0]; fs.write_contents(filepath, stringified, VCPKG_LINE_INFO); diff --git a/src/vcpkg/configure-environment.cpp b/src/vcpkg/configure-environment.cpp deleted file mode 100644 index 63f6a05cde..0000000000 --- a/src/vcpkg/configure-environment.cpp +++ /dev/null @@ -1,285 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace vcpkg; - -namespace -{ - void track_telemetry(const Filesystem& fs, const Path& telemetry_file_path) - { - std::error_code ec; - auto telemetry_file = fs.read_contents(telemetry_file_path, ec); - if (ec) - { - Debug::println("Telemetry file couldn't be read: " + ec.message()); - return; - } - - auto maybe_parsed = Json::parse_object(telemetry_file, telemetry_file_path); - auto pparsed = maybe_parsed.get(); - - if (!pparsed) - { - Debug::println("Telemetry file couldn't be parsed: " + maybe_parsed.error().data()); - return; - } - - if (auto acquired_artifacts = pparsed->get(JsonIdAcquiredArtifacts)) - { - if (auto maybe_acquired_string = acquired_artifacts->maybe_string()) - { - get_global_metrics_collector().track_string(StringMetric::AcquiredArtifacts, *maybe_acquired_string); - } - else - { - Debug::println("Acquired artifacts was not a string."); - } - } - else - { - Debug::println("No artifacts acquired."); - } - - if (auto activated_artifacts = pparsed->get(JsonIdActivatedArtifacts)) - { - if (auto maybe_activated_string = activated_artifacts->maybe_string()) - { - get_global_metrics_collector().track_string(StringMetric::ActivatedArtifacts, *maybe_activated_string); - } - else - { - Debug::println("Activated artifacts was not a string."); - } - } - else - { - Debug::println("No artifacts activated."); - } - } - - constexpr const StringLiteral* ArtifactOperatingSystemsSwitchNamesStorage[] = { - &SwitchWindows, &SwitchOsx, &SwitchLinux, &SwitchFreeBsd}; - constexpr const StringLiteral* ArtifactHostPlatformSwitchNamesStorage[] = { - &SwitchX86, &SwitchX64, &SwitchArm, &SwitchArm64}; - constexpr const StringLiteral* ArtifactTargetPlatformSwitchNamesStorage[] = { - &SwitchTargetX86, &SwitchTargetX64, &SwitchTargetArm, &SwitchTargetArm64}; - - bool more_than_one_mapped(View candidates, - const std::set>& switches) - { - bool seen = false; - for (auto&& candidate : candidates) - { - if (Util::Sets::contains(switches, *candidate)) - { - if (seen) - { - return true; - } - - seen = true; - } - } - - return false; - } -} // unnamed namespace - -namespace vcpkg -{ - Optional provision_node_component(DiagnosticContext& context, - Path script_path, // intentionally declared exe_path in the header - const AssetCachingSettings& asset_cache_settings, - const Filesystem& fs, - const Path& download_root, - StringLiteral script_name, - const Optional& script_sha512) - { - // The .mjs may exist if this is the one-liner, the Visual Studio distribution, or local development - script_path.replace_filename(fmt::format("{}.mjs", script_name)); - script_path.make_preferred(); - if (fs.exists(script_path, VCPKG_LINE_INFO)) - { - return script_path; - } - - const char* url_prefix; - std::string filename = script_name.to_string(); - filename.push_back('-'); - if (auto sha = script_sha512.get()) - { - // this is an official release - url_prefix = "https://github.com/microsoft/vcpkg-tool/releases/download/" VCPKG_BASE_VERSION_AS_STRING; - filename.append(sha->data(), sha->size()); - } - else - { - // not an official release, always use latest - url_prefix = "https://github.com/microsoft/vcpkg-tool/releases/latest/download"; - fmt::format_to(std::back_inserter(filename), "{}", vcpkg::get_process_id()); - } - - filename.append(".mjs"); - Path download_path = download_root / filename; - if (auto sha = script_sha512.get()) - { - if (fs.exists(download_path, VCPKG_LINE_INFO)) - { - auto maybe_actual_hash = - Hash::get_file_hash_required(context, fs, download_path, Hash::Algorithm::Sha512); - if (auto actual_hash = maybe_actual_hash.get()) - { - if (*actual_hash == *sha) - { - return download_path; - } - } - } - } - - fs.remove(download_path, VCPKG_LINE_INFO); - std::string url = fmt::format("{}/{}.mjs", url_prefix, script_name); - if (download_file_asset_cached( - context, null_sink, asset_cache_settings, fs, url, {}, download_path, filename, script_sha512)) - { - return download_path; - } - - fs.remove(download_path, VCPKG_LINE_INFO); - return nullopt; - } - - int run_configure_environment_command(const VcpkgPaths& paths, View args) - { - msg::println_warning(msgVcpkgCeIsExperimental); - auto& fs = paths.get_filesystem(); - - auto exe_path = get_exe_path_of_current_process(); - Optional script_sha512; -#if defined(VCPKG_ARTIFACTS_SHA) - script_sha512.emplace(MACRO_TO_STRING(VCPKG_ARTIFACTS_SHA)); -#endif - - auto maybe_vcpkg_artifacts_path = provision_node_component(console_diagnostic_context, - exe_path, - paths.get_asset_cache_settings(), - fs, - paths.downloads, - "vcpkg-artifacts", - script_sha512); - auto vcpkg_artifacts_path = maybe_vcpkg_artifacts_path.get(); - if (!vcpkg_artifacts_path) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsBootstrapFailed); - } - - auto temp_directory = fs.create_or_get_temp_directory(VCPKG_LINE_INFO); - - auto cmd = Command{paths.get_tool_path_required(Tools::NODE)}; - cmd.string_arg(*vcpkg_artifacts_path); - cmd.forwarded_args(args); - if (Debug::g_debugging) - { - cmd.string_arg("--debug"); - } - - Optional maybe_telemetry_file_path; - if (g_metrics_enabled.load()) - { - auto& p = maybe_telemetry_file_path.emplace(temp_directory / - (generate_random_UUID() + "_artifacts_telemetry.txt")); - cmd.string_arg("--z-telemetry-file").string_arg(p); - } - - cmd.string_arg("--vcpkg-root").string_arg(paths.root); - cmd.string_arg("--z-vcpkg-command").string_arg(exe_path); - - cmd.string_arg("--z-vcpkg-artifacts-root").string_arg(paths.artifacts()); - cmd.string_arg("--z-vcpkg-downloads").string_arg(paths.downloads); - cmd.string_arg("--z-vcpkg-registries-cache").string_arg(paths.registries_cache()); - cmd.string_arg("--z-next-previous-environment") - .string_arg(temp_directory / (generate_random_UUID() + "_previous_environment.txt")); - cmd.string_arg("--z-global-config").string_arg(paths.global_config()); - - auto maybe_file = msg::get_loaded_file(); - if (!maybe_file.empty()) - { - auto temp_file = temp_directory / "messages.json"; - fs.write_contents(temp_file, maybe_file, VCPKG_LINE_INFO); - cmd.string_arg("--language").string_arg(temp_file); - } - - ProcessLaunchSettings settings; - settings.working_directory = paths.original_cwd; - const auto node_result = cmd_execute(cmd, settings).value_or_exit(VCPKG_LINE_INFO); - if (auto telemetry_file_path = maybe_telemetry_file_path.get()) - { - track_telemetry(fs, *telemetry_file_path); - } - - if constexpr (std::is_signed_v) - { - // workaround some systems which only keep the lower 7 bits - if (node_result < 0 || node_result > 127) - { - return 1; - } - - return node_result; - } - else - { - return static_cast(node_result); - } - } - - void forward_common_artifacts_arguments(std::vector& appended_to, const ParsedArguments& parsed) - { - auto&& switches = parsed.switches; - for (auto&& parsed_switch : switches) - { - appended_to.push_back(fmt::format("--{}", parsed_switch)); - } - - if (more_than_one_mapped(ArtifactOperatingSystemsSwitchNamesStorage, parsed.switches)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsSwitchOnlyOneOperatingSystem); - } - - if (more_than_one_mapped(ArtifactHostPlatformSwitchNamesStorage, parsed.switches)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsSwitchOnlyOneHostPlatform); - } - - if (more_than_one_mapped(ArtifactTargetPlatformSwitchNamesStorage, parsed.switches)) - { - Checks::msg_exit_with_error(VCPKG_LINE_INFO, msgArtifactsSwitchOnlyOneTargetPlatform); - } - - for (auto&& parsed_option : parsed.settings) - { - appended_to.push_back(fmt::format("--{}", parsed_option.first)); - appended_to.push_back(parsed_option.second); - } - } -} // namespace vcpkg diff --git a/src/vcpkg/metrics.cpp b/src/vcpkg/metrics.cpp index ab1ed93d86..5180fea620 100644 --- a/src/vcpkg/metrics.cpp +++ b/src/vcpkg/metrics.cpp @@ -146,8 +146,6 @@ namespace vcpkg // NOTE: New metric names should use `_` instead of `-` to simplify query syntax. const constexpr StringMetricEntry all_string_metrics[static_cast(StringMetric::COUNT)] = { // registryUri:id:version,... - {StringMetric::AcquiredArtifacts, "acquired_artifacts", plan_example}, - {StringMetric::ActivatedArtifacts, "activated_artifacts", plan_example}, {StringMetric::CiOwnerId, "ci_owner_id", "0"}, {StringMetric::CiProjectId, "ci_project_id", "0"}, {StringMetric::CommandArgs, "command_args", "0000000011111111aaaaaaaabbbbbbbbccccccccddddddddeeeeeeeeffffffff"}, diff --git a/vcpkg-artifacts/.gitignore b/vcpkg-artifacts/.gitignore deleted file mode 100644 index 3659f1ad7d..0000000000 --- a/vcpkg-artifacts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -dist/* diff --git a/vcpkg-artifacts/.mocharc.json b/vcpkg-artifacts/.mocharc.json deleted file mode 100644 index 636af24414..0000000000 --- a/vcpkg-artifacts/.mocharc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extension": ["ts"], - "spec": "test/**/*.ts" -} \ No newline at end of file diff --git a/vcpkg-artifacts/.npmrc b/vcpkg-artifacts/.npmrc deleted file mode 100644 index 86d9c31a26..0000000000 --- a/vcpkg-artifacts/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry=https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ diff --git a/vcpkg-artifacts/LICENSE b/vcpkg-artifacts/LICENSE deleted file mode 100644 index 5cf7c8db62..0000000000 --- a/vcpkg-artifacts/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. All rights reserved. - -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/vcpkg-artifacts/amf/Requires.ts b/vcpkg-artifacts/amf/Requires.ts deleted file mode 100644 index ae40b5c225..0000000000 --- a/vcpkg-artifacts/amf/Requires.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Scalar } from 'yaml'; -import { VersionReference as IVersionReference } from '../interfaces/metadata/version-reference'; -import { CustomScalarMap } from '../yaml/CustomScalarMap'; -import { Yaml, YAMLDictionary } from '../yaml/yaml-types'; -import { VersionReference } from './version-reference'; - -export class Requires extends CustomScalarMap { - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(VersionReference, node, parent, key); - } - - override set(key: string, value: VersionReference | IVersionReference | string) { - if (typeof value === 'string') { - this.assert(true); // if we don't have a node at the moment, we need to create one. - this.node.set(key, new Scalar(value)); - return; - } - if (value.raw) { - this.assert(true); // if we don't have a node at the moment, we need to create one. - this.node.set(key, new Scalar(value.raw)); - } - if (value.resolved) { - this.assert(true); // if we don't have a node at the moment, we need to create one. - this.node.set(key, new Scalar(`${value.range} ${value.resolved}`)); - } else { - this.assert(true); // if we don't have a node at the moment, we need to create one. - this.node.set(key, new Scalar(value.range)); - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/amf/contact.ts b/vcpkg-artifacts/amf/contact.ts deleted file mode 100644 index 03b9d0d10c..0000000000 --- a/vcpkg-artifacts/amf/contact.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Dictionary } from '../interfaces/collections'; -import { Contact as IContact } from '../interfaces/metadata/contact'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Entity } from '../yaml/Entity'; -import { EntityMap } from '../yaml/EntityMap'; -import { Strings } from '../yaml/strings'; -import { Yaml, YAMLDictionary } from '../yaml/yaml-types'; - -export class Contact extends Entity implements IContact { - get email(): string | undefined { return this.asString(this.getMember('email')); } - set email(value: string | undefined) { this.setMember('email', value); } - - readonly roles = new Strings(undefined, this, 'role'); - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['email', 'role']); - yield* this.validateChild('email', 'string'); - } -} - -export class Contacts extends EntityMap implements Dictionary { - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(Contact, node, parent, key); - } - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - if (this.exists()) { - for (const [, contact] of this) { - yield* contact.validate(); - } - } - } -} diff --git a/vcpkg-artifacts/amf/demands.ts b/vcpkg-artifacts/amf/demands.ts deleted file mode 100644 index 6a0cab3c17..0000000000 --- a/vcpkg-artifacts/amf/demands.ts +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isScalar } from 'yaml'; -import { i } from '../i18n'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { parseQuery } from '../mediaquery/media-query'; -import { Entity } from '../yaml/Entity'; -import { EntityMap } from '../yaml/EntityMap'; -import { Primitive, Yaml, YAMLDictionary } from '../yaml/yaml-types'; -import { Exports } from './exports'; -import { Installs } from './installer'; -import { Requires } from './Requires'; - -const ignore = new Set(['info', 'contacts', 'error', 'message', 'warning', 'requires']); -/** - * A map of mediaquery to DemandBlock - */ -export class Demands extends EntityMap { - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(DemandBlock, node, parent, key); - } - - override get keys() { - return super.keys.filter(each => !ignore.has(each)); - } - - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - - for (const [mediaQuery, demandBlock] of this) { - if (ignore.has(mediaQuery)) { - continue; - } - if (!isMap(demandBlock.node)) { - yield { - message: `Conditional demand '${mediaQuery}' is not an object`, - range: (demandBlock.node).range || [0, 0, 0], - category: ErrorKind.IncorrectType - }; - continue; - } - - const query = parseQuery(mediaQuery); - if (!query.isValid) { - yield { message: i`Error parsing conditional demand '${mediaQuery}'- ${query.error?.message}`, range: this.sourcePosition(mediaQuery)/* mediaQuery.range! */, rangeOffset: query.error, category: ErrorKind.ParseError }; - continue; - } - - yield* demandBlock.validate(); - } - } -} - -export class DemandBlock extends Entity { - discoveredData = >{}; - - get error(): string | undefined { return this.asString(this.getMember('error')); } - set error(value: string | undefined) { this.setMember('error', value); } - - get warning(): string | undefined { return this.asString(this.getMember('warning')); } - set warning(value: string | undefined) { this.setMember('warning', value); } - - get message(): string | undefined { return this.asString(this.getMember('message')); } - set message(value: string | undefined) { this.setMember('message', value); } - - readonly requires = new Requires(undefined, this, 'requires'); - readonly exports = new Exports(undefined, this, 'exports'); - readonly install = new Installs(undefined, this, 'install'); - - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(node, parent, key); - } - - /** @internal */ - override *validate(): Iterable { - yield* this.validateChildKeys(['error', 'warning', 'message', 'requires', 'exports', 'install']); - - yield* super.validate(); - if (this.exists()) { - yield* this.validateChild('error', 'string'); - yield* this.validateChild('warning', 'string'); - yield* this.validateChild('message', 'string'); - - yield* this.exports.validate(); - yield* this.requires.validate(); - yield* this.install.validate(); - } - } - - private evaluate(value: string) { - if (!value || value.indexOf('$') === -1) { - // quick exit if no expression or no variables - return value; - } - - // $$ -> escape for $ - value = value.replace(/\$\$/g, '\uffff'); - - // $0 ... $9 -> replace contents with the values from the artifact - value = value.replace(/\$([0-9])/g, (match) => this.discoveredData[match] || match); - - // restore escaped $ - return value.replace(/\uffff/g, '$'); - } - - override asString(value: any): string | undefined { - if (value === undefined) { - return value; - } - return this.evaluate(isScalar(value) ? value.value : value); - } - - override asPrimitive(value: any): Primitive | undefined { - if (value === undefined) { - return value; - } - if (isScalar(value)) { - value = value.value; - } - switch (typeof value) { - case 'boolean': - case 'number': - return value; - - case 'string': { - return this.evaluate(value); - } - } - return undefined; - } -} diff --git a/vcpkg-artifacts/amf/exports.ts b/vcpkg-artifacts/amf/exports.ts deleted file mode 100644 index 73ea235ca0..0000000000 --- a/vcpkg-artifacts/amf/exports.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -import { Exports as IExports } from '../interfaces/metadata/exports'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { BaseMap } from '../yaml/BaseMap'; -import { ScalarMap } from '../yaml/ScalarMap'; -import { StringsMap } from '../yaml/strings'; - -export class Exports extends BaseMap implements IExports { - aliases: ScalarMap = new ScalarMap(undefined, this, 'aliases'); - defines: ScalarMap = new ScalarMap(undefined, this, 'defines'); - environment: StringsMap = new StringsMap(undefined, this, 'environment'); - locations: ScalarMap = new ScalarMap(undefined, this, 'locations'); - msbuild_properties: ScalarMap = new ScalarMap(undefined, this, 'msbuild-properties'); - paths: StringsMap = new StringsMap(undefined, this, 'paths'); - properties: StringsMap = new StringsMap(undefined, this, 'properties'); - tools: ScalarMap = new ScalarMap(undefined, this, 'tools'); - - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys([ - 'aliases', - 'defines', - 'environment', - 'locations', - 'msbuild-properties', - 'paths', - 'properties', - 'tools' - ]); - } -} diff --git a/vcpkg-artifacts/amf/info.ts b/vcpkg-artifacts/amf/info.ts deleted file mode 100644 index b57b65e566..0000000000 --- a/vcpkg-artifacts/amf/info.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../i18n'; -import { ErrorKind } from '../interfaces/error-kind'; -import { Validation } from '../interfaces/validation'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Entity } from '../yaml/Entity'; -import { Options } from '../yaml/Options'; - - -export class Info extends Entity implements Validation { - // See corresponding properties in MetadataFile - get id(): string { return this.asString(this.getMember('id')) || ''; } - - get version(): string { return this.asString(this.getMember('version')) || ''; } - - get summary(): string | undefined { return this.asString(this.getMember('summary')); } - - get description(): string | undefined { return this.asString(this.getMember('description')); } - - readonly options = new Options(undefined, this, 'options'); - - get priority(): number { return this.asNumber(this.getMember('priority')) || 0; } - - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['version', 'id', 'summary', 'priority', 'description', 'options']); - - if (!this.has('id')) { - yield { message: i`Missing identity '${'info.id'}'`, range: this, category: ErrorKind.FieldMissing }; - } else if (!this.childIs('id', 'string')) { - yield { message: i`info.id should be of type 'string', found '${this.kind('id')}'`, range: this.sourcePosition('id'), category: ErrorKind.IncorrectType }; - } - - if (!this.has('version')) { - yield { message: i`Missing version '${'info.version'}'`, range: this, category: ErrorKind.FieldMissing }; - } else if (!this.childIs('version', 'string')) { - yield { message: i`info.version should be of type 'string', found '${this.kind('version')}'`, range: this.sourcePosition('version'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('summary', 'string') === false) { - yield { message: i`info.summary should be of type 'string', found '${this.kind('summary')}'`, range: this.sourcePosition('summary'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('description', 'string') === false) { - yield { message: i`info.description should be of type 'string', found '${this.kind('description')}'`, range: this.sourcePosition('description'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('options', 'sequence') === false) { - yield { message: i`info.options should be a sequence, found '${this.kind('options')}'`, range: this.sourcePosition('options'), category: ErrorKind.IncorrectType }; - } - } -} diff --git a/vcpkg-artifacts/amf/installer.ts b/vcpkg-artifacts/amf/installer.ts deleted file mode 100644 index 96a8055d28..0000000000 --- a/vcpkg-artifacts/amf/installer.ts +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isSeq } from 'yaml'; -import { GitInstaller } from '../interfaces/metadata/installers/git'; -import { Installer as IInstaller } from '../interfaces/metadata/installers/Installer'; -import { NupkgInstaller } from '../interfaces/metadata/installers/nupkg'; -import { UnTarInstaller } from '../interfaces/metadata/installers/tar'; -import { UnZipInstaller } from '../interfaces/metadata/installers/zip'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Entity } from '../yaml/Entity'; -import { EntitySequence } from '../yaml/EntitySequence'; -import { Options } from '../yaml/Options'; -import { Strings } from '../yaml/strings'; -import { Node, Yaml, YAMLDictionary } from '../yaml/yaml-types'; - -export class Installs extends EntitySequence { - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(Installer, node, parent, key); - } - - override *[Symbol.iterator](): Iterator { - if (isMap(this.node)) { - yield this.createInstance(this.node); - } - if (isSeq(this.node)) { - for (const item of this.node.items) { - yield this.createInstance(item); - } - } - } - - protected createInstance(node: Node): Installer { - if (isMap(node)) { - if (node.has('unzip')) { - return new UnzipNode(node, this); - } - if (node.has('nupkg')) { - return new NupkgNode(node, this); - } - if (node.has('untar')) { - return new UnTarNode(node, this); - } - if (node.has('git')) { - return new GitCloneNode(node, this); - } - } - throw new Error('Unsupported node type'); - } - - override *validate(): Iterable { - yield* super.validate(); - for (const each of this) { - yield* each.validate(); - } - } -} - -export class Installer extends Entity implements IInstaller { - get installerKind(): string { - throw new Error('abstract type, should not get here.'); - } - - override get fullName(): string { - return `${super.fullName}.${this.installerKind}`; - } - - get lang() { - return this.asString(this.getMember('lang')); - } - - get nametag() { - return this.asString(this.getMember('nametag')); - } - - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChild('lang', 'string'); - yield* this.validateChild('nametag', 'string'); - } -} - -abstract class FileInstallerNode extends Installer { - get sha256() { - return this.asString(this.getMember('sha256')); - } - - set sha256(value: string | undefined) { - this.setMember('sha256', value); - } - - get sha512() { - return this.asString(this.getMember('sha512')); - } - - set sha512(value: string | undefined) { - this.setMember('sha512', value); - } - - get strip() { - return this.asNumber(this.getMember('strip')); - } - - set strip(value: number | undefined) { - this.setMember('1', value); - } - - readonly transform = new Strings(undefined, this, 'transform'); - - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChild('strip', 'number'); - yield* this.validateChild('sha256', 'string'); - yield* this.validateChild('sha512', 'string'); - } - -} -class UnzipNode extends FileInstallerNode implements UnZipInstaller { - override get installerKind() { return 'unzip'; } - - readonly location = new Strings(undefined, this, 'unzip'); - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['unzip', 'sha256', 'sha512', 'strip', 'transform', 'lang', 'nametag']); - } - -} -class UnTarNode extends FileInstallerNode implements UnTarInstaller { - override get installerKind() { return 'untar'; } - location = new Strings(undefined, this, 'untar'); - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['untar', 'sha256', 'sha512', 'strip', 'transform']); - } -} -class NupkgNode extends Installer implements NupkgInstaller { - get location() { - return this.asString(this.getMember('nupkg'))!; - } - - set location(value: string) { - this.setMember('nupkg', value); - } - - override get installerKind() { return 'nupkg'; } - - get strip() { - return this.asNumber(this.getMember('strip')); - } - - set strip(value: number | undefined) { - this.setMember('1', value); - } - - get sha256() { - return this.asString(this.getMember('sha256')); - } - - set sha256(value: string | undefined) { - this.setMember('sha256', value); - } - - get sha512() { - return this.asString(this.getMember('sha512')); - } - - set sha512(value: string | undefined) { - this.setMember('sha512', value); - } - - readonly transform = new Strings(undefined, this, 'transform'); - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['nupkg', 'sha256', 'sha512', 'strip', 'transform', 'lang', 'nametag']); - } - -} -class GitCloneNode extends Installer implements GitInstaller { - override get installerKind() { return 'git'; } - - get location() { - return this.asString(this.getMember('git'))!; - } - - set location(value: string) { - this.setMember('git', value); - } - - get commit() { - return this.asString(this.getMember('commit')); - } - - set commit(value: string | undefined) { - this.setMember('commit', value); - } - - private options = new Options(undefined, this, 'options'); - - get full() { - return this.options.has('full'); - } - - set full(value: boolean) { - this.options.set('full', value); - } - - get recurse() { - return this.options.has('recurse'); - } - - set recurse(value: boolean) { - this.options.set('recurse', value); - } - - get subdirectory() { - return this.asString(this.getMember('subdirectory')); - } - - set subdirectory(value: string | undefined) { - this.setMember('subdirectory', value); - } - - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateChildKeys(['git', 'commit', 'subdirectory', 'options', 'lang', 'nametag']); - yield* this.validateChild('commit', 'string'); - } -} diff --git a/vcpkg-artifacts/amf/metadata-file.ts b/vcpkg-artifacts/amf/metadata-file.ts deleted file mode 100644 index 7225c9a5d4..0000000000 --- a/vcpkg-artifacts/amf/metadata-file.ts +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { resolve } from 'path'; -import { Document, isMap, LineCounter, parseDocument, YAMLMap } from 'yaml'; -import { i } from '../i18n'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { BaseMap } from '../yaml/BaseMap'; -import { Options } from '../yaml/Options'; -import { Yaml, YAMLDictionary } from '../yaml/yaml-types'; -import { Contacts } from './contact'; -import { DemandBlock, Demands } from './demands'; -import { Info } from './info'; -import { RegistriesDeclaration } from './registries'; - -export class MetadataFile extends BaseMap { - private constructor(protected document: Document.Parsed, public readonly filename: string, public readonly file: Uri, public lineCounter: LineCounter, public readonly registryUri: Uri | undefined) { - super(>document.contents); - - } - - static async parseMetadata(filename: string, uri: Uri, session: Session, registryUri?: Uri): Promise { - return MetadataFile.parseConfiguration(filename, await uri.readUTF8(), session, registryUri); - } - - static async parseConfiguration(filename: string, content: string, session: Session, registryUri?: Uri): Promise { - const lc = new LineCounter(); - if (!content || content === 'null') { - content = '{\n}'; - } - const doc = parseDocument(content, { prettyErrors: false, lineCounter: lc, strict: true }); - return new MetadataFile(doc, filename, session.fileSystem.file(resolve(filename)), lc, registryUri); - } - - #info = new Info(undefined, this, 'info'); - - contacts = new Contacts(undefined, this, 'contacts'); - registries = new RegistriesDeclaration(undefined, this, 'registries'); - - // rather than re-implement it, use encapsulation with a demand block - private demandBlock = new DemandBlock(this.node, undefined); - - /** Artifact identity - * - * this should be the 'path' to the artifact (following the guidelines) - * - * ie, 'compilers/microsoft/msvc' - * - * artifacts install to artifacts-root/// - */ - get id(): string { return this.asString(this.getMember('id')) || this.#info.id || ''; } - set id(value: string) { this.normalize(); this.setMember('id', value); } - - /** the version of this artifact */ - get version(): string { return this.asString(this.getMember('version')) || this.#info.version || ''; } - set version(value: string) { this.normalize(); this.setMember('version', value); } - - /** a short 1 line descriptive text */ - get summary(): string | undefined { return this.asString(this.getMember('summary')) || this.#info.summary; } - set summary(value: string | undefined) { this.normalize(); this.setMember('summary', value); } - - /** if a longer description is required, the value should go here */ - get description(): string | undefined { return this.asString(this.getMember('description')) || this.#info.description; } - set description(value: string | undefined) { this.normalize(); this.setMember('description', value); } - - readonly #options = new Options(undefined, this, 'options'); - - /** if true, intended to be used only as a dependency; for example, do not show in search results or lists */ - get dependencyOnly(): boolean { return this.#options.has('dependencyOnly') || this.#info.options.has('dependencyOnly'); } - get espidf(): boolean { return this.#options.has('espidf') || this.#info.options.has('espidf'); } - - /** higher priority artifacts should install earlier; the default is zero */ - get priority(): number { return this.asNumber(this.getMember('priority')) || this.#info.priority || 0; } - set priority(value: number) { this.normalize(); this.setMember('priority', value); } - - get error(): string | undefined { return this.demandBlock.error; } - set error(value: string | undefined) { this.demandBlock.error = value; } - - get warning(): string | undefined { return this.demandBlock.warning; } - set warning(value: string | undefined) { this.demandBlock.warning = value; } - - get message(): string | undefined { return this.demandBlock.message; } - set message(value: string | undefined) { this.demandBlock.message = value; } - - get requires() { return this.demandBlock.requires; } - get exports() { return this.demandBlock.exports; } - get install() { return this.demandBlock.install; } - - readonly conditionalDemands = new Demands(undefined, this, 'demands'); - - get isFormatValid(): boolean { - return this.document.errors.length === 0; - } - - toJsonString() { - let content = JSON.stringify(this.document.toJSON(), null, 2); - if (!content || content === 'null') { - content = '{}\n'; - } - - return content; - } - - async save(uri: Uri = this.file): Promise { - await uri.writeUTF8(this.toJsonString()); - } - - #errors!: Array; - get formatErrors(): Array { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const t = this; - return this.#errors || (this.#errors = this.document.errors.map(each => { - const message = each.message; - const line = each.linePos?.[0].line || 1; - const column = each.linePos?.[0].col || 1; - return t.formatMessage(each.name, message, line, column); - })); - } - - /** @internal */ formatMessage(category: ErrorKind | string, message: string, line?: number, column?: number): string { - if (line !== undefined && column !== undefined) { - return `${this.filename}:${line}:${column} ${category}, ${message}`; - } else { - return `${this.filename}: ${category}, ${message}`; - } - } - - formatVMessage(vMessage: ValidationMessage): string { - const message = vMessage.message; - const range = vMessage.range; - const rangeOffset = vMessage.rangeOffset; - const category = vMessage.category; - const r = Array.isArray(range) ? range : range?.sourcePosition(); - const { line, column } = this.positionAt(r, rangeOffset); - - return this.formatMessage(category, message, line, column); - } - - *deprecationWarnings(): Iterable { - const node = this.node; - if (node) { - const info = node.get('info'); - if (info) { - const infoNode = info; - yield { - message: i`The info block is deprecated for consistency with vcpkg.json; move info members to the outside.`, - range: infoNode.range || undefined, - category: ErrorKind.InfoBlockPresent - }; - } - } - } - - private positionAt(range?: [number, number, number?], offset?: { line: number, column: number }) { - const { line, col } = this.lineCounter.linePos(range?.[0] || 0); - - return offset ? { - // adds the offset values (which can come from the mediaquery parser) to the line & column. If MQ doesn't have a position, it's zero. - line: line + (offset.line - 1), - column: col + (offset.column - 1), - } : - { - line, column: col - }; - } - - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - const hasInfo = this.document.has('info'); - const allowedChildren = ['contacts', 'registries', 'demands', 'exports', 'requires', 'install']; - - if (hasInfo) { - // 2022-06-17 and earlier used a separate 'info' block for these fields - allowedChildren.push('info'); - } else { - allowedChildren.push('version', 'id', 'summary', 'priority', 'description', 'options'); - } - - yield* this.validateChildKeys(allowedChildren); - - if (hasInfo) { - yield* this.#info.validate(); - } else { - if (!this.has('id')) { - yield { message: i`Missing identity '${'id'}'`, range: this, category: ErrorKind.FieldMissing }; - } else if (!this.childIs('id', 'string')) { - yield { message: i`id should be of type 'string', found '${this.kind('id')}'`, range: this.sourcePosition('id'), category: ErrorKind.IncorrectType }; - } - - if (!this.has('version')) { - yield { message: i`Missing version '${'version'}'`, range: this, category: ErrorKind.FieldMissing }; - } else if (!this.childIs('version', 'string')) { - yield { message: i`version should be of type 'string', found '${this.kind('version')}'`, range: this.sourcePosition('version'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('summary', 'string') === false) { - yield { message: i`summary should be of type 'string', found '${this.kind('summary')}'`, range: this.sourcePosition('summary'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('description', 'string') === false) { - yield { message: i`description should be of type 'string', found '${this.kind('description')}'`, range: this.sourcePosition('description'), category: ErrorKind.IncorrectType }; - } - if (this.childIs('options', 'sequence') === false) { - yield { message: i`options should be a sequence, found '${this.kind('options')}'`, range: this.sourcePosition('options'), category: ErrorKind.IncorrectType }; - } - } - - if (this.document.has('contacts')) { - for (const each of this.contacts.values) { - yield* each.validate(); - } - } - - const set = new Set(); - for (const [mediaQuery, demandBlock] of this.conditionalDemands) { - if (set.has(mediaQuery)) { - yield { message: i`Duplicate keys detected in manifest: '${mediaQuery}'`, range: demandBlock, category: ErrorKind.DuplicateKey }; - } - - set.add(mediaQuery); - yield* demandBlock.validate(); - } - yield* this.conditionalDemands.validate(); - yield* this.install.validate(); - yield* this.registries.validate(); - yield* this.contacts.validate(); - yield* this.exports.validate(); - yield* this.requires.validate(); - } - - normalize() { - if (!this.node) { return; } - if (this.document.has('info')) { - this.setMember('id', this.#info.id); - this.setMember('version', this.#info.version); - this.setMember('summary', this.#info.summary); - this.setMember('description', this.#info.description); - const maybeOptions = this.#info.options.node?.items; - if (maybeOptions) { - for (const option of maybeOptions) { - this.#options.set(option.value, true); - } - } - - this.setMember('priority', this.#info.priority); - this.node.delete('info'); - } - } - - /** @internal */override assert(_recreateIfDisposed = false, _node = this.node): asserts this is Yaml & { node: YAMLDictionary } { - if (!isMap(this.node)) { - this.document = parseDocument('{}\n', { prettyErrors: false, lineCounter: this.lineCounter, strict: true }); - this.node = >this.document.contents; - } - } -} diff --git a/vcpkg-artifacts/amf/registries.ts b/vcpkg-artifacts/amf/registries.ts deleted file mode 100644 index 9496cb005c..0000000000 --- a/vcpkg-artifacts/amf/registries.ts +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isSeq, YAMLMap } from 'yaml'; -import { Dictionary } from '../interfaces/collections'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Uri } from '../util/uri'; -import { Entity } from '../yaml/Entity'; -import { Strings } from '../yaml/strings'; -import { Node, Yaml, YAMLDictionary, YAMLSequence } from '../yaml/yaml-types'; - -export class RegistryDeclaration extends Entity { - readonly location = new Strings(undefined, this, 'location'); - - get registryKind(): string | undefined { return this.asString(this.getMember('kind')); } - set registryKind(value: string | undefined) { this.setMember('kind', value); } - - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - // - if (this.registryKind === undefined) { - yield { - message: 'Registry missing \'kind\'', - range: this, - category: ErrorKind.FieldMissing, - }; - } - } -} - -export class RegistriesDeclaration extends Yaml implements Dictionary, Iterable<[string, RegistryDeclaration]> { - *[Symbol.iterator](): Iterator<[string, RegistryDeclaration]> { - if (isMap(this.node)) { - for (const { key, value } of this.node.items) { - const v = this.createRegistry(value); - if (v) { - yield [key, v]; - } - } - } - if (isSeq(this.node)) { - for (const item of this.node.items) { - if (isMap(item)) { - const name = this.asString(item.get('name')); - if (name) { - const v = this.createRegistry(item); - if (v) { - yield [name, v]; - } - } - } - } - } - } - - clear(): void { - this.dispose(true); - } - - override createNode() { - return new YAMLSequence(); - } - - add(name: string, location?: Uri, kind?: string): RegistryDeclaration { - if (this.get(name)) { - throw new Error(`Registry ${name} already exists.`); - } - - this.assert(true); - if (isMap(this.node)) { - throw new Error('Not Implemented as a map right now.'); - } - if (isSeq(this.node)) { - const m = new YAMLMap(); - this.node.add(m); - m.set('name', name); - m.set('location', location?.formatted); - m.set('kind', kind); - } - return this.get(name)!; - } - delete(key: string): boolean { - const n = this.node; - if (isMap(n)) { - const result = n.delete(key); - this.dispose(); - return result; - } - if (isSeq(n)) { - let removed = false; - const items = n.items; - for (let i = items.length - 1; i >= 0; i--) { - const item = items[i]; - if (isMap(item) && item.get('name') === key) { - removed ||= n.delete(i); - } - } - this.dispose(); - return removed; - } - return false; - } - get(key: string): RegistryDeclaration | undefined { - const n = this.node; - if (isMap(n)) { - return this.createRegistry(n.get(key, true)); - } - if (isSeq(n)) { - for (const item of n.items) { - if (isMap(item) && item.get('name') === key) { - return this.createRegistry(item); - } - } - } - return undefined; - } - - has(key: string): boolean { - const n = this.node; - if (isMap(n)) { - return n.has(key); - } - if (isSeq(n)) { - for (const item of n.items) { - if (isMap(item) && item.get('name') === key) { - return true; - } - } - } - return false; - } - - get length(): number { - if (isMap(this.node) || isSeq(this.node)) { - return this.node.items.length; - } - return 0; - } - override get keys(): Array { - if (isMap(this.node)) { - return this.node.items.map(({ key }) => this.asString(key) || ''); - } - if (isSeq(this.node)) { - const result = new Array(); - for (const item of this.node.items) { - if (isMap(item)) { - const n = this.asString(item.get('name')); - if (n) { - result.push(n); - } - } - } - return result; - } - return []; - } - - protected createRegistry(node: Node) { - if (isMap(node)) { - const k = this.asString(node.get('kind')); - const l = this.asString(node.get('location')); - - // simplistic check to see if we're pointing to a file or a https:// url - if (k === 'artifact' && l) { - return new RegistryDeclaration(node, this); - } - - } - return undefined; - } - /** @internal */ - override *validate(): Iterable { - yield* super.validate(); - if (this.exists()) { - for (const [, registry] of this) { - yield* registry.validate(); - } - } - } -} diff --git a/vcpkg-artifacts/amf/version-reference.ts b/vcpkg-artifacts/amf/version-reference.ts deleted file mode 100644 index f9aad0c1d5..0000000000 --- a/vcpkg-artifacts/amf/version-reference.ts +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Range, SemVer } from 'semver'; -import { VersionReference as IVersionReference } from '../interfaces/metadata/version-reference'; -import { Yaml, YAMLScalar } from '../yaml/yaml-types'; - - -// nuget-semver parser doesn't have a ts typings package -// eslint-disable-next-line @typescript-eslint/no-require-imports -const parseRange: any = require('@snyk/nuget-semver/lib/range-parser'); - -export class VersionReference extends Yaml implements IVersionReference { - get raw(): string | undefined { - return this.node?.value || undefined; - } - - set raw(value: string | undefined) { - if (value === undefined) { - this.dispose(true); - } else { - this.node = new YAMLScalar(value); - } - } - - static override create(): YAMLScalar { - return new YAMLScalar(''); - } - - private split(): [Range, SemVer | undefined] { - - const v = this.raw; - if (v) { - - const [, a, b] = /(.+)\s+([\d\\.]+)/.exec(v) || []; - - if (/\[|\]|\(|\)/.exec(v)) { - // looks like a nuget version range. - try { - const range = parseRange(a || v); - let str = ''; - if (range._components[0].minOperator) { - str = `${range._components[0].minOperator} ${range._components[0].minOperand}`; - } - if (range._components[0].maxOperator) { - str = `${str} ${range._components[0].maxOperator} ${range._components[0].maxOperand}`; - } - const newRange = new Range(str); - newRange.raw = a || v; - - if (b) { - const ver = new SemVer(b, true); - return [newRange, ver]; - } - - return [newRange, undefined]; - - } catch { - // ignore and fall thru - } - } - - if (a) { - // we have at least a range going on here. - try { - const range = new Range(a, true); - const ver = new SemVer(b, true); - return [range, ver]; - } catch { - // ignore and fall thru - } - } - // the range or version didn't resolve correctly. - // must be a range alone. - return [new Range(v, true), undefined]; - } - return [new Range('*', true), undefined]; - } - get range() { - return this.split()[0]; - } - set range(ver: Range) { - this.raw = `${ver.raw} ${this.resolved?.raw || ''}`.trim(); - } - - get resolved() { - return this.split()[1]; - } - set resolved(ver: SemVer | undefined) { - this.raw = `${this.range.raw} ${ver?.raw || ''}`.trim(); - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/archivers/git.ts b/vcpkg-artifacts/archivers/git.ts deleted file mode 100644 index 2f494f5806..0000000000 --- a/vcpkg-artifacts/archivers/git.ts +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { UnpackEvents } from '../interfaces/events'; -import { execute } from '../util/exec-cmd'; -import { isFilePath, Uri } from '../util/uri'; - -export interface CloneOptions { - force?: boolean; -} - -/** @internal */ -export class Git { - #toolPath: string; - #targetFolder: Uri; - - constructor(toolPath: string, targetFolder: Uri) { - this.#toolPath = toolPath; - this.#targetFolder = targetFolder; - } - - /** - * Method that clones a git repo into a desired location and with various options. - * @param repo The Uri of the remote repository that is desired to be cloned. - * @param events The events that may need to be updated in order to track progress. - * @param options The options that will modify how the clone will be called. - * @returns Boolean representing whether the execution was completed without error, this is not necessarily - * a guarantee that the clone did what we expected. - */ - async clone(repo: Uri, events: Partial, options: { recursive?: boolean, depth?: number } = {}) { - const remote = await isFilePath(repo) ? repo.fsPath : repo.toString(); - - const result = await execute(this.#toolPath, [ - 'clone', - remote, - this.#targetFolder.fsPath, - options.recursive ? '--recursive' : '', - options.depth ? `--depth=${options.depth}` : '', - '--progress' - ], { - onStdErrData: chunkToHeartbeat(events), - onStdOutData: chunkToHeartbeat(events) - }); - - return result.code === 0 ? true : false; - } - - /** - * Fetches a 'tag', this could theoretically be a commit, a tag, or a branch. - * @param remoteName Remote name to fetch from. Typically will be 'origin'. - * @param events Events that may be called in order to present progress. - * @param options Options to modify how fetch is called. - * @returns Boolean representing whether the execution was completed without error, this is not necessarily - * a guarantee that the fetch did what we expected. - */ - async fetch(remoteName: string, _events: Partial, options: { commit?: string, depth?: number } = {}) { - const result = await execute(this.#toolPath, [ - '-C', - this.#targetFolder.fsPath, - 'fetch', - remoteName, - options.commit ? options.commit : '', - options.depth ? `--depth=${options.depth}` : '' - ], { - cwd: this.#targetFolder.fsPath - }); - - return result.code === 0 ? true : false; - } - - /** - * Checks out a specific commit. If no commit is given, the default behavior of a checkout will be - * used. (Checking out the current branch) - * @param events Events to possibly track progress. - * @param options Passing along a commit or branch to checkout, optionally. - * @returns Boolean representing whether the execution was completed without error, this is not necessarily - * a guarantee that the checkout did what we expected. - */ - async checkout(events: Partial, options: { commit?: string } = {}) { - const result = await execute(this.#toolPath, [ - '-C', - this.#targetFolder.fsPath, - 'checkout', - options.commit ? options.commit : '' - ], { - cwd: this.#targetFolder.fsPath, - onStdErrData: chunkToHeartbeat(events), - onStdOutData: chunkToHeartbeat(events) - }); - return result.code === 0 ? true : false; - } - - - /** - * Performs a reset on the git repo. - * @param events Events to possibly track progress. - * @param options Options to control how the reset is called. - * @returns Boolean representing whether the execution was completed without error, this is not necessarily - * a guarantee that the reset did what we expected. - */ - async reset(events: Partial, options: { commit?: string, recurse?: boolean, hard?: boolean } = {}) { - const result = await execute(this.#toolPath, [ - '-C', - this.#targetFolder.fsPath, - 'reset', - options.commit ? options.commit : '', - options.recurse ? '--recurse-submodules' : '', - options.hard ? '--hard' : '' - ], { - cwd: this.#targetFolder.fsPath, - onStdErrData: chunkToHeartbeat(events), - onStdOutData: chunkToHeartbeat(events) - }); - return result.code === 0 ? true : false; - } - - - /** - * Initializes a folder on disk to be a git repository - * @returns true if the initialization was successful, false otherwise. - */ - async init() { - if (! await this.#targetFolder.exists()) { - await this.#targetFolder.createDirectory(); - } - - if (! await this.#targetFolder.isDirectory()) { - throw new Error(`${this.#targetFolder.fsPath} is not a directory.`); - } - - const result = await execute(this.#toolPath, ['init'], { - cwd: this.#targetFolder.fsPath - }); - - return result.code === 0 ? true : false; - } - - /** - * Adds a remote location to the git repo. - * @param name the name of the remote to add. - * @param location the location of the remote to add. - * @returns true if the addition was successful, false otherwise. - */ - async addRemote(name: string, location: Uri) { - const result = await execute(this.#toolPath, [ - '-C', - this.#targetFolder.fsPath, - 'remote', - 'add', - name, - location.toString() - ], { - cwd: this.#targetFolder.fsPath - }); - - return result.code === 0; - } - - /** - * updates submodules in a git repository - * @param events Events to possibly track progress. - * @param options Options to control how the submodule update is called. - * @returns true if the update was successful, false otherwise. - */ - async updateSubmodules(events: Partial, options: { init?: boolean, recursive?: boolean, depth?: number } = {}) { - const result = await execute(this.#toolPath, [ - '-C', - this.#targetFolder.fsPath, - 'submodule', - 'update', - '--progress', - options.init ? '--init' : '', - options.depth ? `--depth=${options.depth}` : '', - options.recursive ? '--recursive' : '', - ], { - cwd: this.#targetFolder.fsPath, - onStdErrData: chunkToHeartbeat(events), - onStdOutData: chunkToHeartbeat(events) - }); - - return result.code === 0; - } - - /** - * sets a git configuration value in the repo. - * @param configFile the relative path to the config file inside the repo on disk - * @param key the key to set in the config file - * @param value the value to set in the config file - * @returns true if the config file was updated, false otherwise - */ - async config(configFile: string, key: string, value: string) { - const result = await execute(this.#toolPath, [ - 'config', - '-f', - this.#targetFolder.join(configFile).fsPath, - key, - value - ], { - cwd: this.#targetFolder.fsPath - }); - return result.code === 0; - } -} -function chunkToHeartbeat(events: Partial): (chunk: any) => void { - return (chunk: any) => { - const regex = /\s([0-9]*?)%/; - chunk.toString().split(/^/gim).map((x: string) => x.trim()).filter((each: any) => each).forEach((line: string) => { - const match_array = line.match(regex); - if (match_array !== null) { - events.unpackArchiveHeartbeat?.(line.trim()); - } - }); - }; -} diff --git a/vcpkg-artifacts/artifacts/SetOfDemands.ts b/vcpkg-artifacts/artifacts/SetOfDemands.ts deleted file mode 100644 index 261cfdf5af..0000000000 --- a/vcpkg-artifacts/artifacts/SetOfDemands.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { MetadataFile } from '../amf/metadata-file'; -import { Demands } from '../interfaces/metadata/demands'; -import { Installer } from '../interfaces/metadata/installers/Installer'; -import { VersionReference } from '../interfaces/metadata/version-reference'; -import { parseQuery } from '../mediaquery/media-query'; -import { Session } from '../session'; -import { MultipleInstallsMatched } from '../util/exceptions'; -import { linq } from '../util/linq'; - - -export class SetOfDemands { - _demands = new Map(); - - constructor(metadata: MetadataFile, session: Session) { - this._demands.set('', metadata); - - for (const [query, demands] of metadata.conditionalDemands) { - if (parseQuery(query).match(session.context)) { - session.channels.debug(`Matching demand query: '${query}'`); - this._demands.set(query, demands); - } - } - } - - get installer(): Iterable { - const install = linq.entries(this._demands).where(([, demand]) => demand.install.length > 0).toArray(); - - if (install.length > 1) { - // bad. There should only ever be one install block. - throw new MultipleInstallsMatched(install.map(each => each[0])); - } - - return install[0]?.[1].install || []; - } - - get errors() { - return linq.values(this._demands).selectNonNullable(d => d.error).toArray(); - } - get warnings() { - return linq.values(this._demands).selectNonNullable(d => d.warning).toArray(); - } - get messages() { - return linq.values(this._demands).selectNonNullable(d => d.message).toArray(); - } - get exports() { - return linq.values(this._demands).selectNonNullable(d => d.exports).toArray(); - } - - get requires() { - const d = this._demands; - const rq1 = linq.values(d).selectNonNullable(d => d.requires).toArray(); - const result : Record = {}; - for (const dict of rq1) { - for (const [query, demands] of dict) { - result[query] = demands; - } - } - const rq = [...d.values()].map(each => each.requires).filter(each => each); - - for (const dict of rq) { - for (const [query, demands] of dict) { - result[query] = demands; - } - } - return result; - } -} diff --git a/vcpkg-artifacts/artifacts/activation.ts b/vcpkg-artifacts/artifacts/activation.ts deleted file mode 100644 index 479ef89a5c..0000000000 --- a/vcpkg-artifacts/artifacts/activation.ts +++ /dev/null @@ -1,817 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/* eslint-disable prefer-const */ - -import { lstat } from 'fs/promises'; -import { delimiter, extname, resolve } from 'path'; -import { isScalar } from 'yaml'; -import { postscriptVariable, undoVariableName } from '../constants'; -import { i } from '../i18n'; -import { Exports } from '../interfaces/metadata/exports'; -import { Session } from '../session'; -import { Channels } from '../util/channels'; -import { isIterable } from '../util/checks'; -import { replaceCurlyBraces } from '../util/curly-replacements'; -import { linq } from '../util/linq'; -import { Queue } from '../util/promise'; -import { Uri } from '../util/uri'; -// eslint-disable-next-line @typescript-eslint/no-require-imports -const XMLWriterImpl = require('xml-writer'); - -export interface XmlWriter { - startDocument(version: string | undefined, encoding: string | undefined): XmlWriter; - writeElement(name: string, content: string): XmlWriter; - writeAttribute(name: string, value: string): XmlWriter; - startElement(name: string): XmlWriter; - endElement(): XmlWriter; -} - -export interface UndoFile { - environment: Record | undefined; - aliases: Array | undefined; - stack: Array | undefined; -} - -function findCaseInsensitiveOnWindows(map: Map, key: string): V | undefined { - return process.platform === 'win32' ? linq.find(map, key) : map.get(key); -} -export type Tuple = [K, V]; - -function displayNoPostScriptError(channels: Channels) { - channels.error(i`no postscript file: run vcpkg-shell with the same arguments`); -} - -export class Activation { - #defines = new Map(); - #aliases = new Map(); - #environmentChanges = new Map>(); - #properties = new Map>(); - #msbuild_properties = new Array>(); - - // Relative to the artifact install - #locations = new Map(); - #paths = new Map>(); - #tools = new Map(); - - private constructor( - private readonly allowStacking: boolean, - private readonly channels: Channels, - private readonly environment: NodeJS.ProcessEnv, - private readonly postscriptFile: Uri | undefined, - private readonly undoFile: UndoFile | undefined, - private readonly nextUndoEnvironmentFile: Uri) { - } - - static async start(session: Session, allowStacking: boolean) : Promise { - const environment = process.env; - const postscriptFileName = environment[postscriptVariable]; - const postscriptFile = postscriptFileName ? session.fileSystem.file(postscriptFileName) : undefined; - - const undoVariableValue = environment[undoVariableName]; - const undoFileUri = undoVariableValue ? session.fileSystem.file(undoVariableValue) : undefined; - const undoFileRaw = undoFileUri ? await undoFileUri.tryReadUTF8() : undefined; - const undoFile = undoFileRaw ? JSON.parse(undoFileRaw) : undefined; - - const undoStack = undoFile?.stack; - if (undoFile && !allowStacking) { - if (undoStack) { - printDeactivatingMessage(session.channels, undoStack); - undoStack.length = 0; - } - - if (undoFile.environment) { - // form what the environment "would have been" had we deactivated first for figuring out - // what the new environment should be - undoActivation(environment, undoFile.environment); - } - } - - const nextUndoEnvironmentFile = session.nextPreviousEnvironment; - - return new Activation(allowStacking, session.channels, environment, postscriptFile, undoFile, nextUndoEnvironmentFile); - } - - addExports(exports: Exports, targetFolder: Uri) { - for (let [define, defineValue] of exports.defines) { - if (!define) { - continue; - } - - if (defineValue === 'true') { - defineValue = '1'; - } - this.addDefine(define, defineValue); - } - - // **** paths **** - for (const [pathName, values] of exports.paths) { - if (!pathName || !values || values.length === 0) { - continue; - } - - // the folder is relative to the artifact install - for (const folder of values) { - this.addPath(pathName, targetFolder.join(folder).fsPath); - } - } - - // **** tools **** - for (let [toolName, toolPath] of exports.tools) { - if (!toolName || !toolPath) { - continue; - } - this.addTool(toolName, targetFolder.join(toolPath).fsPath); - } - - // **** locations **** - for (const [name, location] of exports.locations) { - if (!name || !location) { - continue; - } - - this.addLocation(name, targetFolder.join(location).fsPath); - } - - // **** variables **** - for (const [name, environmentVariableValues] of exports.environment) { - if (!name || environmentVariableValues.length === 0) { - continue; - } - this.addEnvironmentVariable(name, environmentVariableValues); - } - - // **** properties **** - for (const [name, propertyValues] of exports.properties) { - if (!name || propertyValues.length === 0) { - continue; - } - this.addProperty(name, propertyValues); - } - - // **** aliases **** - for (const [name, alias] of exports.aliases) { - if (!name || !alias) { - continue; - } - this.addAlias(name, alias); - } - - // **** msbuild-properties **** - for (const [name, propertyValue] of exports.msbuild_properties) { - this.addMSBuildProperty(name, propertyValue, targetFolder); - } - } - - - /** a collection of #define declarations that would assumably be applied to all compiler calls. */ - addDefine(name: string, value: string) { - const v = findCaseInsensitiveOnWindows(this.#defines, name); - - if (v === undefined) { - this.#defines.set(name, value); - } else if (v !== value) { - // conflict. todo: what do we want to do? - this.channels.warning(i`Duplicate define ${name} during activation. New value will replace old.`); - this.#defines.set(name, value); - } - } - - get defines() { - return linq.entries(this.#defines).selectAsync(async ([key, value]) => >[key, await this.resolveAndVerify(value)]); - } - - async getDefine(name: string): Promise { - const v = this.#defines.get(name); - return v ? await this.resolveAndVerify(v) : undefined; - } - - /** a collection of tool locations from artifacts */ - addTool(name: string, value: string) { - const t = findCaseInsensitiveOnWindows(this.#tools, name); - if (t === undefined) { - this.#tools.set(name, value); - } else if (t !== value) { - this.channels.warning(i`Duplicate tool declared ${name} during activation. New value will replace old.`); - this.#tools.set(name, value); - } - } - - get tools() { - return linq.entries(this.#tools).selectAsync(async ([key, value]) => >[key, await this.resolveAndVerify(value)]); - } - - async getTool(name: string): Promise { - const t = findCaseInsensitiveOnWindows(this.#tools, name); - if (t) { - const path = await this.resolveAndVerify(t); - return await this.validatePath(path) ? path : undefined; - } - return undefined; - } - - /** Aliases are tools that get exposed to the user as shell aliases */ - addAlias(name: string, value: string) { - const a = findCaseInsensitiveOnWindows(this.#aliases, name); - if (a === undefined) { - this.#aliases.set(name, value); - } else if (a !== value) { - this.channels.warning(i`Duplicate alias declared ${name} during activation. New value will replace old.`); - this.#aliases.set(name, value); - } - } - - async getAlias(name: string, refcheck = new Set()): Promise { - const v = findCaseInsensitiveOnWindows(this.#aliases, name); - if (v !== undefined) { - return this.resolveAndVerify(v, [], refcheck); - } - return undefined; - } - - get aliases() { - return linq.entries(this.#aliases).selectAsync(async ([key, value]) => >[key, await this.resolveAndVerify(value)]); - } - - get aliasCount() { - return this.#aliases.size; - } - - /** a collection of 'published locations' from artifacts */ - addLocation(name: string, location: string | Uri) { - if (!name || !location) { - return; - } - location = typeof location === 'string' ? location : location.fsPath; - - const l = this.#locations.get(name); - if (l === undefined) { - this.#locations.set(name, location); - } else if (l !== location) { - this.channels.warning(i`Duplicate location declared ${name} during activation. New value will replace old.`); - this.#locations.set(name, location); - } - } - - get locations() { - return linq.entries(this.#locations).selectAsync(async ([key, value]) => >[key, await this.resolveAndVerify(value)]); - } - - getLocation(name: string) { - const l = this.#locations.get(name); - return l ? this.resolveAndVerify(l) : undefined; - } - - /** a collection of environment variables from artifacts that are intended to be combinined into variables that have PATH delimiters */ - addPath(name: string, location: string | Iterable | Uri | Iterable) { - if (!name || !location) { - return; - } - - let set = findCaseInsensitiveOnWindows(this.#paths, name); - - if (!set) { - set = new Set(); - this.#paths.set(name, set); - } - - if (isIterable(location)) { - for (const l of location) { - set.add(typeof l === 'string' ? l : l.fsPath); - } - } else { - set.add(typeof location === 'string' ? location : location.fsPath); - } - } - - get paths() { - return linq.entries(this.#paths).selectAsync(async ([key, value]) => >>[key, await this.resolveAndVerify(value)]); - } - - async getPath(name: string) { - const set = this.#paths.get(name); - if (!set) { - return undefined; - } - return this.resolveAndVerify(set); - } - - /** environment variables from artifacts */ - addEnvironmentVariable(name: string, value: string | Iterable) { - if (!name) { - return; - } - - let v = findCaseInsensitiveOnWindows(this.#environmentChanges, name); - if (!v) { - v = new Set(); - this.#environmentChanges.set(name, v); - } - - if (typeof value === 'string') { - v.add(value); - } else { - for (const each of value) { - v.add(each); - } - } - } - - /** a collection of arbitrary properties from artifacts */ - addProperty(name: string, value: string | Iterable) { - if (!name) { - return; - } - let v = this.#properties.get(name); - if (v === undefined) { - v = new Set(); - this.#properties.set(name, v); - } - - if (typeof value === 'string') { - v.add(value); - } else { - for (const each of value) { - v.add(each); - } - } - } - - get properties() { - return linq.entries(this.#properties).selectAsync(async ([key, value]) => >>[key, await this.resolveAndVerify(value)]); - } - - async getProperty(name: string) { - const v = this.#properties.get(name); - return v ? await this.resolveAndVerify(v) : undefined; - } - - msBuildProcessPropertyValue(value: string, targetFolder: Uri) { - // note that this is intended to be consistent with vcpkg's handling: - // include/vcpkg/base/api_stable_format.h - const initialLocal = targetFolder.fsPath; - const endsWithSlash = initialLocal.endsWith('\\') || initialLocal.endsWith('/'); - const root = endsWithSlash ? initialLocal.substring(0, initialLocal.length - 1) : initialLocal; - const replacements = new Map([['root', root]]); - return replaceCurlyBraces(value, replacements); - } - - addMSBuildProperty(name: string, value: string, targetFolder: Uri) { - this.#msbuild_properties.push([name, this.msBuildProcessPropertyValue(value, targetFolder)]); - } - - async resolveAndVerify(value: string, locals?: Array, refcheck?: Set): Promise - async resolveAndVerify(value: Set, locals?: Array, refcheck?: Set): Promise> - async resolveAndVerify(value: string | Set, locals: Array = [], refcheck = new Set()): Promise> { - if (typeof value === 'string') { - value = this.resolveVariables(value, locals, refcheck); - - if (value.indexOf('{') === -1) { - return value; - } - const parts = value.split(/\{+(.+?)\}+/g); - const result = []; - for (let index = 0; index < parts.length; index += 2) { - result.push(parts[index]); - result.push(await this.validatePath(parts[index + 1])); - } - return result.join(''); - } - // for sets - const result = new Set(); - await new Queue().enqueueMany(value, async (v) => result.add(await this.resolveAndVerify(v, locals))).done; - return result; - } - - private resolveVariables(text: string, locals: Array = [], refcheck = new Set()): string { - if (isScalar(text)) { - this.channels.debug(`internal warning: scalar value being used directly : ${text.value}`); - text = text.value; // spews a --debug warning if a scalar makes its way thru for some reason - } - - // short-circuiting - if (!text || text.indexOf('$') === -1) { - return text; - } - - // prevent circular resolution - if (refcheck.has(text)) { - this.channels.warning(i`Circular variable reference detected: ${text}`); - this.channels.debug(i`Circular variable reference detected: ${text} - ${linq.join(refcheck, ' -> ')}`); - return text; - } - - return text.replace(/(\$\$)|(\$)([a-zA-Z_][a-zA-Z0-9_]*)\.([a-zA-Z_][a-zA-Z0-9_]*)|(\$)([a-zA-Z_][a-zA-Z0-9_]*)/g, (_wholeMatch, isDoubleDollar, isObjectMember, obj, member, _isSimple, variable) => { - return isDoubleDollar ? '$' : isObjectMember ? this.getValueForVariableSubstitution(obj, member, locals, refcheck) : this.resolveVariables(locals[variable], locals, refcheck); - }); - } - - private getValueForVariableSubstitution(obj: string, member: string, locals: Array, refcheck: Set): string { - switch (obj) { - case 'environment': { - // lookup environment variable value - const v = findCaseInsensitiveOnWindows(this.#environmentChanges, member); - if (v) { - return this.resolveVariables(linq.join(v, ' '), [], refcheck); - } - - // lookup the environment variable in the original environment - const orig = this.environment[member]; - if (orig) { - return orig; - } - break; - } - - case 'defines': { - const v = findCaseInsensitiveOnWindows(this.#defines, member); - if (v !== undefined) { - return this.resolveVariables(v, locals, refcheck); - } - break; - } - - case 'aliases': { - const v = findCaseInsensitiveOnWindows(this.#aliases, member); - if (v !== undefined) { - return this.resolveVariables(v, locals, refcheck); - } - break; - } - - case 'locations': { - const v = findCaseInsensitiveOnWindows(this.#locations, member); - if (v !== undefined) { - return this.resolveVariables(v, locals, refcheck); - } - break; - } - - case 'paths': { - const v = findCaseInsensitiveOnWindows(this.#paths, member); - if (v !== undefined) { - return this.resolveVariables(linq.join(v, delimiter), locals, refcheck); - } - break; - } - - case 'properties': { - const v = findCaseInsensitiveOnWindows(this.#properties, member); - if (v !== undefined) { - return this.resolveVariables(linq.join(v, ';'), locals, refcheck); - } - break; - } - - case 'tools': { - const v = findCaseInsensitiveOnWindows(this.#tools, member); - if (v !== undefined) { - return this.resolveVariables(v, locals, refcheck); - } - break; - } - - default: - this.channels.warning(i`Variable reference found '$${obj}.${member}' that is referencing an unknown base object.`); - return `$${obj}.${member}`; - } - - this.channels.debug(i`Unresolved variable reference found ($${obj}.${member}) during variable substitution.`); - return `$${obj}.${member}`; - } - - - private async validatePath(path: string) { - if (path) { - try { - if (path[0] === '"') { - path = path.substr(1, path.length - 2); - } - path = resolve(path); - await lstat(path); - - // if the path has spaces, we need to quote it - if (path.indexOf(' ') !== -1) { - path = `"${path}"`; - } - - return path; - } catch { - // does not exist - this.channels.error(i`Invalid path - does not exist: ${path}`); - } - } - return ''; - } - - expandPathLikeVariableExpressions(value: string): Array { - let n : number | undefined = undefined; - const parts = value.split(/(\$[a-zA-Z0-9_.]+)/g).filter(each => each).map((part, i) => { - - const value = this.resolveVariables(part).replace(/\{(.*?)\}/g, (_match, expression) => expression); - - if (value.indexOf(delimiter) !== -1) { - n = i; - } - - return value; - }); - - if (n === undefined) { - // if the value didn't have a path separator, then just return the value - return [parts.join('')]; - } - - const front = parts.slice(0, n).join(''); - const back = parts.slice(n + 1).join(''); - - return parts[n].split(delimiter).filter(each => each).map(each => `${front}${each}${back}`); - } - - generateMSBuild(): string { - const result : XmlWriter = new XMLWriterImpl(' '); - result.startDocument('1.0', 'utf-8'); - result.startElement('Project'); - result.writeAttribute('xmlns', 'http://schemas.microsoft.com/developer/msbuild/2003'); - if (this.#msbuild_properties.length) { - result.startElement('PropertyGroup'); - for (const [key, value] of this.#msbuild_properties) { - result.writeElement(key, value); - } - - result.endElement(); // PropertyGroup - } - - result.endElement(); // Project - return result.toString(); - } - - protected async generateEnvironmentVariables(): Promise<[Record, Record]> { - const undo : Record = {}; - const env : Record = {}; - - for await (const [pathVariable, locations] of this.paths) { - if (locations.size) { - const originalVariable = linq.find(this.environment, pathVariable) || ''; - if (originalVariable) { - for (const p of originalVariable.split(delimiter)) { - if (p) { - locations.add(p); - } - } - } - // compose the final value - env[pathVariable] = linq.join(locations, delimiter); - - // set the undo data - undo[pathVariable] = originalVariable || ''; - } - } - - // combine environment variables with multiple values with spaces (uses: CFLAGS, etc) - const environmentVariables = linq.entries(this.#environmentChanges) - .selectAsync(async ([key, value]) => >>[key, await this.resolveAndVerify(value)]); - for await (const [variable, values] of environmentVariables) { - env[variable] = linq.join(values, ' '); - undo[variable] = this.environment[variable] || ''; - } - - // .tools get defined as environment variables too. - for await (const [variable, value] of this.tools) { - env[variable] = value; - undo[variable] = this.environment[variable] || ''; - } - - // .defines get compiled into a single environment variable. - let defines = ''; - for await (const [name, value] of this.defines) { - defines += value ? `-D${name}=${value} ` : `-D${name} `; - } - - if (defines) { - env['DEFINES'] = defines; - undo['DEFINES'] = this.environment['DEFINES'] || ''; - } - - return [env, undo]; - } - - async activate(thisStackEntries: Array, msbuildFile: Uri | undefined, json: Uri | undefined) : Promise { - const postscriptFile = this.postscriptFile; - if (!postscriptFile && !msbuildFile && !json) { - displayNoPostScriptError(this.channels); - return false; - } - - async function transformtoRecord ( - orig: AsyncGenerator>, any, unknown>, - // this type cast to U isn't *technically* correct but since it's locally scoped for this next block of code it shouldn't cause problems - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - func: (value: T) => U = (x => x as unknown as U)) { - - return linq.values((await toArrayAsync(orig))).toObject(tuple => [tuple[0], func(tuple[1])]); - } - - const defines = await transformtoRecord(this.defines); - const aliases = await transformtoRecord(this.aliases); - const locations = await transformtoRecord(this.locations); - const tools = await transformtoRecord(this.tools); - const properties = await transformtoRecord(this.properties, (set) => Array.from(set)); - const paths = await transformtoRecord(this.paths, (set) => Array.from(set)); - - const [variables, undo] = await this.generateEnvironmentVariables(); - - // msbuildFile and json are always generated as if deactivation happend first so that their - // content does not depend on the stacked environment. - if (msbuildFile) { - const contents = await this.generateMSBuild(); - this.channels.debug(`--------[START MSBUILD FILE]--------\n${contents}\n--------[END MSBUILD FILE]---------`); - await msbuildFile.writeUTF8(contents); - } - - if (json) { - const contents = generateJson(variables, defines, aliases, properties, locations, paths, tools); - this.channels.debug(`--------[START ENV VAR FILE]--------\n${contents}\n--------[END ENV VAR FILE]---------`); - await json.writeUTF8(contents); - } - - const newUndoStack = this.undoFile?.stack ?? []; - Array.prototype.push.apply(newUndoStack, thisStackEntries); - this.channels.message(i`Activating: ${newUndoStack.join(' + ')}`); - - if (postscriptFile) { - // preserve undo environment variables for anything this particular activation did not touch - const oldEnvironment = this.undoFile?.environment; - if (oldEnvironment) { - for (const oldUndoKey in oldEnvironment) { - undo[oldUndoKey] = oldEnvironment[oldUndoKey] ?? ''; - if (!this.allowStacking && variables[oldUndoKey] === undefined) { - variables[oldUndoKey] = ''; - } - } - } - - if (!variables[undoVariableName]) { - variables[undoVariableName] = this.nextUndoEnvironmentFile.fsPath; - } - - // if any aliases were undone, remove them - const oldAliases = this.undoFile?.aliases; - if (oldAliases) { - for (const oldAlias in oldAliases) { - if (aliases[oldAlias] === undefined) { - aliases[oldAlias] = ''; - } - } - } - - // generate shell script - await writePostscript(this.channels, postscriptFile, variables, aliases); - - const nonEmptyAliases : Array = []; - for (const alias in aliases) { - if (aliases[alias]) { - nonEmptyAliases.push(alias); - } - } - - const undoContents : UndoFile = { - environment: undo, - aliases: nonEmptyAliases, - stack: newUndoStack - }; - - const undoStringified = JSON.stringify(undoContents); - this.channels.debug(`--------[START UNDO FILE]--------\n${undoStringified}\n--------[END UNDO FILE]---------`); - await this.nextUndoEnvironmentFile.writeUTF8(undoStringified); - } - - return true; - } -} - -function generateCmdScript(variables: Record, aliases: Record): string { - return linq.entries(variables).select(([k, v]) => { return v ? `set ${k}=${v}` : `set ${k}=`; }).join('\r\n') + - '\r\n' + - linq.entries(aliases).select(([k, v]) => { return v ? `doskey ${k}=${v} $*` : `doskey ${k}=`; }).join('\r\n') + - '\r\n'; -} - -function generatePowerShellScript(variables: Record, aliases: Record): string { - return linq.entries(variables).select(([k, v]) => { return v ? `$\{ENV:${k}}="${v}"` : `$\{ENV:${k}}=$null`; }).join('\n') + - '\n' + - linq.entries(aliases).select(([k, v]) => { return v ? `function global:${k} { & ${v} @args }` : `remove-item -ea 0 "function:${k}"`; }).join('\n') + - '\n'; -} - -function generatePosixScript(variables: Record, aliases: Record): string { - return linq.entries(variables).select(([k, v]) => { return v ? `export ${k}="${v}"` : `unset ${k}`; }).join('\n') + - '\n' + - linq.entries(aliases).select(([k, v]) => { return v ? `${k}() {\n ${v} $* \n}` : `unset -f ${v} > /dev/null 2>&1`; }).join('\n') + - '\n'; -} - -function generateScriptContent(kind: string, variables: Record, aliases: Record) { - switch (kind) { - case '.ps1': - return generatePowerShellScript(variables, aliases); - case '.cmd': - return generateCmdScript(variables, aliases); - case '.sh': - return generatePosixScript(variables, aliases); - } - return ''; -} - -async function writePostscript(channels: Channels, postscriptFile: Uri, variables: Record, aliases: Record) { - const contents = generateScriptContent(extname(postscriptFile.fsPath), variables, aliases); - channels.debug(`--------[START SHELL SCRIPT FILE]--------\n${contents}\n--------[END SHELL SCRIPT FILE]---------`); - channels.debug(`Postscript file ${postscriptFile}`); - await postscriptFile.writeUTF8(contents); -} - -function generateJson(variables: Record, defines: Record, aliases: Record, - properties:Record>, locations: Record, paths: Record>, tools: Record): string { - - let contents = { - 'version': 1, - variables, - defines, - aliases, - properties, - locations, - paths, - tools - }; - - return JSON.stringify(contents); -} - -function printDeactivatingMessage(channels: Channels, stack: Array) { - channels.message(i`Deactivating: ${stack.join(' + ')}`); -} - - -export async function deactivate(session: Session, warnIfNoActivation: boolean) : Promise { - const undoVariableValue = process.env[undoVariableName]; - if (!undoVariableValue) { - if (warnIfNoActivation) { - session.channels.warning(i`nothing is activated, no changes have been made`); - } - - return true; - } - - const postscriptFileName = process.env[postscriptVariable]; - if (!postscriptFileName) { - displayNoPostScriptError(session.channels); - return false; - } - - const postscriptFile = session.fileSystem.file(postscriptFileName); - const undoFileUri = session.fileSystem.file(undoVariableValue); - const undoFileRaw = await undoFileUri.tryReadUTF8(); - if (undoFileRaw) { - const undoFile = JSON.parse(undoFileRaw); - const deactivationStack = undoFile.stack; - if (deactivationStack) { - printDeactivatingMessage(session.channels, deactivationStack); - } - - const deactivationEnvironment = {...undoFile.environment}; - deactivationEnvironment[undoVariableName] = ''; - - const deactivateAliases : Record = {}; - const aliases = undoFile.aliases; - if (aliases) { - for (const alias of aliases) { - deactivateAliases[alias] = ''; - } - } - - await writePostscript(session.channels, postscriptFile, deactivationEnvironment, deactivateAliases); - await undoFileUri.delete(); - } - - return true; -} - -// replace all values in target with those in source -function undoActivation(target: NodeJS.ProcessEnv, source: Record) { - for (const key in source) { - const value = source[key]; - if (value) { - target[key] = value; - } else { - delete target[key]; - } - } -} - -async function toArrayAsync(iterable: AsyncIterable) { - const result = []; - for await (const item of iterable) { - result.push(item); - } - return result; -} diff --git a/vcpkg-artifacts/artifacts/artifact.ts b/vcpkg-artifacts/artifacts/artifact.ts deleted file mode 100644 index cfa59e4266..0000000000 --- a/vcpkg-artifacts/artifacts/artifact.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* eslint-disable prefer-const */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { fail } from 'assert'; -import { resolve } from 'path'; -import { MetadataFile } from '../amf/metadata-file'; -import { RegistriesDeclaration, RegistryDeclaration } from '../amf/registries'; -import { artifactIdentity, prettyRegistryName } from '../cli/format'; -import { i } from '../i18n'; -import { activateEspIdf, installEspIdf } from '../installers/espidf'; -import { InstallEvents } from '../interfaces/events'; -import { getArtifact, Registry, RegistryResolver } from '../registries/registries'; -import { Session } from '../session'; -import { linq } from '../util/linq'; -import { Uri } from '../util/uri'; -import { Activation } from './activation'; -import { SetOfDemands } from './SetOfDemands'; - -export type Selections = Map; // idOrShortName, version - -export function parseArtifactDependency(id: string): [string | undefined, string] { - const parts = id.split(':'); - if (parts.length === 2) { - return [parts[0], parts[1]]; - } - - if (parts.length === 1) { - return [undefined, parts[0]]; - } - - throw new Error(i`Invalid artifact id '${id}'`); -} - -function loadRegistry(session: Session, decl: RegistryDeclaration) : Promise { - const loc = decl.location.get(0); - if (loc) { - const locUri = session.parseLocation(loc); - session.channels.debug(`Loading registry ${loc} (interpreted as ${locUri.toString()})`); - return session.registryDatabase.loadRegistry(session, locUri); - } - - return Promise.resolve(undefined); -} - -export async function buildRegistryResolver(session: Session, registries: RegistriesDeclaration | undefined) { - // load the registries from the project file - const result = new RegistryResolver(session.registryDatabase); - if (registries) { - for (const [name, registry] of registries) { - const loaded = await loadRegistry(session, registry); - if (loaded) { - result.add(loaded.location, name); - } - } - } - - return result; -} - -function addDisplayPrefix(prefix: string, targets: Array): Array { - const result = new Array(); - for (const element of targets) { - result.push(i`${prefix} - ${element}`); - } - - return result; -} - -export abstract class ArtifactBase { - readonly applicableDemands: SetOfDemands; - - constructor(protected session: Session, public readonly metadata: MetadataFile) { - this.applicableDemands = new SetOfDemands(this.metadata, this.session); - } - - buildRegistryByName(name: string) : Promise { - const decl = this.metadata.registries.get(name); - if (decl) { - return loadRegistry(this.session, decl); - } - - return Promise.resolve(undefined); - } - - abstract loadActivationSettings(activation: Activation): Promise; -} - -export function checkDemands(session: Session, thisDisplayName: string, applicableDemands: SetOfDemands): boolean { - const errors = addDisplayPrefix(thisDisplayName, applicableDemands.errors); - session.channels.error(errors); - if (errors.length) { - return false; - } - - session.channels.warning(addDisplayPrefix(thisDisplayName, applicableDemands.warnings)); - session.channels.message(addDisplayPrefix(thisDisplayName, applicableDemands.messages)); - return true; -} - -export enum InstallStatus { - Installed, - AlreadyInstalled, - Failed -} - -export class Artifact extends ArtifactBase { - constructor(session: Session, metadata: MetadataFile, public shortName: string, public targetLocation: Uri) { - super(session, metadata); - } - - get id() { - return this.metadata.id; - } - - get version() { - return this.metadata.version; - } - - get registryUri() { - return this.metadata.registryUri!; - } - - get isInstalled() { - return this.targetLocation.exists('artifact.json'); - } - - get uniqueId() { - return `${this.registryUri.toString()}::${this.id}::${this.version}`; - } - - async install(thisDisplayName: string, events: Partial, options: { force?: boolean, allLanguages?: boolean, language?: string }): Promise { - const applicableDemands = this.applicableDemands; - if (!checkDemands(this.session, thisDisplayName, applicableDemands)) { - return InstallStatus.Failed; - } - - if (await this.isInstalled && !options.force) { - events.alreadyInstalledArtifact?.(thisDisplayName); - return InstallStatus.AlreadyInstalled; - } - - try { - if (options.force) { - try { - await this.uninstall(); - } catch { - // if a file is locked, it may not get removed. We'll deal with this later. - } - } - - // ok, let's install this. - events.startInstallArtifact?.(thisDisplayName); - for (const installInfo of applicableDemands.installer) { - if (installInfo.lang && !options.allLanguages && options.language && options.language.toLowerCase() !== installInfo.lang.toLowerCase()) { - continue; - } - - const installer = this.session.artifactInstaller(installInfo); - if (!installer) { - fail(i`Unknown installer type ${installInfo!.installerKind}`); - } - await installer(this.session, this.id, this.version, this.targetLocation, installInfo, events, options); - } - - if (this.metadata.espidf) { - await installEspIdf(this.session, events, this.targetLocation); - } - - // after we unpack it, write out the installed manifest - await this.writeManifest(); - return InstallStatus.Installed; - } catch (err) { - try { - await this.uninstall(); - } catch { - // if a file is locked, it may not get removed. We'll deal with this later. - } - - throw err; - } - } - - async writeManifest() { - await this.targetLocation.createDirectory(); - await this.metadata.save(this.targetLocation.join('artifact.json')); - } - - async uninstall() { - await this.targetLocation.delete({ recursive: true, useTrash: false }); - } - - - async loadActivationSettings(activation: Activation) : Promise { - // construct paths (bin, lib, include, etc.) - // construct tools - // compose variables - // defines - - for (const exportsBlock of this.applicableDemands.exports) { - activation.addExports(exportsBlock, this.targetLocation); - } - - // if espressif install - if (this.metadata.espidf) { - // activate - if (!await activateEspIdf(this.session, activation, this.targetLocation)) { - return false; - } - } - - return true; - } - - async sanitizeAndValidatePath(path: string) { - try { - const loc = this.session.fileSystem.file(resolve(this.targetLocation.fsPath, path)); - if (await loc.exists()) { - return loc; - } - } catch { - // no worries, treat it like a relative path. - } - const loc = this.targetLocation.join(sanitizePath(path)); - if (await loc.exists()) { - return loc; - } - return undefined; - } -} - -export function sanitizePath(path: string) { - return path. - replace(/[\\/]+/g, '/'). // forward slashes please - replace(/[?<>:|"]/g, ''). // remove illegal characters. - // eslint-disable-next-line no-control-regex - replace(/[\x00-\x1f\x80-\x9f]/g, ''). // remove unicode control codes - replace(/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i, ''). // no reserved names - replace(/^[/.]*\//, ''). // dots and slashes off the front. - replace(/[/.]+$/, ''). // dots and slashes off the back. - replace(/\/\.+\//g, '/'). // no parts made just of dots. - replace(/\/+/g, '/'); // duplicate slashes. -} - -export function sanitizeUri(u: string) { - return u. - replace(/[\\/]+/g, '/'). // forward slashes please - replace(/[?<>|"]/g, ''). // remove illegal characters. - // eslint-disable-next-line no-control-regex - replace(/[\x00-\x1f\x80-\x9f]/g, ''). // remove unicode control codes - replace(/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i, ''). // no reserved names - replace(/^[/.]*\//, ''). // dots and slashes off the front. - replace(/[/.]+$/, ''). // dots and slashes off the back. - replace(/\/\.+\//g, '/'). // no parts made just of dots. - replace(/\/+/g, '/'); // duplicate slashes. -} - -export class ProjectManifest extends ArtifactBase { - loadActivationSettings(_activation: Activation) { - return Promise.resolve(true); - } -} - -export class InstalledArtifact extends Artifact { - constructor(session: Session, metadata: MetadataFile) { - super(session, metadata, '', Uri.invalid); - } -} - -export interface ResolvedArtifact { - artifact: ArtifactBase, - uniqueId: string, - initialSelection: boolean, - depth: number, - priority: number -} - -export async function resolveDependencies(session: Session, registryResolver: RegistryResolver, initialParents: Array, dependencyDepth: number): Promise> { - let depth = 0; - let nextDepthRegistries: Array = initialParents.map((parent) => - parent.metadata.registryUri ? registryResolver.getRegistryByUri(parent.metadata.registryUri) : undefined); - let currentRegistries: Array = []; - let nextDepth: Array = initialParents; - let initialSelections = new Set(); - let current: Array = []; - let resultSet = new Map(); // uniqueId, artifact - let orderer = new Map(); // uniqueId, [depth, priority] - - while (nextDepth.length !== 0) { - ++depth; - currentRegistries = nextDepthRegistries; - nextDepthRegistries = []; - current = nextDepth; - nextDepth = []; - - if (depth == dependencyDepth) { - initialSelections = new Set(resultSet.keys()); - } - - for (let idx = 0; idx < current.length; ++idx) { - const subjectParentRegistry = currentRegistries[idx]; - const subject = current[idx]; - let subjectId: string; - let subjectUniqueId: string; - if (subject instanceof Artifact) { - subjectId = subject.id; - subjectUniqueId = subject.uniqueId; - } else { - subjectId = subject.metadata.file.toString(); - subjectUniqueId = subjectId; - } - - session.channels.debug(`Resolving ${subjectUniqueId}'s dependencies...`); - // Note that we must update depth even if visiting the same artifact again - orderer.set(subjectUniqueId, [depth, subject.metadata.priority]); - if (resultSet.has(subjectUniqueId)) { - session.channels.debug(`${subjectUniqueId} is a terminal dependency with a depth of ${depth}.`); - // already visited - continue; - } - - resultSet.set(subjectUniqueId, subject); - for (const [idOrShortName, version] of linq.entries(subject.applicableDemands.requires)) { - const [dependencyRegistryDeclaredName, dependencyId] = parseArtifactDependency(idOrShortName); - let dependencyRegistry: Registry; - if (dependencyRegistryDeclaredName) { - const maybeRegistry = await subject.buildRegistryByName(dependencyRegistryDeclaredName); - if (!maybeRegistry) { - throw new Error(i`While resolving dependencies of ${subjectId}, ${dependencyRegistryDeclaredName} in ${idOrShortName} could not be resolved to a registry.`); - } - - dependencyRegistry = maybeRegistry; - } else { - if (!subjectParentRegistry) { - throw new Error(i`While resolving dependencies of the project file ${subjectId}, ${idOrShortName} did not specify a registry.`); - } - - dependencyRegistry = subjectParentRegistry; - } - - const dependencyRegistryDisplayName = registryResolver.getRegistryDisplayName(dependencyRegistry.location); - session.channels.debug(`Interpreting '${idOrShortName}' as ${dependencyRegistry.location.toString()}:${dependencyId}`); - const dependency = await getArtifact(dependencyRegistry, dependencyId, version.raw); - if (!dependency) { - throw new Error(i`Unable to resolve dependency ${dependencyId} in ${prettyRegistryName(dependencyRegistryDisplayName)}.`); - } - - session.channels.debug(`Resolved dependency ${artifactIdentity(dependencyRegistryDisplayName, dependency[0], dependency[1].shortName)}`); - nextDepthRegistries.push(dependencyRegistry); - nextDepth.push(dependency[1]); - } - } - } - - if (initialSelections.size === 0) { - initialSelections = new Set(resultSet.keys()); - } - - session.channels.debug(`The following are initial selections: ${Array.from(initialSelections).join(', ')}`); - - const results = new Array(); - for (const [uniqueId, artifact] of resultSet) { - const order = orderer.get(uniqueId); - if (order) { - results.push({ - 'artifact': artifact, - 'uniqueId': uniqueId, - 'initialSelection': initialSelections.has(uniqueId), - 'depth': order[0], - 'priority': artifact.metadata.priority - }); - } else { - throw new Error('Result artifact with no order (bug in resolveDependencies)'); - } - } - - results.sort((a, b) => { - if (a.depth != b.depth) { - return b.depth - a.depth; - } - - return a.priority - b.priority; - }); - - return results; -} diff --git a/vcpkg-artifacts/cli/argument.ts b/vcpkg-artifacts/cli/argument.ts deleted file mode 100644 index d9f64c99d8..0000000000 --- a/vcpkg-artifacts/cli/argument.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Command } from './command'; - -export abstract class Argument { - readonly abstract argument: string; - readonly title = ''; - - constructor(protected command: Command) { - command.arguments.push(this); - } -} diff --git a/vcpkg-artifacts/cli/artifacts.ts b/vcpkg-artifacts/cli/artifacts.ts deleted file mode 100644 index ceeba4fc62..0000000000 --- a/vcpkg-artifacts/cli/artifacts.ts +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { MultiBar, SingleBar } from 'cli-progress'; -import { Artifact, ArtifactBase, InstallStatus, ResolvedArtifact, Selections, resolveDependencies } from '../artifacts/artifact'; -import { i } from '../i18n'; -import { InstallEvents } from '../interfaces/events'; -import { RegistryDisplayContext, RegistryResolver, getArtifact } from '../registries/registries'; -import { Session } from '../session'; -import { Channels } from '../util/channels'; -import { Uri } from '../util/uri'; -import { Table } from './console-table'; -import { addVersionToArtifactIdentity, artifactIdentity } from './format'; -import { debug, error, log } from './styling'; - -export async function showArtifacts(artifacts: Iterable, registries: RegistryDisplayContext, options?: { force?: boolean }) { - let failing = false; - const table = new Table(i`Artifact`, i`Version`, i`Status`, i`Dependency`, i`Summary`); - for (const resolved of artifacts) { - const artifact = resolved.artifact; - if (artifact instanceof Artifact) { - const name = artifactIdentity(registries.getRegistryDisplayName(artifact.registryUri), artifact.id, artifact.shortName); - for (const err of artifact.metadata.validate()) { - failing = true; - error(artifact.metadata.formatVMessage(err)); - } - table.push(name, artifact.version, options?.force || await artifact.isInstalled ? 'installed' : 'will install', resolved.initialSelection ? ' ' : '*', artifact.metadata.summary || ''); - } - } - - log(table.toString()); - log(); - return !failing; -} - -export interface SelectedArtifact extends ResolvedArtifact { - requestedVersion: string | undefined; -} - -export async function selectArtifacts(session: Session, selections: Selections, registries: RegistryResolver, dependencyDepth: number): Promise> { - const userSelectedArtifacts = new Map(); - const userSelectedVersions = new Map(); - for (const [idOrShortName, version] of selections) { - const [, artifact] = await getArtifact(registries, idOrShortName, version) || []; - - if (!artifact) { - error(`Unable to resolve artifact: ${addVersionToArtifactIdentity(idOrShortName, version)}`); - - const results = await registries.search({ keyword: idOrShortName, version: version }); - if (results.length) { - log('Possible matches:'); - for (const [artifactDisplay, artifactVersions] of results) { - for (const artifactVersion of artifactVersions) { - log(` ${addVersionToArtifactIdentity(artifactDisplay, artifactVersion.version)}`); - } - } - } - - return false; - } - - userSelectedArtifacts.set(artifact.uniqueId, artifact); - userSelectedVersions.set(artifact.uniqueId, version); - } - - const allResolved = await resolveDependencies(session, registries, Array.from(userSelectedArtifacts.values()), dependencyDepth); - const results = new Array(); - for (const resolved of allResolved) { - results.push({...resolved, 'requestedVersion': userSelectedVersions.get(resolved.uniqueId)}); - } - - return results; -} - -interface ProgressRenderer extends InstallEvents { - setArtifactIndex(index: number, displayName: string): void; - stop(): void; -} - -enum TaggedProgressKind { - Unset, - Verifying, - Downloading, - GenericProgress, - Heartbeat -} - -class TaggedProgressBar { - private bar: SingleBar | undefined; - private kind = TaggedProgressKind.Unset; - public lastCurrentValue = 0; - constructor(private readonly multiBar: MultiBar) { - } - - private checkChangeKind(currentValue: number, kind: TaggedProgressKind) { - this.lastCurrentValue = currentValue; - if (this.kind !== kind) { - if (this.bar) { - this.multiBar.remove(this.bar); - this.bar = undefined; - } - - this.kind = kind; - } - } - - startOrUpdate(kind: TaggedProgressKind, total: number, currentValue: number, suffix: string) { - this.checkChangeKind(currentValue, kind); - const payload = { suffix: suffix }; - if (this.bar) { - this.bar.update(currentValue, payload); - } else { - this.kind = kind; - this.bar = this.multiBar.create(total, currentValue, payload, { format: '{bar} {percentage}% {suffix}' }); - } - } - - heartbeat(suffix: string) { - this.checkChangeKind(0, TaggedProgressKind.Heartbeat); - const payload = { suffix: suffix }; - if (this.bar) { - this.bar.update(0, payload); - } else { - const progressUnknown = i`(progress unknown)`; - const totalSpaces = 41 - progressUnknown.length; - const prefixSpaces = Math.floor(totalSpaces / 2); - const suffixSpaces = totalSpaces - prefixSpaces; - const prettyProgressUnknown = Array(prefixSpaces).join(' ') + progressUnknown + Array(suffixSpaces).join(' '); - this.bar = this.multiBar.create(0, 0, payload, { format: '*' + prettyProgressUnknown + '* {suffix}' }); - } - } -} - -class TtyProgressRenderer implements Partial { - readonly #bar = new MultiBar({ - clearOnComplete: true, - hideCursor: true, - barCompleteChar: '*', - barIncompleteChar: ' ', - etaBuffer: 40 - }); - readonly #overallProgress : SingleBar; - readonly #individualProgress : TaggedProgressBar; - - constructor(totalArtifactCount: number) { - this.#overallProgress = this.#bar.create(totalArtifactCount, 0, { name: '' }, { format: `{bar} [{value}/${totalArtifactCount - 1}] {name}`, emptyOnZero: true }); - this.#individualProgress = new TaggedProgressBar(this.#bar); - } - - setArtifactIndex(index: number, displayName: string): void { - this.#overallProgress.update(index, { name: displayName }); - } - - hashVerifyProgress(file: string, percent: number) { - this.#individualProgress.startOrUpdate(TaggedProgressKind.Verifying, 100, percent, i`verifying` + ' ' + file); - } - - downloadProgress(uri: Uri, destination: string, percent: number) { - this.#individualProgress.startOrUpdate(TaggedProgressKind.Downloading, 100, percent, i`downloading ${uri.toString()} -> ${destination}`); - } - - unpackArchiveStart(archiveUri: Uri) { - this.#individualProgress.heartbeat(i`unpacking ${archiveUri.fsPath}`); - } - - unpackArchiveHeartbeat(text: string) { - this.#individualProgress.heartbeat(text); - } - - stop() { - this.#bar.stop(); - } -} - -const downloadUpdateRateMs = 10 * 1000; - -class NoTtyProgressRenderer implements Partial { - #currentIndex = 0; - #downloadPrecent = 0; - #downloadTimeoutId: NodeJS.Timeout | undefined; - constructor(private readonly channels: Channels, private readonly totalArtifactCount: number) {} - - setArtifactIndex(index: number): void { - this.#currentIndex = index; - } - - startInstallArtifact(displayName: string) { - this.channels.message(`[${this.#currentIndex + 1}/${this.totalArtifactCount - 1}] ` + i`Installing ${displayName}...`); - } - - alreadyInstalledArtifact(displayName: string) { - this.channels.message(`[${this.#currentIndex + 1}/${this.totalArtifactCount - 1}] ` + i`${displayName} already installed.`); - } - - downloadStart(uris: Array, _destination: string) { - let displayUri: string; - if (uris.length === 1) { - displayUri = uris[0].toString(); - } else { - displayUri = JSON.stringify(uris.map(uri => uri.toString())); - } - - this.channels.message(i`Downloading ${displayUri}...`); - this.#downloadTimeoutId = setTimeout(this.downloadProgressDisplay.bind(this), downloadUpdateRateMs); - } - - downloadProgress(_uri: Uri, _destination: string, percent: number): void { - this.#downloadPrecent = percent; - } - - downloadProgressDisplay() { - this.channels.message(`${this.#downloadPrecent}%`); - this.#downloadTimeoutId = setTimeout(this.downloadProgressDisplay.bind(this), downloadUpdateRateMs); - } - - downloadComplete(): void { - if (this.#downloadTimeoutId) { - clearTimeout(this.#downloadTimeoutId); - } - } - - stop(): void { - if (this.#downloadTimeoutId) { - clearTimeout(this.#downloadTimeoutId); - } - } - - unpackArchiveStart(archiveUri: Uri) { - this.channels.message(i`Unpacking ${archiveUri.fsPath}...`); - } -} - -export async function acquireArtifacts(session: Session, resolved: Array, registries: RegistryDisplayContext, options?: { force?: boolean, allLanguages?: boolean, language?: string }): Promise { - // resolve the full set of artifacts to install. - const isTty = process.stdout.isTTY === true; - const progressRenderer : Partial = isTty ? new TtyProgressRenderer(resolved.length) : new NoTtyProgressRenderer(session.channels, resolved.length); - for (let idx = 0; idx < resolved.length; ++idx) { - const artifact = resolved[idx].artifact; - if (artifact instanceof Artifact) { - const id = artifact.id; - const registryName = registries.getRegistryDisplayName(artifact.registryUri); - const artifactDisplayName = artifactIdentity(registryName, id, artifact.shortName); - progressRenderer.setArtifactIndex?.(idx, artifactDisplayName); - try { - const installStatus = await artifact.install(artifactDisplayName, progressRenderer, options || {}); - switch (installStatus) { - case InstallStatus.Installed: - session.trackAcquire(artifact.registryUri.toString(), id, artifact.version); - break; - case InstallStatus.AlreadyInstalled: - break; - case InstallStatus.Failed: - progressRenderer.stop?.(); - return false; - } - } catch (e: any) { - progressRenderer.stop?.(); - debug(e); - debug(e.stack); - error(i`Error installing ${artifactDisplayName} - ${e}`); - return false; - } - } - } - - progressRenderer.stop?.(); - return true; -} diff --git a/vcpkg-artifacts/cli/command-line.ts b/vcpkg-artifacts/cli/command-line.ts deleted file mode 100644 index d60703bfaa..0000000000 --- a/vcpkg-artifacts/cli/command-line.ts +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { tmpdir } from 'os'; -import { join, resolve } from 'path'; -import { intersect } from '../util/intersect'; -import { Command } from './command'; - -export type switches = { - [key: string]: Array; -} - -class Ctx { - constructor(cmdline: CommandLine) { - this.os = - cmdline.isSet('windows') ? 'win32' : - cmdline.isSet('osx') ? 'darwin' : - cmdline.isSet('linux') ? 'linux' : - cmdline.isSet('freebsd') ? 'freebsd' : - process.platform; - this.arch = cmdline.isSet('x64') ? 'x64' : - cmdline.isSet('x86') ? 'x32' : - cmdline.isSet('arm') ? 'arm' : - cmdline.isSet('arm64') ? 'arm64' : - process.arch; - } - - readonly os: string; - readonly arch: string; - - get windows(): boolean { - return this.os === 'win32'; - } - - get linux(): boolean { - return this.os === 'linux'; - } - - get freebsd(): boolean { - return this.os === 'freebsd'; - } - - get osx(): boolean { - return this.os === 'darwin'; - } - - get x64(): boolean { - return this.arch === 'x64'; - } - - get x86(): boolean { - return this.arch === 'x32'; - } - - get arm(): boolean { - return this.arch === 'arm'; - } - - get arm64(): boolean { - return this.arch === 'arm64'; - } -} - -export class CommandLine { - readonly commands = new Array(); - readonly inputs = new Array(); - readonly switches: switches = {}; - readonly context: Ctx & switches; - - #home?: string; - get homeFolder() { - // home folder is determined by - // command line ( --vcpkg-root ) - // environment (VCPKG_ROOT) - // default 1 $HOME/.vcpkg - // default 2 /.vcpkg - - // note, this does not create the folder, that would happen when the session is initialized. - - return this.#home || (this.#home = resolve( - this.switches['vcpkg-root']?.[0] || - process.env['VCPKG_ROOT'] || - join(process.env['HOME'] || process.env['USERPROFILE'] || tmpdir(), '.vcpkg'))); - } - - get vcpkgCommand() { - return this.switches['z-vcpkg-command']?.[0]; - } - - get force() { - return !!this.switches['force']; - } - - get debug() { - return !!this.switches['debug']; - } - - get vcpkgArtifactsRoot() { - return this.switches['z-vcpkg-artifacts-root']?.[0]; - } - - get vcpkgDownloads() { - return this.switches['z-vcpkg-downloads']?.[0]; - } - - get vcpkgRegistriesCache() { - return this.switches['z-vcpkg-registries-cache']?.[0]; - } - - get telemetryFile() { - return this.switches['z-telemetry-file']?.[0]; - } - - get nextPreviousEnvironment() { - return this.switches['z-next-previous-environment']?.[0]; - } - - get globalConfig() { - return this.switches['z-global-config']?.[0]; - } - - get language() { - const l = this.switches['language'] || []; - return l[0]; - } - - get allLanguages(): boolean { - const l = this.switches['all-languages'] || []; - return !!l[0]; - } - - isSet(sw: string) { - const s = this.switches[sw]; - if (s && s.last !== 'false') { - return true; - } - return false; - } - - claim(sw: string) { - const v = this.switches[sw]; - delete this.switches[sw]; - return v; - } - - addCommand(command: Command) { - this.commands.push(command); - } - - /** parses the command line and returns the command that has been requested */ - get command() { - return this.commands.find(cmd => cmd.command === this.inputs[0]); - } - - constructor(args: Array) { - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - // eslint-disable-next-line prefer-const - let [, name, , value] = /^--([^=:]+)([=:])?(.+)?$/g.exec(arg) || []; - if (name) { - if (!value) { - if (i + 1 < args.length && !args[i + 1].startsWith('--')) { - // if you say --foo bar then bar is the value - value = args[++i]; - } - } - this.switches[name] = this.switches[name] === undefined ? [] : this.switches[name]; - this.switches[name].push(value); - continue; - } - this.inputs.push(arg); - } - - this.context = intersect(new Ctx(this), this.switches); - } -} diff --git a/vcpkg-artifacts/cli/command.ts b/vcpkg-artifacts/cli/command.ts deleted file mode 100644 index 57f08344ed..0000000000 --- a/vcpkg-artifacts/cli/command.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Argument } from './argument'; -import { CommandLine } from './command-line'; -import { Switch } from './switch'; -import { Debug } from './switches/debug'; -import { Force } from './switches/force'; - -/** @internal */ - -export abstract class Command { - readonly abstract command: string; - - readonly switches = new Array(); - readonly arguments = new Array(); - - readonly force = new Force(this); - readonly debug = new Debug(this); - - constructor(public commandLine: CommandLine) {} - - get inputs() { - return this.commandLine.inputs.slice(1); - } - - async run() { - // do something - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/acquire-project.ts b/vcpkg-artifacts/cli/commands/acquire-project.ts deleted file mode 100644 index 334893eb13..0000000000 --- a/vcpkg-artifacts/cli/commands/acquire-project.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { buildRegistryResolver, resolveDependencies } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { acquireArtifacts, showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { error } from '../styling'; -import { Project } from '../switches/project'; - -export class AcquireProjectCommand extends Command { - readonly command = 'acquire-project'; - project: Project = new Project(this); - - override async run() { - const projectManifest = await this.project.manifest; - if (!projectManifest) { - error(i`Unable to find project in folder (or parent folders) for ${session.currentDirectory.fsPath}`); - return false; - } - - const projectResolver = await buildRegistryResolver(session, projectManifest.metadata.registries); - const resolved = await resolveDependencies(session, projectResolver, [projectManifest], 3); - - // print the status of what is going to be acquired - if (!await showArtifacts(resolved, projectResolver, {force: this.commandLine.force})) { - session.channels.error(i`Unable to acquire project`); - return false; - } - - return await acquireArtifacts(session, resolved, projectResolver, { - force: this.commandLine.force, - allLanguages: this.commandLine.allLanguages, - language: this.commandLine.language - }); - } -} diff --git a/vcpkg-artifacts/cli/commands/acquire.ts b/vcpkg-artifacts/cli/commands/acquire.ts deleted file mode 100644 index 46a33a8048..0000000000 --- a/vcpkg-artifacts/cli/commands/acquire.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Artifact, buildRegistryResolver } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { countWhere } from '../../util/linq'; -import { acquireArtifacts, selectArtifacts, showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { cmdSwitch } from '../format'; -import { debug, error, log, warning } from '../styling'; -import { Project } from '../switches/project'; -import { Version } from '../switches/version'; - -export class AcquireCommand extends Command { - readonly command = 'acquire'; - version: Version = new Version(this); - project: Project = new Project(this); - - override async run() { - if (this.inputs.length === 0) { - error(i`No artifacts specified`); - return false; - } - - const versions = this.version.values; - if (versions.length && this.inputs.length !== versions.length) { - error(`Multiple packages specified, but not an equal number of ${cmdSwitch('version')} switches`); - return false; - } - - const resolver = session.globalRegistryResolver.with( - await buildRegistryResolver(session, (await this.project.manifest)?.metadata.registries)); - const resolved = await selectArtifacts(session, new Map(this.inputs.map((v, i) => [v, versions[i] || '*'])), resolver, 2); - if (!resolved) { - debug('No artifacts selected - stopping'); - return false; - } - - if (!await showArtifacts(resolved, resolver, this.commandLine)) { - warning(i`No artifacts are acquired`); - return false; - } - - const numberOfArtifacts = await countWhere(resolved, async (resolution) => { - const artifact = resolution.artifact; - return !(!this.commandLine.force && artifact instanceof Artifact && await artifact.isInstalled); - }); - - if (!numberOfArtifacts) { - log(i`All artifacts are already installed`); - return true; - } - - debug(`Installing ${numberOfArtifacts} artifacts`); - const success = await acquireArtifacts(session, resolved, resolver, { force: this.commandLine.force, language: this.commandLine.language, allLanguages: this.commandLine.allLanguages }); - if (success) { - log(i`${numberOfArtifacts} artifacts installed successfully`); - } else { - log(i`Installation failed -- stopping`); - } - - return success; - } -} diff --git a/vcpkg-artifacts/cli/commands/activate.ts b/vcpkg-artifacts/cli/commands/activate.ts deleted file mode 100644 index 4a59bb18b9..0000000000 --- a/vcpkg-artifacts/cli/commands/activate.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { buildRegistryResolver, checkDemands, resolveDependencies } from '../../artifacts/artifact'; -import { configurationName } from '../../constants'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { projectFile } from '../format'; -import { activate } from '../project'; -import { error } from '../styling'; -import { Json } from '../switches/json'; -import { MSBuildProps } from '../switches/msbuild-props'; -import { Project } from '../switches/project'; - -export class ActivateCommand extends Command { - readonly command = 'activate'; - project: Project = new Project(this); - msbuildProps: MSBuildProps = new MSBuildProps(this); - json : Json = new Json(this); - - override async run() { - const projectManifest = await this.project.manifest; - - if (!projectManifest) { - error(i`Unable to find project in folder (or parent folders) for ${session.currentDirectory.fsPath}`); - return false; - } - - const options = { - force: this.commandLine.force, - allLanguages: this.commandLine.allLanguages, - language: this.commandLine.language, - msbuildProps: this.msbuildProps.resolvedValue, - json: this.json.resolvedValue - }; - - // track what got installed - const projectResolver = await buildRegistryResolver(session, projectManifest.metadata.registries); - if (!checkDemands(session, (await session.findProjectProfile())?.fsPath ?? configurationName, projectManifest.applicableDemands)) { - return false; - } - - const resolved = await resolveDependencies(session, projectResolver, [projectManifest], 3); - - // print the status of what is going to be activated. - if (!await showArtifacts(resolved, projectResolver, options)) { - return false; - } - - return activate(session, false, [projectFile(projectManifest.metadata.file.parent)], resolved, projectResolver, options); - } -} diff --git a/vcpkg-artifacts/cli/commands/add.ts b/vcpkg-artifacts/cli/commands/add.ts deleted file mode 100644 index 4d6460c366..0000000000 --- a/vcpkg-artifacts/cli/commands/add.ts +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Artifact, buildRegistryResolver } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { selectArtifacts, showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { cmdSwitch } from '../format'; -import { error } from '../styling'; -import { Project } from '../switches/project'; -import { Version } from '../switches/version'; - -export class AddCommand extends Command { - readonly command = 'add'; - - version = new Version(this); - project: Project = new Project(this); - - override async run() { - const projectManifest = await this.project.manifest; - - if (!projectManifest) { - error(i`Unable to find project in folder (or parent folders) for ${session.currentDirectory.fsPath}`); - return false; - } - - if (this.inputs.length === 0) { - error(i`No artifacts specified`); - return false; - } - - const versions = this.version.values; - if (versions.length && this.inputs.length !== versions.length) { - error(i`Multiple artifacts specified, but not an equal number of ${cmdSwitch('version')} switches`); - return false; - } - - const selections = new Map(this.inputs.map((v, i) => [v, versions[i] || '*'])); - const projectResolver = await buildRegistryResolver(session, projectManifest.metadata.registries); - const combinedResolver = session.globalRegistryResolver.with(projectResolver); - const selectedArtifacts = await selectArtifacts(session, selections, combinedResolver, 2); - if (!selectedArtifacts) { - return false; - } - - await showArtifacts(selectedArtifacts, combinedResolver); - for (const resolution of selectedArtifacts) { - // map the registry of the found artifact to the registries already in the project file - const artifact = resolution.artifact; - if (resolution.initialSelection && artifact instanceof Artifact) { - const registryUri = artifact.metadata.registryUri!; - let registryName = projectResolver.getRegistryName(registryUri); - if (!registryName) { - // the registry isn't known yet to the project, try to declare it - registryName = session.globalRegistryResolver.getRegistryName(registryUri); - if (!registryName) { - throw new Error(i`Tried to add an artifact [${registryUri.toString()}]:${artifact.id} but could not determine the registry to use.`); - } - - const conflictingRegistry = projectResolver.getRegistryByName(registryName); - if (conflictingRegistry) { - throw new Error(i`Tried to add registry ${registryName} as ${registryUri.toString()}, but it was already ${conflictingRegistry.location.toString()}. Please add ${registryUri.toString()} to this project manually and reattempt.`); - } - - projectManifest.metadata.registries.add(registryName, artifact.registryUri, 'artifact'); - projectResolver.add(registryUri, registryName); - } - - // add the artifact to the project - const fulfilled = artifact.version.toString(); - const requested = resolution.requestedVersion; - const v = requested !== fulfilled ? `${requested} ${fulfilled}` : fulfilled; - projectManifest.metadata.requires.set(`${registryName}:${artifact.id}`, v); - } - } - - // write the file out. - await projectManifest.metadata.save(); - session.channels.message(i`Run \`vcpkg-shell activate\` to apply to the current terminal`); - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/cache.ts b/vcpkg-artifacts/cli/commands/cache.ts deleted file mode 100644 index 28beede6d4..0000000000 --- a/vcpkg-artifacts/cli/commands/cache.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { basename } from 'path'; -import { FileType } from '../../fs/filesystem'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Uri } from '../../util/uri'; -import { Command } from '../command'; -import { Table } from '../console-table'; -import { log } from '../styling'; -import { Clear } from '../switches/clear'; - -export class CacheCommand extends Command { - readonly command = 'cache'; - clear = new Clear(this); - - override async run() { - if (this.clear.active) { - await session.downloads.delete({ recursive: true }); - await session.downloads.createDirectory(); - log(i`Downloads folder cleared (${session.downloads.fsPath}) `); - return true; - } - let files: Array<[Uri, FileType]> = []; - try { - files = await session.downloads.readDirectory(); - } catch { - // shh - } - - if (!files.length) { - log('The download cache is empty'); - return true; - } - - const table = new Table('File', 'Size', 'Date'); - for (const [file, ] of files) { - const stat = await file.stat(); - table.push(basename(file.fsPath), stat.size.toString(), new Date(stat.mtime).toString()); - } - log(table.toString()); - log(); - - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/clean.ts b/vcpkg-artifacts/cli/commands/clean.ts deleted file mode 100644 index edebcf502d..0000000000 --- a/vcpkg-artifacts/cli/commands/clean.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { deactivate } from '../../artifacts/activation'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Command } from '../command'; -import { log } from '../styling'; -import { Switch } from '../switch'; - -export class All extends Switch { - switch = 'all'; -} - -export class Downloads extends Switch { - switch = 'downloads'; -} - -export class Artifacts extends Switch { - switch = 'artifacts'; -} - -export class CleanCommand extends Command { - readonly command = 'clean'; - all = new All(this); - artifacts = new Artifacts(this); - downloads = new Downloads(this); - - override async run() { - - if (this.all.active || this.artifacts.active) { - await deactivate(session, false); - await session.installFolder.delete({ recursive: true }); - await session.installFolder.createDirectory(); - log(i`Installed Artifact folder cleared (${session.installFolder.fsPath}) `); - } - - if (this.all.active || this.downloads.active) { - await session.downloads.delete({ recursive: true }); - await session.downloads.createDirectory(); - log(i`Cache folder cleared (${session.downloads.fsPath}) `); - } - - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/deactivate.ts b/vcpkg-artifacts/cli/commands/deactivate.ts deleted file mode 100644 index 0688dbc47b..0000000000 --- a/vcpkg-artifacts/cli/commands/deactivate.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { deactivate } from '../../artifacts/activation'; -import { session } from '../../main'; -import { Command } from '../command'; - -export class DeactivateCommand extends Command { - readonly command = 'deactivate'; - - override run() { - return deactivate(session, true); - } -} diff --git a/vcpkg-artifacts/cli/commands/delete.ts b/vcpkg-artifacts/cli/commands/delete.ts deleted file mode 100644 index aa76e3e912..0000000000 --- a/vcpkg-artifacts/cli/commands/delete.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Command } from '../command'; -import { Version } from '../switches/version'; - -export class DeleteCommand extends Command { - readonly command = 'delete'; - version = new Version(this); - override async run() { - const artifacts = await session.getInstalledArtifacts(); - for (const input of this.inputs) { - for (const { artifact, id, folder } of artifacts) { - if (input === id) { - if (await folder.exists()) { - session.channels.message(i`Deleting artifact ${id} from ${folder.fsPath}`); - await artifact.uninstall(); - } - } - } - } - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/find.ts b/vcpkg-artifacts/cli/commands/find.ts deleted file mode 100644 index ba944af2cb..0000000000 --- a/vcpkg-artifacts/cli/commands/find.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -import chalk from 'chalk'; -import { buildRegistryResolver } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Command } from '../command'; -import { Table } from '../console-table'; -import { error, log } from '../styling'; -import { Project } from '../switches/project'; -import { Version } from '../switches/version'; - -export class FindCommand extends Command { - readonly command = 'find'; - - version = new Version(this); - project = new Project(this); - - override async run() { - // load registries (from the current project too if available) - const resolver = session.globalRegistryResolver.with( - await buildRegistryResolver(session, (await this.project.manifest)?.metadata.registries)); - const table = new Table(i`Artifact`, i`Version`, i`Summary`); - - let anyEntries = false; - for (const each of this.inputs) { - const hasColon = each.indexOf(':') > -1; - // eslint-disable-next-line prefer-const - for (let [display, artifactVersions] of await resolver.search({ - // use keyword search if no registry is specified - keyword: hasColon ? undefined : each, - // otherwise use the criteria as an id - idOrShortName: hasColon ? each : undefined, - version: this.version.value - })) { - if (!this.version.isRangeOfVersions) { - // if the user didn't specify a range, just show the latest version that was returned - artifactVersions.splice(1); - } - for (const result of artifactVersions) { - if (!result.metadata.dependencyOnly) { - anyEntries = true; - table.push(display, result.metadata.version, result.metadata.summary || ''); - } - } - } - } - - if (!anyEntries) { - error(i`No artifacts found matching criteria: ${chalk.cyan.bold(this.inputs.join(', '))}`); - return false; - } - - log(table.toString()); - log(); - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/generate-msbuild-props.ts b/vcpkg-artifacts/cli/commands/generate-msbuild-props.ts deleted file mode 100644 index 90637d0983..0000000000 --- a/vcpkg-artifacts/cli/commands/generate-msbuild-props.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Activation } from '../../artifacts/activation'; -import { buildRegistryResolver, resolveDependencies } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { error } from '../styling'; -import { MSBuildProps } from '../switches/msbuild-props'; -import { Project } from '../switches/project'; - -export class GenerateMSBuildPropsCommand extends Command { - readonly command = 'generate-msbuild-props'; - - project: Project = new Project(this); - msbuildProps: MSBuildProps = new MSBuildProps(this, 'out'); - - override async run() { - if (!this.msbuildProps.active) { - error('generate-msbuild-props requires --msbuild-props'); - return false; - } - - const projectManifest = await this.project.manifest; - - if (!projectManifest) { - error(i`Unable to find project in folder (or parent folders) for ${session.currentDirectory.fsPath}`); - return false; - } - - const projectResolver = await buildRegistryResolver(session, projectManifest.metadata.registries); - const resolved = await resolveDependencies(session, projectResolver, [projectManifest], 3); - - // print the status of what is going to be activated. - if (!await showArtifacts(resolved, projectResolver, {})) { - error(i`Unable to activate project`); - return false; - } - - const activation = await Activation.start(session, false); - for (const artifact of resolved) { - if (!await artifact.artifact.loadActivationSettings(activation)) { - session.channels.error(i`Unable to activate project`); - return false; - } - } - - const content = activation.generateMSBuild(); - await this.msbuildProps.resolvedValue?.writeUTF8(content); - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/regenerate-index.ts b/vcpkg-artifacts/cli/commands/regenerate-index.ts deleted file mode 100644 index 37d24d21dd..0000000000 --- a/vcpkg-artifacts/cli/commands/regenerate-index.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { resolve } from 'path'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { LocalRegistry } from '../../registries/LocalRegistry'; -import { Command } from '../command'; -import { error, log } from '../styling'; -import { Normalize } from '../switches/normalize'; - -export class RegenerateCommand extends Command { - readonly command = 'regenerate'; - readonly normalize = new Normalize(this); - - override async run() { - for (const input of this.inputs) { - const inputUri = session.fileSystem.file(resolve(input)); - const localReg = new LocalRegistry(session, inputUri); - try { - await localReg.load(); - log(i`Regenerating index for ${input}`); - await localReg.regenerate(this.normalize.active); - const count = localReg.count; - if (count) { - await localReg.save(); - log(i`Regeneration complete. Index contains ${count} metadata files`); - } else { - // looks like the registry contained no items - error(i`Registry: '${input}' contains no artifacts.`); - } - } catch (e) { - let message = 'unknown'; - if (e instanceof Error) { - message = e.message; - } - - log(i`error ${input}: ` + message); - return false; - } - } - - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/remove.ts b/vcpkg-artifacts/cli/commands/remove.ts deleted file mode 100644 index b034dfe2b4..0000000000 --- a/vcpkg-artifacts/cli/commands/remove.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Command } from '../command'; -import { error, log } from '../styling'; -import { Project } from '../switches/project'; - -export class RemoveCommand extends Command { - readonly command = 'remove'; - project: Project = new Project(this); - - override async run() { - const projectManifest = await this.project.manifest; - - if (!projectManifest) { - error(i`Unable to find project in folder (or parent folders) for ${session.currentDirectory.fsPath}`); - return false; - } - - if (this.inputs.length === 0) { - error(i`No artifacts specified`); - return false; - } - - - const req = projectManifest.metadata.requires.keys; - for (const input of this.inputs) { - if (req.indexOf(input) !== -1) { - projectManifest.metadata.requires.delete(input); - log(i`Removing ${input} from project manifest`); - } else { - error(i`unable to find artifact ${input} in the project manifest`); - return false; - } - } - - // write the file out. - await projectManifest.metadata.save(); - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/update.ts b/vcpkg-artifacts/cli/commands/update.ts deleted file mode 100644 index 70d90c9fe7..0000000000 --- a/vcpkg-artifacts/cli/commands/update.ts +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { buildRegistryResolver } from '../../artifacts/artifact'; -import { schemeOf } from '../../fs/unified-filesystem'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { RemoteRegistry } from '../../registries/RemoteRegistry'; -import { Registry } from '../../registries/registries'; -import { RemoteFileUnavailable } from '../../util/exceptions'; -import { Command } from '../command'; -import { count } from '../format'; -import { error, log, writeException } from '../styling'; -import { All } from '../switches/all'; -import { Project } from '../switches/project'; - -async function updateRegistry(registry: Registry, displayName: string) : Promise { - try { - await registry.update(displayName); - await registry.load(); - log(i`Updated ${displayName}. It contains ${count(registry.count)} metadata files.`); - } catch (e) { - if (e instanceof RemoteFileUnavailable) { - log(i`Unable to download ${displayName}.`); - } else { - log(i`${displayName} could not be updated; it could be malformed.`); - writeException(e); - } - - return false; - } - - return true; -} - -export class UpdateCommand extends Command { - readonly command = 'update'; - - project: Project = new Project(this); - all = new All(this); - - override async run() { - const resolver = session.globalRegistryResolver.with( - await buildRegistryResolver(session, (await this.project.manifest)?.metadata.registries)); - - if (this.all.active) { - for (const registryUri of session.registryDatabase.getAllUris()) { - if (schemeOf(registryUri) != 'https') { continue; } - const parsed = session.fileSystem.parseUri(registryUri); - const displayName = resolver.getRegistryDisplayName(parsed); - const loaded = resolver.getRegistryByUri(parsed); - if (loaded) { - if (!await updateRegistry(loaded, displayName)) { - return false; - } - } - } - } - - for (const registryInput of this.inputs) { - const registryByName = resolver.getRegistryByName(registryInput); - if (registryByName) { - // if it matched a name, it's a name - if (!await updateRegistry(registryByName, registryInput)) { - return false; - } - - continue; - } - - const scheme = schemeOf(registryInput); - switch (scheme) { - case 'https': - { - const registryInputAsUri = session.fileSystem.parseUri(registryInput); - const registryByUri = resolver.getRegistryByUri(registryInputAsUri) - ?? new RemoteRegistry(session, registryInputAsUri); - if (!await updateRegistry(registryByUri, resolver.getRegistryDisplayName(registryInputAsUri))) { - return false; - } - - continue; - } - case 'file': - error(i`The x-update-registry command downloads new registry information and thus cannot be used with local registries. Did you mean x-regenerate ${registryInput}?`); - return false; - } - - error(i`Unable to find registry ${registryInput}.`); - return false; - } - - return true; - } -} diff --git a/vcpkg-artifacts/cli/commands/use.ts b/vcpkg-artifacts/cli/commands/use.ts deleted file mode 100644 index c2ef509286..0000000000 --- a/vcpkg-artifacts/cli/commands/use.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { buildRegistryResolver } from '../../artifacts/artifact'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { selectArtifacts, showArtifacts } from '../artifacts'; -import { Command } from '../command'; -import { cmdSwitch } from '../format'; -import { activate } from '../project'; -import { error, warning } from '../styling'; -import { MSBuildProps } from '../switches/msbuild-props'; -import { Project } from '../switches/project'; -import { Version } from '../switches/version'; - -export class UseCommand extends Command { - readonly command = 'use'; - version = new Version(this); - project = new Project(this); - msbuildProps = new MSBuildProps(this); - - override async run() : Promise { - if (this.inputs.length === 0) { - error(i`No artifacts specified`); - return false; - } - - const resolver = session.globalRegistryResolver.with( - await buildRegistryResolver(session, (await this.project.manifest)?.metadata.registries)); - const versions = this.version.values; - if (versions.length && this.inputs.length !== versions.length) { - error(`Multiple packages specified, but not an equal number of ${cmdSwitch('version')} switches`); - return false; - } - - const selections = new Map(this.inputs.map((v, i) => [v, versions[i] || '*'])); - const artifacts = await selectArtifacts(session, selections, resolver, 2); - if (!artifacts) { - return false; - } - - if (!await showArtifacts(artifacts, resolver, this.commandLine)) { - warning(i`No artifacts are being acquired`); - return false; - } - - return activate(session, true, this.inputs, artifacts, resolver, - { force: this.commandLine.force, language: this.commandLine.language, allLanguages: this.commandLine.allLanguages }); - } -} diff --git a/vcpkg-artifacts/cli/console-table.ts b/vcpkg-artifacts/cli/console-table.ts deleted file mode 100644 index 2ce08bbdba..0000000000 --- a/vcpkg-artifacts/cli/console-table.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import chalk from 'chalk'; -import stripAnsi from 'strip-ansi'; - -function leftPad(text: string, length: number) { - const remain = length - text.length; - if (remain <= 0) { return text; } - return text + ' '.repeat(remain); -} - -export class Table { - private readonly columnNames: Array; - private readonly rows = new Array>(); - constructor(...columnNames: Array) { - this.columnNames = columnNames; - } - push(...values: Array) { - strict.equal(values.length, this.columnNames.length, 'unexpected number of arguments in table row'); - this.rows.push(Array.from(values)); - } - toString() { - const lengths = new Array(this.columnNames.length); - for (let colNum = 0; colNum < this.columnNames.length; ++colNum) { - lengths[colNum] = this.columnNames[colNum].length; - } - - for (const row of this.rows) { - for (let colNum = 0; colNum < this.columnNames.length; ++colNum) { - const colLen = stripAnsi(row[colNum]).length; - if (colLen > lengths[colNum]) { - lengths[colNum] = colLen; - } - } - } - - const formattedRows = new Array(); - const thisFormattedRow = new Array(this.columnNames.length); - for (let colNum = 0; colNum < this.columnNames.length; ++colNum) { - thisFormattedRow[colNum] = chalk.red(leftPad(this.columnNames[colNum], lengths[colNum])); - } - - formattedRows.push(thisFormattedRow.join(' ')); - - for (const row of this.rows) { - for (let colNum = 0; colNum < this.columnNames.length; ++colNum) { - thisFormattedRow[colNum] = leftPad(row[colNum], lengths[colNum]); - } - - formattedRows.push(thisFormattedRow.join(' ')); - } - - return formattedRows.join('\n'); - } -} diff --git a/vcpkg-artifacts/cli/constants.ts b/vcpkg-artifacts/cli/constants.ts deleted file mode 100644 index 289667ba48..0000000000 --- a/vcpkg-artifacts/cli/constants.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export const cli = 'vcpkg'; -export const product = 'vcpkg-artifacts'; -export const project = 'vcpkg-configuration.json'; diff --git a/vcpkg-artifacts/cli/format.ts b/vcpkg-artifacts/cli/format.ts deleted file mode 100644 index 0df3407d19..0000000000 --- a/vcpkg-artifacts/cli/format.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import chalk from 'chalk'; -import { Uri } from '../util/uri'; - -export function projectFile(uri: Uri): string { - return chalk.cyan(uri.fsPath); -} - -export function prettyRegistryName(registryName: string) { - return `${chalk.whiteBright(registryName)}`; -} - -export function artifactIdentity(registryName: string, identity: string, shortName: string) : string { - return `${chalk.whiteBright(registryName)}:${chalk.yellow.dim(identity.substr(0, identity.length - shortName.length))}${chalk.yellowBright(shortName)}`; -} - -export function addVersionToArtifactIdentity(identity: string, version: string) { - return version && version !== '*' ? `${identity}-${chalk.gray(version)}` : identity; -} - -export function heading(text: string, level = 1) { - switch (level) { - case 1: - return `${chalk.underline.bold(text)}`; - case 2: - return `${chalk.greenBright(text)}`; - case 3: - return `${chalk.green(text)}`; - } - return `${chalk.bold(text)}`; -} - -export function optional(text: string) { - return chalk.gray(text); -} -export function cmdSwitch(text: string) { - return optional(`--${text}`); -} - -export function command(text: string) { - return chalk.whiteBright.bold(text); -} - -export function hint(text: string) { - return chalk.green.dim(text); -} - -export function count(num: number) { - return chalk.grey(`${num}`); -} - -export function position(text: string) { - return chalk.grey(`${text}`); -} diff --git a/vcpkg-artifacts/cli/project.ts b/vcpkg-artifacts/cli/project.ts deleted file mode 100644 index 3594bf9982..0000000000 --- a/vcpkg-artifacts/cli/project.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Activation } from '../artifacts/activation'; -import { Artifact, ResolvedArtifact } from '../artifacts/artifact'; -import { RegistryDisplayContext } from '../registries/registries'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { acquireArtifacts } from './artifacts'; - -export interface ActivationOptions { - force?: boolean; - allLanguages?: boolean; - language?: string; - msbuildProps?: Uri; - json?: Uri; -} - -function trackActivationPlan(session: Session, resolved: Array) { - for (const resolvedEntry of resolved) { - const artifact = resolvedEntry.artifact; - if (artifact instanceof Artifact) { - session.trackActivate(artifact.registryUri.toString(), artifact.id, artifact.version); - } - } -} - -export async function activate(session: Session, allowStacking: boolean, stackEntries: Array, artifacts: Array, registries: RegistryDisplayContext, options?: ActivationOptions): Promise { - trackActivationPlan(session, artifacts); - // install the items in the project - if (!await acquireArtifacts(session, artifacts, registries, options)) { - return false; - } - - const activation = await Activation.start(session, allowStacking); - for (const artifact of artifacts) { - if (!await artifact.artifact.loadActivationSettings(activation)) { - return false; - } - } - - return await activation.activate(stackEntries, options?.msbuildProps, options?.json); -} diff --git a/vcpkg-artifacts/cli/styling.ts b/vcpkg-artifacts/cli/styling.ts deleted file mode 100644 index c04af18fda..0000000000 --- a/vcpkg-artifacts/cli/styling.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import chalk from 'chalk'; -import { argv } from 'process'; -import { i } from '../i18n'; -import { Session } from '../session'; - -function formatTime(t: number) { - return ( - t < 3600000 ? [Math.floor(t / 60000) % 60, Math.floor(t / 1000) % 60, t % 1000] : - t < 86400000 ? [Math.floor(t / 3600000) % 24, Math.floor(t / 60000) % 60, Math.floor(t / 1000) % 60, t % 1000] : - [Math.floor(t / 86400000), Math.floor(t / 3600000) % 24, Math.floor(t / 60000) % 60, Math.floor(t / 1000) % 60, t % 1000]).map(each => each.toString().padStart(2, '0')).join(':').replace(/(.*):(\d)/, '$1.$2'); -} - -export function indent(text: string): string -export function indent(text: Array): Array -export function indent(text: string | Array): string | Array { - if (Array.isArray(text)) { - return text.map(each => indent(each)); - } - return ` ${text}`; -} - -export const log: (message?: any) => void = console.log; -export const error: (message?: any) => void = (text) => { - const errorLocalized = i`error:`; - return console.log(`${chalk.red.bold(errorLocalized)} ${text}`); -}; -export const warning: (message?: any) => void = (text) => { - const warningLocalized = i`warning:`; - return console.log(`${chalk.yellow.bold(warningLocalized)} ${text}`); -}; -export const debug: (message?: any) => void = (text) => { - if (argv.any(arg => arg === '--debug')) { - console.log(`${chalk.cyan.bold('debug: ')}${text}`); - } -}; - -export function writeException(e: any) { - if (e instanceof Error) { - debug(e.message); - debug(e.stack); - return; - } - debug(e && e.toString ? e.toString() : e); -} - -export function initStyling(session: Session) { - - session.channels.on('message', (text: string, _msec: number) => { - log(text); - }); - - session.channels.on('error', (text: string, _msec: number) => { - error(text); - }); - - session.channels.on('debug', (text: string, msec: number) => { - debug(`${chalk.cyan.bold(`[${formatTime(msec)}]`)} ${text}`); - }); - - session.channels.on('warning', (text: string, _msec: number) => { - warning(text); - }); -} diff --git a/vcpkg-artifacts/cli/switch.ts b/vcpkg-artifacts/cli/switch.ts deleted file mode 100644 index 0be431b717..0000000000 --- a/vcpkg-artifacts/cli/switch.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { i } from '../i18n'; -import { Command } from './command'; -import { cmdSwitch } from './format'; - - -export abstract class Switch { - readonly abstract switch: string; - readonly title = ''; - readonly required: boolean; - - constructor(protected command: Command, options?: { required?: boolean }) { - command.switches.push(this); - this.required = options?.required || false; - } - - get valid() { - return this.required || this.active; - } - - #values?: Array; - get values() { - return this.#values || (this.#values = this.command.commandLine.claim(this.switch) || []); - } - - get value(): string | undefined { - const v = this.values; - strict.ok(v.length < 2, i`Expected a single value for ${cmdSwitch(this.switch)} - found multiple`); - return v[0]; - } - - get requiredValue(): string { - const v = this.values; - strict.ok(v.length == 1 && v[0], i`Expected a single value for '--${this.switch}'.`); - return v[0]; - } - - get active(): boolean { - const v = this.values; - return !!v && v.length > 0 && v[0] !== 'false'; - } - get isRangeOfVersions() { - return !!/[*[\]()~^]/.exec(this.value ?? ''); - } -} diff --git a/vcpkg-artifacts/cli/switches/all.ts b/vcpkg-artifacts/cli/switches/all.ts deleted file mode 100644 index c50877799f..0000000000 --- a/vcpkg-artifacts/cli/switches/all.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class All extends Switch { - switch = 'all'; -} diff --git a/vcpkg-artifacts/cli/switches/clear.ts b/vcpkg-artifacts/cli/switches/clear.ts deleted file mode 100644 index 690613404d..0000000000 --- a/vcpkg-artifacts/cli/switches/clear.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Clear extends Switch { - switch = 'clear'; -} diff --git a/vcpkg-artifacts/cli/switches/debug.ts b/vcpkg-artifacts/cli/switches/debug.ts deleted file mode 100644 index cb898370e1..0000000000 --- a/vcpkg-artifacts/cli/switches/debug.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Debug extends Switch { - switch = 'debug'; -} diff --git a/vcpkg-artifacts/cli/switches/force.ts b/vcpkg-artifacts/cli/switches/force.ts deleted file mode 100644 index 474bbfcf20..0000000000 --- a/vcpkg-artifacts/cli/switches/force.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Force extends Switch { - switch = 'force'; -} diff --git a/vcpkg-artifacts/cli/switches/installed.ts b/vcpkg-artifacts/cli/switches/installed.ts deleted file mode 100644 index d2b1c8a2cc..0000000000 --- a/vcpkg-artifacts/cli/switches/installed.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Installed extends Switch { - switch = 'installed'; -} diff --git a/vcpkg-artifacts/cli/switches/json.ts b/vcpkg-artifacts/cli/switches/json.ts deleted file mode 100644 index 00487d7840..0000000000 --- a/vcpkg-artifacts/cli/switches/json.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { resolve } from 'path'; -import { session } from '../../main'; -import { Uri } from '../../util/uri'; -import { Switch } from '../switch'; - -export class Json extends Switch { - switch = 'json'; - - get resolvedValue(): Uri | undefined { - const v = this.value; - if (v) { - return session.fileSystem.file(resolve(v)); - } - - return undefined; - } - -} diff --git a/vcpkg-artifacts/cli/switches/msbuild-props.ts b/vcpkg-artifacts/cli/switches/msbuild-props.ts deleted file mode 100644 index 37b50016ce..0000000000 --- a/vcpkg-artifacts/cli/switches/msbuild-props.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { resolve } from 'path'; -import { session } from '../../main'; -import { Uri } from '../../util/uri'; -import { Command } from '../command'; -import { Switch } from '../switch'; - -export class MSBuildProps extends Switch { - public readonly switch: string; - constructor(command: Command, swName = 'msbuild-props') { - super(command); - this.switch = swName; - } - - get resolvedValue(): Uri | undefined { - const v = this.value; - if (v) { - return session.fileSystem.file(resolve(v)); - } - - return undefined; - } -} diff --git a/vcpkg-artifacts/cli/switches/normalize.ts b/vcpkg-artifacts/cli/switches/normalize.ts deleted file mode 100644 index 47a65460fd..0000000000 --- a/vcpkg-artifacts/cli/switches/normalize.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Normalize extends Switch { - switch = 'normalize'; -} diff --git a/vcpkg-artifacts/cli/switches/project.ts b/vcpkg-artifacts/cli/switches/project.ts deleted file mode 100644 index 24ad5a409a..0000000000 --- a/vcpkg-artifacts/cli/switches/project.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { resolve } from 'path'; -import { ProjectManifest } from '../../artifacts/artifact'; -import { configurationName } from '../../constants'; -import { FileType } from '../../fs/filesystem'; -import { i } from '../../i18n'; -import { session } from '../../main'; -import { Uri } from '../../util/uri'; -import { projectFile } from '../format'; -import { debug, error } from '../styling'; -import { Switch } from '../switch'; - -interface ResolvedProjectUri { - filename: string; - uri: Uri; -} - -export class Project extends Switch { - switch = 'project'; - - async resolveProjectUri() : Promise { - const v = this.value; - if (v) { - const uri = session.fileSystem.file(resolve(v)); - const stat = await uri.stat(); - - if (stat.type & FileType.File) { - return {'filename': v, uri: uri}; - } - if (stat.type & FileType.Directory) { - const project = uri.join(configurationName); - if (await project.exists()) { - return {'filename': project.fsPath, uri: project}; - } - } - - error(i`Unable to find project environment ${projectFile(uri)}`); - return undefined; - } - - const sessionProject = await session.findProjectProfile(); - if (sessionProject) { - return {'filename': sessionProject.fsPath, 'uri': sessionProject}; - } - - return undefined; - } - - get resolvedValue(): Promise { - return this.resolveProjectUri().then(v => v?.uri); - } - - get manifest(): Promise { - return this.resolveProjectUri().then(async (resolved) => { - if (!resolved) { - debug('No project manifest'); - return undefined; - } - - debug(`Loading project manifest ${resolved.filename} `); - return await new ProjectManifest(session, await session.openManifest(resolved.filename, resolved.uri)); - }); - } -} diff --git a/vcpkg-artifacts/cli/switches/version.ts b/vcpkg-artifacts/cli/switches/version.ts deleted file mode 100644 index daf37dc62c..0000000000 --- a/vcpkg-artifacts/cli/switches/version.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Switch } from '../switch'; - -export class Version extends Switch { - switch = 'version'; -} diff --git a/vcpkg-artifacts/constants.ts b/vcpkg-artifacts/constants.ts deleted file mode 100644 index 7eb4f48e43..0000000000 --- a/vcpkg-artifacts/constants.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export const undoVariableName = 'Z_VCPKG_UNDO'; -export const postscriptVariable = 'Z_VCPKG_POSTSCRIPT'; -export const latestVersion = '*'; -export const vcpkgDownloadVariable = 'VCPKG_DOWNLOADS'; -export const manifestName = 'vcpkg.json'; -export const configurationName = 'vcpkg-configuration.json'; -export const registryIndexFile = 'index.yaml'; - -export const defaultConfig = - `{ - "registries": [ - { - "kind": "artifact", - "name": "microsoft", - "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip" - }, - { - "kind": "artifact", - "name": "arm", - "location": "https://artifacts.tools.arm.com/vcpkg-registry" - } - ] -} -`; diff --git a/vcpkg-artifacts/eslint.config.mjs b/vcpkg-artifacts/eslint.config.mjs deleted file mode 100644 index 3c2dfbaa4f..0000000000 --- a/vcpkg-artifacts/eslint.config.mjs +++ /dev/null @@ -1,108 +0,0 @@ -import { FlatCompat } from "@eslint/eslintrc"; -import js from "@eslint/js"; -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import tsParser from "@typescript-eslint/parser"; -import notice from "eslint-plugin-notice"; -import { defineConfig, globalIgnores } from "eslint/config"; -import globals from "globals"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default defineConfig([globalIgnores(["**/*.d.ts", "test/scenarios/**/*", "dist/**/*", 'eslint.config.mjs']), { - extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), - - plugins: { - "@typescript-eslint": typescriptEslint, - notice, - }, - - languageOptions: { - globals: { - ...globals.node, - Atomics: "readonly", - SharedArrayBuffer: "readonly", - }, - - parser: tsParser, - ecmaVersion: 2022, - sourceType: "module", - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname - } - }, - - rules: { - "no-trailing-spaces": "error", - "space-in-parens": "error", - - "keyword-spacing": ["error", { - overrides: { - this: { - before: false, - }, - }, - }], - - "@typescript-eslint/no-floating-promises": "error", - - "@typescript-eslint/consistent-type-assertions": ["error", { - assertionStyle: "angle-bracket", - }], - - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": ["error", { - argsIgnorePattern: "^_" - }], - - "@typescript-eslint/array-type": ["error", { - default: "generic", - }], - - indent: ["warn", 2, { - SwitchCase: 1, - ObjectExpression: "first", - }], - - "@typescript-eslint/indent": [0, 2], - "linebreak-style": ["error", "unix"], - quotes: ["error", "single"], - semi: ["error", "always"], - - "no-multiple-empty-lines": ["error", { - max: 2, - maxBOF: 0, - maxEOF: 1, - }], - - "notice/notice": ["error", { - templateFile: "./header.txt", - }], - - "no-eval": "error", - "no-implied-eval": "off", - "@typescript-eslint/no-implied-eval": "error", - - "no-restricted-syntax": ["error", { - selector: "CallExpression[callee.name='execUnsafeLocalFunction']", - message: "execUnsafeLocalFunction is banned", - }, { - selector: "CallExpression[callee.property.name='execUnsafeLocalFunction']", - message: "execUnsafeLocalFunction is banned", - }, { - selector: "CallExpression[callee.name='setInnerHTMLUnsafe']", - message: "setInnerHTMLUnsafe is banned", - }, { - selector: "CallExpression[callee.property.name='setInnerHTMLUnsafe']", - message: "setInnerHTMLUnsafe is banned", - }], - }, -}]); diff --git a/vcpkg-artifacts/exports.ts b/vcpkg-artifacts/exports.ts deleted file mode 100644 index 7fc8613767..0000000000 --- a/vcpkg-artifacts/exports.ts +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ManyMap } from './util/linq'; -import { Queue } from './util/promise'; - -/** This adds the expected declarations to the Array type. */ -declare global { - interface Array { - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. - */ - where(callbackfn: (value: T, index: number, array: Array) => value is S): Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. - */ - where(callbackfn: (value: T, index: number, array: Array) => unknown): Array; - - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - */ - select(callbackfn: (value: T, index: number, array: Array) => U): Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls - * the callbackfn function for each element in the array until the callbackfn returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - any(callbackfn: (value: T, index: number, array: Array) => unknown, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in the array until the callbackfn returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - all(callbackfn: (value: T, index: number, array: Array) => unknown, thisArg?: any): boolean; - - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the array in place of the deleted elements. - */ - insert(start: number, ...items: Array): Array; - - /** - * Removes elements from an array returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - */ - remove(start: number, deleteCount?: number): Array; - - /** - * Iterates on a collection to create a Queue that will throttle - * the async operation 'fn' to a reasonable degree of parallelism. - * @param fn the async Fn to call on each - */ - forEachAsync(fn: (v: T) => Promise): Queue; - - selectMany(callbackfn: (value: T, index: number, array: Array) => U): Array ? InnerArr : U>; - groupByMap(keySelector: (each: T) => TKey, selector: (each: T) => TValue): Map>; - groupBy(keySelector: (each: T) => string, selector: (each: T) => TValue): { [s: string]: Array }; - count(predicate: (each: T) => Promise): Promise, - count(predicate: (each: T) => boolean): number, - readonly last: T | undefined; - readonly first: T | undefined; - } -} - -declare global { - interface Map { - getOrDefault(key: K, defaultValue: V | (() => V)): V; - } -} - -if (!Map.prototype.getOrDefault) { - Object.defineProperties(Map.prototype, { - getOrDefault: { - value: function (key: any, defaultValue: any) { - let v = this.get(key); - if (!v) { - this.set(key, v = typeof defaultValue === 'function' ? defaultValue() : defaultValue); - } - return v; - } - } - }); -} - -if (!Array.prototype.insert) { - /** - * adding some linq-like functionality to the Array type - */ - Object.defineProperties(Array.prototype, { - where: { value: Array.prototype.filter }, - select: { value: Array.prototype.map }, - any: { value: Array.prototype.some }, - all: { value: Array.prototype.every }, - insert: { value: function (position: number, items: Array) { return (>this).splice(position, 0, ...items); } }, - selectMany: { value: Array.prototype.flatMap }, - count: { - value: function (predicate: (e: any) => boolean | Promise) { - let v = 0; - const all = []; - for (const each of this) { - const test = predicate(each); - if (test.then) { - all.push(test.then((antecedent: any) => { - if (antecedent) { - v++; - } - })); - continue; - } - if (test) { - v++; - } - } - if (all.length) { - return Promise.all(all).then(() => v); - } - return v; - } - }, - groupByMap: { - value: function (keySelector: (each: any) => any, selector: (each: any) => any) { - const result = new ManyMap(); - for (const each of this) { - result.push(keySelector(each), selector(each)); - } - return result; - } - }, - groupBy: { - value: function (keySelector: (each: any) => any, selector: (each: any) => any) { - const result = {}; - for (const each of this) { - const key = keySelector(each); - (result[key] = result[key] || new Array()).push(selector(each)); - } - return result; - } - }, - last: { - get() { - return this[this.length - 1]; - } - }, - first: { - get() { - return this[0]; - } - }, - forEachAsync: { - value: function (fn: (i: any) => Promise) { - return new Queue().enqueueMany(this, fn); - } - } - }); -} diff --git a/vcpkg-artifacts/fs/acquire.ts b/vcpkg-artifacts/fs/acquire.ts deleted file mode 100644 index 25f1d718f9..0000000000 --- a/vcpkg-artifacts/fs/acquire.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { i } from '../i18n'; -import { DownloadEvents } from '../interfaces/events'; -import { Session } from '../session'; -import { RemoteFileUnavailable } from '../util/exceptions'; -import { Hash } from '../util/hash'; -import { Uri } from '../util/uri'; -import { vcpkgDownload } from '../vcpkg'; - -export interface AcquireOptions extends Hash { - /** force a redownload even if it's in cache */ - force?: boolean; -} - -export async function acquireArtifactFile(session: Session, uris: Array, outputFilename: string, events: Partial, options?: AcquireOptions) { - await session.downloads.createDirectory(); - session.channels.debug(`Acquire file '${outputFilename}' from [${uris.map(each => each.toString()).join(',')}]`); - - // is the file present on a local filesystem? - for (const uri of uris) { - if (uri.isLocal) { - // we have a local file - - if (options?.algorithm && options?.value) { - // we have a hash. - // is it valid? - if (await uri.hashValid(events, options)) { - session.channels.debug(`Local file matched hash: ${uri.fsPath}`); - return uri; - } - } else if (await uri.exists()) { - // we don't have a hash, but the file is local, and it exists. - // we have to return it - session.channels.debug(`Using local file (no hash, unable to verify): ${uri.fsPath}`); - return uri; - } - // do we have a filename - } - } - - // we don't have a local file - // https is all that we know at the moment. - const webUris = uris.where(each => each.isHttps); - if (webUris.length === 0) { - // wait, no web uris? - throw new RemoteFileUnavailable(uris); - } - - return https(session, webUris, outputFilename, events, options); -} - -/** */ -async function https(session: Session, uris: Array, outputFilename: string, events: Partial, options?: AcquireOptions) { - session.channels.debug(`Attempting to download file '${outputFilename}' from [${uris.map(each => each.toString()).join(',')}]`); - const hashAlgorithm = options?.algorithm; - const outputFile = session.downloads.join(outputFilename); - if (options?.force) { - session.channels.debug(`Acquire '${outputFilename}': force specified, forcing download`); - // is force specified; delete the current file - await outputFile.delete(); - } else if (hashAlgorithm) { - // does it match a hash that we have? - if (await outputFile.hashValid(events, options)) { - session.channels.debug(`Acquire '${outputFilename}': local file hash matches metdata`); - // yes it does. let's just return done. - return outputFile; - } - - // invalid hash, deleting file - session.channels.debug(`Acquire '${outputFilename}': local file hash mismatch, redownloading`); - await outputFile.delete(); - } else if (await outputFile.exists()) { - session.channels.debug(`Acquire '${outputFilename}': skipped due to existing file, no hash known`); - session.channels.warning(i`Assuming '${outputFilename}' is correct; supply a hash in the artifact metadata to suppress this message.`); - return outputFile; - } - - session.channels.debug(`Acquire '${outputFilename}': checking remote connections`); - events.downloadStart?.(uris, outputFile.fsPath); - let sha512 = undefined; - if (hashAlgorithm == 'sha512') { - sha512 = options?.value; - } - - await vcpkgDownload(session, outputFile.fsPath, sha512, uris, events); - - events.downloadComplete?.(); - // we've downloaded the file, let's see if it matches the hash we have. - if (hashAlgorithm == 'sha512') { - // vcpkg took care of it already - session.channels.debug(`Acquire '${outputFilename}': vcpkg checked SHA512`); - } else if (hashAlgorithm) { - session.channels.debug(`Acquire '${outputFilename}': checking downloaded file hash`); - // does it match the hash that we have? - if (!await outputFile.hashValid(events, options)) { - await outputFile.delete(); - throw new Error(i`Downloaded file '${outputFile.fsPath}' did not have the correct hash (${options.algorithm}: ${options.value}) `); - } - - session.channels.debug(`Acquire '${outputFilename}': downloaded file hash matches specified hash`); - } - - session.channels.debug(`Acquire '${outputFilename}': downloading file successful`); - return outputFile; -} - -export async function resolveNuGetUrl(session: Session, pkg: string) { - const [, name, version] = pkg.match(/^(.*)\/(.*)$/) ?? []; - strict.ok(version, i`package reference '${pkg}' is not a valid NuGet package reference ({name}/{version})`); - - // let's resolve the redirect first, since nuget servers don't like us getting HEAD data on the targets via a redirect. - // even if this wasn't the case, this is lower cost now rather than later. - return session.fileSystem.parseUri(`https://www.nuget.org/api/v2/package/${name}/${version}`); -} - -export async function acquireNuGetFile(session: Session, pkg: string, outputFilename: string, events: Partial, options?: AcquireOptions): Promise { - return https(session, [await resolveNuGetUrl(session, pkg)], outputFilename, events, options); -} diff --git a/vcpkg-artifacts/fs/filesystem.ts b/vcpkg-artifacts/fs/filesystem.ts deleted file mode 100644 index d659328c64..0000000000 --- a/vcpkg-artifacts/fs/filesystem.ts +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { EventEmitter } from 'node:events'; -import { Readable, Writable } from 'stream'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; - -const size64K = 1 << 16; -const size32K = 1 << 15; - -/** - * The `FileStat`-type represents metadata about a file - */ -export interface FileStat { - /** - * The type of the file, e.g. is a regular file, a directory, or symbolic link - * to a file. - * - * *Note:* This value might be a bitmask, e.g. `FileType.File | FileType.SymbolicLink`. - */ - type: FileType; - /** - * The creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC. - */ - ctime: number; - /** - * The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC. - * - * *Note:* If the file changed, it is important to provide an updated `mtime` that advanced - * from the previous value. Otherwise there may be optimizations in place that will not show - * the updated file contents in an editor for example. - */ - mtime: number; - /** - * The size in bytes. - * - * *Note:* If the file changed, it is important to provide an updated `size`. Otherwise there - * may be optimizations in place that will not show the updated file contents in an editor for - * example. - */ - size: number; - /** - * The file mode (unix permissions). - */ - mode: number; -} - -/** -* Enumeration of file types. The types `File` and `Directory` can also be -* a symbolic links, in that case use `FileType.File | FileType.SymbolicLink` and -* `FileType.Directory | FileType.SymbolicLink`. -*/ -export enum FileType { - /** - * The file type is unknown. - */ - Unknown = 0, - /** - * A regular file. - */ - File = 1, - /** - * A directory. - */ - Directory = 2, - /** - * A symbolic link to a file. - */ - SymbolicLink = 64 -} - -export interface WriteStreamOptions { - append?: boolean; - mode?: number; - mtime?: Date; -} - -/** - * A random-access reading interface to access a file in a FileSystem. - * - * Ideally, we keep reads in a file to a forward order, so that this can be implemented on filesystems - * that do not support random access (ie, please do your best to order reads so that they go forward only as much as possible) - * - * Underneath on FSes that do not support random access, this would likely require multiple 'open' operation for the same - * target file. - */ -export abstract class ReadHandle { - /** - * Reads a block from a file - * - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - abstract read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; - - async readComplete(buffr: TBuffer, offset = 0, length = buffr.byteLength, position: number | null = null, totalRead = 0): Promise<{ bytesRead: number, buffer: TBuffer }> { - const { bytesRead, buffer } = await this.read(buffr, offset, length, position); - if (length) { - if (bytesRead && bytesRead < length) { - return await this.readComplete(buffr, offset + bytesRead, length - bytesRead, position ? position + bytesRead : null, bytesRead + totalRead); - } - } - return { bytesRead: bytesRead + totalRead, buffer }; - } - /** - * Returns a Readable for consuming an opened ReadHandle - * @param start the first byte to read of the target - * @param end the last byte to read of the target (inclusive!) - */ - readStream(start = 0, end = Infinity): Readable { - return Readable.from(asyncIterableOverHandle(start, end, this), {}); - } - - abstract size(): Promise; - - abstract close(): Promise; - - range(start: number, length: number) { - return new RangeReadHandle(this, start, length); - } -} - -class RangeReadHandle extends ReadHandle { - - pos = 0; - readHandle?: ReadHandle; - - constructor(readHandle: ReadHandle, private start: number, private length: number) { - super(); - this.readHandle = readHandle; - } - - async read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number; buffer: TBuffer; }> { - if (this.readHandle) { - position = position !== undefined && position !== null ? (position + this.start) : (this.pos + this.start); - length = length === null ? this.length : length; - - const result = await this.readHandle.read(buffer, offset, length, position); - this.pos += result.bytesRead; - return result; - } - - return { - bytesRead: 0, buffer - }; - - } - - async size(): Promise { - return this.length; - } - - async close(): Promise { - this.readHandle = undefined; - } - -} - -/** - * Picks a reasonable buffer size. Not more than 64k - * - * @param length - */ -function reasonableBuffer(length: number) { - return Buffer.alloc(length > size64K ? size32K : length); -} - -/** - * Creates an AsyncIterable over a ReadHandle - * @param start the first byte in the target read from - * @param end the last byte in the target to read from - * @param handle the ReadHandle - */ -async function* asyncIterableOverHandle(start: number, end: number, handle: ReadHandle): AsyncIterable { - while (start < end) { - // buffer alloc must be inside the loop; zlib will hold the buffers until it can deal with a whole stream. - const buffer = reasonableBuffer(1 + end - start); - const count = Math.min(1 + end - start, buffer.byteLength); - const b = await handle.read(buffer, 0, count, start); - if (b.bytesRead === 0) { - return; - } - start += b.bytesRead; - // return only what was actually read. (just a view) - if (b.bytesRead === buffer.byteLength) { - yield buffer; - } - else { - yield buffer.slice(0, b.bytesRead); - } - } -} - -export abstract class FileSystem extends EventEmitter { - - protected baseUri?: Uri; - - /** - * Creates a new URI from a file system path, e.g. `c:\my\files`, - * `/usr/home`, or `\\server\share\some\path`. - * - * associates this FileSystem with the Uri - * - * @param path A file system path (see `URI#fsPath`) - */ - file(path: string): Uri { - return Uri.file(this, path); - } - - /** construct an Uri from the various parts */ - from(components: { - scheme: string; - authority?: string; - path?: string; - query?: string; - fragment?: string; - }): Uri { - return Uri.from(this, components); - } - - /** - * Creates a new URI from a string, e.g. `https://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param value A string which represents an URI (see `URI#toString`). - */ - parseUri(value: string, _strict?: boolean): Uri { - return Uri.parse(this, value, _strict); - } - - /** - * Retrieve metadata about a file. - * - * @param uri The uri of the file to retrieve metadata about. - * @return The file metadata about the file. - */ - abstract stat(uri: Uri, options?: object): Promise; - - /** - * Retrieve all entries of a [directory](#FileType.Directory). - * - * @param uri The uri of the folder. - * @return An array of name/type-tuples or a Promise that resolves to such. - */ - abstract readDirectory(uri: Uri, options?: { recursive?: boolean }): Promise>; - - /** - * Create a new directory (Note, that new files are created via `write`-calls). - * - * *Note* that missing directories are created automatically, e.g this call has - * `mkdirp` semantics. - * - * @param uri The uri of the new folder. - */ - abstract createDirectory(uri: Uri, options?: object): Promise; - - /** - * Read the entire contents of a file. - * - * @param uri The uri of the file. - * @return An array of bytes or a Promise that resolves to such. - */ - abstract readFile(uri: Uri, options?: object): Promise; - - /** - * Creates a stream to read a file from the filesystem - * - * @param uri The uri of the file. - * @return a Readable stream - */ - abstract readStream(uri: Uri, options?: { start?: number, end?: number }): Promise; - - /** - * Write data to a file, replacing its entire contents. - * - * @param uri The uri of the file. - * @param content The new content of the file. - */ - abstract writeFile(uri: Uri, content: Uint8Array): Promise; - - /** - * Creates a stream to write a file to the filesystem - * - * @param uri The uri of the file. - * @return a Writeable stream - */ - abstract writeStream(uri: Uri, options?: WriteStreamOptions): Promise; - - /** - * Delete a file. - * - * @param uri The resource that is to be deleted. - * @param options Defines if trash can should be used and if deletion of folders is recursive - */ - abstract delete(uri: Uri, options?: { recursive?: boolean, useTrash?: boolean }): Promise; - - /** - * Rename a file or folder. - * - * @param oldUri The existing file. - * @param newUri The new location. - * @param options Defines if existing files should be overwritten. - */ - abstract rename(source: Uri, target: Uri, options?: { overwrite?: boolean }): Promise; - - abstract openFile(uri: Uri): Promise; - - /** - * Copy files or folders. - * - * @param source The existing file. - * @param destination The destination location. - * @param options Defines if existing files should be overwritten. - */ - abstract copy(source: Uri, target: Uri, options?: { overwrite?: boolean }): Promise; - - abstract createSymlink(symlink: Uri, target: Uri): Promise; - - /** checks to see if the target exists */ - async exists(uri: Uri) { - try { - return !!(await this.stat(uri)); - } catch { - // if this fails, we're assuming false - } - return false; - } - - /** checks to see if the target is a directory/folder */ - async isDirectory(uri: Uri) { - try { - return !!((await this.stat(uri)).type & FileType.Directory); - } catch { - // if this fails, we're assuming false - } - return false; - } - - /** checks to see if the target is a file */ - async isFile(uri: Uri) { - try { - const s = await this.stat(uri); - - return !!(s.type & FileType.File); - } catch { - // if this fails, we're assuming false - } - return false; - } - - /** checks to see if the target is a symbolic link */ - async isSymlink(uri: Uri) { - try { - return !!((await this.stat(uri)) && FileType.SymbolicLink); - } catch { - // if this fails, we're assuming false - } - return false; - } - - constructor(protected readonly session: Session) { - super(); - } - - /** EventEmitter for when files are read */ - protected read(path: Uri, context?: any) { - this.emit('read', path, context, this.session.stopwatch.total); - } - - /** EventEmitter for when files are written */ - protected write(path: Uri, context?: any) { - this.emit('write', path, context, this.session.stopwatch.total); - } - - /** EventEmitter for when files are deleted */ - protected deleted(path: Uri, context?: any) { - this.emit('deleted', path, context, this.session.stopwatch.total); - } - - /** EventEmitter for when files are renamed */ - protected renamed(path: Uri, context?: any) { - this.emit('renamed', path, context, this.session.stopwatch.total); - } - - /** EventEmitter for when directories are read */ - protected directoryRead(path: Uri, contents?: Promise>) { - this.emit('directoryRead', path, contents, this.session.stopwatch.total); - } - - /** EventEmitter for when direcotries are created */ - protected directoryCreated(path: Uri, context?: any) { - this.emit('directoryCreated', path, context, this.session.stopwatch.total); - } -} diff --git a/vcpkg-artifacts/fs/http-filesystem.ts b/vcpkg-artifacts/fs/http-filesystem.ts deleted file mode 100644 index d6476df4c4..0000000000 --- a/vcpkg-artifacts/fs/http-filesystem.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Readable, Writable } from 'stream'; -import { Uri } from '../util/uri'; -import { FileStat, FileSystem, FileType, ReadHandle } from './filesystem'; - -/** - * HTTPS Filesystem - * - */ -export class HttpsFileSystem extends FileSystem { - - async stat(_uri: Uri): Promise { - throw new Error('Method not implemented'); - } - readDirectory(_uri: Uri): Promise> { - throw new Error('Method not implemented'); - } - createDirectory(_uri: Uri): Promise { - throw new Error('Method not implemented'); - } - async readFile(_uri: Uri): Promise { - throw new Error('Method not implemented'); - } - writeFile(_uri: Uri, _content: Uint8Array): Promise { - throw new Error('Method not implemented'); - } - delete(_uri: Uri, _options?: { recursive?: boolean | undefined; useTrash?: boolean | undefined; }): Promise { - throw new Error('Method not implemented'); - } - rename(_source: Uri, _target: Uri, _options?: { overwrite?: boolean | undefined; }): Promise { - throw new Error('Method not implemented'); - } - copy(_source: Uri, _target: Uri, _options?: { overwrite?: boolean | undefined; }): Promise { - throw new Error('Method not implemented'); - } - async createSymlink(_original: Uri, _symlink: Uri): Promise { - throw new Error('Method not implemented'); - } - async readStream(_uri: Uri, _options?: { start?: number, end?: number }): Promise { - throw new Error('Method not implemented'); - } - writeStream(_uri: Uri): Promise { - throw new Error('Method not implemented'); - } - - async openFile(_uri: Uri): Promise { - throw new Error('Method not implemented'); - } -} diff --git a/vcpkg-artifacts/fs/local-filesystem.ts b/vcpkg-artifacts/fs/local-filesystem.ts deleted file mode 100644 index f3b270bf96..0000000000 --- a/vcpkg-artifacts/fs/local-filesystem.ts +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { COPYFILE_EXCL } from 'constants'; -import { close, createReadStream, createWriteStream, futimes, NoParamCallback, open as openFd, Stats, write as writeFd, writev as writevFd } from 'fs'; -import { copyFile, FileHandle, mkdir, open, readdir, readFile, rename, rm, stat, symlink, writeFile } from 'fs/promises'; -import { basename, join } from 'path'; -import { Readable, Writable } from 'stream'; -import { i } from '../i18n'; -import { TargetFileCollision } from '../util/exceptions'; -import { Queue } from '../util/promise'; -import { Uri } from '../util/uri'; -import { FileStat, FileSystem, FileType, ReadHandle, WriteStreamOptions } from './filesystem'; - -function getFileType(stats: Stats) { - return FileType.Unknown | - (stats.isDirectory() ? FileType.Directory : 0) | - (stats.isFile() ? FileType.File : 0) | - (stats.isSymbolicLink() ? FileType.SymbolicLink : 0); -} - -class LocalFileStats implements FileStat { - constructor(private stats: Stats) { - strict.ok(stats, i`stats may not be undefined`); - } - get type() { - return getFileType(this.stats); - } - get ctime() { - return this.stats.ctimeMs; - } - get mtime() { - return this.stats.mtimeMs; - } - get size() { - return this.stats.size; - } - get mode() { - return this.stats.mode; - } -} - - -/** - * Implementation of the Local File System - * - * This is used to handle the access to the local disks. - */ -export class LocalFileSystem extends FileSystem { - async stat(uri: Uri): Promise { - const path = uri.fsPath; - const s = await stat(path); - return new LocalFileStats(s); - } - - async readDirectory(uri: Uri, options?: { recursive?: boolean }): Promise> { - let retval!: Promise>; - try { - const folder = uri.fsPath; - const retval = new Array<[Uri, FileType]>(); - - // use forEachAsync instead so we can throttle this appropriately. - await (await readdir(folder)).forEachAsync(async each => { - const path = uri.fileSystem.file(join(folder, each)); - const type = getFileType(await stat(uri.join(each).fsPath)); - retval.push(<[Uri, FileType]>[path, type]); - if (options?.recursive && type === FileType.Directory) { - retval.push(... await this.readDirectory(path, options)); - } - }).done; - - return retval; - } finally { - // log that. - this.directoryRead(uri, retval); - } - } - - async createDirectory(uri: Uri): Promise { - await mkdir(uri.fsPath, { recursive: true }); - this.directoryCreated(uri); - } - - createSymlink(original: Uri, slink: Uri): Promise { - return symlink(original.fsPath, slink.fsPath, 'file'); - } - - async readFile(uri: Uri): Promise { - let contents!: Promise; - try { - contents = readFile(uri.fsPath); - return await contents; - } finally { - this.read(uri, contents); - } - } - - async writeFile(uri: Uri, content: Uint8Array): Promise { - try { - await uri.parent.createDirectory(); - return writeFile(uri.fsPath, content); - } finally { - this.write(uri, content); - } - } - - async delete(uri: Uri, options?: { recursive?: boolean | undefined; useTrash?: boolean | undefined; }): Promise { - try { - options = options || { recursive: false }; - await rm(uri.fsPath, { recursive: options.recursive, force: true, maxRetries: 3, retryDelay: 20 }); - // todo: Hack -- on windows, when something is used and then deleted, the delete might not actually finish - // before the Promise is resolved. Adding a delay fixes this (but probably is an underlying node bug) - await new Promise(res => setTimeout(res, 50)); - return; - } finally { - this.deleted(uri); - } - } - - rename(source: Uri, target: Uri, options?: { overwrite?: boolean | undefined; }): Promise { - try { - strict.equal(source.fileSystem, target.fileSystem, i`Cannot rename files across filesystems`); - return rename(source.fsPath, target.fsPath); - } finally { - this.renamed(source, { target, options }); - } - } - - async copy(source: Uri, target: Uri, options?: { overwrite?: boolean | undefined; }): Promise { - const { type } = await source.stat(); - const opts = (options || {}); - const overwrite = opts.overwrite ? 0 : COPYFILE_EXCL; - - if (type & FileType.File) { - // make sure the target folder is there - await target.parent.createDirectory(); - await copyFile(source.fsPath, target.fsPath, overwrite); - return 1; - } - - strict.ok(type & FileType.Directory, 'Unknown file type should never happen during copy'); - - let targetIsFile = false; - try { - targetIsFile = !!((await target.stat()).type & FileType.File); - } catch { - // not a file - } - - // if it's a folder, then the target has to be a folder, or not exist - if (targetIsFile) { - throw new TargetFileCollision(target, i`Copy failed: source (${source.fsPath}) is a folder, target (${target.fsPath}) is a file`); - } - - // make sure the target folder exists - await target.createDirectory(); - - // only the initial call gets to wait for everybody to finish. - let queue: Queue | undefined; - - // track the count, starting at the base folder. - if (opts.queue === undefined) { - queue = opts.queue = new Queue(); - } - - // loop thru the contents of this folder - for (const [sourceUri, fileType] of await source.readDirectory()) { - const targetUri = target.join(basename(sourceUri.path)); - if (fileType & FileType.Directory) { - await this.copy(sourceUri, targetUri, opts); - continue; - } - // queue up the copy file - void opts.queue.enqueue(() => copyFile(sourceUri.fsPath, targetUri.fsPath, overwrite)); - } - return queue ? queue.done : -1 /* innerloop */; - } - - async readStream(uri: Uri, options?: { start?: number, end?: number }): Promise { - this.read(uri); - return createReadStream(uri.fsPath, options); - } - - async writeStream(uri: Uri, options?: WriteStreamOptions): Promise { - this.write(uri); - const flags = options?.append ? 'a' : 'w'; - const createWriteOptions: any = { flags, mode: options?.mode, autoClose: true, emitClose: true }; - if (options?.mtime) { - const mtime = options.mtime; - // inject futimes call as part of close - createWriteOptions.fs = { - open: openFd, - write: writeFd, - writev: writevFd, - close: (fd: number, callback: NoParamCallback) => { - futimes(fd, new Date(), mtime, (futimesErr) => { - close(fd, (closeErr) => { - callback(futimesErr || closeErr); - }); - }); - } - }; - } - - return createWriteStream(uri.fsPath, createWriteOptions); - } - - async openFile(uri: Uri): Promise { - return new LocalReadHandle(await open(uri.fsPath, 'r')); - } -} - -class LocalReadHandle extends ReadHandle { - constructor(private handle: FileHandle) { - super(); - } - - read(buffer: TBuffer, offset = 0, length = buffer.byteLength, position: number | null = null): Promise<{ bytesRead: number; buffer: TBuffer; }> { - return this.handle.read(buffer, offset, length, position); - } - - async size(): Promise { - const stat = await this.handle.stat(); - return stat.size; - } - - async close() { - return this.handle.close(); - } -} diff --git a/vcpkg-artifacts/fs/streams.ts b/vcpkg-artifacts/fs/streams.ts deleted file mode 100644 index e02f307760..0000000000 --- a/vcpkg-artifacts/fs/streams.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { EventEmitter, Transform, TransformCallback } from 'stream'; -import { Stopwatch } from '../util/channels'; -import { PercentageScaler } from '../util/percentage-scaler'; - -export interface Progress { - progress(percent: number, bytes: number, msec: number): void; -} - -export interface ProgressTrackingEvents extends EventEmitter { - on(event: 'progress', callback: (progress: number, currentPosition: number, msec: number) => void): this; -} - -export class ProgressTrackingStream extends Transform implements ProgressTrackingEvents { - private readonly stopwatch = new Stopwatch; - private readonly scaler: PercentageScaler; - private currentPosition: number; - - constructor(start: number, end: number) { - super(); - this.scaler = new PercentageScaler(start, end); - this.currentPosition = start; - } - - override _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { - if (encoding !== 'buffer') { - return callback(new Error('unexpected chunk type')); - } - - const chunkBuffer = chunk; - this.currentPosition += chunkBuffer.byteLength; - this.emit('progress', this.scaler.scalePosition(this.currentPosition), this.currentPosition, this.stopwatch.total); - return callback(null, chunk); - } - - get currentPercentage() { - return this.scaler.scalePosition(this.currentPosition); - } -} diff --git a/vcpkg-artifacts/fs/unified-filesystem.ts b/vcpkg-artifacts/fs/unified-filesystem.ts deleted file mode 100644 index ac725e47e2..0000000000 --- a/vcpkg-artifacts/fs/unified-filesystem.ts +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { Readable, Writable } from 'stream'; -import { i } from '../i18n'; -import { Uri } from '../util/uri'; -import { FileStat, FileSystem, FileType, ReadHandle, WriteStreamOptions } from './filesystem'; - -/** - * gets the scheme off the front of an uri. - * @param uri the uri to get the scheme for. - * @returns the scheme, undefined if the uri has no scheme (colon) - */ -export function schemeOf(uri: string) { - strict.ok(uri, i`Uri may not be empty`); - return /^(\w*):/.exec(uri)?.[1]; -} - -export class UnifiedFileSystem extends FileSystem { - - private filesystems : Record = {}; - - /** registers a scheme to a given filesystem - * - * @param scheme the Uri scheme to reserve - * @param fileSystem the filesystem to associate with the scheme - */ - register(scheme: string, fileSystem: FileSystem) { - strict.ok(!this.filesystems[scheme], i`scheme '${scheme}' already registered`); - this.filesystems[scheme] = fileSystem; - return this; - } - - /** - * gets the filesystem for the given uri. - * - * @param uri the uri to check the filesystem for - * - * @returns the filesystem. Will throw if no filesystem is valid. - */ - public filesystem(uri: string | Uri) { - const scheme = schemeOf(uri.toString()); - - strict.ok(scheme, i`uri ${uri.toString()} has no scheme`); - - const filesystem = this.filesystems[scheme]; - strict.ok(filesystem, i`scheme ${scheme} has no filesystem associated with it`); - - return filesystem; - } - - /** - * Creates a new URI from a string, e.g. `https://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param uri A string which represents an URI (see `URI#toString`). - */ - override parseUri(uri: string, _strict?: boolean): Uri { - return this.filesystem(uri).parseUri(uri); - } - - - stat(uri: Uri): Promise { - return this.filesystem(uri).stat(uri); - } - - async readDirectory(uri: Uri, options?: { recursive?: boolean }): Promise> { - return this.filesystem(uri).readDirectory(uri, options); - } - - createDirectory(uri: Uri): Promise { - return this.filesystem(uri).createDirectory(uri); - } - - readFile(uri: Uri): Promise { - return this.filesystem(uri).readFile(uri); - } - - openFile(uri: Uri): Promise { - return this.filesystem(uri).openFile(uri); - } - - writeFile(uri: Uri, content: Uint8Array): Promise { - return this.filesystem(uri).writeFile(uri, content); - } - - readStream(uri: Uri, options?: { start?: number, end?: number }): Promise { - return this.filesystem(uri).readStream(uri, options); - } - - writeStream(uri: Uri, options?: WriteStreamOptions): Promise { - return this.filesystem(uri).writeStream(uri, options); - } - - delete(uri: Uri, options?: { recursive?: boolean | undefined; useTrash?: boolean | undefined; }): Promise { - return this.filesystem(uri).delete(uri, options); - } - - rename(source: Uri, target: Uri, options?: { overwrite?: boolean | undefined; }): Promise { - strict.ok(source.fileSystem === target.fileSystem, i`may not rename across filesystems`); - return source.fileSystem.rename(source, target, options); - } - - copy(source: Uri, target: Uri, _options?: { overwrite?: boolean | undefined; }): Promise { - return target.fileSystem.copy(source, target); - } - - createSymlink(original: Uri, symlink: Uri): Promise { - return symlink.fileSystem.createSymlink(original, symlink); - } -} diff --git a/vcpkg-artifacts/fs/vsix-local-filesystem.ts b/vcpkg-artifacts/fs/vsix-local-filesystem.ts deleted file mode 100644 index 28bcd1d259..0000000000 --- a/vcpkg-artifacts/fs/vsix-local-filesystem.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { LocalFileSystem } from './local-filesystem'; - -export class VsixLocalFilesystem extends LocalFileSystem { - private readonly vsixBaseUri: Uri | undefined; - - constructor(session: Session) { - super(session); - const programData = process.env['ProgramData']; - if (programData) { - this.vsixBaseUri = this.file(programData).join('Microsoft/VisualStudio/Packages'); - } - } - - /** - * Creates a new URI from a string, e.g. `https://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param value A string which represents an URI (see `URI#toString`). - */ - override parseUri(value: string, _strict?: boolean): Uri { - return Uri.parseFilterVsix(this, value, _strict, this.vsixBaseUri); - } -} diff --git a/vcpkg-artifacts/header.txt b/vcpkg-artifacts/header.txt deleted file mode 100644 index 5f34b52a07..0000000000 --- a/vcpkg-artifacts/header.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - diff --git a/vcpkg-artifacts/i18n.ts b/vcpkg-artifacts/i18n.ts deleted file mode 100644 index a292c4cedd..0000000000 --- a/vcpkg-artifacts/i18n.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { readFileSync } from 'node:fs'; -import { createContext, runInContext } from 'node:vm'; -/** - * Creates a reusable safe-eval sandbox to execute code in. - */ -export function createSandbox(): (code: string, context?: any) => T { - const sandbox = createContext({}); - return (code: string, context?: any) => { - const response = 'SAFE_EVAL_' + Math.floor(Math.random() * 1000000); - sandbox[response] = {}; - if (context) { - Object.keys(context).forEach(key => sandbox[key] = context[key]); - runInContext(`try { ${response} = ${code} } catch (e) { ${response} = undefined }`, sandbox); - for (const key of Object.keys(context)) { - delete sandbox[key]; - } - } else { - runInContext(`${response} = ${code}`, sandbox); - } - return sandbox[response]; - }; -} - -export const safeEval = createSandbox(); - -// eslint-disable-next-line @typescript-eslint/no-require-imports -let currentLocale = require('./locales/messages.json'); - -export function setLocale(newLocale: string | undefined) { - if (newLocale) { - currentLocale = JSON.parse(readFileSync(newLocale, 'utf8')); - } -} - - -/** - * generates the translation key for a given message - * - * @param literals - * @returns the key - */ -function indexOf(literals: TemplateStringsArray) { - const content = literals.flatMap((k) => [k, '$']); - content.length--; // drop the trailing undefined. - return content.join('').trim().replace(/ [a-z]/g, ([, b]) => b.toUpperCase()).replace(/[^a-zA-Z$]/g, ''); -} - -/** - * Support for tagged template literals for i18n. - * - * Leverages translation files in ../i18n - * - * @param literals the literal values in the tagged template - * @param values the inserted values in the template - * - * @translator - */ -export function i(literals: TemplateStringsArray, ...values: Array): string { - const key = indexOf(literals); - if (key) { - const str = currentLocale[key]; // get localized string - if (str) { - // fill out the template string. - return safeEval(`\`${str}\``, values.reduce((p, c, i) => { p[`p${i}`] = c; return p; }, {})); - } - } - // if the translation isn't available, just resolve the string template normally. - return String.raw(literals, ...values); -} diff --git a/vcpkg-artifacts/installers/espidf.ts b/vcpkg-artifacts/installers/espidf.ts deleted file mode 100644 index 675c0a9825..0000000000 --- a/vcpkg-artifacts/installers/espidf.ts +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { delimiter } from 'path'; -import { Activation } from '../artifacts/activation'; -import { i } from '../i18n'; -import { UnpackEvents } from '../interfaces/events'; -import { Session } from '../session'; -import { execute } from '../util/exec-cmd'; -import { Uri } from '../util/uri'; -import { vcpkgFetch } from '../vcpkg'; - -export async function installEspIdf(session: Session, events: Partial, targetLocation: Uri) { - // check for some file that espressif installs to see if it's installed. - if (await targetLocation.exists('.espressif')) { return true; } - - // create the .espressif folder for the espressif installation - const dotEspidf = await targetLocation.createDirectory('.espressif'); - - const pythonPath = await vcpkgFetch(session, 'python3_with_venv'); - if (!pythonPath) { - throw new Error(i`Could not activate esp-idf: python was not found.`); - } - - const targetDirectory = targetLocation.fsPath; - - const extendedEnvironment: NodeJS.ProcessEnv = { - ... process.env, - IDF_PATH: targetDirectory, - IDF_TOOLS_PATH: dotEspidf.fsPath - }; - - const idfTools = targetLocation.join('tools/idf_tools.py').fsPath; - session.channels.debug(`Running idf installer ${idfTools}`); - - const installResult = await execute(pythonPath, [ - idfTools, - 'install', - '--targets=all' - ], { - env: extendedEnvironment, - onStdOutData: (chunk) => { - session.channels.debug('espidf: ' + chunk); - const regex = /\s(100)%/; - chunk.toString().split('\n').forEach((line: string) => { - const match_array = line.match(regex); - if (match_array !== null) { - events.unpackArchiveHeartbeat?.('Installing espidf'); - } - }); - } - }); - - if (installResult.code) { - return false; - } - - const installPythonEnv = await execute(pythonPath, [ - idfTools, - 'install-python-env' - ], { - env: extendedEnvironment - }); - - return installPythonEnv.code === 0; -} - -export async function activateEspIdf(session: Session, activation: Activation, targetLocation: Uri) { - const pythonPath = await vcpkgFetch(session, 'python3_with_venv'); - if (!pythonPath) { - throw new Error(i`Could not activate esp-idf: python was not found.`); - } - - const targetDirectory = targetLocation.fsPath; - const dotEspidf = targetLocation.join('.espressif'); - const extendedEnvironment: NodeJS.ProcessEnv = { - ... process.env, - IDF_PATH: targetDirectory, - IDF_TOOLS_PATH: dotEspidf.fsPath - }; - - const activateIdf = await execute(pythonPath, [ - `${targetLocation.fsPath}/tools/idf_tools.py`, - 'export', - '--format', - 'key-value', - '--prefer-system' - ], { - env: extendedEnvironment, - onStdOutData: (chunk) => { - chunk.toString().split('\n').forEach((line: string) => { - const splitLine = line.split('='); - if (splitLine[0]) { - if (splitLine[0] !== 'PATH') { - activation.addEnvironmentVariable(splitLine[0].trim(), [splitLine[1].trim()]); - } - else { - const pathValues = splitLine[1].split(delimiter); - for (const path of pathValues) { - if (path.trim() !== '%PATH%' && path.trim() !== '$PATH') { - // we actually want to use the artifacts we installed, not the ones that are being bundled. - // when espressif supports artifacts properly, we shouldn't need this filter. - if (! /\.espressif.tools/ig.exec(path)) { - activation.addPath(splitLine[0].trim(), session.fileSystem.file(path)); - } - } - } - } - } - }); - } - }); - - if (activateIdf.code) { - throw new Error(`Failed to activate esp-idf - ${activateIdf.stderr}`); - } - - activation.addEnvironmentVariable('IDF_PATH', targetDirectory); - activation.addTool('IDF_TOOLS_PATH', dotEspidf.fsPath); - return true; -} diff --git a/vcpkg-artifacts/installers/git.ts b/vcpkg-artifacts/installers/git.ts deleted file mode 100644 index c34bedb404..0000000000 --- a/vcpkg-artifacts/installers/git.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { CloneOptions, Git } from '../archivers/git'; -import { i } from '../i18n'; -import { InstallEvents, InstallOptions } from '../interfaces/events'; -import { CloneSettings, GitInstaller } from '../interfaces/metadata/installers/git'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { vcpkgFetch } from '../vcpkg'; - -export async function installGit(session: Session, name: string, version: string, targetLocation: Uri, install: GitInstaller, events: Partial, options: Partial): Promise { - const gitPath = await vcpkgFetch(session, 'git'); - - if (!gitPath) { - throw new Error(i`Git is not installed`); - } - - const repo = session.parseLocation(install.location); - const targetDirectory = targetLocation.join(options.subdirectory ?? ''); - - const gitTool = new Git(gitPath, targetDirectory); - events.unpackArchiveStart?.(repo); - - // changing the clone process to do an init/add remote/fetch/checkout because - // it's far faster to clone a specific commit and this allows us to support - // recursive shallow submodules as well. - - if (! await gitTool.init()) { - events.unpackArchiveHeartbeat?.(i`Initializing repository folder`); - throw new Error(i`Failed to initialize git repository folder (${targetDirectory.fsPath})`); - } - - if (!await gitTool.addRemote('origin', repo)) { - events.unpackArchiveHeartbeat?.(i`Adding remote ${repo.toString()} to git repository folder`); - throw new Error(i`Failed to set git origin (${repo.toString()}) in folder (${targetDirectory.fsPath})`); - } - - if (!await gitTool.fetch('origin', events, { commit: install.commit, depth: install.full ? undefined : 1 })) { - events.unpackArchiveHeartbeat?.(i`Fetching remote ${repo.toString()} for git repository folder`); - throw new Error(i`Unable to fetch git data for (${repo.toString()}) in folder (${targetDirectory.fsPath})`); - } - - if (!await gitTool.checkout(events, { commit: 'FETCH_HEAD' })) { - events.unpackArchiveHeartbeat?.(i`Checking out commit ${install.commit} for ${repo.toString()} to git repository folder`); - throw new Error(i`Unable to checkout data for (${repo.toString()}) in folder (${targetDirectory.fsPath})`); - } - - if (install.recurse) { - events.unpackArchiveHeartbeat?.(i`Updating submodules for repository ${repo.toString()} in the git repository folder`); - if (!await gitTool.config('.gitmodules', 'submodule.*.shallow', 'true')) { - throw new Error(i`Unable to set submodule shallow data for (${repo.toString()}) in folder (${targetDirectory.fsPath})`); - } - - if (!await gitTool.updateSubmodules(events, { init: true, recursive: true, depth: install.full ? undefined : 1 })) { - throw new Error(i`Unable update submodules for (${repo.toString()}) in folder (${targetDirectory.fsPath})`); - } - } -} diff --git a/vcpkg-artifacts/installers/nuget.ts b/vcpkg-artifacts/installers/nuget.ts deleted file mode 100644 index 9039c47923..0000000000 --- a/vcpkg-artifacts/installers/nuget.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { acquireNuGetFile } from '../fs/acquire'; -import { InstallEvents, InstallOptions } from '../interfaces/events'; -import { NupkgInstaller } from '../interfaces/metadata/installers/nupkg'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { vcpkgExtract } from '../vcpkg'; -import { applyAcquireOptions } from './util'; -export async function installNuGet(session: Session, name: string, version: string, targetLocation: Uri, install: NupkgInstaller, events: Partial, options: Partial): Promise { - const file = await acquireNuGetFile(session, install.location, `${name}.zip`, events, applyAcquireOptions(options, install)); - events.unpackArchiveStart?.(file); - await vcpkgExtract( - session, - file.fsPath, - targetLocation.fsPath, - install.strip); -} diff --git a/vcpkg-artifacts/installers/untar.ts b/vcpkg-artifacts/installers/untar.ts deleted file mode 100644 index 97e0178512..0000000000 --- a/vcpkg-artifacts/installers/untar.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { acquireArtifactFile } from '../fs/acquire'; -import { InstallEvents, InstallOptions } from '../interfaces/events'; -import { UnTarInstaller } from '../interfaces/metadata/installers/tar'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { vcpkgExtract } from '../vcpkg'; -import { applyAcquireOptions, artifactFileName } from './util'; - -export async function installUnTar(session: Session, name: string, version: string, targetLocation: Uri, install: UnTarInstaller, events: Partial, options: Partial): Promise { - const file = await acquireArtifactFile(session, [...install.location].map(each => session.parseLocation(each)), artifactFileName(name, version, install, '.tar'), events, applyAcquireOptions(options, install)); - events.unpackArchiveStart?.(file); - await vcpkgExtract( - session, - file.fsPath, - targetLocation.fsPath, - install.strip - ); -} diff --git a/vcpkg-artifacts/installers/unzip.ts b/vcpkg-artifacts/installers/unzip.ts deleted file mode 100644 index bf1da1f5b0..0000000000 --- a/vcpkg-artifacts/installers/unzip.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { acquireArtifactFile } from '../fs/acquire'; -import { InstallEvents, InstallOptions } from '../interfaces/events'; -import { UnZipInstaller } from '../interfaces/metadata/installers/zip'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { vcpkgExtract } from '../vcpkg'; -import { applyAcquireOptions, artifactFileName } from './util'; - -export async function installUnZip(session: Session, name: string, version: string, targetLocation: Uri, install: UnZipInstaller, events: Partial, options: Partial): Promise { - const file = await acquireArtifactFile(session, [...install.location].map(each => session.parseLocation(each)), artifactFileName(name, version, install, '.zip'), events, applyAcquireOptions(options, install)); - events.unpackArchiveStart?.(file); - await vcpkgExtract( - session, - file.fsPath, - targetLocation.fsPath, - install.strip); -} diff --git a/vcpkg-artifacts/installers/util.ts b/vcpkg-artifacts/installers/util.ts deleted file mode 100644 index b17a01fdd1..0000000000 --- a/vcpkg-artifacts/installers/util.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { AcquireOptions } from '../fs/acquire'; -import { Installer } from '../interfaces/metadata/installers/Installer'; -import { Verifiable } from '../interfaces/metadata/installers/verifiable'; - -export function artifactFileName(name: string, version: string, install: Installer & Verifiable, extension: string): string { - let result = name; - if (install.nametag) { - result += '-'; - result += install.nametag; - } - - if (install.lang) { - result += '-'; - result += install.lang; - } - // add the version number into the filename too. - result += '-' + version; - - // if there is a sha256 or sha512 hash in the install, add it to the filename - const hash = (install.sha256 || install.sha512 || ''); - if (hash) { - result += `-(${hash})`; - } - - result += extension; - return result.replace(/[^\w()-]+/g, '.'); -} - -export function applyAcquireOptions(options: AcquireOptions, install: Verifiable): AcquireOptions { - const sha256 = install.sha256; - if (sha256 !== null && sha256 !== undefined) { - return { ...options, algorithm: 'sha256', value: sha256.toString() }; - } - - const sha512 = install.sha512; - if (sha512 !== null && sha512 !== undefined) { - return { ...options, algorithm: 'sha512', value: sha512.toString() }; - } - - return options; -} - diff --git a/vcpkg-artifacts/interfaces/collections.ts b/vcpkg-artifacts/interfaces/collections.ts deleted file mode 100644 index faad3cc450..0000000000 --- a/vcpkg-artifacts/interfaces/collections.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export type Range = [number, number, number]; - -export interface Dictionary extends Iterable<[string, T]> { - clear(): void; - delete(key: string): boolean; - get(key: string): T | undefined; - has(key: string): boolean; - add(key: string): T; - sourcePosition(key: string): Range | undefined; - readonly length: number; - readonly keys: Array; -} - -export interface Sequence extends Iterable { - [Symbol.iterator](): Iterator; - readonly length: number; - clear(): void; -} - -export interface Strings extends Sequence { - get(index: number): string | undefined; - delete(val: string | Array): void; -} \ No newline at end of file diff --git a/vcpkg-artifacts/interfaces/error-kind.ts b/vcpkg-artifacts/interfaces/error-kind.ts deleted file mode 100644 index 625dc68534..0000000000 --- a/vcpkg-artifacts/interfaces/error-kind.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export enum ErrorKind { - SectionNotFound = 'SectionMessing', - FieldMissing = 'FieldMissing', - IncorrectType = 'IncorrectType', - ParseError = 'ParseError', - DuplicateKey = 'DuplicateKey', - NoInstallInDemand = 'NoInstallInDemand', - HostOnly = 'HostOnly', - MissingHash = 'MissingHashValue', - InvalidDefinition = 'InvalidDefinition', - InvalidChild = 'InvalidChild', - InvalidExpression = 'InvalidExpression', - InfoBlockPresent = 'InfoBlockPresent', -} diff --git a/vcpkg-artifacts/interfaces/events.ts b/vcpkg-artifacts/interfaces/events.ts deleted file mode 100644 index a642970380..0000000000 --- a/vcpkg-artifacts/interfaces/events.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Uri } from '../util/uri'; - -export interface HashVerifyEvents { - hashVerifyStart(file: string): void; - hashVerifyProgress(file: string, percent: number): void; - hashVerifyComplete(file: string): void; -} - -export interface DownloadEvents extends HashVerifyEvents { - downloadStart(uris: Array, destination: string): void; - downloadProgress(uri: Uri, destination: string, percent: number): void; - downloadComplete(): void; -} - -export interface FileEntry { - archiveUri: Uri; - destination: Uri; - path: string; - extractPath: string | undefined; -} - -export interface UnpackEvents { - unpackArchiveStart(archiveUri: Uri): void; - unpackArchiveHeartbeat(text: string): void; -} - -export interface InstallEvents extends DownloadEvents, UnpackEvents { - startInstallArtifact(artifactDisplayName: string): void; - alreadyInstalledArtifact(artifactDisplayName: string): void; -} - -export interface InstallOptions { - force?: boolean, - allLanguages?: boolean, - language?: string -} diff --git a/vcpkg-artifacts/interfaces/metadata/contact.ts b/vcpkg-artifacts/interfaces/metadata/contact.ts deleted file mode 100644 index 30440e4b9d..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/contact.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Strings } from '../collections'; -import { Validation } from '../validation'; - -/** A person/organization/etc who either has contributed or is connected to the artifact */ -export interface Contact extends Validation { - email?: string; - readonly roles: Strings; -} diff --git a/vcpkg-artifacts/interfaces/metadata/demands.ts b/vcpkg-artifacts/interfaces/metadata/demands.ts deleted file mode 100644 index 4547edf2d5..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/demands.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -import { Dictionary, Sequence } from '../collections'; -import { Validation } from '../validation'; -import { Exports } from './exports'; -import { Installer } from './installers/Installer'; -import { VersionReference } from './version-reference'; - -/** - * These are the things that are necessary to install/set/depend-on/etc for a given 'artifact' - */ - -export interface Demands extends Validation { - /** set of required artifacts */ - requires: Dictionary; - - /** An error message that the user should get, and abort the installation */ - error: string | undefined; // markdown text with ${} replacements - - /** A warning message that the user should get, does not abort the installation */ - warning: string | undefined; // markdown text with ${} replacements - - /** A text message that the user should get, does not abort the installation */ - message: string | undefined; // markdown text with ${} replacements - - /** settings that should be applied to the context when activated */ - exports: Exports; - - /** - * defines what should be physically laid out on disk for this artifact - * - * Note: once the host/environment queries have been completed, there should - * only be one single package/file/repo/etc that gets downloaded and - * installed for this artifact. If there needs to be more than one, - * then there would need to be a 'requires' that refers to the additional - * package. - */ - install: Sequence; -} diff --git a/vcpkg-artifacts/interfaces/metadata/exports.ts b/vcpkg-artifacts/interfaces/metadata/exports.ts deleted file mode 100644 index 9666123eb8..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/exports.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Dictionary, Strings } from '../collections'; -import { Validation } from '../validation'; - -/** settings that should be applied to the context */ - -export interface Exports extends Validation { - /** shell aliases (aka functions/etc) for exposing specific commands */ - aliases: Dictionary; - // this is where we'd see things like - // CFLAGS: [...] where you can have a bunch of things that would end up in the CFLAGS variable (or used to set values in a vcxproj/cmake settings file.) - // - /** - * a map of #defines for the artifact. - * - * these would likely also be turned into 'variables', but - * it's significant enough that we need them separately - */ - defines: Dictionary; - /** - * a map of (environment) variables that should be set in the context. - * - * arrays mean that the values should be joined with spaces - */ - environment: Dictionary; - /** a map of locations that are activation-type specific */ - locations: Dictionary; - /** a map of key/values to emit into an MSBuild */ - msbuild_properties: Dictionary; - /** a map of path categories to one or more values */ - paths: Dictionary; - /** a map of properties that are activation-type specific */ - properties: Dictionary; - /** a map of the known tools to actual tool executable name */ - tools: Dictionary; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/Installer.ts b/vcpkg-artifacts/interfaces/metadata/installers/Installer.ts deleted file mode 100644 index d522f9230b..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/Installer.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Validation } from '../../validation'; - -/** - * defines what should be physically laid out on disk for this artifact - * - * Note: once the host/environment queries have been completed, there should - * only be one single package/file/repo/etc that gets downloaded and - * installed for this artifact. If there needs to be more than one, - * then there would need to be a 'requires' that refers to the additional - * package. - * - * More types to follow. - */ - -export interface Installer extends Validation { - readonly installerKind: string; - readonly lang?: string; // note to only install this entry when the current locale is this language - readonly nametag?: string; // note to include this tag in the file name of the cached artifact -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/git.ts b/vcpkg-artifacts/interfaces/metadata/installers/git.ts deleted file mode 100644 index 57b3f3d018..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/git.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Installer } from './Installer'; - -export interface CloneSettings { - /** optionally, a tag/branch to be checkout out */ - commit?: string; - - /** - * determines if the whole repo is cloned. - * - * Note: - * - when false (default), indicates that the repo should be cloned with --depth 1 - * - when true, indicates that the full repo should be cloned - * */ - full?: boolean; - - /** - * determines if the repo should be cloned recursively. - * - * Note: - * - when false (default), indicates that the repo should clone recursive submodules - * - when true, indicates that the repo should be cloned recursively. - */ - recurse?: boolean; - - /** - * Gives a subdirectory to clone the repo to, if given. - */ - subdirectory?: string; -} - -/** - * Installer that clones a git repository - */ -export interface GitInstaller extends Installer, CloneSettings { - /** the git repo location to be cloned */ - location: string; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/nupkg.ts b/vcpkg-artifacts/interfaces/metadata/installers/nupkg.ts deleted file mode 100644 index ebcc7b7f80..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/nupkg.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Installer } from './Installer'; -import { UnpackSettings } from './unpack-settings'; -import { Verifiable } from './verifiable'; - -/** - * a special version of UnZip, this assumes the nuget.org package service - * the 'nupkg' value is the package id (ie, 'Microsoft.Windows.SDK.CPP.x64/10.0.19041.5') - * - * and that is appended to the known-url https://www.nuget.org/api/v2/package/ to get - * the final url. - * - * post MVP we could add the ability to use artifact sources and grab the package that way. - * - * combined with Verifiable, the hash should be matched before proceeding - */ - -export interface NupkgInstaller extends Verifiable, UnpackSettings, Installer { - /** the source location of a file to unzip/untar/unrar/etc */ - location: string; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/tar.ts b/vcpkg-artifacts/interfaces/metadata/installers/tar.ts deleted file mode 100644 index 5f6336d48a..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/tar.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Strings } from '../../collections'; -import { Installer } from './Installer'; -import { UnpackSettings } from './unpack-settings'; -import { Verifiable } from './verifiable'; - -/** - * a file that can be untar'd - * - * combined with Verifiable, the hash should be matched before proceeding - */ - -export interface UnTarInstaller extends Verifiable, UnpackSettings, Installer { - /** the source location of a file to untar */ - location: Strings; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/unpack-settings.ts b/vcpkg-artifacts/interfaces/metadata/installers/unpack-settings.ts deleted file mode 100644 index bfd7e6f11f..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/unpack-settings.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Strings } from '../../collections'; - - -export interface UnpackSettings { - /** a number of levels of directories to strip off the front of the file names in the archive when restoring (think tar --strip 1) */ - strip?: number; - - /** one or more transform strings to apply to the filenames as they are restored (think tar --xform ... ) */ - transform: Strings; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/verifiable.ts b/vcpkg-artifacts/interfaces/metadata/installers/verifiable.ts deleted file mode 100644 index 7fe98940eb..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/verifiable.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** One of several choices for a HASH etc */ - -export interface Verifiable { - /** SHA-256 hash */ - sha256?: string; - sha512?: string; -} diff --git a/vcpkg-artifacts/interfaces/metadata/installers/zip.ts b/vcpkg-artifacts/interfaces/metadata/installers/zip.ts deleted file mode 100644 index 76c2a46b20..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/installers/zip.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Strings } from '../../collections'; -import { Installer } from './Installer'; -import { UnpackSettings } from './unpack-settings'; -import { Verifiable } from './verifiable'; - -/** - * a file that can be unzipp'd - * - * combined with Verifiable, the hash should be matched before proceeding - */ - -export interface UnZipInstaller extends Verifiable, UnpackSettings, Installer { - /** the source location of a file to unzip */ - location: Strings; -} diff --git a/vcpkg-artifacts/interfaces/metadata/version-reference.ts b/vcpkg-artifacts/interfaces/metadata/version-reference.ts deleted file mode 100644 index a192ceaa96..0000000000 --- a/vcpkg-artifacts/interfaces/metadata/version-reference.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Range, SemVer } from 'semver'; -import { Validation } from '../validation'; - - -export interface VersionReference extends Validation { - range: Range; - resolved?: SemVer; - readonly raw?: string; -} diff --git a/vcpkg-artifacts/interfaces/validation-message.ts b/vcpkg-artifacts/interfaces/validation-message.ts deleted file mode 100644 index a8e8ef0e64..0000000000 --- a/vcpkg-artifacts/interfaces/validation-message.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ErrorKind } from './error-kind'; - -export interface ValidationMessage { - message: string; - range?: [number, number, number] | { sourcePosition(): [number, number, number] | undefined }; - rangeOffset?: { line: number; column: number; }; - category: ErrorKind; -} diff --git a/vcpkg-artifacts/interfaces/validation.ts b/vcpkg-artifacts/interfaces/validation.ts deleted file mode 100644 index fa5ef7f7db..0000000000 --- a/vcpkg-artifacts/interfaces/validation.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ValidationMessage } from './validation-message'; - -export interface Validation { - /** - * @internal - * - * actively validate this node. - */ - validate(): Iterable; -} diff --git a/vcpkg-artifacts/locales/messages.json b/vcpkg-artifacts/locales/messages.json deleted file mode 100644 index 91ba852ff3..0000000000 --- a/vcpkg-artifacts/locales/messages.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "FatalTheRootFolder$CannotBeCreated": "Fatal: The root folder '${p0}' cannot be created", - "_FatalTheRootFolder$CannotBeCreated.comment": "\n'${p0}' (aka 'this.homeFolder.fsPath') is a parameter of type 'string'\n", - "FatalTheGlobalConfigurationFile$CannotBeCreated": "Fatal: The global configuration file '${p0}' cannot be created", - "_FatalTheGlobalConfigurationFile$CannotBeCreated.comment": "\n'${p0}' (aka 'this.globalConfig.fsPath') is a parameter of type 'string'\n", - "VCPKGCOMMANDWasNotSet": "VCPKG_COMMAND was not set", - "RunningVcpkgInternallyReturnedANonzeroExitCode$": "Running vcpkg internally returned a nonzero exit code: ${p0}", - "_RunningVcpkgInternallyReturnedANonzeroExitCode$.comment": "\n'${p0}' is a parameter of type 'number'\n", - "failedToDownloadFrom$": "failed to download from ${p0}", - "_failedToDownloadFrom$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "failedToDownload$FromAnySource": "failed to download ${p0} from any source", - "_failedToDownload$FromAnySource.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ErrorParsingConditionalDemand$$": "Error parsing conditional demand '${p0}'- ${p1}", - "_ErrorParsingConditionalDemand$$.comment": "\n'${p0}' is a parameter of type 'any'\n\n'${p1}' (aka 'query.error?.message') is a parameter of type 'string'\n", - "MissingIdentity$": "Missing identity '${p0}'", - "_MissingIdentity$.comment": "\n'${p0}' (aka ''info.id'') is a parameter of type 'string'\n", - "infoidShouldBeOfTypestringFound$": "info.id should be of type 'string', found '${p0}'", - "_infoidShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "MissingVersion$": "Missing version '${p0}'", - "_MissingVersion$.comment": "\n'${p0}' (aka ''info.version'') is a parameter of type 'string'\n", - "infoversionShouldBeOfTypestringFound$": "info.version should be of type 'string', found '${p0}'", - "_infoversionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infosummaryShouldBeOfTypestringFound$": "info.summary should be of type 'string', found '${p0}'", - "_infosummaryShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infodescriptionShouldBeOfTypestringFound$": "info.description should be of type 'string', found '${p0}'", - "_infodescriptionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "infooptionsShouldBeASequenceFound$": "info.options should be a sequence, found '${p0}'", - "_infooptionsShouldBeASequenceFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TheInfoBlockIsDeprecatedForConsistencyWithVcpkgjsonMoveInfoMembersToTheOutside": "The info block is deprecated for consistency with vcpkg.json; move info members to the outside.", - "idShouldBeOfTypestringFound$": "id should be of type 'string', found '${p0}'", - "_idShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "versionShouldBeOfTypestringFound$": "version should be of type 'string', found '${p0}'", - "_versionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "summaryShouldBeOfTypestringFound$": "summary should be of type 'string', found '${p0}'", - "_summaryShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "descriptionShouldBeOfTypestringFound$": "description should be of type 'string', found '${p0}'", - "_descriptionShouldBeOfTypestringFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "optionsShouldBeASequenceFound$": "options should be a sequence, found '${p0}'", - "_optionsShouldBeASequenceFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateKeysDetectedInManifest$": "Duplicate keys detected in manifest: '${p0}'", - "_DuplicateKeysDetectedInManifest$.comment": "\n'${p0}' is a parameter of type 'any'\n", - "noPostscriptFileRunVcpkgshellWithTheSameArguments": "no postscript file: run vcpkg-shell with the same arguments", - "DuplicateDefine$DuringActivationNewValueWillReplaceOld": "Duplicate define ${p0} during activation. New value will replace old.", - "_DuplicateDefine$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateToolDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate tool declared ${p0} during activation. New value will replace old.", - "_DuplicateToolDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateAliasDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate alias declared ${p0} during activation. New value will replace old.", - "_DuplicateAliasDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DuplicateLocationDeclared$DuringActivationNewValueWillReplaceOld": "Duplicate location declared ${p0} during activation. New value will replace old.", - "_DuplicateLocationDeclared$DuringActivationNewValueWillReplaceOld.comment": "\n'${p0}' is a parameter of type 'string'\n", - "CircularVariableReferenceDetected$": "Circular variable reference detected: ${p0}", - "_CircularVariableReferenceDetected$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "CircularVariableReferenceDetected$$": "Circular variable reference detected: ${p0} - ${p1}", - "_CircularVariableReferenceDetected$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "VariableReferenceFound$$$ThatIsReferencingAnUnknownBaseObject": "Variable reference found '$${p0}.${p1}' that is referencing an unknown base object.", - "_VariableReferenceFound$$$ThatIsReferencingAnUnknownBaseObject.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnresolvedVariableReferenceFound$$$DuringVariableSubstitution": "Unresolved variable reference found ($${p0}.${p1}) during variable substitution.", - "_UnresolvedVariableReferenceFound$$$DuringVariableSubstitution.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "InvalidPathDoesNotExist$": "Invalid path - does not exist: ${p0}", - "_InvalidPathDoesNotExist$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Activating$": "Activating: ${p0}", - "_Activating$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Deactivating$": "Deactivating: ${p0}", - "_Deactivating$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "nothingIsActivatedNoChangesHaveBeenMade": "nothing is activated, no changes have been made", - "InvalidArtifactId$": "Invalid artifact id '${p0}'", - "_InvalidArtifactId$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnknownInstallerType$": "Unknown installer type ${p0}", - "_UnknownInstallerType$.comment": "\n'${p0}' (aka 'installInfo!.installerKind') is a parameter of type 'string'\n", - "WhileResolvingDependenciesOf$$In$CouldNotBeResolvedToARegistry": "While resolving dependencies of ${p0}, ${p1} in ${p2} could not be resolved to a registry.", - "_WhileResolvingDependenciesOf$$In$CouldNotBeResolvedToARegistry.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string | undefined'\n\n'${p2}' is a parameter of type 'any'\n", - "WhileResolvingDependenciesOfTheProjectFile$$DidNotSpecifyARegistry": "While resolving dependencies of the project file ${p0}, ${p1} did not specify a registry.", - "_WhileResolvingDependenciesOfTheProjectFile$$DidNotSpecifyARegistry.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'any'\n", - "UnableToResolveDependency$In$": "Unable to resolve dependency ${p0} in ${p1}.", - "_UnableToResolveDependency$In$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "Artifact": "Artifact", - "Version": "Version", - "Status": "Status", - "Dependency": "Dependency", - "Summary": "Summary", - "progressUnknown": "(progress unknown)", - "verifying": "verifying", - "downloading$$": "downloading ${p0} -> ${p1}", - "_downloading$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "unpacking$": "unpacking ${p0}", - "_unpacking$.comment": "\n'${p0}' (aka 'archiveUri.fsPath') is a parameter of type 'string'\n", - "Installing$": "Installing ${p0}...", - "_Installing$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$AlreadyInstalled": "${p0} already installed.", - "_$AlreadyInstalled.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Downloading$": "Downloading ${p0}...", - "_Downloading$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Unpacking$": "Unpacking ${p0}...", - "_Unpacking$.comment": "\n'${p0}' (aka 'archiveUri.fsPath') is a parameter of type 'string'\n", - "ErrorInstalling$$": "Error installing ${p0} - ${p1}", - "_ErrorInstalling$$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'any'\n", - "error": "error:", - "warning": "warning:", - "ExpectedASingleValueFor$FoundMultiple": "Expected a single value for ${p0} - found multiple", - "_ExpectedASingleValueFor$FoundMultiple.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedASingleValueFor$": "Expected a single value for '--${p0}'.", - "_ExpectedASingleValueFor$.comment": "\n'${p0}' (aka 'this.switch') is a parameter of type 'string'\n", - "Assuming$IsCorrectSupplyAHashInTheArtifactMetadataToSuppressThisMessage": "Assuming '${p0}' is correct; supply a hash in the artifact metadata to suppress this message.", - "_Assuming$IsCorrectSupplyAHashInTheArtifactMetadataToSuppressThisMessage.comment": "\n'${p0}' is a parameter of type 'string'\n", - "DownloadedFile$DidNotHaveTheCorrectHash$$": "Downloaded file '${p0}' did not have the correct hash (${p1}: ${p2}) ", - "_DownloadedFile$DidNotHaveTheCorrectHash$$.comment": "\n'${p0}' (aka 'outputFile.fsPath') is a parameter of type 'string'\n\n'${p1}' (aka 'options.algorithm') is a parameter of type 'string'\n\n'${p2}' (aka 'options.value') is a parameter of type 'string'\n", - "packageReference$IsNotAValidNuGetPackageReferencenameversion": "package reference '${p0}' is not a valid NuGet package reference ({name}/{version})", - "_packageReference$IsNotAValidNuGetPackageReferencenameversion.comment": "\n'${p0}' is a parameter of type 'string'\n", - "statsMayNotBeUndefined": "stats may not be undefined", - "CannotRenameFilesAcrossFilesystems": "Cannot rename files across filesystems", - "CopyFailedSource$IsAFolderTarget$IsAFile": "Copy failed: source (${p0}) is a folder, target (${p1}) is a file", - "_CopyFailedSource$IsAFolderTarget$IsAFile.comment": "\n'${p0}' (aka 'source.fsPath') is a parameter of type 'string'\n\n'${p1}' (aka 'target.fsPath') is a parameter of type 'string'\n", - "UriMayNotBeEmpty": "Uri may not be empty", - "scheme$AlreadyRegistered": "scheme '${p0}' already registered", - "_scheme$AlreadyRegistered.comment": "\n'${p0}' is a parameter of type 'string'\n", - "uri$HasNoScheme": "uri ${p0} has no scheme", - "_uri$HasNoScheme.comment": "\n'${p0}' is a parameter of type 'string'\n", - "scheme$HasNoFilesystemAssociatedWithIt": "scheme ${p0} has no filesystem associated with it", - "_scheme$HasNoFilesystemAssociatedWithIt.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n", - "mayNotRenameAcrossFilesystems": "may not rename across filesystems", - "CouldNotActivateEspidfPythonWasNotFound": "Could not activate esp-idf: python was not found.", - "GitIsNotInstalled": "Git is not installed", - "InitializingRepositoryFolder": "Initializing repository folder", - "FailedToInitializeGitRepositoryFolder$": "Failed to initialize git repository folder (${p0})", - "_FailedToInitializeGitRepositoryFolder$.comment": "\n'${p0}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "AddingRemote$ToGitRepositoryFolder": "Adding remote ${p0} to git repository folder", - "_AddingRemote$ToGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "FailedToSetGitOrigin$InFolder$": "Failed to set git origin (${p0}) in folder (${p1})", - "_FailedToSetGitOrigin$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "FetchingRemote$ForGitRepositoryFolder": "Fetching remote ${p0} for git repository folder", - "_FetchingRemote$ForGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFetchGitDataFor$InFolder$": "Unable to fetch git data for (${p0}) in folder (${p1})", - "_UnableToFetchGitDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "CheckingOutCommit$For$ToGitRepositoryFolder": "Checking out commit ${p0} for ${p1} to git repository folder", - "_CheckingOutCommit$For$ToGitRepositoryFolder.comment": "\n'${p0}' (aka 'install.commit') is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnableToCheckoutDataFor$InFolder$": "Unable to checkout data for (${p0}) in folder (${p1})", - "_UnableToCheckoutDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "UpdatingSubmodulesForRepository$InTheGitRepositoryFolder": "Updating submodules for repository ${p0} in the git repository folder", - "_UpdatingSubmodulesForRepository$InTheGitRepositoryFolder.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToSetSubmoduleShallowDataFor$InFolder$": "Unable to set submodule shallow data for (${p0}) in folder (${p1})", - "_UnableToSetSubmoduleShallowDataFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "UnableUpdateSubmodulesFor$InFolder$": "Unable update submodules for (${p0}) in folder (${p1})", - "_UnableUpdateSubmodulesFor$InFolder$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'targetDirectory.fsPath') is a parameter of type 'string'\n", - "ExpectedCommaFound$": "Expected comma, found ${p0}", - "_ExpectedCommaFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedOneOfNumberBooleanIdentifierStringFoundToken$": "Expected one of {Number, Boolean, Identifier, String}, found token ${p0}", - "_ExpectedOneOfNumberBooleanIdentifierStringFoundToken$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpressionSpecifiedNOTTwice": "Expression specified NOT twice", - "ExpectedCloseParenthesisForExpressionFound$": "Expected close parenthesis for expression, found ${p0}", - "_ExpectedCloseParenthesisForExpressionFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ExpectedExpressionFound$": "Expected expression, found ${p0}", - "_ExpectedExpressionFound$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "ParseErrorDigitExpected": "ParseError: Digit expected (0-9)", - "ParseErrorHexDigitExpectedFf": "ParseError: Hex Digit expected (0-F,0-f)", - "ParseErrorBinaryDigitExpected": "ParseError: Binary Digit expected (0,1)", - "UnexpectedEndOfFileWhileSearchingFor$": "Unexpected end of file while searching for '${p0}'", - "_UnexpectedEndOfFileWhileSearchingFor$.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n", - "InvalidEscapeSequence": "Invalid escape sequence", - "FailedToDeserializeIndex$": "Failed to deserialize index ${p0}", - "_FailedToDeserializeIndex$.comment": "\n'${p0}' is a parameter of type 'any'\n", - "$MatchedMoreThanOneResult$": "'${p0}' matched more than one result (${p1}).", - "_$MatchedMoreThanOneResult$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnsupportedRegistryScheme$": "Unsupported registry scheme '${p0}'", - "_UnsupportedRegistryScheme$.comment": "\n'${p0}' (aka 'locationUri.scheme') is a parameter of type 'string'\n", - "TriedToAdd$As$But$IsAlready$": "Tried to add ${p0} as ${p1}, but ${p2} is already ${p3}.", - "_TriedToAdd$As$But$IsAlready$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string | undefined'\n", - "UnknownRegistry$in$TheFollowingAreKnown$": "Unknown registry ${p0} (in ${p1}). The following are known: ${p2}", - "_UnknownRegistry$in$TheFollowingAreKnown$.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n", - "UpdatingRegistryDataFrom$": "Updating registry data from ${p0}", - "_UpdatingRegistryDataFrom$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeAString": "${p0} must be a string", - "_$MustBeAString.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeABool": "${p0} must be a bool", - "_$MustBeABool.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$MustBeAnArrayOfStringsOrUnset": "${p0} must be an array of strings, or unset", - "_$MustBeAnArrayOfStringsOrUnset.comment": "\n'${p0}' is a parameter of type 'string'\n", - "FoundAMismatched$In$ForALiteral$Use$$Instead": "Found a mismatched ${p0} in '${p1}'. For a literal ${p2}, use ${p3}${p4} instead.", - "_FoundAMismatched$In$ForALiteral$Use$$Instead.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string'\n\n'${p4}' is a parameter of type 'string'\n", - "CouldNotFindAValueFor$In$ToWriteTheLiteralValueUse$Instead": "Could not find a value for {${p0}} in '${p1}'. To write the literal value, use '{{${p2}}}' instead.", - "_CouldNotFindAValueFor$In$ToWriteTheLiteralValueUse$Instead.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n", - "MatchedMoreThanOneInstallBlock$": "Matched more than one install block [${p0}]", - "_MatchedMoreThanOneInstallBlock$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFindProjectInFolderorParentFoldersFor$": "Unable to find project in folder (or parent folders) for ${p0}", - "_UnableToFindProjectInFolderorParentFoldersFor$.comment": "\n'${p0}' (aka 'session.currentDirectory.fsPath') is a parameter of type 'string'\n", - "UnableToAcquireProject": "Unable to acquire project", - "NoArtifactsSpecified": "No artifacts specified", - "NoArtifactsAreAcquired": "No artifacts are acquired", - "AllArtifactsAreAlreadyInstalled": "All artifacts are already installed", - "$ArtifactsInstalledSuccessfully": "${p0} artifacts installed successfully", - "_$ArtifactsInstalledSuccessfully.comment": "\n'${p0}' is a parameter of type 'number'\n", - "InstallationFailedStopping": "Installation failed -- stopping", - "MultipleArtifactsSpecifiedButNotAnEqualNumberOf$Switches": "Multiple artifacts specified, but not an equal number of ${p0} switches", - "_MultipleArtifactsSpecifiedButNotAnEqualNumberOf$Switches.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TriedToAddAnArtifact$$ButCouldNotDetermineTheRegistryToUse": "Tried to add an artifact [${p0}]:${p1} but could not determine the registry to use.", - "_TriedToAddAnArtifact$$ButCouldNotDetermineTheRegistryToUse.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'artifact.id') is a parameter of type 'string'\n", - "TriedToAddRegistry$As$ButItWasAlready$PleaseAdd$ToThisProjectManuallyAndReattempt": "Tried to add registry ${p0} as ${p1}, but it was already ${p2}. Please add ${p3} to this project manually and reattempt.", - "_TriedToAddRegistry$As$ButItWasAlready$PleaseAdd$ToThisProjectManuallyAndReattempt.comment": "\n'${p0}' is a parameter of type 'string | undefined'\n\n'${p1}' is a parameter of type 'string'\n\n'${p2}' is a parameter of type 'string'\n\n'${p3}' is a parameter of type 'string'\n", - "RunvcpkgshellActivateToApplyToTheCurrentTerminal": "Run \\`vcpkg-shell activate\\` to apply to the current terminal", - "DownloadsFolderCleared$": "Downloads folder cleared (${p0}) ", - "_DownloadsFolderCleared$.comment": "\n'${p0}' (aka 'session.downloads.fsPath') is a parameter of type 'string'\n", - "InstalledArtifactFolderCleared$": "Installed Artifact folder cleared (${p0}) ", - "_InstalledArtifactFolderCleared$.comment": "\n'${p0}' (aka 'session.installFolder.fsPath') is a parameter of type 'string'\n", - "CacheFolderCleared$": "Cache folder cleared (${p0}) ", - "_CacheFolderCleared$.comment": "\n'${p0}' (aka 'session.downloads.fsPath') is a parameter of type 'string'\n", - "DeletingArtifact$From$": "Deleting artifact ${p0} from ${p1}", - "_DeletingArtifact$From$.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' (aka 'folder.fsPath') is a parameter of type 'string'\n", - "NoArtifactsFoundMatchingCriteria$": "No artifacts found matching criteria: ${p0}", - "_NoArtifactsFoundMatchingCriteria$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToActivateProject": "Unable to activate project", - "RegeneratingIndexFor$": "Regenerating index for ${p0}", - "_RegeneratingIndexFor$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "RegenerationCompleteIndexContains$MetadataFiles": "Regeneration complete. Index contains ${p0} metadata files", - "_RegenerationCompleteIndexContains$MetadataFiles.comment": "\n'${p0}' is a parameter of type 'number'\n", - "Registry$ContainsNoArtifacts": "Registry: '${p0}' contains no artifacts.", - "_Registry$ContainsNoArtifacts.comment": "\n'${p0}' is a parameter of type 'string'\n", - "error$": "error ${p0}: ", - "_error$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Removing$FromProjectManifest": "Removing ${p0} from project manifest", - "_Removing$FromProjectManifest.comment": "\n'${p0}' is a parameter of type 'string'\n", - "unableToFindArtifact$InTheProjectManifest": "unable to find artifact ${p0} in the project manifest", - "_unableToFindArtifact$InTheProjectManifest.comment": "\n'${p0}' is a parameter of type 'string'\n", - "Updated$ItContains$MetadataFiles": "Updated ${p0}. It contains ${p1} metadata files.", - "_Updated$ItContains$MetadataFiles.comment": "\n'${p0}' is a parameter of type 'string'\n\n'${p1}' is a parameter of type 'string'\n", - "UnableToDownload$": "Unable to download ${p0}.", - "_UnableToDownload$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "$CouldNotBeUpdatedItCouldBeMalformed": "${p0} could not be updated; it could be malformed.", - "_$CouldNotBeUpdatedItCouldBeMalformed.comment": "\n'${p0}' is a parameter of type 'string'\n", - "TheXupdateregistryCommandDownloadsNewRegistryInformationAndThusCannotBeUsedWithLocalRegistriesDidYouMeanXregenerate$": "The x-update-registry command downloads new registry information and thus cannot be used with local registries. Did you mean x-regenerate ${p0}?", - "_TheXupdateregistryCommandDownloadsNewRegistryInformationAndThusCannotBeUsedWithLocalRegistriesDidYouMeanXregenerate$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "UnableToFindRegistry$": "Unable to find registry ${p0}.", - "_UnableToFindRegistry$.comment": "\n'${p0}' is a parameter of type 'string'\n", - "NoArtifactsAreBeingAcquired": "No artifacts are being acquired", - "UnableToFindProjectEnvironment$": "Unable to find project environment ${p0}", - "_UnableToFindProjectEnvironment$.comment": "\n'${p0}' is a parameter of type 'string'\n" -} \ No newline at end of file diff --git a/vcpkg-artifacts/main.ts b/vcpkg-artifacts/main.ts deleted file mode 100644 index 29924238d2..0000000000 --- a/vcpkg-artifacts/main.ts +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env node - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { spawn } from 'child_process'; -import { argv } from 'process'; -import { CommandLine } from './cli/command-line'; -import { AcquireCommand } from './cli/commands/acquire'; -import { AcquireProjectCommand } from './cli/commands/acquire-project'; -import { ActivateCommand } from './cli/commands/activate'; -import { AddCommand } from './cli/commands/add'; -import { CacheCommand } from './cli/commands/cache'; -import { CleanCommand } from './cli/commands/clean'; -import { DeactivateCommand } from './cli/commands/deactivate'; -import { DeleteCommand } from './cli/commands/delete'; -import { FindCommand } from './cli/commands/find'; -import { GenerateMSBuildPropsCommand } from './cli/commands/generate-msbuild-props'; -import { RegenerateCommand } from './cli/commands/regenerate-index'; -import { RemoveCommand } from './cli/commands/remove'; -import { UpdateCommand } from './cli/commands/update'; -import { UseCommand } from './cli/commands/use'; -import { error, initStyling, log } from './cli/styling'; -import { setLocale } from './i18n'; -import { Session } from './session'; - -// parse the command line -const commandline = new CommandLine(argv.slice(2)); - -setLocale(commandline.language); - -export let session: Session; -// eslint-disable-next-line @typescript-eslint/no-require-imports -require('./exports'); - -async function main() { - - // ensure we can execute commands from this process. - // this works around an odd bug in the way that node handles - // executing child processes where the target is a windows store symlink - spawn(process.argv0, ['--version']); - - // create our session for this process. - session = new Session(process.cwd(), commandline.context, commandline); - - initStyling(session); - - // start up the session and init the channel listeners. - await session.init(); - - commandline.addCommand(new FindCommand(commandline)); - - commandline.addCommand(new AddCommand(commandline)); - commandline.addCommand(new AcquireProjectCommand(commandline)); - commandline.addCommand(new AcquireCommand(commandline)); - commandline.addCommand(new UseCommand(commandline)); - - commandline.addCommand(new RemoveCommand(commandline)); - commandline.addCommand(new DeleteCommand(commandline)); - - commandline.addCommand(new ActivateCommand(commandline)); - commandline.addCommand(new GenerateMSBuildPropsCommand(commandline)); - commandline.addCommand(new DeactivateCommand(commandline)); - - commandline.addCommand(new RegenerateCommand(commandline)); - commandline.addCommand(new UpdateCommand(commandline)); - - commandline.addCommand(new CacheCommand(commandline)); - commandline.addCommand(new CleanCommand(commandline)); - - const command = commandline.command; - if (!command) { - // no command recognized. - - // did they specify inputs? - if (commandline.inputs.length > 0) { - // unrecognized command - error(`Unrecognized command '${commandline.inputs[0]}'`); - return process.exitCode = 1; - } - - return process.exitCode = 0; - } - let result = true; - try { - result = await command.run(); - } catch (e) { - // in --debug mode we want to see the stack trace(s). - if (commandline.debug && e instanceof Error) { - log(e.stack); - if (e instanceof AggregateError) { - e.errors.forEach(each => log(each.stack)); - } - } - - error(e); - - await session.writeTelemetry(); - return process.exit(1); - } finally { - await session.writeTelemetry(); - } - - return process.exit(result ? 0 : 1); -} - -// eslint-disable-next-line @typescript-eslint/no-floating-promises -main(); diff --git a/vcpkg-artifacts/mediaquery/character-codes.ts b/vcpkg-artifacts/mediaquery/character-codes.ts deleted file mode 100644 index 9a80a48f83..0000000000 --- a/vcpkg-artifacts/mediaquery/character-codes.ts +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 0x7F, - - lineFeed = 0x0A, - carriageReturn = 0x0D, - lineSeparator = 0x2028, - paragraphSeparator = 0x2029, - nextLine = 0x0085, - - // Unicode 3.0 space characters - space = 0x0020, - nonBreakingSpace = 0x00A0, - enQuad = 0x2000, - emQuad = 0x2001, - enSpace = 0x2002, - emSpace = 0x2003, - threePerEmSpace = 0x2004, - fourPerEmSpace = 0x2005, - sixPerEmSpace = 0x2006, - figureSpace = 0x2007, - punctuationSpace = 0x2008, - thinSpace = 0x2009, - hairSpace = 0x200A, - zeroWidthSpace = 0x200B, - narrowNoBreakSpace = 0x202F, - ideographicSpace = 0x3000, - mathematicalSpace = 0x205F, - ogham = 0x1680, - - _ = 0x5F, - $ = 0x24, - - _0 = 0x30, - _1 = 0x31, - _2 = 0x32, - _3 = 0x33, - _4 = 0x34, - _5 = 0x35, - _6 = 0x36, - _7 = 0x37, - _8 = 0x38, - _9 = 0x39, - - a = 0x61, - b = 0x62, - c = 0x63, - d = 0x64, - e = 0x65, - f = 0x66, - g = 0x67, - h = 0x68, - i = 0x69, - j = 0x6A, - k = 0x6B, - l = 0x6C, - m = 0x6D, - n = 0x6E, - o = 0x6F, - p = 0x70, - q = 0x71, - r = 0x72, - s = 0x73, - t = 0x74, - u = 0x75, - v = 0x76, - w = 0x77, - x = 0x78, - y = 0x79, - z = 0x7A, - - A = 0x41, - B = 0x42, - C = 0x43, - D = 0x44, - E = 0x45, - F = 0x46, - G = 0x47, - H = 0x48, - I = 0x49, - J = 0x4A, - K = 0x4B, - L = 0x4C, - M = 0x4D, - N = 0x4E, - O = 0x4F, - P = 0x50, - Q = 0x51, - R = 0x52, - S = 0x53, - T = 0x54, - U = 0x55, - V = 0x56, - W = 0x57, - X = 0x58, - Y = 0x59, - Z = 0x5a, - - ampersand = 0x26, - asterisk = 0x2A, - at = 0x40, - backslash = 0x5C, - backtick = 0x60, - bar = 0x7C, - caret = 0x5E, - closeBrace = 0x7D, - closeBracket = 0x5D, - closeParen = 0x29, - colon = 0x3A, - comma = 0x2C, - dot = 0x2E, - doubleQuote = 0x22, - equals = 0x3D, - exclamation = 0x21, - greaterThan = 0x3E, - hash = 0x23, - lessThan = 0x3C, - minus = 0x2D, - openBrace = 0x7B, - openBracket = 0x5B, - openParen = 0x28, - percent = 0x25, - plus = 0x2B, - question = 0x3F, - semicolon = 0x3B, - singleQuote = 0x27, - slash = 0x2F, - tilde = 0x7E, - - backspace = 0x08, - formFeed = 0x0C, - byteOrderMark = 0xFEFF, - tab = 0x09, - verticalTab = 0x0B -} - - -/** Does not include line breaks. For that, see isWhiteSpaceLike. */ -export function isWhiteSpaceSingleLine(ch: number): boolean { - // Note: nextLine is in the Zs space, and should be considered to be a whitespace. - // It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript. - return ch === CharacterCodes.space || - ch === CharacterCodes.tab || - ch === CharacterCodes.verticalTab || - ch === CharacterCodes.formFeed || - ch === CharacterCodes.nonBreakingSpace || - ch === CharacterCodes.nextLine || - ch === CharacterCodes.ogham || - ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace || - ch === CharacterCodes.narrowNoBreakSpace || - ch === CharacterCodes.mathematicalSpace || - ch === CharacterCodes.ideographicSpace || - ch === CharacterCodes.byteOrderMark; -} - -export function isLineBreak(ch: number): boolean { - // Other new line or line - // breaking characters are treated as white space but not as line terminators. - return ch === CharacterCodes.lineFeed || - ch === CharacterCodes.carriageReturn || - ch === CharacterCodes.lineSeparator || - ch === CharacterCodes.paragraphSeparator; -} - -export function isDigit(ch: number): boolean { - return ch >= CharacterCodes._0 && ch <= CharacterCodes._9; -} - -export function isHexDigit(ch: number): boolean { - return isDigit(ch) || ch >= CharacterCodes.A && ch <= CharacterCodes.F || ch >= CharacterCodes.a && ch <= CharacterCodes.f; -} - -export function isBinaryDigit(ch: number): boolean { - return ch === CharacterCodes._0 || ch === CharacterCodes._1; -} - -export function isIdentifierStart(ch: number): boolean { - return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || - ch >= CharacterCodes.a && ch <= CharacterCodes.z || - ch === CharacterCodes.$ || ch === CharacterCodes._ || - ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierStart(ch); -} - -export function isIdentifierPart(ch: number,): boolean { - return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || - ch >= CharacterCodes.a && ch <= CharacterCodes.z || - ch >= CharacterCodes._0 && ch <= CharacterCodes._9 || - ch === CharacterCodes.$ || ch === CharacterCodes._ || ch === CharacterCodes.minus || - ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch); -} - -/** Characters that are in this range are actually code points that take two characters in utf16 */ -export function sizeOf(ch: number): number { - return ch >= 0xD800 && ch <= 0xDBFF ? 2 : 1; -} - -function lookupInUnicodeMap(code: number, map: ReadonlyArray): boolean { - // Bail out quickly if it couldn't possibly be in the map. - if (code < map[0]) { - return false; - } - - // Perform binary search in one of the Unicode range maps - let lo = 0; - let hi: number = map.length; - let mid: number; - - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - // mid has to be even to catch a range's beginning - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - - return false; -} - -const unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2208, 2228, 2230, 2237, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69376, 69404, 69415, 69415, 69424, 69445, 69600, 69622, 69635, 69687, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70751, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71680, 71723, 71840, 71903, 71935, 71935, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 123136, 123180, 123191, 123197, 123214, 123214, 123584, 123627, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101]; -const unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999]; - -/* @internal */ export function isUnicodeIdentifierStart(code: number) { - return lookupInUnicodeMap(code, unicodeESNextIdentifierStart); -} - -function isUnicodeIdentifierPart(code: number) { - return lookupInUnicodeMap(code, unicodeESNextIdentifierPart); -} diff --git a/vcpkg-artifacts/mediaquery/media-query.ts b/vcpkg-artifacts/mediaquery/media-query.ts deleted file mode 100644 index 3abc83b87b..0000000000 --- a/vcpkg-artifacts/mediaquery/media-query.ts +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../i18n'; -import { Kind, MediaQueryError, Scanner, Token } from './scanner'; - -export function parseQuery(text: string) { - const cursor = new Scanner(text); - - return QueryList.parse(cursor); -} - -export function takeWhitespace(cursor: Scanner) { - while (!cursor.eof && isWhiteSpace(cursor)) { - cursor.take(); - } -} - -function isWhiteSpace(cursor: Scanner) { - return cursor.kind === Kind.Whitespace; -} - -class QueryList { - queries = new Array(); - get isValid() { - return !this.error; - } - error?: MediaQueryError; - - protected constructor() { - // - } - - get length() { - return this.queries.length; - } - static parse(cursor: Scanner) { - const result = new QueryList(); - - try { - cursor.scan(); // start the scanner - for (const statement of QueryList.parseQuery(cursor)) { - result.queries.push(statement); - } - } catch (error: any) { - result.error = error; - } - return result; - } - - static *parseQuery(cursor: Scanner): Iterable { - takeWhitespace(cursor); - if (cursor.eof) { - return; - } - yield Query.parse(cursor); - takeWhitespace(cursor); - if (cursor.eof) { - return; - } - switch (cursor.kind) { - case Kind.Comma: - cursor.take(); - return yield* QueryList.parseQuery(cursor); - case Kind.EndOfFile: - return; - } - throw new MediaQueryError(i`Expected comma, found ${JSON.stringify(cursor.text)}`, cursor.position.line, cursor.position.column); - } - - get features() { - const result = new Set(); - for (const query of this.queries) { - for (const expression of query.expressions) { - if (expression.feature) { - result.add(expression.feature); - } - } - } - return result; - } - - match(properties: Record) { - if (this.isValid) { - queries: for (const query of this.queries) { - for (const { feature, constant, not } of query.expressions) { - // get the value from the context - const contextValue = stringValue(properties[feature]); - if (not) { - // negative/not present query - - if (contextValue) { - // we have a value - if (constant && contextValue !== constant) { - continue; // the values are NOT a match. - } - if (!constant && contextValue === 'false') { - continue; - } - } else { - // no value - if (!constant || contextValue === 'false') { - continue; - } - } - } else { - // positive/present query - if (contextValue) { - if (contextValue === constant || contextValue !== 'false' && !constant) { - continue; - } - } else { - if (constant === 'false') { - continue; - } - } - } - continue queries; // no match - } - // we matched a whole query, we're good - return true; - } - } - // no query matched. - return false; - } -} - -function stringValue(value: unknown): string | undefined { - switch (typeof value) { - case 'string': - case 'number': - case 'boolean': - return value.toString(); - - case 'object': - return value === null ? 'true' : Array.isArray(value) ? stringValue(value[0]) || 'true' : 'true'; - } - return undefined; -} - -class Query { - protected constructor(public readonly expressions: Array) { - - } - - static parse(cursor: Scanner): Query { - const result = new Array(); - takeWhitespace(cursor); - while (true) { - result.push(Expression.parse(cursor)); - takeWhitespace(cursor); - if (cursor.kind === Kind.AndKeyword) { - cursor.take(); // consume and - continue; - } - // the next token is not an 'and', so we bail now. - return new Query(result); - } - } - -} - -class Expression { - protected constructor(protected readonly featureToken: Token, protected readonly constantToken: Token | undefined, public readonly not: boolean) { - - } - get feature() { - return this.featureToken.text; - } - get constant() { - return this.constantToken?.stringValue || this.constantToken?.text || undefined; - } - - - /** @internal */ - static parse(cursor: Scanner, isNotted = false, inParen = false): Expression { - takeWhitespace(cursor); - - switch (cursor.kind) { - case Kind.Identifier: { - // start of an expression - const feature = cursor.take(); - takeWhitespace(cursor); - - if (cursor.kind === Kind.Colon) { - cursor.take(); // consume colon; - - // we have a constant for the - takeWhitespace(cursor); - switch (cursor.kind) { - case Kind.NumericLiteral: - case Kind.BooleanLiteral: - case Kind.Identifier: - case Kind.StringLiteral: { - // we have a good const value. - const constant = cursor.take(); - return new Expression(feature, constant, isNotted); - } - } - throw new MediaQueryError(i`Expected one of {Number, Boolean, Identifier, String}, found token ${JSON.stringify(cursor.text)}`, cursor.position.line, cursor.position.column); - } - return new Expression(feature, undefined, isNotted); - } - - case Kind.NotKeyword: - if (isNotted) { - throw new MediaQueryError(i`Expression specified NOT twice`, cursor.position.line, cursor.position.column); - } - cursor.take(); // suck up the not token - return Expression.parse(cursor, true, inParen); - - case Kind.OpenParen: { - cursor.take(); - const result = Expression.parse(cursor, isNotted, inParen); - takeWhitespace(cursor); - if (cursor.kind !== Kind.CloseParen) { - throw new MediaQueryError(i`Expected close parenthesis for expression, found ${JSON.stringify(cursor.text)}`, cursor.position.line, cursor.position.column); - } - - cursor.take(); - return result; - } - - default: - throw new MediaQueryError(i`Expected expression, found ${JSON.stringify(cursor.text)}`, cursor.position.line, cursor.position.column); - } - } -} diff --git a/vcpkg-artifacts/mediaquery/scanner.ts b/vcpkg-artifacts/mediaquery/scanner.ts deleted file mode 100644 index 0e3aee3b68..0000000000 --- a/vcpkg-artifacts/mediaquery/scanner.ts +++ /dev/null @@ -1,915 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../i18n'; -import { CharacterCodes, isBinaryDigit, isDigit, isHexDigit, isIdentifierPart, isIdentifierStart, isLineBreak, isWhiteSpaceSingleLine, sizeOf } from './character-codes'; - -export enum MessageCategory { - Warning, - Error, - Suggestion, - Message -} - -export interface Message { - code: number; - category: MessageCategory; - text: string; -} - -export const messages = { - DigitExpected: { code: 1100, category: MessageCategory.Error, text: 'Digit expected (0-9)' }, - HexDigitExpected: { code: 1101, category: MessageCategory.Error, text: 'Hex Digit expected (0-F,0-f)' }, - BinaryDigitExpected: { code: 1102, category: MessageCategory.Error, text: 'Binary Digit expected (0,1)' }, - UnexpectedEndOfFile: { code: 1103, category: MessageCategory.Error, text: 'Unexpected end of file while searching for \'{0}\'' }, - InvalidEscapeSequence: { code: 1104, category: MessageCategory.Error, text: 'Invalid escape sequence' }, -}; - -export function format(text: string, ...args: Array): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => '' + args[+index] || ''); -} - -export interface Token { - /** the character offset within the document */ - readonly offset: number; - - /** the text of the current token (when appropriate) */ - text: string; - - /** the literal value */ - stringValue?: string; - - /** the token kind */ - readonly kind: Kind; -} - - -// All conflict markers consist of the same character repeated seven times. If it is -// a <<<<<<< or >>>>>>> marker then it is also followed by a space. -const mergeConflictMarkerLength = 7; - -/** - * Position in a text document expressed as zero-based line and character offset. - * The offsets are based on a UTF-16 string representation. So a string of the form - * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` - * is 1 and the character offset of b is 3 since `𐐀` is represented using two code - * units in UTF-16. - * - * Positions are line end character agnostic. So you cannot specify a position that - * denotes `\r|\n` or `\n|` where `|` represents the character offset. - */ -export interface Position { - /** - * Line position in a document (zero-based). - * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. - * If a line number is negative, it defaults to 0. - */ - line: number; - /** - * Character offset on a line in a document (zero-based). Assuming that the line is - * represented as a string, the `character` value represents the gap between the - * `character` and `character + 1`. - * - * If the character value is greater than the line length it defaults back to the - * line length. - * If a line number is negative, it defaults to 0. - */ - column: number; -} - -export enum Kind { - Unknown, - EndOfFile, - - SingleLineComment, - MultiLineComment, - NewLine, - Whitespace, - - // We detect and provide better error recovery when we encounter a git merge marker. This - // allows us to edit files with git-conflict markers in them in a much more pleasant manner. - ConflictMarker, - - // Literals - NumericLiteral, - StringLiteral, - - // Boolean Literals - BooleanLiteral, - - TrueKeyword, - FalseKeyword, - - // Punctuation - OpenBrace, - CloseBrace, - OpenParen, - CloseParen, - OpenBracket, - CloseBracket, - Dot, - Elipsis, - Semicolon, - Comma, - QuestionDot, - LessThan, - OpenAngle = LessThan, - LessThanSlash, - GreaterThan, - CloseAngle = GreaterThan, - LessThanEquals, - GreaterThanEquals, - EqualsEquals, - ExclamationEquals, - EqualsEqualsEquals, - ExclamationEqualsEquals, - EqualsArrow, - Plus, - Minus, - Asterisk, - AsteriskAsterisk, - Slash, - Percent, - PlusPlus, - MinusMinus, - LessThanLessThan, - GreaterThanGreaterThan, - GreaterThanGreaterThanGreaterThan, - Ampersand, - Bar, - Caret, - Exclamation, - Tilde, - AmpersandAmpersand, - BarBar, - Question, - Colon, - At, - QuestionQuestion, - - // Assignments - Equals, - PlusEquals, - MinusEquals, - AsteriskEquals, - AsteriskAsteriskEquals, - SlashEquals, - PercentEquals, - LessThanLessThanEquals, - GreaterThanGreaterThanEquals, - GreaterThanGreaterThanGreaterThanEquals, - AmpersandEquals, - BarEquals, - BarBarEquals, - AmpersandAmpersandEquals, - QuestionQuestionEquals, - CaretEquals, - - // Identifiers - Identifier, - - // Keywords - KeywordsStart = 1000, - AndKeyword, - NotKeyword, - - KeywordsEnd, - - - // Tokens that can represent elements - Elements = 2000, - Model, - Enum, - EnumValue, - Import, - TypeAlias, - ParameterAlias, - ResponseAlias, - Interface, - Operation, - Annotation, - Documentation, - Label, - Preamble, - Property, - Parameter, - TemplateDeclaration, - TemplateParameters, - Parent, - Response, - ResponseExpression, - Result, - TypeExpression, - Union, -} - -const keywords = new Map([ - ['NOT', Kind.NotKeyword], - ['not', Kind.NotKeyword], - ['AND', Kind.AndKeyword], - ['and', Kind.AndKeyword], - - - ['true', Kind.BooleanLiteral], // TrueKeyword - ['false', Kind.BooleanLiteral] // FalseKeyword -]); - -interface TokenLocation extends Position { - offset: number; -} - -export class Scanner implements Token { - #offset = 0; - #line = 0; - #column = 0; - #map = new Array(); - - #length: number; - #text: string; - - #ch!: number; - #chNext!: number; - #chNextNext!: number; - - #chSz!: number; - #chNextSz!: number; - #chNextNextSz!: number; - - /** The assumed tab width. If this is set before scanning, it enables accurate Position tracking. */ - tabWidth = 2; - - // current token information - - /** the character offset within the document */ - offset!: number; - - /** the token kind */ - kind!: Kind; - - /** the text of the current token (when appropriate) */ - text!: string; - - /** the string value of current string literal token (unquoted, unescaped) */ - stringValue?: string; - - /** returns the Position (line/column) of the current token */ - get position(): Position { - return this.positionFromOffset(this.offset); - } - - constructor(text: string) { - this.#text = text; - this.#length = text.length; - this.advance(0); - this.markPosition(); - - // let's hide these, then we can clone this nicely. - Object.defineProperty(this, 'tabWidth', { enumerable: false }); - } - - get eof() { - return this.#offset > (this.#length); - } - - private advance(count?: number): number { - let codeOrChar: number; - let newOffset: number; - let offsetAdvancedBy = 0; - - switch (count) { - case undefined: - case 1: - offsetAdvancedBy = this.#chSz; - this.#offset += this.#chSz; - this.#ch = this.#chNext; this.#chSz = this.#chNextSz; - this.#chNext = this.#chNextNext; this.#chNextSz = this.#chNextNextSz; - - newOffset = this.#offset + this.#chSz + this.#chNextSz; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#chNextNext = (this.#chNextNextSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - return offsetAdvancedBy; - - case 2: - offsetAdvancedBy = this.#chSz + this.#chNextSz; - this.#offset += this.#chSz + this.#chNextSz; - this.#ch = this.#chNextNext; this.#chSz = this.#chNextNextSz; - - newOffset = this.#offset + this.#chSz; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#chNext = (this.#chNextSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - - newOffset += this.#chNextSz; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#chNextNext = (this.#chNextNextSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - return offsetAdvancedBy; - - default: - case 3: - offsetAdvancedBy = this.#chSz + this.#chNextSz + this.#chNextNextSz; - count -= 3; - while (count) { - // skip over characters while we work. - offsetAdvancedBy += sizeOf(this.#text.charCodeAt(this.#offset + offsetAdvancedBy)); - } - this.#offset += offsetAdvancedBy; - - // eslint-disable-next-line no-fallthrough - case 0: - newOffset = this.#offset; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#ch = (this.#chSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - - newOffset += this.#chSz; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#chNext = (this.#chNextSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - - newOffset += this.#chNextSz; - codeOrChar = this.#text.charCodeAt(newOffset); - this.#chNextNext = (this.#chNextNextSz = sizeOf(codeOrChar)) === 1 ? codeOrChar : this.#text.codePointAt(newOffset)!; - return offsetAdvancedBy; - } - } - - private next(token: Kind, count = 1, value?: string) { - const originalOffset = this.#offset; - const offsetAdvancedBy = this.advance(count); - this.text = value || this.#text.substr(originalOffset, offsetAdvancedBy); - - this.#column += count; - return this.kind = token; - } - - /** adds the current position to the token to the offset:position map */ - private markPosition() { - this.#map.push({ offset: this.#offset, column: this.#column, line: this.#line }); - } - - /** updates the position and marks the location */ - private newLine(count = 1) { - this.text = this.#text.substr(this.#offset, count); - this.advance(count); - - this.#line++; - this.#column = 0; - this.markPosition(); // make sure the map has the new location - - return this.kind = Kind.NewLine; - } - - start() { - if (this.offset === undefined) { - this.scan(); - } - return this; - } - - /** - * Identifies and returns the next token type in the document - * - * @returns the state of the scanner will have the properties `token`, `value`, `offset` pointing to the current token at the end of this call. - * - * @notes before this call, `#offset` is pointing to the next character to be evaluated. - * - */ - scan(): Kind { - - // this token starts at - this.offset = this.#offset; - this.stringValue = undefined; - - if (!this.eof) { - switch (this.#ch) { - case CharacterCodes.carriageReturn: - return this.newLine(this.#chNext === CharacterCodes.lineFeed ? 2 : 1); - - case CharacterCodes.lineFeed: - return this.newLine(); - - case CharacterCodes.tab: - case CharacterCodes.verticalTab: - case CharacterCodes.formFeed: - case CharacterCodes.space: - case CharacterCodes.nonBreakingSpace: - case CharacterCodes.ogham: - case CharacterCodes.enQuad: - case CharacterCodes.emQuad: - case CharacterCodes.enSpace: - case CharacterCodes.emSpace: - case CharacterCodes.threePerEmSpace: - case CharacterCodes.fourPerEmSpace: - case CharacterCodes.sixPerEmSpace: - case CharacterCodes.figureSpace: - case CharacterCodes.punctuationSpace: - case CharacterCodes.thinSpace: - case CharacterCodes.hairSpace: - case CharacterCodes.zeroWidthSpace: - case CharacterCodes.narrowNoBreakSpace: - case CharacterCodes.mathematicalSpace: - case CharacterCodes.ideographicSpace: - case CharacterCodes.byteOrderMark: - return this.scanWhitespace(); - - case CharacterCodes.openParen: - return this.next(Kind.OpenParen); - - case CharacterCodes.closeParen: - return this.next(Kind.CloseParen); - - case CharacterCodes.comma: - return this.next(Kind.Comma); - - case CharacterCodes.colon: - return this.next(Kind.Colon); - - case CharacterCodes.semicolon: - return this.next(Kind.Semicolon); - - case CharacterCodes.openBracket: - return this.next(Kind.OpenBracket); - - case CharacterCodes.closeBracket: - return this.next(Kind.CloseBracket); - - case CharacterCodes.openBrace: - return this.next(Kind.OpenBrace); - - case CharacterCodes.closeBrace: - return this.next(Kind.CloseBrace); - - case CharacterCodes.tilde: - return this.next(Kind.Tilde); - - case CharacterCodes.at: - return this.next(Kind.At); - - case CharacterCodes.caret: - return this.#chNext === CharacterCodes.equals ? this.next(Kind.CaretEquals, 2) : this.next(Kind.Caret); - - case CharacterCodes.percent: - return this.#chNext === CharacterCodes.equals ? this.next(Kind.PercentEquals, 2) : this.next(Kind.Percent); - - case CharacterCodes.question: - return this.#chNext === CharacterCodes.dot && !isDigit(this.#chNextNext) ? - this.next(Kind.QuestionDot, 2) : - this.#chNext === CharacterCodes.question ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.QuestionQuestionEquals, 3) : - this.next(Kind.QuestionQuestion, 2) : - this.next(Kind.Question); - - case CharacterCodes.exclamation: - return this.#chNext === CharacterCodes.equals ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.ExclamationEqualsEquals, 3) : - this.next(Kind.ExclamationEquals, 2) : - this.next(Kind.Exclamation); - - case CharacterCodes.ampersand: - return this.#chNext === CharacterCodes.ampersand ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.AmpersandAmpersandEquals, 3) : - this.next(Kind.AmpersandAmpersand, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.AmpersandEquals, 2) : - this.next(Kind.Ampersand); - - case CharacterCodes.asterisk: - return this.#chNext === CharacterCodes.asterisk ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.AsteriskAsteriskEquals, 3) : - this.next(Kind.AsteriskAsterisk, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.AsteriskEquals, 2) : - this.next(Kind.Asterisk); - - case CharacterCodes.plus: - return this.#chNext === CharacterCodes.plus ? - this.next(Kind.PlusPlus, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.PlusEquals, 2) : - this.next(Kind.Plus); - - case CharacterCodes.minus: - return this.#chNext === CharacterCodes.minus ? - this.next(Kind.MinusMinus, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.MinusEquals, 2) : - this.next(Kind.Minus); - - case CharacterCodes.dot: - return isDigit(this.#chNext) ? - this.scanNumber() : - this.#chNext === CharacterCodes.dot && this.#chNextNext === CharacterCodes.dot ? - this.next(Kind.Elipsis, 3) : - this.next(Kind.Dot); - - case CharacterCodes.slash: - return this.#chNext === CharacterCodes.slash ? - this.scanSingleLineComment() : - this.#chNext === CharacterCodes.asterisk ? - this.scanMultiLineComment() : - - this.#chNext === CharacterCodes.equals ? - this.next(Kind.SlashEquals) : - this.next(Kind.Slash); - - case CharacterCodes._0: - return this.#chNext === CharacterCodes.x || this.#chNext === CharacterCodes.X ? - this.scanHexNumber() : - this.#chNext === CharacterCodes.B || this.#chNext === CharacterCodes.B ? - this.scanBinaryNumber() : - this.scanNumber(); - - case CharacterCodes._1: - case CharacterCodes._2: - case CharacterCodes._3: - case CharacterCodes._4: - case CharacterCodes._5: - case CharacterCodes._6: - case CharacterCodes._7: - case CharacterCodes._8: - case CharacterCodes._9: - return this.scanNumber(); - - case CharacterCodes.lessThan: - return this.isConflictMarker() ? - this.next(Kind.ConflictMarker, mergeConflictMarkerLength) : - this.#chNext === CharacterCodes.lessThan ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.LessThanLessThanEquals, 3) : - this.next(Kind.LessThanLessThan, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.LessThanEquals, 2) : - this.next(Kind.LessThan); - - case CharacterCodes.greaterThan: - return this.isConflictMarker() ? - this.next(Kind.ConflictMarker, mergeConflictMarkerLength) : - this.next(Kind.GreaterThan); - - case CharacterCodes.equals: - return this.isConflictMarker() ? - this.next(Kind.ConflictMarker, mergeConflictMarkerLength) : - this.#chNext === CharacterCodes.equals ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.EqualsEqualsEquals, 3) : - this.next(Kind.EqualsEquals, 2) : - this.#chNext === CharacterCodes.greaterThan ? - this.next(Kind.EqualsArrow, 2) : - this.next(Kind.Equals); - - case CharacterCodes.bar: - return this.isConflictMarker() ? - this.next(Kind.ConflictMarker, mergeConflictMarkerLength) : - this.#chNext === CharacterCodes.bar ? - this.#chNextNext === CharacterCodes.equals ? - this.next(Kind.BarBarEquals, 3) : - this.next(Kind.BarBar, 2) : - this.#chNext === CharacterCodes.equals ? - this.next(Kind.BarEquals, 2) : - this.next(Kind.Bar); - - case CharacterCodes.singleQuote: - case CharacterCodes.doubleQuote: - case CharacterCodes.backtick: - return this.scanString(); - - default: - // FYI: - // Well-known characters that are currently not processed - // # \ - // will need to update the scanner if there is a need to recognize them - return isIdentifierStart(this.#ch) ? this.scanIdentifier() : this.next(Kind.Unknown); - } - } - - this.text = ''; - return this.kind = Kind.EndOfFile; - } - - take() { - const result = { ...this }; - this.scan(); - return result; - } - - takeWhitespace() { - while (!this.eof && this.kind === Kind.Whitespace) { - this.take(); - } - } - - /** - * When the current token is greaterThan, this will return any tokens with characters - * after the greater than character. This has to be scanned separately because greater - * thans appear in positions where longer tokens are incorrect, e.g. `model x=y;`. - * The solution is to call rescanGreaterThan from the parser in contexts where longer - * tokens starting with `>` are allowed (i.e. when parsing binary expressions). - */ - rescanGreaterThan(): Kind { - if (this.kind === Kind.GreaterThan) { - return this.#ch === CharacterCodes.greaterThan ? - this.#chNext === CharacterCodes.equals ? - this.next(Kind.GreaterThanGreaterThanEquals, 3) : - this.next(Kind.GreaterThanGreaterThan, 2) : - this.#ch === CharacterCodes.equals ? - this.next(Kind.GreaterThanEquals, 2) : - this.next(Kind.GreaterThan); - } - return this.kind; - } - - private isConflictMarker() { - // Conflict markers must be at the start of a line. - if (this.#offset === 0 || isLineBreak(this.#text.charCodeAt(this.#offset - 1))) { - if ((this.#offset + mergeConflictMarkerLength) < this.#length) { - for (let i = 0; i < mergeConflictMarkerLength; i++) { - if (this.#text.charCodeAt(this.#offset + i) !== this.#ch) { - return false; - } - } - return this.#ch === CharacterCodes.equals || this.#text.charCodeAt(this.#offset + mergeConflictMarkerLength) === CharacterCodes.space; - } - } - - return false; - } - - private scanWhitespace(): Kind { - // since whitespace are not always 1 character wide, we're going to mark the position before the whitespace. - this.markPosition(); - - do { - // advance the position - this.#column += this.widthOfCh; - this.advance(); - } while (isWhiteSpaceSingleLine(this.#ch)); - - // and after... - this.markPosition(); - - this.text = this.#text.substring(this.offset, this.#offset); - return this.kind = Kind.Whitespace; - } - - private scanDigits(): string { - const start = this.#offset; - while (isDigit(this.#ch)) { - this.advance(); - } - return this.#text.substring(start, this.#offset); - } - - private scanNumber() { - const start = this.#offset; - - const main = this.scanDigits(); - let decimal: string | undefined; - let scientific: string | undefined; - - if (this.#ch === CharacterCodes.dot) { - this.advance(); - decimal = this.scanDigits(); - } - - if (this.#ch === CharacterCodes.E || this.#ch === CharacterCodes.e) { - this.assert(isDigit(this.#chNext), i`ParseError: Digit expected (0-9)`); - this.advance(); - scientific = this.scanDigits(); - } - - this.text = scientific ? - decimal ? - `${main}.${decimal}e${scientific}` : - `${main}e${scientific}` : - decimal ? - `${main}.${decimal}` : - main; - - // update the position - this.#column += (this.#offset - start); - return this.kind = Kind.NumericLiteral; - } - - private scanHexNumber() { - this.assert(isHexDigit(this.#chNextNext), i`ParseError: Hex Digit expected (0-F,0-f)`); - this.advance(2); - - this.text = `0x${this.scanUntil((ch) => !isHexDigit(ch), 'Hex Digit')}`; - return this.kind = Kind.NumericLiteral; - } - - private scanBinaryNumber() { - this.assert(isBinaryDigit(this.#chNextNext), i`ParseError: Binary Digit expected (0,1)`); - - this.advance(2); - - this.text = `0b${this.scanUntil((ch) => !isBinaryDigit(ch), 'Binary Digit')}`; - return this.kind = Kind.NumericLiteral; - - } - - private get widthOfCh() { - return this.#ch === CharacterCodes.tab ? (this.#column % this.tabWidth || this.tabWidth) : 1; - } - - private scanUntil(predicate: (char: number, charNext: number, charNextNext: number) => boolean, expectedClose?: string, consumeClose?: number) { - const start = this.#offset; - - do { - // advance the position - if (isLineBreak(this.#ch)) { - this.advance(this.#ch === CharacterCodes.carriageReturn && this.#chNext === CharacterCodes.lineFeed ? 2 : 1); - this.#line++; - this.#column = 0; - this.markPosition(); // make sure the map has the new location - } else { - this.#column += this.widthOfCh; - this.advance(); - } - - if (this.eof) { - this.assert(!expectedClose, i`Unexpected end of file while searching for '${expectedClose}'`); - break; - } - - } while (!predicate(this.#ch, this.#chNext, this.#chNextNext)); - - if (consumeClose) { - this.advance(consumeClose); - } - - // and after... - this.markPosition(); - - return this.#text.substring(start, this.#offset); - } - - private scanSingleLineComment() { - this.text = this.scanUntil(isLineBreak); - return this.kind = Kind.SingleLineComment; - } - - private scanMultiLineComment() { - this.text = this.scanUntil((ch, chNext) => ch === CharacterCodes.asterisk && chNext === CharacterCodes.slash, '*/', 2); - return this.kind = Kind.MultiLineComment; - } - - private scanString() { - const quote = this.#ch; - const quoteLength = 1; - const closing = String.fromCharCode(this.#ch); - let escaped = false; - let crlf = false; - let isEscaping = false; - - const text = this.scanUntil((ch, chNext) => { - if (isEscaping) { - isEscaping = false; - return false; - } - - if (ch === CharacterCodes.backslash) { - isEscaping = escaped = true; - return false; - } - - if (ch == CharacterCodes.carriageReturn) { - if (chNext == CharacterCodes.lineFeed) { - crlf = true; - } - return false; - } - - return ch === quote; - }, closing, quoteLength); - - // TODO: optimize to single pass over string, easier if we refactor some bookkeeping first. - - // strip quotes - let value = text.substring(quoteLength, text.length - quoteLength); - - // Normalize CRLF to LF when interpreting value of multi-line string - // literals. Matches JavaScript behavior and ensures program behavior does - // not change due to line-ending conversion. - if (crlf) { - value = value.replace(/\r\n/g, '\n'); - } - - if (escaped) { - value = this.unescapeString(value); - } - - this.text = text; - this.stringValue = value; - return this.kind = Kind.StringLiteral; - } - - private unescapeString(text: string) { - let result = ''; - let start = 0; - let pos = 0; - const end = text.length; - - while (pos < end) { - let ch = text.charCodeAt(pos); - if (ch != CharacterCodes.backslash) { - pos++; - continue; - } - - result += text.substring(start, pos); - pos++; - ch = text.charCodeAt(pos); - - switch (ch) { - case CharacterCodes.r: - result += '\r'; - break; - case CharacterCodes.n: - result += '\n'; - break; - case CharacterCodes.t: - result += '\t'; - break; - case CharacterCodes.singleQuote: - result += '\''; - break; - case CharacterCodes.doubleQuote: - result += '"'; - break; - case CharacterCodes.backslash: - result += '\\'; - break; - case CharacterCodes.backtick: - result += '`'; - break; - default: - throw new MediaQueryError(i`Invalid escape sequence`, this.position.line, this.position.column); - } - - pos++; - start = pos; - } - - result += text.substring(start, pos); - return result; - } - - scanIdentifier() { - this.text = this.scanUntil((ch) => !isIdentifierPart(ch)); - return this.kind = keywords.get(this.text) ?? Kind.Identifier; - } - - /** - * Returns the zero-based line/column from the given offset - * (binary search thru the token start locations) - * @param offset the character position in the document - */ - positionFromOffset(offset: number): Position { - let position = { line: 0, column: 0, offset: 0 }; - - if (offset < 0 || offset > this.#length) { - return { line: position.line, column: position.column }; - } - - let first = 0; //left endpoint - let last = this.#map.length - 1; //right endpoint - let middle = Math.floor((first + last) / 2); - - while (first <= last) { - middle = Math.floor((first + last) / 2); - position = this.#map[middle]; - if (position.offset === offset) { - return { line: position.line, column: position.column }; - } - if (position.offset < offset) { - first = middle + 1; - continue; - } - last = middle - 1; - position = this.#map[last]; - } - return { line: position.line, column: position.column + (offset - position.offset) }; - } - - static * TokensFrom(text: string): Iterable { - const scanner = new Scanner(text).start(); - while (!scanner.eof) { - yield scanner.take(); - } - } - - protected assert(assertion: boolean, message: string) { - if (!assertion) { - const p = this.position; - throw new MediaQueryError(message, p.line, p.column); - } - } -} - -export class MediaQueryError extends Error { - constructor(message: string, public readonly line: number, public readonly column: number) { - super(message); - } -} diff --git a/vcpkg-artifacts/package-lock.json b/vcpkg-artifacts/package-lock.json deleted file mode 100644 index 52c6233735..0000000000 --- a/vcpkg-artifacts/package-lock.json +++ /dev/null @@ -1,4315 +0,0 @@ -{ - "name": "vcpkg-artifacts", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "license": "MIT", - "dependencies": { - "@snyk/nuget-semver": "1.6.0", - "chalk": "5.4.1", - "cli-progress": "3.12.0", - "semver": "7.7.2", - "sorted-btree": "1.8.1", - "strip-ansi": "7.1.0", - "vscode-uri": "3.1.0", - "xml-writer": "1.7.0", - "yaml": "^2.8.3" - }, - "devDependencies": { - "@eslint/js": "^9.31.0", - "@types/cli-progress": "^3.11.6", - "@types/mocha": "^10.0.10", - "@types/node": "^24.0.0", - "@types/semver": "^7.7.0", - "@typescript-eslint/parser": "^8.37.0", - "@vercel/ncc": "^0.38.3", - "eslint": "^9.31.0", - "eslint-plugin-notice": "1.0.0", - "mocha": "11.7.5", - "source-map-support": "0.5.21", - "translate-strings": "1.1.15", - "tsx": "^4.20.3", - "typescript": "^5.8.3", - "typescript-eslint": "^8.37.0" - }, - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha1-Qv4MyrI4QdmQWBLFjxCC0neEVm0=", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/abort-controller/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", - "dev": true, - "license": "0BSD" - }, - "node_modules/@azure/cognitiveservices-translatortext": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/cognitiveservices-translatortext/-/cognitiveservices-translatortext-1.0.1.tgz", - "integrity": "sha1-iIRCw+KXZ33jaIf7MlEAonFS0CU=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/ms-rest-js": "^2.0.4", - "tslib": "^1.10.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.10.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/core-auth/-/core-auth-1.10.1.tgz", - "integrity": "sha1-aKF/qGHr0U9v0xQFV5g1Xva+3xs=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-util": "^1.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-auth/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", - "dev": true, - "license": "0BSD" - }, - "node_modules/@azure/core-util": { - "version": "1.13.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/core-util/-/core-util-1.13.1.tgz", - "integrity": "sha1-bf8v9tPJxkMMb007PmXeUx8Quv4=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@typespec/ts-http-runtime": "^0.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-util/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", - "dev": true, - "license": "0BSD" - }, - "node_modules/@azure/ms-rest-azure-js": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/ms-rest-azure-js/-/ms-rest-azure-js-2.1.0.tgz", - "integrity": "sha1-jJCzFGiuyjFGsGxxRLOG/Ugn9kw=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.1.4", - "@azure/ms-rest-js": "^2.2.0", - "tslib": "^1.10.0" - } - }, - "node_modules/@azure/ms-rest-js": { - "version": "2.7.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", - "integrity": "sha1-hjkGVXf/30lGlR4dJGM06/1y1Tc=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.7", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.5.0" - } - }, - "node_modules/@dsherret/to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-H2R13IvZdM6gei2vOGSzF7HdMyw=", - "dev": true, - "license": "MIT", - "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/aix-ppc64/-/aix-ppc64-0.27.4.tgz", - "integrity": "sha1-TFhQAvetaU04/g6Mv1z9k5zP8yc=", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/android-arm/-/android-arm-0.27.4.tgz", - "integrity": "sha1-mgzx0SmX7Ebd37Ms5n6byoQjgaw=", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/android-arm64/-/android-arm64-0.27.4.tgz", - "integrity": "sha1-diXQlSw7QC0+3iA6Fsnyt4+KSCc=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/android-x64/-/android-x64-0.27.4.tgz", - "integrity": "sha1-BuH9xig/zNa8aq3WdUr85s+W9C4=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/darwin-arm64/-/darwin-arm64-0.27.4.tgz", - "integrity": "sha1-bFUO5sAnO8sPrCREeP9yfCZ1XYA=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/darwin-x64/-/darwin-x64-0.27.4.tgz", - "integrity": "sha1-7XoSXp8lzgCRua/3g+6UP2umy4Y=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.4.tgz", - "integrity": "sha1-WX3I5xYdunHbTBZWExwfHp12YMY=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/freebsd-x64/-/freebsd-x64-0.27.4.tgz", - "integrity": "sha1-6hcfn08A76qOnT/ouqG3XXV9GzY=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-arm/-/linux-arm-0.27.4.tgz", - "integrity": "sha1-XgwLY0kIrbzgoCzr66izrKwmP7Y=", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-arm64/-/linux-arm64-0.27.4.tgz", - "integrity": "sha1-5S1X8gI2k4bm28szcKF6BJGrFGQ=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-ia32/-/linux-ia32-0.27.4.tgz", - "integrity": "sha1-X5DwHxMWUkc+wGsDihTEloPhTsc=", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-loong64/-/linux-loong64-0.27.4.tgz", - "integrity": "sha1-Y7rP/bmVdMkxj5r70N1P/3aoN+M=", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-mips64el/-/linux-mips64el-0.27.4.tgz", - "integrity": "sha1-xLaVLspqjv/2f+42caNTbI5nt+s=", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-ppc64/-/linux-ppc64-0.27.4.tgz", - "integrity": "sha1-bepn09mMaYbxt3aeTxhI5a5HrVg=", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-riscv64/-/linux-riscv64-0.27.4.tgz", - "integrity": "sha1-mtK0w8BQLGutqcgZl7tWxZeFNIk=", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-s390x/-/linux-s390x-0.27.4.tgz", - "integrity": "sha1-xD08/QcwQspvXFK7m8MT7SBmzig=", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/linux-x64/-/linux-x64-0.27.4.tgz", - "integrity": "sha1-RfoXPgWRrHTYDTz3ZwRxPhTipKY=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.4.tgz", - "integrity": "sha1-NmsO9AzbmG/HUcva0W6MJf4bqHk=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/netbsd-x64/-/netbsd-x64-0.27.4.tgz", - "integrity": "sha1-6YXUmjZo/SBENDBx1S4a6BURKz4=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.4.tgz", - "integrity": "sha1-b7Sre3P35Vcs5eyc+RwT/23USEI=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/openbsd-x64/-/openbsd-x64-0.27.4.tgz", - "integrity": "sha1-ZB8FIECg15hD1oiY9XkWOKAm2YM=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.4.tgz", - "integrity": "sha1-/B0z6snYGuCkM7PtHdYXGiDU4xc=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/sunos-x64/-/sunos-x64-0.27.4.tgz", - "integrity": "sha1-ryzVyoQtbQVxIfZqGS1PeX3ij1M=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/win32-arm64/-/win32-arm64-0.27.4.tgz", - "integrity": "sha1-eOx+WbsGQEWD1MlRHmIdsxx2DeM=", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/win32-ia32/-/win32-ia32-0.27.4.tgz", - "integrity": "sha1-DmFqpIi37l0lkqsHD/nsBqn93xE=", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@esbuild/win32-x64/-/win32-x64-0.27.4.tgz", - "integrity": "sha1-H3unGj1hVdRKb6qNviScYqs+QIw=", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha1-TpCvZ7xR3e5s3vUoTt9XLsN2tZU=", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha1-DNcv6FUOPC6uFWqWpN3c0cisWAA=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha1-vM32Fbz3tujbgw7AuNIcmiXeWXs=", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/config-array/-/config-array-0.21.2.tgz", - "integrity": "sha1-8p4iBXrVMWzyODbO6aNMgf/8t+Y=", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.5" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha1-03h1wB3J7/mI3UnREqV8tntU7+Y=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha1-WAyI+NVEXyvWqo88re+g3nn71p4=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", - "integrity": "sha1-G9AGzut+LlWyt3OrMY0wDhpmrto=", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha1-dyJYIEE9lhdQnak0IZCiAZ54dhw=", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/eslintrc/-/eslintrc-3.3.5.tgz", - "integrity": "sha1-wTF5PPwae5bySoPgqLvUuIFVjGA=", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.14.0", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.1", - "minimatch": "^3.1.5", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha1-03h1wB3J7/mI3UnREqV8tntU7+Y=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha1-WAyI+NVEXyvWqo88re+g3nn71p4=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "9.39.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/js/-/js-9.39.4.tgz", - "integrity": "sha1-o/g7/G/ZvzOoU9+s0LSbOY61lsE=", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha1-biEmoTR+hqTe34cG7Gf/jhB+u60=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", - "integrity": "sha1-l3nj/Zt+4zVxpXQ1z0M1oXlKbLI=", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha1-F8Vcp9Qmcz/jxWGQa4Fzwza0Cnc=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha1-giy3s6EsWiQKJPYhtaJBPiekXyY=", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha1-r1smkaIrRL6EewyoFkHF+2rQFyw=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha1-wrnS43TuYsWG062+qHGZsdenpro=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha1-s3Znt7wYHBaHgiWbq0JHT79StVA=", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha1-hAyIA7DYBH9P8M+WMXazLU7z7XI=", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha1-FPja7G2B5yIdKjV+Zoyrc728p5Q=", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha1-p36nQvqyV3UUVDTrHSMoz1ATrDM=", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@snyk/nuget-semver": { - "version": "1.6.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@snyk/nuget-semver/-/nuget-semver-1.6.0.tgz", - "integrity": "sha1-6odnoGTcPggGRNA74LycPY+onx0=", - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "node_modules/@ts-morph/common": { - "version": "0.7.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@ts-morph/common/-/common-0.7.5.tgz", - "integrity": "sha1-2BYDq9S4bQCZ1pI5y7zfmQpd+yU=", - "dev": true, - "license": "MIT", - "dependencies": { - "@dsherret/to-absolute-glob": "^2.0.2", - "fast-glob": "^3.2.5", - "is-negated-glob": "^1.0.0", - "mkdirp": "^1.0.4", - "multimatch": "^5.0.0", - "typescript": "~4.1.3" - } - }, - "node_modules/@ts-morph/common/node_modules/typescript": { - "version": "4.1.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/typescript/-/typescript-4.1.6.tgz", - "integrity": "sha1-G+zYXXdWfDx0EXIznpPOLmmTITg=", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@types/cli-progress": { - "version": "3.11.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/cli-progress/-/cli-progress-3.11.6.tgz", - "integrity": "sha1-lLM06+QZD3EOUcG/m0/ttoH6nkU=", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha1-lYuRyZGxhnztMYvt6g4hXuBQcm4=", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha1-WWoXRyM2lNUPatinhp/Lb1bPWEE=", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha1-EAHMXmo3BLg8I2An538vWOoBD0A=", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mocha": { - "version": "10.0.10", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/mocha/-/mocha-10.0.10.tgz", - "integrity": "sha1-kfYpBejSPL1mIlMS8jlFSiO+v6A=", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.12.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/node/-/node-24.12.0.tgz", - "integrity": "sha1-YiLgKCEOUyLk9PZ2f42I5eo7M9I=", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "node_modules/@types/semver": { - "version": "7.7.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@types/semver/-/semver-7.7.1.tgz", - "integrity": "sha1-POOvGlUk7zJ9Lank/YttlcjXBSg=", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.0.tgz", - "integrity": "sha1-rUDkkvGTH0baG9iI5SueVt+QY6o=", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/type-utils": "8.58.0", - "@typescript-eslint/utils": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.58.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha1-TLX2zX1MerA2VzjHrqiIuqbX79k=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/parser/-/parser-8.58.0.tgz", - "integrity": "sha1-2gTs4ZZ7bC/o8Qw0c9q/OCV5Xvc=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/project-service/-/project-service-8.58.0.tgz", - "integrity": "sha1-Zs7aCqv3QnrsPicT+kPrJ43q0qo=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.58.0", - "@typescript-eslint/types": "^8.58.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/scope-manager/-/scope-manager-8.58.0.tgz", - "integrity": "sha1-4wQUJ3Xkmht6w8i/JTZxREfHLKs=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.0.tgz", - "integrity": "sha1-xajtsh8x4P3uVlck4bmEFxxVlII=", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/type-utils/-/type-utils-8.58.0.tgz", - "integrity": "sha1-zg5yzZZ/+76N4yLbYIm9Q3S+NS8=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0", - "@typescript-eslint/utils": "8.58.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/types/-/types-8.58.0.tgz", - "integrity": "sha1-6Urnq9wcZTDnEYPBAHth+pMRKlo=", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.0.tgz", - "integrity": "sha1-7SM/qo4vKi4TV8Pn1VPWRloO5Zo=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.58.0", - "@typescript-eslint/tsconfig-utils": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/semver/-/semver-7.7.4.tgz", - "integrity": "sha1-KEZONgYOmR+noR0CedLT87V6foo=", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/utils/-/utils-8.58.0.tgz", - "integrity": "sha1-IadKeWOw0oi3GaQSHH3VVa2qs8M=", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.0.tgz", - "integrity": "sha1-Kr1VpL5w/VWWes6rpDMLm6n0UYk=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.58.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typespec/ts-http-runtime": { - "version": "0.3.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.4.tgz", - "integrity": "sha1-xfI26lkkyFrY/5bWDs3woiWFQRw=", - "dev": true, - "license": "MIT", - "dependencies": { - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@typespec/ts-http-runtime/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", - "dev": true, - "license": "0BSD" - }, - "node_modules/@vercel/ncc": { - "version": "0.38.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/@vercel/ncc/-/ncc-0.38.4.tgz", - "integrity": "sha1-4fuL6eftM79EwSETHUxulfeEr6w=", - "dev": true, - "license": "MIT", - "bin": { - "ncc": "dist/ncc/cli.js" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha1-6vVNU7YrrkE46AnKIlyEOabvs5I=", - "dev": true, - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha1-TOecib5Ar+ev6POtuQKh8c6awIo=", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha1-ftW7VZCLOy8bxVxq8WU7rafweTc=", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/agent-base/-/agent-base-7.1.4.tgz", - "integrity": "sha1-48121MVI7oldPD/Y3B9sW5Ay56g=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha1-/QZ3E+IoIQY267CMYL03Zdbb5zo=", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha1-YCFu6kZNhkWXzigyAAc4oFiWUME=", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha1-wETV3MUhoHZBNHJZehrLHxA8QEE=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-differ": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha1-PLs9DzFoEOr8xHYkc0I31q7krms=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha1-yWVekzHgq81YjSp8rX6ZVvZnAfo=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha1-v7EGYv7tgZaixi58aOF3IMJ0F5o=", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha1-3MOjcRa3nz4bRtuZTO1dVw6TD9s=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/braces/-/braces-3.0.3.tgz", - "integrity": "sha1-SQMy9AkZRSJy1VqEgK3AxEE1h4k=", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", - "dev": true, - "license": "ISC" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=", - "dev": true, - "license": "MIT" - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha1-S1QowiK+mF15w9gmV0edvgtZstY=", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha1-VoW5XrIJrJwMF3Rnd4ychN9Yupo=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha1-G0i/CWPsFY3OKqz2nAk64t0gktg=", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha1-e+N6TAPJruHs/oYqSiOyxwwgXTA=", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/cli-progress": { - "version": "3.12.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/cli-progress/-/cli-progress-3.12.0.tgz", - "integrity": "sha1-gH7hS2a8wIYljkRK0PGefUJXeUI=", - "license": "MIT", - "dependencies": { - "string-width": "^4.2.3" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha1-DASwddsCy/5g3I5s8vVIaxo2CKo=", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/code-block-writer": { - "version": "10.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/code-block-writer/-/code-block-writer-10.1.1.tgz", - "integrity": "sha1-rVaE7Uv7KweDyLExKBroTuZApC8=", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha1-ilj+ePANzXDDcEUXWd+/rwPo7p8=", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/debug/-/debug-4.4.3.tgz", - "integrity": "sha1-xq5DLZvZZiWC/OCHCbA4xY6ePWo=", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha1-qkcte/Zg6xXzSU79UxyrfypwmDc=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha1-pvLc5hL63S7x9Rm3NVHxfoUZmDE=", - "dev": true, - "license": "MIT" - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/diff": { - "version": "8.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/diff/-/diff-8.0.3.tgz", - "integrity": "sha1-x9o9ng6MKDu1SGgfjXF0ZTcgwtU=", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha1-165mfh3INIL4tw/Q9u78UNow9Yo=", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha1-aWzi7Aqg5uqTo5f/zySqeEDIJ8s=", - "dev": true, - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", - "license": "MIT" - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha1-mD6y+aZyTpMD9hrd8BHHLgngsPo=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha1-BfdaJdq5jk+x3NXhRywFRtUFfI8=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha1-HE8sSDcydZfOadLKGQp/3RcjOME=", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha1-8x274MGDsAptJutjJcgQwP0YvU0=", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.27.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/esbuild/-/esbuild-0.27.4.tgz", - "integrity": "sha1-uVkd1+CrgDoRycO2AoUEA77yLwA=", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.4", - "@esbuild/android-arm": "0.27.4", - "@esbuild/android-arm64": "0.27.4", - "@esbuild/android-x64": "0.27.4", - "@esbuild/darwin-arm64": "0.27.4", - "@esbuild/darwin-x64": "0.27.4", - "@esbuild/freebsd-arm64": "0.27.4", - "@esbuild/freebsd-x64": "0.27.4", - "@esbuild/linux-arm": "0.27.4", - "@esbuild/linux-arm64": "0.27.4", - "@esbuild/linux-ia32": "0.27.4", - "@esbuild/linux-loong64": "0.27.4", - "@esbuild/linux-mips64el": "0.27.4", - "@esbuild/linux-ppc64": "0.27.4", - "@esbuild/linux-riscv64": "0.27.4", - "@esbuild/linux-s390x": "0.27.4", - "@esbuild/linux-x64": "0.27.4", - "@esbuild/netbsd-arm64": "0.27.4", - "@esbuild/netbsd-x64": "0.27.4", - "@esbuild/openbsd-arm64": "0.27.4", - "@esbuild/openbsd-x64": "0.27.4", - "@esbuild/openharmony-arm64": "0.27.4", - "@esbuild/sunos-x64": "0.27.4", - "@esbuild/win32-arm64": "0.27.4", - "@esbuild/win32-ia32": "0.27.4", - "@esbuild/win32-x64": "0.27.4" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha1-ARo/aYVroYnf+n3I/M6Z0qh5A+U=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.39.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint/-/eslint-9.39.4.tgz", - "integrity": "sha1-hV2hsuKtZtxZkRlfNeJivOyBF7U=", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.2", - "@eslint/config-helpers": "^0.4.2", - "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.5", - "@eslint/js": "9.39.4", - "@eslint/plugin-kit": "^0.4.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-notice": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-plugin-notice/-/eslint-plugin-notice-1.0.0.tgz", - "integrity": "sha1-S5j/3yJ00Q80pCMadO+v3srWzeQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "find-root": "^1.1.0", - "lodash": "^4.17.21", - "metric-lcs": "^0.1.2" - }, - "peerDependencies": { - "eslint": ">=3.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha1-iOZGogf61hQ2/6OetQUUcgBlXII=", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha1-njyUiWl4JNLUzjqK0SYo+R6fWb4=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha1-03h1wB3J7/mI3UnREqV8tntU7+Y=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha1-TP6mD+fdCtjoFuHtAmwdUlG1EsE=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha1-WAyI+NVEXyvWqo88re+g3nn71p4=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/espree/-/espree-10.4.0.tgz", - "integrity": "sha1-1U9JSdRikAWh+haNk3w/8ffiqDc=", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha1-TP6mD+fdCtjoFuHtAmwdUlG1EsE=", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha1-CNBI8mHw3e21uulfRoCUY9nJSW0=", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha1-LupSkHAvJquP5TcDcP+GyWXSESM=", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha1-XU0+vflYPWOlMzzi3rdICrKwV4k=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha1-0G1YXOjbqQoWsFBcVDw8z7OuuBg=", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha1-ynUKENySW8ixiDn9ID4+9LPO1nU=", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha1-7Sq5Z6MxreYvGNB32uGSaE1Q01A=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha1-d4e93PETG/+5JjbGlFe7wO3W2B8=", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha1-RCZdPKwH4+p9wkdRY4BkN1SgUpI=", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha1-q8/Iunb3CMQql7PWhbfpRQv7nOQ=", - "dev": true, - "license": "MIT" - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha1-TJKBnstwg1YeT0okCoa+UZj1Nvw=", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/flat/-/flat-5.0.2.tgz", - "integrity": "sha1-jKb+MyBp/6nTJMMnGYxZglnOskE=", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha1-Ds45/LFO4BL0sEEL0z3ZwfAREnw=", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha1-9cI8EH8PN96NvfJPE3IrO5jVJyY=", - "dev": true, - "license": "ISC" - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha1-Mujp7Rtoo0l777msK2rfkqY4V28=", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "2.5.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/form-data/-/form-data-2.5.5.tgz", - "integrity": "sha1-pfY2Stfk5n6VtKB+LYxvcRx09iQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha1-ysZAd4XQNnWipeGlMFxpezR9kNY=", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha1-LALYZNl/PqbIgwxGTL0Rq26rehw=", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha1-dD8OO2lkqTpUke0b/6rgVNf5jQE=", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha1-FQs/J0OGnvPoUewMSdFbHRTQDuE=", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-tsconfig": { - "version": "4.13.7", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/get-tsconfig/-/get-tsconfig-4.13.7.tgz", - "integrity": "sha1-udixmbBgM87uoak99+pXZUFQibw=", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "10.5.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/glob/-/glob-10.5.0.tgz", - "integrity": "sha1-jsA1WRnNMzjChCiiPU8k7MX+c4w=", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha1-bSN9mQg5UMeSkPJMdkKj3poo+eM=", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-2.0.3.tgz", - "integrity": "sha1-BJMzi91Y4xmxA5xnz37kOYksAdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha1-mwy5/LeAh/b9fqur4lEcTT1gV04=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/globals/-/globals-14.0.0.tgz", - "integrity": "sha1-iY10E8Kbq89rr+Vvyt3thYrack4=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha1-ifVrghe9vIgCvSmd9tfxCB1+UaE=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha1-/JxqeDoISVHQuXH+EBjegTcHozg=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha1-LNxC1AvvLltO6rfAGnPFTOerWrw=", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha1-AD6vkb563DcuhOxZ3DclLO24AAM=", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/he/-/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha1-mosfJGhmwChQlIZYX2K48sGMJw4=", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha1-2o3+rH2hMLBcK6S1nJts1mYRprk=", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha1-nOy1ZQPAraHydB271lRuSxO1fM8=", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", - "dev": true, - "license": "MIT", - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha1-ZPYeQsu7LuwgcanawLKLoeZdUIQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negated-glob": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha1-0jE2LlOgf/Kw4Op/7QSRYf/RYoM=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha1-ReQuN/zPH0Dajl927iFRWEDAkoc=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", - "dev": true, - "license": "MIT", - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", - "dev": true, - "license": "MIT", - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true, - "license": "ISC" - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha1-iDOp2Jq0rN5hiJQr0cU7Y5DtWoo=", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha1-hUwpJGdwW2mUduGi3swMijRYgGs=", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha1-qHmpnilFL5QkOfKkBeOvizHU3pM=", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/levn/-/levn-0.4.1.tgz", - "integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha1-VTIeswn+u8WcSAHZMackUqaB0oY=", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/lodash/-/lodash-4.18.1.tgz", - "integrity": "sha1-/ytmwfYybVlRPeJAe/iBQ5gSdxw=", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha1-P727lbRoOsn8eFER55LlWNSr1QM=", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha1-QQ/IoXtw5ZgBPfJXwkRrfzOD8Rk=", - "dev": true, - "license": "ISC" - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha1-oN10voHiqlwvJ+Zc4oNgXuTit/k=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/metric-lcs": { - "version": "0.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/metric-lcs/-/metric-lcs-0.1.2.tgz", - "integrity": "sha1-h5E/FJQQ45x8WhkDdRKBTq8VXhE=", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha1-1m+hjzpHB2eJMgubGvMr2G2fogI=", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha1-WpQpFeJrNy3A8OZ1MUmhbmscVgE=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha1-u6vNwChZ9JhzAchW4zh85exDv3A=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha1-OBqHG2KnNEUGYK497uRIE/cNlZo=", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha1-vUhoegvjjtKWE5kQVgD4MglYYdE=", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha1-eTibTrG7LQA6m7qH1JLyvTe9xls=", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "11.7.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/mocha/-/mocha-11.7.5.tgz", - "integrity": "sha1-WPW7+l4CEc5+XuYSgQfO/CUVpic=", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", - "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", - "ms": "^2.1.3", - "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-2.0.3.tgz", - "integrity": "sha1-BJMzi91Y4xmxA5xnz37kOYksAdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha1-mwy5/LeAh/b9fqur4lEcTT1gV04=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ms/-/ms-2.1.3.tgz", - "integrity": "sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=", - "dev": true, - "license": "MIT" - }, - "node_modules/multimatch": { - "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/multimatch/-/multimatch-5.0.0.tgz", - "integrity": "sha1-kyuACWPOp6MaAzMo+h4MOhh02+Y=", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/multimatch/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true, - "license": "MIT" - }, - "node_modules/multimatch/node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha1-03h1wB3J7/mI3UnREqV8tntU7+Y=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/multimatch/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha1-WAyI+NVEXyvWqo88re+g3nn71p4=", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true, - "license": "MIT" - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha1-0PD6bj4twdJ+/NitmdVQvalNGH0=", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha1-fqHBpdkddk+yghOciP4R4YKjpzQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha1-4drMvnjQ0TiMoYxk/qOOPlfjcGs=", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha1-g8gxXGeFAF470CGDlBHJ4RDm2DQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha1-TxRxoBCCeob5TP2bByfjbSZ95QU=", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha1-eWCmaIiFlKByCxKpEdGnQqufEdI=", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha1-PTIa8+q5ObCDyPkpodEs2oHCa2s=", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha1-/W9eAKFDCG4HTf/kySS4+yk7BYk=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha1-SSkii7xyTfrEPg77BYyve2z7YkM=", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha1-64WAFDX78qfuWPGeCSGwaPxplI0=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha1-YWs9wsVwVrVYjDHN9LPWTbEzcg8=", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha1-D+E7lSLhRz9RtVjueW4I8R+bSJ8=", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/sax": { - "version": "1.6.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/sax/-/sax-1.6.0.tgz", - "integrity": "sha1-2lljdikwe5fnxMso4ICnvDhWDVs=", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=11.0.0" - } - }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/semver/-/semver-7.7.2.tgz", - "integrity": "sha1-Z9mf3NNc7CHm+Lh6f9UVoz+YK1g=", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "7.0.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/serialize-javascript/-/serialize-javascript-7.0.5.tgz", - "integrity": "sha1-x5jMBVL/uwiYGRSkKodW4znQ1bE=", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha1-lSGIwcvVRgcOLdIND0HArgUwywQ=", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sorted-btree": { - "version": "1.8.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/sorted-btree/-/sorted-btree-1.8.1.tgz", - "integrity": "sha1-bmJ195VeWJK7hzcUnL5JW+EPQm8=", - "license": "MIT" - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha1-BP58f54e0tZiIzwoyys1ufY/bk8=", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha1-1bZWjKaJ2FYTcLBwdoXSJDT6/0U=", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha1-zW/BfihQDP9WwbhsCn/UpUpzAFw=", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha1-4ijdHmOM6pk9L9tPzS1GAqeZUcI=", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true, - "license": "MIT" - }, - "node_modules/translate-strings": { - "version": "1.1.15", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/translate-strings/-/translate-strings-1.1.15.tgz", - "integrity": "sha1-PoTack2jIs6+u2+KDpVm6hMo6p4=", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/cognitiveservices-translatortext": "1.0.1", - "@azure/ms-rest-azure-js": "2.1.0", - "chalk": "4.1.0", - "ts-morph": "9.1.0" - }, - "bin": { - "translate-strings": "dist/main.js" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/translate-strings/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/translate-strings/node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/translate-strings/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha1-Ss1KFV4ic0mQpe0f6el/ETvLN8E=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/ts-morph": { - "version": "9.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ts-morph/-/ts-morph-9.1.0.tgz", - "integrity": "sha1-ENIIg4fHHzxnT4JJKjzsHjU48N0=", - "dev": true, - "license": "MIT", - "dependencies": { - "@dsherret/to-absolute-glob": "^2.0.2", - "@ts-morph/common": "~0.7.0", - "code-block-writer": "^10.1.1" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=", - "dev": true, - "license": "0BSD" - }, - "node_modules/tsx": { - "version": "4.21.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tsx/-/tsx-4.21.0.tgz", - "integrity": "sha1-Mqps8XSB4zb3Vhleb+BNrj5jCLE=", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.27.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha1-cvExSzSlsZLbASMk3yzFh8pH+Sw=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha1-W09Z4VMQqxeiFvXWz1PuR27eZw8=", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.58.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/typescript-eslint/-/typescript-eslint-8.58.0.tgz", - "integrity": "sha1-V1ixtorn7AXXVrmMY6H2lToBFys=", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.58.0", - "@typescript-eslint/parser": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0", - "@typescript-eslint/utils": "8.58.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha1-/8zf82rqSITL/OmnUKBYAiT1ikY=", - "dev": true, - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha1-gNW1ztJxu5r2xEXyGhoExgbO++I=", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vscode-uri": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/vscode-uri/-/vscode-uri-3.1.0.tgz", - "integrity": "sha1-3QnsWmaji1w//8d0AVcTSW0U4Jw=", - "license": "MIT" - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/which/-/which-2.0.2.tgz", - "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha1-0sRcbdT7zmIaZvE2y+Mor9BBCzQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "9.3.4", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/workerpool/-/workerpool-9.3.4.tgz", - "integrity": "sha1-9skjlbIUGv144qiJ6AyzOP6fykE=", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha1-VtwiNo7lcPrOG0mBmXXZuaXq0hQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha1-hAyIA7DYBH9P8M+WMXazLU7z7XI=", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha1-FPja7G2B5yIdKjV+Zoyrc728p5Q=", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/xml-writer": { - "version": "1.7.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/xml-writer/-/xml-writer-1.7.0.tgz", - "integrity": "sha1-t28dWRwWomNOvbcDx729D9aBkGU=", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha1-2UQGMfuy7YACA/rRBvJyT2LEk7c=", - "dev": true, - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha1-vpuuHIoEbnazESdyY0fQrXACvrM=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yaml": { - "version": "2.8.3", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/yaml/-/yaml-2.8.3.tgz", - "integrity": "sha1-oNa9Lvs90DxZNwIjcBg05gQJvX0=", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha1-mR3zmspnWhkrgW4eA2P5110qomk=", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha1-kJa87r+ZDSG7MfqVFuDt4pSnfTU=", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha1-8TH5ImkRrl2a04xDL+gJNmwjJes=", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://pkgs.dev.azure.com/vcpkg/public/_packaging/vcpkg-ecmascript-dependencies/npm/registry/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha1-ApTrPe4FAo0x7hpfosVWpqrxChs=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/vcpkg-artifacts/package.json b/vcpkg-artifacts/package.json deleted file mode 100644 index 48698ddb83..0000000000 --- a/vcpkg-artifacts/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "main": "dist/main.js", - "typings": "dist/exports.d.ts", - "engines": { - "node": ">=22.0.0" - }, - "type": "module", - "scripts": { - "eslint-fix": "eslint . --fix --ext .ts", - "eslint": "eslint . --ext .ts", - "test": "mocha --import=tsx" - }, - "keywords": [ - "vcpkg-artifacts", - "vcpkg" - ], - "author": "Microsoft", - "license": "MIT", - "files": [ - "dist", - "locales" - ], - "devDependencies": { - "@eslint/js": "^9.31.0", - "@types/cli-progress": "^3.11.6", - "@types/mocha": "^10.0.10", - "@types/node": "^24.0.0", - "@types/semver": "^7.7.0", - "@typescript-eslint/parser": "^8.37.0", - "@vercel/ncc": "^0.38.3", - "eslint": "^9.31.0", - "eslint-plugin-notice": "1.0.0", - "mocha": "11.7.5", - "source-map-support": "0.5.21", - "translate-strings": "1.1.15", - "tsx": "^4.20.3", - "typescript": "^5.8.3", - "typescript-eslint": "^8.37.0" - }, - "dependencies": { - "@snyk/nuget-semver": "1.6.0", - "chalk": "5.4.1", - "cli-progress": "3.12.0", - "semver": "7.7.2", - "sorted-btree": "1.8.1", - "strip-ansi": "7.1.0", - "vscode-uri": "3.1.0", - "xml-writer": "1.7.0", - "yaml": "^2.8.3" - }, - "overrides": { - "diff": "8.0.3", - "serialize-javascript": "7.0.5" - } -} diff --git a/vcpkg-artifacts/registries/ArtifactRegistry.ts b/vcpkg-artifacts/registries/ArtifactRegistry.ts deleted file mode 100644 index 28f8baa431..0000000000 --- a/vcpkg-artifacts/registries/ArtifactRegistry.ts +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { compare } from 'semver'; -import { MetadataFile } from '../amf/metadata-file'; -import { Artifact } from '../artifacts/artifact'; -import { FileType } from '../fs/filesystem'; -import { Session } from '../session'; -import { Queue } from '../util/promise'; -import { Uri } from '../util/uri'; -import { serialize } from '../yaml/yaml'; -import { ArtifactIndex } from './artifact-index'; -import { Index } from './indexer'; -import { Registry, SearchCriteria } from './registries'; - -export abstract class ArtifactRegistry implements Registry { - constructor(protected session: Session, readonly location: Uri) { - } - abstract load(): Promise; - - abstract readonly installationFolder: Uri; - - protected abstract readonly cacheFolder: Uri; - protected index = new Index(ArtifactIndex); - protected abstract indexYaml: Uri; - - get count() { - return this.index.indexOfTargets.length; - } - - #loaded = false; - - get loaded() { - return this.#loaded; - } - - protected set loaded(loaded: boolean) { - this.#loaded = loaded; - } - - abstract update(displayName?: string): Promise; - - async regenerate(normalize?: boolean): Promise { - // reset the index to blank. - this.index = new Index(ArtifactIndex); - - // eslint-disable-next-line @typescript-eslint/no-this-alias - const repo = this; - const q = new Queue(); - const session = this.session; - - async function processFile(uri: Uri) { - const content = await uri.readUTF8(); - try { - const amf = await MetadataFile.parseConfiguration(uri.fsPath, content, session); - - if (!amf.isFormatValid) { - for (const err of amf.formatErrors) { - repo.session.channels.warning(`Parse errors in metadata file ${err}}`); - } - throw new Error('invalid format'); - } - - let anyErrors = false; - for (const err of amf.validate()) { - repo.session.channels.warning(amf.formatVMessage(err)); - anyErrors = true; - } - - if (anyErrors) { - throw new Error('invalid manifest'); - } - - let fileUpdated = false; - for (const warning of amf.deprecationWarnings()) { - if (normalize) { - amf.normalize(); - fileUpdated = true; - } else { - repo.session.channels.warning(amf.formatVMessage(warning)); - } - } - - repo.session.channels.debug(`Inserting ${uri.formatted} into index.`); - repo.index.insert(amf, repo.cacheFolder.relative(uri)); - - if (fileUpdated) { - await amf.save(uri); - } - } catch (e: any) { - repo.session.channels.debug(e.toString()); - repo.session.channels.warning(`skipping invalid metadata file ${uri.fsPath}`); - } - } - - async function process(folder: Uri) { - for (const [entry, type] of await folder.readDirectory()) { - if (type & FileType.Directory) { - await process(entry); - continue; - } - - if (type & FileType.File && entry.path.endsWith('.json')) { - void q.enqueue(() => processFile(entry)); - } - } - } - - // process the files in the local folder - await process(this.cacheFolder); - await q.done; - - // we're done inserting values - this.index.doneInsertion(); - - this.loaded = true; - } - - async search(criteria?: SearchCriteria): Promise]>> { - await this.load(); - const query = this.index.where; - - if (criteria?.idOrShortName) { - query.id.nameOrShortNameIs(criteria.idOrShortName); - } - - if (criteria?.keyword) { - query.id.contains(criteria.keyword); - } - - const version = criteria?.version; - if (version && version !== '*') { - query.version.rangeMatch(version); - } - - return [...(await this.openArtifacts(query.items)).entries()]; - } - - - private async openArtifact(manifestPath: string): Promise { - const metadataPath = this.cacheFolder.join(manifestPath); - const metadata = await MetadataFile.parseMetadata(metadataPath.fsPath, metadataPath, this.session, this.location); - const id = metadata.id; - return new Artifact(this.session, - metadata, - this.index.indexSchema.id.getShortNameOf(id) || id, - this.installationFolder.join(id.replace(/[^\w]+/g, '.'), metadata.version) - ); - } - - private async openArtifacts(manifestPaths: Array) { - let metadataFiles = new Array(); - - // load them up async, but throttled via a queue - await manifestPaths.forEachAsync(async (manifest) => metadataFiles.push(await this.openArtifact(manifest))).done; - - // sort the contents by version before grouping. (descending version) - metadataFiles = metadataFiles.sort((a, b) => compare(b.metadata.version, a.metadata.version)); - - // return a map. - return metadataFiles.groupByMap(m => m.metadata.id, artifact => artifact); - } - - async save(): Promise { - await this.indexYaml.writeFile(Buffer.from(serialize(this.index.serialize()))); - } -} diff --git a/vcpkg-artifacts/registries/LocalRegistry.ts b/vcpkg-artifacts/registries/LocalRegistry.ts deleted file mode 100644 index 05fc59f3fe..0000000000 --- a/vcpkg-artifacts/registries/LocalRegistry.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { createHash } from 'crypto'; -import { parse } from 'yaml'; -import { registryIndexFile } from '../constants'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { ArtifactRegistry } from './ArtifactRegistry'; - - -export class LocalRegistry extends ArtifactRegistry { - protected indexYaml: Uri; - readonly installationFolder; - readonly cacheFolder: Uri; - - constructor(session: Session, location: Uri) { - strict.ok(location.scheme === 'file', `local registry location must be a file uri (${location})`); - - super(session, location); - this.cacheFolder = location; - this.indexYaml = this.cacheFolder.join(registryIndexFile); - this.installationFolder = session.installFolder.join(this.localName); - } - - update(): Promise { - return this.regenerate(); - } - - override async load(force?: boolean): Promise { - if (force || !this.loaded) { - if (! await this.indexYaml.exists()) { - // generate an index from scratch - await this.regenerate(); - this.loaded = true; - return; - } - this.session.channels.debug(`Loading registry from '${this.indexYaml.fsPath}'`); - this.index.deserialize(parse(await this.indexYaml.readUTF8())); - this.loaded = true; - } - } - - private get localName() { - // We use this to generate the subdirectory that we install artifacts into. - // It's not reqired to be very unique, but we'll generate it based of the path of the local location. - return createHash('sha256').update(this.location.fsPath, 'utf8').digest('hex').substring(0, 8); - } -} diff --git a/vcpkg-artifacts/registries/RemoteRegistry.ts b/vcpkg-artifacts/registries/RemoteRegistry.ts deleted file mode 100644 index 57e7f0e528..0000000000 --- a/vcpkg-artifacts/registries/RemoteRegistry.ts +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { createHash } from 'crypto'; -import { parse } from 'yaml'; -import { registryIndexFile } from '../constants'; -import { acquireArtifactFile } from '../fs/acquire'; -import { i } from '../i18n'; -import { Session } from '../session'; -import { isGithubRepo } from '../util/checks'; -import { Uri } from '../util/uri'; -import { vcpkgExtract } from '../vcpkg'; -import { ArtifactRegistry } from './ArtifactRegistry'; -import { ArtifactIndex } from './artifact-index'; -import { Index } from './indexer'; - -export class RemoteRegistry extends ArtifactRegistry { - protected indexYaml: Uri; - readonly installationFolder; - readonly cacheFolder: Uri; - #localName: string | undefined; - - constructor(session: Session, location: Uri) { - strict.ok(location.scheme === 'https', `remote registry location must be an HTTPS uri (${location})`); - super(session, location); - - this.cacheFolder = session.registryFolder.join(this.localName); - this.indexYaml = this.cacheFolder.join(registryIndexFile); - this.installationFolder = session.installFolder.join(this.localName); - } - - /* - notes: - // does this look like a github repo (in which case assume '${url}/archive/refs/heads/main.zip') as the packed repo. - // does this point to a .zip file ? - // https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip - */ - private get localName() { - if (!this.#localName) { - switch (this.location.authority.toLowerCase()) { - case 'aka.ms': - return this.#localName = this.location.path.replace(/\//g, ''); - - case 'github.com': - if (isGithubRepo(this.location)) { - // it's a reference to a github repo, the assumption that the zip archive is what we're getting - return this.#localName = this.location.path; - } - break; - } - // if we didn't get a match, use the url to generate a local filesystem name - this.#localName = createHash('sha256').update(this.location.toString(), 'utf8').digest('hex').substring(0, 8); - } - return this.#localName; - } - - private get safeName() { - return this.localName.replace(/[^a-zA-Z0-9]/g, '.'); - } - - override async load(force?: boolean): Promise { - if (force || !this.loaded) { - if (!await this.indexYaml.exists()) { - await this.update(); - } - - strict.ok(await this.indexYaml.exists(), `Index file is missing '${this.indexYaml.fsPath}'`); - - // load it fresh. - this.index = new Index(ArtifactIndex); - - this.session.channels.debug(`Loading registry from '${this.indexYaml.fsPath}'`); - this.index.deserialize(parse(await this.indexYaml.readUTF8())); - this.loaded = true; - } - } - - async update(displayName?: string) { - const displayNameStr = displayName ?? this.location.toString(); - - this.session.channels.message(i`Updating registry data from ${displayNameStr}`); - - let locations = [this.location]; - - if (isGithubRepo(this.location)) { - // it's just a github uri, let's use the main/m*ster branch as the zip file location. - locations = [this.location.join('archive/refs/heads/main.zip'), this.location.join('archive/refs/heads/master.zip')]; - } - - const file = await acquireArtifactFile(this.session, locations, `${this.safeName}-registry.zip`, {}, {force: true}); - if (await file.exists()) { - const targetLocation = this.cacheFolder.fsPath; - await vcpkgExtract(this.session, file.fsPath, targetLocation, 'AUTO'); - await file.delete(); - } - } -} diff --git a/vcpkg-artifacts/registries/artifact-index.ts b/vcpkg-artifacts/registries/artifact-index.ts deleted file mode 100644 index 686e194d3f..0000000000 --- a/vcpkg-artifacts/registries/artifact-index.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { SemVer } from 'semver'; -import { MetadataFile } from '../amf/metadata-file'; -import { IdentityKey, IndexSchema, SemverKey, StringKey } from './indexer'; - - -export class ArtifactIndex extends IndexSchema { - id = new IdentityKey(this, (i) => i.id, ['IdentityKey/id', 'IdentityKey/info.id']); - version = new SemverKey(this, (i) => new SemVer(i.version), ['SemverKey/version', 'SemverKey/info.version']); - summary = new StringKey(this, (i) => i.summary, ['StringKey/summary', 'StringKey/info.summary']); -} diff --git a/vcpkg-artifacts/registries/indexer.ts b/vcpkg-artifacts/registries/indexer.ts deleted file mode 100644 index 87b84dc129..0000000000 --- a/vcpkg-artifacts/registries/indexer.ts +++ /dev/null @@ -1,556 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Range, SemVer } from 'semver'; -import BTree from 'sorted-btree'; -import { i } from '../i18n'; -import { isIterable } from '../util/checks'; -import { entries, ManyMap } from '../util/linq'; - -/** Keys have to support toString so that we can serialize them */ -interface HasToString { - toString(): string; -} - -/** - * An Index is the means to search a registry - * - * @param TGraph The type of object to create an index for - * @param TIndexSchema the custom index schema (layout). - */ -export class Index> { - /** @internal */ - indexSchema: TIndexSchema; - /** @internal */ - indexOfTargets = new Array(); - - /** - * Creates an index for fast searching. - * - * @param indexConstructor the class for the custom index. - */ - constructor(protected indexConstructor: new (index: Index) => TIndexSchema) { - this.indexSchema = new indexConstructor(this); - } - - reset() { - this.indexSchema = new this.indexConstructor(this); - } - - /** - * Serializes the index to a javascript object graph that can be persisted. - */ - serialize() { - return { - items: this.indexOfTargets, - indexes: this.indexSchema.serialize() - }; - } - - /** - * Deserializes an object graph to the expected indexes. - * - * @param content the object graph to deserialize. - */ - deserialize(content: any) { - this.indexOfTargets = content.items; - this.indexSchema.deserialize(content.indexes); - } - - /** - * Returns a clone of the index that can be searched, which narrows the list of - */ - get where(): TIndexSchema { - // clone the index so that the consumer can filter on it. - const index = new Index(this.indexConstructor); - index.indexOfTargets = this.indexOfTargets; - for (const [key, impl] of this.indexSchema.mapOfKeyObjects.entries()) { - index.indexSchema.mapOfKeyObjects.get(key)!.cloneKey(impl); - } - return index.indexSchema; - } - - /** inserts an object into the index */ - insert(content: TGraph, target: string) { - const n = this.indexOfTargets.push(target) - 1; - for (const indexKey of this.indexSchema.mapOfKeyObjects.values()) { - indexKey.insert(content, n); - } - } - - doneInsertion() { - for (const indexKey of this.indexSchema.mapOfKeyObjects.values()) { - indexKey.doneInsertion(); - } - } -} - -/** - * A Key is a means to creating a searchable, sortable index - */ -abstract class Key> { - - /** child class must implement a standard compare function */ - abstract compare(a: TKey, b: TKey): number; - - /** child class must implement a function to transform value into comparable key */ - abstract coerce(value: TKey | string): TKey; - - protected nestedKeys = new Array>(); - protected values = new BTree>(undefined, this.compare); - protected words = new BTree>(); - protected indexSchema: TIndexSchema; - readonly identity: string; - readonly alternativeIdentities: Array; - - /** persists the key to an object graph */ - serialize() { - const result = { - keys: {}, - words: {}, - }; - for (const each of this.values.entries()) { - result.keys[each[0]] = [...each[1]]; - } - for (const each of this.words.entries()) { - result.words[each[0]] = [...each[1]]; - } - return result; - } - - /** deserializes an object graph back into this key */ - deserialize(content: any) { - for (const [key, ids] of entries(content.keys)) { - this.values.set(this.coerce(key), new Set(ids)); - } - for (const [key, ids] of entries(content.words)) { - this.words.set(key, new Set(ids)); - } - } - - /** @internal */ - cloneKey(from: this) { - this.values = from.values.greedyClone(); - this.words = from.words.greedyClone(); - } - - /** adds key value to this Key */ - protected addKey(each: TKey, n: number) { - let set = this.values.get(each); - if (!set) { - set = new Set(); - this.values.set(each, set); - } - set.add(n); - } - - /** adds a 'word' value to this key */ - protected addWord(each: TKey, n: number) { - const words = each.toString().split(/(\W+)/g); - - for (let word = 0; word < words.length; word += 2) { - for (let i = word; i < words.length; i += 2) { - const s = words.slice(word, i + 1).join(''); - if (s && s.indexOf(' ') === -1) { - let set = this.words.get(s); - if (!set) { - set = new Set(); - this.words.set(s, set); - } - set.add(n); - } - } - } - - } - - /** processes an object to generate key/word values for it. */ - insert(graph: TGraph, n: number) { - let value = this.accessor(graph); - if (value) { - value = >(Array.isArray(value) ? value - : typeof value === 'string' ? [value] - : isIterable(value) ? [...value] : [value]); - - this.insertKey(graph, n, value); - } - } - - /** insert the key/word values and process any children */ - private insertKey(graph: TGraph, n: number, value: TKey | Iterable) { - if (isIterable(value)) { - for (const each of value) { - this.addKey(each, n); - this.addWord(each, n); - if (this.nestedKeys) { - for (const child of this.nestedKeys) { - const v = child.accessor(graph, each.toString()); - if (v) { - child.insertKey(graph, n, v); - } - } - } - } - } else { - this.addKey(value, n); - this.addWord(value, n); - } - } - - /** construct a Key */ - constructor(indexSchema: IndexSchema, public accessor: (value: TGraph, ...args: Array) => TKey | undefined | Array | Iterable, protoIdentity: Array | string) { - this.indexSchema = indexSchema; - if (typeof protoIdentity === 'string') { - this.identity = protoIdentity; - this.alternativeIdentities = [protoIdentity]; - } else { - this.identity = protoIdentity[0]; - this.alternativeIdentities = protoIdentity; - } - - this.indexSchema.mapOfKeyObjects.set(this.identity, this); - } - - /** word search */ - contains(value: TKey | string): TIndexSchema { - if (value !== undefined && value !== '') { - const matches = this.words.get(value.toString()); - this.indexSchema.filter(matches || []); - } - return this.indexSchema; - } - - /** exact match search */ - equals(value: TKey | string): TIndexSchema { - if (value !== undefined && value !== '') { - const matches = this.values.get(this.coerce(value)); - this.indexSchema.filter(matches || []); - } - return this.indexSchema; - } - - /** metadata value is greater than search */ - greaterThan(value: TKey | string): TIndexSchema { - const max = this.values.maxKey(); - const set = new Set(); - if (max && value !== undefined && value !== '') { - this.values.forRange(this.coerce(value), max, true, (k, v) => { - for (const n of v) { - set.add(n); - } - }); - } - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - - /** metadata value is less than search */ - lessThan(value: TKey | string): TIndexSchema { - const min = this.values.minKey(); - const set = new Set(); - if (min && value !== undefined && value !== '') { - value = this.coerce(value); - this.values.forRange(min, this.coerce(value), false, (k, v) => { - for (const n of v) { - set.add(n); - } - }); - } - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - - /** regex search -- WARNING: slower */ - match(regex: string): TIndexSchema { - // This could be faster if we stored a reverse lookup - // array that had the id for each key, but .. I don't - // think the perf will suffer much doing it this way. - - const set = new Set(); - - for (const node of this.values.entries()) { - for (const id of node[1]) { - if (!this.indexSchema.selectedElements || this.indexSchema.selectedElements.has(id)) { - // it's currently in the keep list. - if (regex.match(node.toString())) { - set.add(id); - } - } - } - } - - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - /** substring match -- slower */ - startsWith(value: TKey | string): TIndexSchema { - // ok, I'm being lazy here. I can add a check to see if we're past - // the point where this could be a match, but I don't know if I'll - // even need this enough to keep it. - - const set = new Set(); - - for (const node of this.values.entries()) { - for (const id of node[1]) { - if (!this.indexSchema.selectedElements || this.indexSchema.selectedElements.has(id)) { - // it's currently in the keep list. - if (node[0].toString().startsWith((value).toString())) { - set.add(id); - } - } - } - } - - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - /** substring match -- slower */ - endsWith(value: TKey | string): TIndexSchema { - // Same thing here, but I'd have to do a reversal of all the strings. - - const set = new Set(); - - for (const node of this.values.entries()) { - for (const id of node[1]) { - if (!this.indexSchema.selectedElements || this.indexSchema.selectedElements.has(id)) { - // it's currently in the keep list. - if (node[0].toString().endsWith((value).toString())) { - set.add(id); - } - } - } - } - - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - - doneInsertion() { - // nothing normally - } -} - -/** An key for string values. */ -export class StringKey> extends Key { - - compare(a: string, b: string): number { - if (a && b) { - return a.localeCompare(b); - } - if (a) { - return 1; - } - if (b) { - return -1; - } - return 0; - } - - /** impl: transform value into comparable key */ - coerce(value: string): string { - return value; - } -} - -function shortName(value: string, n: number) { - const v = value.split('/'); - let p = v.length - n; - if (p < 0) { - p = 0; - } - return v.slice(p).join('/'); -} - -export class IdentityKey> extends StringKey { - - protected identities = new BTree>(undefined, this.compare); - protected idShortName = new Map(); - - override doneInsertion() { - // go thru each of the values, find short name for each. - const ids = new ManyMap]>(); - - for (const idAndIndexNumber of this.values.entries()) { - ids.push(shortName(idAndIndexNumber[0], 1), idAndIndexNumber); - } - - let n = 1; - while (ids.size > 0) { - n++; - for (const [snKey, artifacts] of [...ids.entries()]) { - // remove it from the list. - ids.delete(snKey); - if (artifacts.length === 1) { - // keep this one, it's unique - this.identities.set(snKey, artifacts[0][1]); - this.idShortName.set(artifacts[0][0], snKey); - } else { - for (const each of artifacts) { - ids.push(shortName(each[0], n), each); - } - } - } - } - } - - /** @internal */ - override cloneKey(from: this) { - super.cloneKey(from); - this.identities = from.identities.greedyClone(); - this.idShortName = new Map(from.idShortName); - } - - getShortNameOf(id: string) { - return this.idShortName.get(id); - } - - nameOrShortNameIs(value: string): TIndexSchema { - if (value !== undefined && value !== '') { - const matches = this.identities.get(value); - if (matches) { - this.indexSchema.filter(matches); - } - else { - return this.equals(value); - } - } - return this.indexSchema; - } - - /** deserializes an object graph back into this key */ - override deserialize(content: any) { - super.deserialize(content); - this.doneInsertion(); - } -} - -/** An key for string values. Does not support 'word' searches */ -export class SemverKey> extends Key { - compare(a: SemVer, b: SemVer): number { - return a.compare(b); - } - coerce(value: SemVer | string): SemVer { - if (typeof value === 'string') { - return new SemVer(value); - } - return value; - } - protected override addWord(_each: SemVer, _n: number) { - // no parts - } - - rangeMatch(value: Range | string) { - // This could be faster if we stored a reverse lookup - // array that had the id for each key, but .. I don't - // think the perf will suffer much doing it this way. - - const set = new Set(); - const range = new Range(value); - - for (const node of this.values.entries()) { - for (const id of node[1]) { - - if (!this.indexSchema.selectedElements || this.indexSchema.selectedElements.has(id)) { - // it's currently in the keep list. - if (range.test(node[0])) { - set.add(id); - } - } - } - } - - this.indexSchema.filter(set.values()); - return this.indexSchema; - } - - override serialize() { - const result = super.serialize(); - result.words = undefined; - - return result; - } -} - -/** - * Base class for a custom IndexSchema - * - * @param TGraph - the object kind to be indexing - * @param TSelf - the child class that is being constructed. - */ -export abstract class IndexSchema> { - /** the collection of keys in this IndexSchema */ - readonly mapOfKeyObjects = new Map>(); - - /** - * the selected element ids. - * - * if this is `undefined`, the whole set is currently selected - */ - selectedElements?: Set; - - /** - * filter the selected elements down to an intersection of the {selectedelements} ∩ {idsToKeep} - * - * @param idsToKeep the element ids to intersect with. - */ - filter(idsToKeep: Iterable) { - if (this.selectedElements) { - const selected = new Set(); - for (const each of idsToKeep) { - if (this.selectedElements.has(each)) { - selected.add(each); - } - } - this.selectedElements = selected; - } else { - this.selectedElements = new Set(idsToKeep); - } - } - - /** - * Serializes this IndexSchema to a persistable object graph. - */ - serialize() { - const result = { - }; - for (const [key, impl] of this.mapOfKeyObjects.entries()) { - result[key] = impl.serialize(); - } - return result; - } - - /** - * Deserializes a persistable object graph into the IndexSchema. - * - * replaces any existing data in the IndexSchema. - * @param content the persistable object graph. - */ - deserialize(content: any) { - for (const [key, impl] of this.mapOfKeyObjects.entries()) { - let anyMatches = false; - for (const maybeIdentity of impl.alternativeIdentities) { - const maybeKey = content[maybeIdentity]; - if (maybeKey) { - impl.deserialize(maybeKey); - anyMatches = true; - break; - } - } - - if (!anyMatches) { - throw new Error(i`Failed to deserialize index ${key}`); - } - } - } - - /** - * returns the selected - */ - get items(): Array { - return this.selectedElements ? [...this.selectedElements].map(each => this.index.indexOfTargets[each]) : this.index.indexOfTargets; - } - - /** @internal */ - constructor(public index: Index) { - } -} diff --git a/vcpkg-artifacts/registries/registries.ts b/vcpkg-artifacts/registries/registries.ts deleted file mode 100644 index 38220024b4..0000000000 --- a/vcpkg-artifacts/registries/registries.ts +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { fail } from 'assert'; -import { Artifact, parseArtifactDependency } from '../artifacts/artifact'; -import { artifactIdentity } from '../cli/format'; -import { i } from '../i18n'; -import { Session } from '../session'; -import { Uri } from '../util/uri'; -import { LocalRegistry } from './LocalRegistry'; -import { RemoteRegistry } from './RemoteRegistry'; - -export interface SearchCriteria { - idOrShortName?: string; - version?: string; - keyword?: string; -} - -// In general, a Registry or RegistryResolverContext -export interface ArtifactSearchable { - // Returns [artifactId, artifactsOfMatchingVersionsOfThatId][] - search(criteria?: SearchCriteria): Promise]>>; -} - -export interface Registry extends ArtifactSearchable { - readonly count: number; - readonly location: Uri; - - load(force?: boolean): Promise; - save(): Promise; - update(displayName?: string): Promise; - regenerate(normalize?: boolean): Promise; -} - -/** - * returns an artifact for the strongly-named artifact id/version. - */ -export async function getArtifact(registry: ArtifactSearchable, idOrShortName: string, version: string | undefined): Promise<[string, Artifact] | undefined> { - const artifactRecords = await registry.search({ idOrShortName, version }); - if (artifactRecords.length === 0) { - return undefined; // nothing matched. - } - - if (artifactRecords.length === 1) { - // found 1 matching artifact identity - const artifactRecord = artifactRecords[0]; - const artifactDisplay = artifactRecord[0]; - const artifactVersions = artifactRecord[1]; - if (artifactVersions.length === 0) { - throw new Error('Internal search error: id matched but no versions present'); - } - - return [artifactDisplay, artifactVersions[0]]; - } - - // multiple matches. - // we can't return a single artifact, we're going to have to throw. - fail(i`'${idOrShortName}' matched more than one result (${[...artifactRecords.map(each => each[0])].join(',')}).`); -} - -export class RegistryDatabase { - #uriToRegistry: Map = new Map(); - - getRegistryByUri(registryUri: string) { - return this.#uriToRegistry.get(registryUri); - } - - has(registryUri: string) { return this.#uriToRegistry.has(registryUri); } - - // Exposed for testing - add(uri: Uri, registry: Registry) { - const stringized = uri.toString(); - if (this.#uriToRegistry.has(stringized)) { - throw new Error(`Duplicate registry add ${stringized}`); - } - - this.#uriToRegistry.set(stringized, registry); - } - - async loadRegistry(session: Session, locationUri: Uri): Promise { - const locationUriStr = locationUri.toString(); - const existingRegistry = this.#uriToRegistry.get(locationUriStr); - if (existingRegistry) { - return existingRegistry; - } - - // not already loaded - let loaded: Registry; - switch (locationUri.scheme) { - case 'https': - loaded = new RemoteRegistry(session, locationUri); - break; - - case 'file': - loaded = new LocalRegistry(session, locationUri); - break; - - default: - throw new Error(i`Unsupported registry scheme '${locationUri.scheme}'`); - } - - this.#uriToRegistry.set(locationUriStr, loaded); - await loaded.load(); - return loaded; - } - - getAllUris() { - return Array.from(this.#uriToRegistry.keys()); - } -} - -// When a registry resolver is used to map a URI back to some form of for-display-purposes-only name. -export interface RegistryDisplayContext { - getRegistryDisplayName(registry: Uri): string; -} - -export class RegistryResolver implements RegistryDisplayContext { - readonly #database: RegistryDatabase; - readonly #knownUris: Set; - readonly #uriToName: Map; - readonly #nameToUri: Map; - - private addMapping(name: string, uri: string) { - this.#uriToName.set(uri, name); - this.#nameToUri.set(name, uri); - } - - constructor(parent: RegistryDatabase | RegistryResolver) { - if (parent instanceof RegistryResolver) { - this.#database = parent.#database; - this.#knownUris = new Set(parent.#knownUris); - this.#uriToName = new Map(parent.#uriToName); - this.#nameToUri = new Map(parent.#nameToUri); - } else { - this.#database = parent; - this.#knownUris = new Set(); - this.#uriToName = new Map(); - this.#nameToUri = new Map(); - } - } - - getRegistryName(registry: Uri): string | undefined { - const stringized = registry.toString(); - return this.#uriToName.get(stringized); - } - - getRegistryDisplayName(registry: Uri): string { - const stringized = registry.toString(); - const prettyName = this.#uriToName.get(stringized); - if (prettyName) { - return prettyName; - } - - return `[${stringized}]`; - } - - getRegistryByUri(registryUri: Uri): Registry | undefined { - const stringized = registryUri.toString(); - if (this.#knownUris.has(stringized)) { - return this.#database.getRegistryByUri(stringized); - } - - return undefined; - } - - getRegistryByName(name: string) : Registry | undefined { - const asUri = this.#nameToUri.get(name); - if (asUri) { - return this.#database.getRegistryByUri(asUri); - } - - return undefined; - } - - // Adds `registry` to this context with name `name`. If `name` is already set to a different URI, throws. - add(registryUri: Uri, name: string) { - const stringized = registryUri.toString(); - if (!this.#database.has(stringized)) { - throw new Error('Attempted to add unloaded registry to a RegistryContext'); - } - - const oldLocation = this.#nameToUri.get(name); - if (oldLocation && oldLocation !== stringized) { - throw new Error(i`Tried to add ${stringized} as ${name}, but ${name} is already ${oldLocation}.`); - } - - this.#knownUris.add(stringized); - this.addMapping(name, stringized); - } - - async search(criteria?: SearchCriteria): Promise]>> { - const idOrShortName = criteria?.idOrShortName || ''; - const [source, name] = parseArtifactDependency(idOrShortName); - if (source === undefined) { - // search them all - const results : Array<[string, Array]> = []; - for (const location of this.#knownUris) { - const registry = this.#database.getRegistryByUri(location); - if (registry === undefined) { - throw new Error('RegistryContext tried to search an unloaded registry.'); - } - - const displayName = this.getRegistryDisplayName(registry.location); - for (const [artifactId, artifacts] of await registry.search(criteria)) { - results.push([artifactIdentity(displayName, artifactId, artifacts[0].shortName), artifacts]); - } - } - - return results; - } else { - const registry = this.getRegistryByName(source); - if (registry) { - return (await registry.search({ ...criteria, idOrShortName: name })) - .map((artifactRecord) => [artifactIdentity(source, artifactRecord[0], artifactRecord[1][0].shortName), artifactRecord[1]]); - } - - throw new Error(i`Unknown registry ${source} (in ${idOrShortName}). The following are known: ${Array.from(this.#nameToUri.keys()).join(', ')}`); - } - } - - // Combines resolvers together. Any registries that match exactly will take their names from `otherResolver`. Any - // registries whose names match but which resolve to different URIs will have the name from `otherResolver`, and the - // other registry will become known but nameless. - with(otherResolver: RegistryResolver) : RegistryResolver { - if (this.#database !== otherResolver.#database) { - throw new Error('Tried to combine registry resolvers with different databases.'); - } - - const result = new RegistryResolver(otherResolver); - for (const uri of this.#knownUris) { - result.#knownUris.add(uri); - } - - for (const [name, location] of this.#nameToUri) { - if (!result.#nameToUri.has(name) && !result.#uriToName.has(location)) { - result.addMapping(name, location); - } - } - - return result; - } -} diff --git a/vcpkg-artifacts/session.ts b/vcpkg-artifacts/session.ts deleted file mode 100644 index e21df5dc6f..0000000000 --- a/vcpkg-artifacts/session.ts +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { createHash } from 'crypto'; -import { MetadataFile } from './amf/metadata-file'; -import { Artifact, InstalledArtifact } from './artifacts/artifact'; -import { configurationName, defaultConfig } from './constants'; -import { FileSystem } from './fs/filesystem'; -import { LocalFileSystem } from './fs/local-filesystem'; -import { UnifiedFileSystem } from './fs/unified-filesystem'; -import { VsixLocalFilesystem } from './fs/vsix-local-filesystem'; -import { i } from './i18n'; -import { installGit } from './installers/git'; -import { installNuGet } from './installers/nuget'; -import { installUnTar } from './installers/untar'; -import { installUnZip } from './installers/unzip'; -import { InstallEvents, InstallOptions } from './interfaces/events'; -import { Installer } from './interfaces/metadata/installers/Installer'; -import { RegistryDatabase, RegistryResolver } from './registries/registries'; -import { Channels, Stopwatch } from './util/channels'; -import { Uri } from './util/uri'; -import { HttpsFileSystem } from './fs/http-filesystem'; - -/** The definition for an installer tool function */ -type InstallerTool = ( - session: Session, - name: string, - version: string, - targetLocation: Uri, - install: T, - events: Partial, - options: Partial -) => Promise - - -export type Context = { [key: string]: Array | undefined; } & { - readonly os: string; - readonly arch: string; - readonly windows: boolean; - readonly osx: boolean; - readonly linux: boolean; - readonly freebsd: boolean; - readonly x64: boolean; - readonly x86: boolean; - readonly arm: boolean; - readonly arm64: boolean; -} - -export type SessionSettings = { - readonly vcpkgCommand?: string; - readonly homeFolder: string; - readonly vcpkgArtifactsRoot?: string; - readonly vcpkgDownloads?: string; - readonly vcpkgRegistriesCache?: string; - readonly telemetryFile?: string; - readonly nextPreviousEnvironment?: string; - readonly globalConfig?: string; -} - -interface ArtifactEntry { - registryUri: string; - id: string; - version: string; -} - -function hexsha(content: string) { - return createHash('sha256').update(content, 'ascii').digest('hex'); -} - -function formatArtifactEntry(entry: ArtifactEntry): string { - // we hash all the things to remove PII - return `${hexsha(entry.registryUri)}:${hexsha(entry.id)}:${hexsha(entry.version)}`; -} - -/** - * The Session class is used to hold a reference to the - * message channels, - * the filesystems, - * and any other 'global' data that should be kept. - * - */ -export class Session { - /** @internal */ - readonly stopwatch = new Stopwatch(); - readonly fileSystem: FileSystem; - readonly channels: Channels; - readonly homeFolder: Uri; - readonly nextPreviousEnvironment: Uri; - readonly installFolder: Uri; - readonly registryFolder: Uri; - readonly telemetryFile: Uri | undefined; - get vcpkgCommand() { return this.settings.vcpkgCommand; } - - readonly globalConfig: Uri; - readonly downloads: Uri; - currentDirectory: Uri; - configuration?: MetadataFile; - - /** register installer functions here */ - private installers = new Map([ - ['nuget', installNuGet], - ['unzip', installUnZip], - ['untar', installUnTar], - ['git', installGit] - ]); - - readonly registryDatabase = new RegistryDatabase(); - readonly globalRegistryResolver = new RegistryResolver(this.registryDatabase); - - processVcpkgArg(argSetting: string | undefined, defaultName: string): Uri { - return argSetting ? this.fileSystem.file(argSetting) : this.homeFolder.join(defaultName); - } - - constructor(currentDirectory: string, public readonly context: Context, public readonly settings: SessionSettings) { - this.fileSystem = new UnifiedFileSystem(this). - register('file', new LocalFileSystem(this)). - register('vsix', new VsixLocalFilesystem(this)). - register('https', new HttpsFileSystem(this)); - - this.channels = new Channels(this); - - if (settings.telemetryFile) { - this.telemetryFile = this.fileSystem.file(settings.telemetryFile); - } - - this.homeFolder = this.fileSystem.file(settings.homeFolder); - this.downloads = this.processVcpkgArg(settings.vcpkgDownloads, 'downloads'); - this.globalConfig = this.processVcpkgArg(settings.globalConfig, configurationName); - - this.registryFolder = this.processVcpkgArg(settings.vcpkgRegistriesCache, 'registries').join('artifact'); - this.installFolder = this.processVcpkgArg(settings.vcpkgArtifactsRoot, 'artifacts'); - this.nextPreviousEnvironment = this.processVcpkgArg(settings.nextPreviousEnvironment, `previous-environment-${Date.now().toFixed()}.json`); - - this.currentDirectory = this.fileSystem.file(currentDirectory); - } - - parseLocation(location: string): Uri { - // Drive letter, absolute Unix path, or drive-relative windows path, treat as a file - if (/^[A-Za-z]:/.exec(location) || location.startsWith('/') || location.startsWith('\\')) { - return this.fileSystem.file(location); - } - - // Otherwise, it's a URI - return this.fileSystem.parseUri(location); - } - - async saveConfig() { - await this.configuration?.save(this.globalConfig); - } - - async init() { - // load global configuration - if (!await this.fileSystem.isDirectory(this.homeFolder)) { - // let's create the folder - try { - await this.fileSystem.createDirectory(this.homeFolder); - } catch (error: any) { - // if this throws, let it - this.channels.debug(error?.message); - } - // check if it got made, because at an absolute minimum, we need a folder, so failing this is catastrophic. - strict.ok(await this.fileSystem.isDirectory(this.homeFolder), i`Fatal: The root folder '${this.homeFolder.fsPath}' cannot be created`); - } - - if (!await this.fileSystem.isFile(this.globalConfig)) { - try { - await this.globalConfig.writeUTF8(defaultConfig); - } catch { - // if this throws, let it - } - // check if it got made, because at an absolute minimum, we need the config file, so failing this is catastrophic. - strict.ok(await this.fileSystem.isFile(this.globalConfig), i`Fatal: The global configuration file '${this.globalConfig.fsPath}' cannot be created`); - } - - // got past the checks, let's load the configuration. - this.configuration = await MetadataFile.parseMetadata(this.globalConfig.fsPath, this.globalConfig, this); - this.channels.debug(`Loaded global configuration file '${this.globalConfig.fsPath}'`); - - // load the registries - for (const [name, regDef] of this.configuration.registries) { - const loc = regDef.location.get(0); - if (loc) { - const uri = this.parseLocation(loc); - const reg = await this.registryDatabase.loadRegistry(this, uri); - this.globalRegistryResolver.add(uri, name); - if (reg) { - this.channels.debug(`Loaded global manifest ${name} => ${uri.formatted}`); - } - } - } - - return this; - } - - async findProjectProfile(startLocation = this.currentDirectory): Promise { - let location = startLocation; - const path = location.join(configurationName); - if (await this.fileSystem.isFile(path)) { - return path; - } - - location = location.join('..'); - return (location.toString() === startLocation.toString()) ? undefined : this.findProjectProfile(location); - } - - async getInstalledArtifacts() { - const result = new Array<{ folder: Uri, id: string, artifact: Artifact }>(); - if (! await this.installFolder.exists()) { - return result; - } - for (const [folder] of await this.installFolder.readDirectory(undefined, { recursive: true })) { - try { - const artifactJsonPath = folder.join('artifact.json'); - const metadata = await MetadataFile.parseMetadata(artifactJsonPath.fsPath, artifactJsonPath, this); - result.push({ - folder, - id: metadata.id, - artifact: await new InstalledArtifact(this, metadata) - }); - } catch { - // not a valid install. - } - } - return result; - } - - /** returns an installer function (or undefined) for a given installerkind */ - artifactInstaller(installInfo: Installer) { - return this.installers.get(installInfo.installerKind); - } - - async openManifest(filename: string, uri: Uri): Promise { - return await MetadataFile.parseConfiguration(filename, await uri.readUTF8(), this); - } - - readonly #acquiredArtifacts: Array = []; - readonly #activatedArtifacts: Array = []; - - trackAcquire(registryUri: string, id: string, version: string) { - this.#acquiredArtifacts.push({ registryUri: registryUri, id: id, version: version }); - } - - trackActivate(registryUri: string, id: string, version: string) { - this.#activatedArtifacts.push({ registryUri: registryUri, id: id, version: version }); - } - - writeTelemetry(): Promise { - const acquiredArtifacts = this.#acquiredArtifacts.map(formatArtifactEntry).join(','); - const activatedArtifacts = this.#activatedArtifacts.map(formatArtifactEntry).join(','); - - const telemetryFile = this.telemetryFile; - if (telemetryFile) { - return telemetryFile.writeUTF8(JSON.stringify({ - 'acquired-artifacts': acquiredArtifacts, - 'activated-artifacts': activatedArtifacts - })); - } - - return Promise.resolve(undefined); - } -} diff --git a/vcpkg-artifacts/test-resources/cmake.json b/vcpkg-artifacts/test-resources/cmake.json deleted file mode 100644 index ec1b09d91a..0000000000 --- a/vcpkg-artifacts/test-resources/cmake.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.20.1", - "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "demands": { - "windows and x64": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "windows and x86": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-i386.zip", - "sha256": "650026534e66dabe0ed6be3422e86fabce5fa86d43927171ea8b8dfd0877fc9d", - "strip": 1 - } - }, - "windows": { - "environment": { - "tools": { - "cmake": "bin/cmake.exe", - "cmake_gui": "bin/cmake-gui.exe", - "ctest": "bin/ctest.exe" - }, - "paths": { - "path": "bin" - } - } - }, - "osx": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-macos-universal.tar.gz", - "sha256": "89afcb79f58bb1f0bb840047c146c3fac8051829b6025c3dbe9b75799b27deb4", - "strip": 3 - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz", - "sha256": "B8C141BD7A6D335600AB0A8A35E75AF79F95B837F736456B5532F4D717F20A09", - "strip": 1 - } - }, - "linux and arm64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-aarch64.tar.gz", - "sha256": "2761a222c14a15b9bdf1bdb4a17c10806757b7ed3bc26a84523f042ec212b76c", - "strip": 1 - } - }, - "not windows": { - "exports": { - "tools": { - "cmake": "bin/cmake", - "cmake_gui": "bin/cmake-gui", - "ctest": "bin/ctest" - }, - "paths": { - "path": "bin" - } - } - } - } -} diff --git a/vcpkg-artifacts/test-resources/empty.json b/vcpkg-artifacts/test-resources/empty.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vcpkg-artifacts/test-resources/errors.json b/vcpkg-artifacts/test-resources/errors.json deleted file mode 100644 index e76c92b23b..0000000000 --- a/vcpkg-artifacts/test-resources/errors.json +++ /dev/null @@ -1,10 +0,0 @@ - -top: foo -top: foobar - -info: - id: bob - version: 1.0.2 - summary: none - -$*$*$*$* diff --git a/vcpkg-artifacts/test-resources/example-artifact.json b/vcpkg-artifacts/test-resources/example-artifact.json deleted file mode 100644 index 45b45328fa..0000000000 --- a/vcpkg-artifacts/test-resources/example-artifact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "a/b", - "version": "1.0", - "requires": { - "compilers/arm/gcc": "2020.10.0", - "tools/kitware/cmake": "3.20.1" - } -} diff --git a/vcpkg-artifacts/test-resources/example-before-2022-06-17-artifact.json b/vcpkg-artifacts/test-resources/example-before-2022-06-17-artifact.json deleted file mode 100644 index 729570ec46..0000000000 --- a/vcpkg-artifacts/test-resources/example-before-2022-06-17-artifact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "info": { - "id": "a/b", - "version": "1.0" - }, - "requires": { - "compilers/arm/gcc": "2020.10.0", - "tools/kitware/cmake": "3.20.1" - } -} diff --git a/vcpkg-artifacts/test-resources/large-file.txt b/vcpkg-artifacts/test-resources/large-file.txt deleted file mode 100644 index e90232410d..0000000000 --- a/vcpkg-artifacts/test-resources/large-file.txt +++ /dev/null @@ -1,559 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore -eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt -in culpa qui officia deserunt mollit anim id est laborum. - -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium -doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore -veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim -ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia -consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque -porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, -adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et -dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis -nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex -ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea -voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem -eum fugiat quo voluptas nulla pariatur? \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.04.0.json b/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.04.0.json deleted file mode 100644 index f13e362393..0000000000 --- a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.04.0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "info": { - "id": "compilers/gnu/gcc/arm-none-eabi", - "version": "2019.4.0", - "description": "sample artifact file that might work for gcc", - "summary": "GCC compiler for ARM CPUs. from early 2019" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "windows": { - "install": { - "unzip": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip", - "sha256": "90057B8737B888C53CA5AEE332F1F73C401D6D3873124D2C2906DF4347EBEF9E", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "environment": { - "tools": { - "CC": "bin/arm-none-eabi-gcc.exe", - "CXX": "bin/arm-none-eabi-g++.exe" - }, - "paths": [ - "bin", - "gcc-arm-eabi-none/bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.10.0.json b/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.10.0.json deleted file mode 100644 index 41d47c81b9..0000000000 --- a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2019.10.0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "info": { - "id": "compilers/gnu/gcc/arm-none-eabi", - "version": "2019.10.0", - "description": "sample artifact file that might work for gcc from late 2019", - "summary": "GCC compiler for ARM CPUs. This is an older one, but newer than the oldest" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "windows": { - "install": { - "unzip": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip", - "sha256": "90057B8737B888C53CA5AEE332F1F73C401D6D3873124D2C2906DF4347EBEF9E", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "CC": "bin/arm-none-eabi-gcc.exe", - "CXX": "bin/arm-none-eabi-g++.exe" - }, - "paths": [ - "bin", - "gcc-arm-eabi-none/bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2020-10.0.json b/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2020-10.0.json deleted file mode 100644 index df5b6e4979..0000000000 --- a/vcpkg-artifacts/test-resources/repo/compilers/gnu/gcc-arm-none-eabi-2020-10.0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "info": { - "id": "compilers/gnu/gcc/arm-none-eabi", - "version": "2020.10.0", - "description": "sample artifact file that might work for gcc", - "summary": "GCC compiler for ARM CPUs." - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "windows": { - "install": { - "unzip": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip", - "sha256": "90057B8737B888C53CA5AEE332F1F73C401D6D3873124D2C2906DF4347EBEF9E", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "CC": "bin/arm-none-eabi-gcc.exe", - "CXX": "bin/arm-none-eabi-g++.exe" - }, - "paths": [ - "bin", - "gcc-arm-eabi-none/bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm.json b/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm.json deleted file mode 100644 index e0b30a6ff5..0000000000 --- a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "info": { - "id": "sdks/microsoft/windows/arm", - "version": "10.0.19041", - "description": "The Windows SDK available as a NuGet package for more seamless acquisition and CI/CD integration. This package is designed for C++ applications (targeting arm)", - "summary": "Microsoft Windows SDK. (targeting arm)" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "install": { - "nupkg": "Microsoft.Windows.SDK.cpp.arm/10.0.19041.5", - "sha256": "fluffyKittenBunnies" - } -} diff --git a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm64.json b/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm64.json deleted file mode 100644 index 2150295e40..0000000000 --- a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.arm64.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "info": { - "id": "sdks/microsoft/windows/arm64", - "version": "10.0.19041", - "description": "The Windows SDK available as a NuGet package for more seamless acquisition and CI/CD integration. This package is designed for C++ applications (targeting arm64)", - "summary": "Microsoft Windows SDK. (targeting arm64)" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "install": { - "nupkg": "Microsoft.Windows.SDK.cpp.arm64/10.0.19041.5", - "sha256": "fluffyKittenBunnies" - } -} diff --git a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.json b/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.json deleted file mode 100644 index 1067c76bea..0000000000 --- a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "info": { - "id": "sdks/microsoft/windows", - "version": "10.0.19041", - "description": "The Windows SDK available as a NuGet package for more seamless acquisition and CI/CD integration. This package is designed for C++ applications", - "summary": "Microsoft Windows SDK." - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "install": { - "nupkg": "Microsoft.Windows.SDK.cpp/10.0.19041.5", - "sha256": "fluffyKittenBunnies" - }, - "demands": { - "windows and target:x64": { - "requires": { - "sdks/microsoft/windows/x64": "10.0.19041" - } - }, - "windows and target:x86": { - "requires": { - "sdks/microsoft/windows/x86": "10.0.19041" - } - }, - "windows and target:arm": { - "requires": { - "sdks/microsoft/windows/arm": "10.0.19041" - } - }, - "windows and target:arm64": { - "requires": { - "sdks/microsoft/windows/arm64": "10.0.19041" - } - } - } -} diff --git a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x64.json b/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x64.json deleted file mode 100644 index 2db5a9196e..0000000000 --- a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x64.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "info": { - "id": "sdks/microsoft/windows/x64", - "version": "10.0.19041", - "description": "The Windows SDK available as a NuGet package for more seamless acquisition and CI/CD integration. This package is designed for C++ applications (targeting x64)", - "summary": "Microsoft Windows SDK. (targeting x64)" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "install": { - "nupkg": "Microsoft.Windows.SDK.cpp.x64/10.0.19041.5", - "sha256": "fluffyKittenBunnies" - }, - "x64": { - "exports": { - "paths": [ - "./**/bin/x64" - ] - } - }, - "not x64": { - "exports": { - "paths": [ - "./**/bin/x64" - ] - } - } -} diff --git a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x86.json b/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x86.json deleted file mode 100644 index 3f9865c1ab..0000000000 --- a/vcpkg-artifacts/test-resources/repo/sdks/microsoft/windows.x86.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "info": { - "id": "sdks/microsoft/windows/x86", - "version": "10.0.19041", - "description": "The Windows SDK available as a NuGet package for more seamless acquisition and CI/CD integration. This package is designed for C++ applications (targeting x86)", - "summary": "Microsoft Windows SDK. (targeting x86)" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "install": { - "nupkg": "Microsoft.Windows.SDK.cpp.x86/10.0.19041.5", - "sha256": "fluffyKittenBunnies" - } -} diff --git a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.0.json b/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.0.json deleted file mode 100644 index 11233791e6..0000000000 --- a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.0.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.15.0", - "description": "sample artifact file that might work", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "requires": { - "compilers/arm/gcc": "2020.10.0", - "compilers/arm/other": "1.2.3" - }, - "windows": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "cmake": "bin/cmake.exe" - }, - "paths": [ - "bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.1.json b/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.1.json deleted file mode 100644 index 6bfac4502c..0000000000 --- a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.15.1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.15.1", - "description": "sample artifact file that might work", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "windows": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "cmake": "bin/cmake.exe" - }, - "paths": [ - "bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.17.0.json b/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.17.0.json deleted file mode 100644 index 0f91782319..0000000000 --- a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.17.0.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.17.0", - "description": "sample artifact file that might work", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "windows": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "cmake": "bin/cmake.exe" - }, - "paths": [ - "bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.19.0.json b/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.19.0.json deleted file mode 100644 index 6b705ea9de..0000000000 --- a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.19.0.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.19.0", - "description": "sample artifact file that might work", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "windows": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "cmake": "bin/cmake.exe" - }, - "paths": [ - "bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.20.0.json b/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.20.0.json deleted file mode 100644 index 357bdc5e43..0000000000 --- a/vcpkg-artifacts/test-resources/repo/tools/kitware/cmake-3.20.0.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.20.0", - "description": "sample artifact file that might work", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "windows": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "not windows": { - "error": "not yet supported" - }, - "exports": { - "tools": { - "cmake": "bin/cmake.exe" - }, - "paths": [ - "bin" - ] - } -} diff --git a/vcpkg-artifacts/test-resources/sample1.json b/vcpkg-artifacts/test-resources/sample1.json deleted file mode 100644 index ac0bd5be70..0000000000 --- a/vcpkg-artifacts/test-resources/sample1.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "info": { - "id": "sample1", - "version": "1.2.3" - }, - "contacts": { - "Garrett Serack": { - "email": "garrett@serack.org", - "role": "developer" - }, - "Bob Smith": { - "email": "bob@smith.com", - "role": [ - "fallguy", - "otherguy" - ] - } - }, - "requires": { - "foo/bar/bin": "~2.0.0", - "bar/bin:baz": "* 1.2.3", - "bar/bin/buz": "~*", - "weird/range": ">= 1.0 <= 2.0 2.0.0", - "nuget/range": "(2.0,3.0] 2.3.4" - }, - "exports": { - "tools": { - "CC": "foo/bar/cl.exe", - "CXX": "bin/baz/cl.exe", - "Whatever": "some/tool/path/foo" - }, - "environment": { - "test": "abc", - "cxxflags": [ - "foo=bar", - "bar=baz" - ] - }, - "paths": { - "bin": [ - "foo/bar/bin/baz", - "foo/bar/bin/waz" - ] - } - }, - "demands": { - "windows and arm": { - "install": { - "nupkg": "floobaloo/1.2.3", - "sha256": "fluffyKittenBunnies" - } - } - } -} diff --git a/vcpkg-artifacts/test-resources/small-file.txt b/vcpkg-artifacts/test-resources/small-file.txt deleted file mode 100644 index c2f590c383..0000000000 --- a/vcpkg-artifacts/test-resources/small-file.txt +++ /dev/null @@ -1,2 +0,0 @@ -this is a small file. - diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/alpha.json b/vcpkg-artifacts/test-resources/topo-sort-registry/alpha.json deleted file mode 100644 index e97fa57f45..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/alpha.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id":"alpha", - "version": "1.0.0", - "requires": { - "bravo": "1.0", - "delta": "1.0", - "echo": "1.0" - } -} diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/bravo.json b/vcpkg-artifacts/test-resources/topo-sort-registry/bravo.json deleted file mode 100644 index 45958a636e..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/bravo.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id":"bravo", - "version": "1.0.0", - "requires": { - "charlie": "1.0" - } -} diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/charlie.json b/vcpkg-artifacts/test-resources/topo-sort-registry/charlie.json deleted file mode 100644 index 8a09488325..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/charlie.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id":"charlie", - "version": "1.0.0", - "requires": { - "delta": "1.0" - } -} diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/delta.json b/vcpkg-artifacts/test-resources/topo-sort-registry/delta.json deleted file mode 100644 index ed91358528..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/delta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id":"delta", - "version": "1.0.0" -} diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/echo.json b/vcpkg-artifacts/test-resources/topo-sort-registry/echo.json deleted file mode 100644 index 1374c433c4..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/echo.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id":"echo", - "version": "1.0.0" -} diff --git a/vcpkg-artifacts/test-resources/topo-sort-registry/foxtrot.json b/vcpkg-artifacts/test-resources/topo-sort-registry/foxtrot.json deleted file mode 100644 index 50fe117a1a..0000000000 --- a/vcpkg-artifacts/test-resources/topo-sort-registry/foxtrot.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id":"foxtrot", - "version": "1.0.0" -} diff --git a/vcpkg-artifacts/test-resources/validation-errors.json b/vcpkg-artifacts/test-resources/validation-errors.json deleted file mode 100644 index 0282707e89..0000000000 --- a/vcpkg-artifacts/test-resources/validation-errors.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "info": { - "nothing": "here" - }, - "goober )": { - "install": "bugger me" - }, - "goober": { - "install": "not correct" - }, - "floopy": "floo", - "windows and target:x64": { - "install": { - "nupkg": "floobaloo/1.2.3" - } - } -} diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/compilers/arm/gcc/gcc-2020.10.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/compilers/arm/gcc/gcc-2020.10.0.json deleted file mode 100644 index 6dbbe5839f..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/compilers/arm/gcc/gcc-2020.10.0.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "info": { - "id": "compilers/arm/gcc", - "version": "2020.10.0", - "description": "The GNU Arm Embedded Toolchain is a ready-to-use, open-source suite of tools for C, C++ and assembly programming. The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.", - "summary": "GCC compiler for ARM CPUs." - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip", - "sha256": "90057B8737B888C53CA5AEE332F1F73C401D6D3873124D2C2906DF4347EBEF9E", - "strip": 1 - }, - "exports": { - "paths": { - "PATH": "bin" - } - } - }, - "linux and arm64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-aarch64-linux.tar.bz2", - "sha256": "343D8C812934FE5A904C73583A91EDD812B1AC20636EB52DE04135BB0F5CF36A", - "strip": 1 - } - }, - "linux and x64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2", - "sha256": "21134CAA478BBF5352E239FBC6E2DA3038F8D2207E089EFC96C3B55F1EDCD618", - "strip": 1 - } - }, - "osx and x64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-mac.tar.bz2", - "sha256": "BED12DE3565D4EB02E7B58BE945376EACA79A8AE3EBB785EC7344E7E2DB0BDC0", - "strip": 1 - } - }, - "not windows": { - "exports": { - "paths": { - "PATH": "bin" - } - } - }, - "linux": { - "warning": "Ensure libncurses5 is installed with your system package manager before running arm-none-eabi-gdb." - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/index.yaml b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/index.yaml deleted file mode 100644 index be59ad5689..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/index.yaml +++ /dev/null @@ -1,130 +0,0 @@ -# MANIFEST-INDEX -items: - [ - compilers/arm/gcc/gcc-2020.10.0.json, tools/arduino/arduino-ide-1.18.15.json, tools/arduino/arduino-cli-0.18.3.json, tools/compuphase/termite-3.4.0.json, tools/kitware/cmake-3.20.1.json, tools/microsoft/openocd-0.11.0-ms1.json, tools/microsoft/openocd-0.11.0.json, tools/ninja-build/ninja-1.10.2.json, tools/raspberrypi/pico-sdk-1.3.0.json - ] -indexes: - IdentityKey/info.id: - keys: - compilers/arm/gcc: [ 0 ] - raspberrypi/pico-sdk: [ 8 ] - tools/arduino/arduino-cli: [ 2 ] - tools/arduino/arduino-ide: [ 1 ] - tools/compuphase/termite: [ 3 ] - tools/kitware/cmake: [ 4 ] - tools/microsoft/openocd: [ 5, 6 ] - tools/ninja-build/ninja: [ 7 ] - words: - arduino: [ 1, 2 ] - arduino-cli: [ 2 ] - arduino-ide: [ 1 ] - arduino/arduino: [ 1, 2 ] - arduino/arduino-cli: [ 2 ] - arduino/arduino-ide: [ 1 ] - arm: [ 0 ] - arm/gcc: [ 0 ] - build: [ 7 ] - build/ninja: [ 7 ] - cli: [ 2 ] - cmake: [ 4 ] - compilers: [ 0 ] - compilers/arm: [ 0 ] - compilers/arm/gcc: [ 0 ] - compuphase: [ 3 ] - compuphase/termite: [ 3 ] - gcc: [ 0 ] - ide: [ 1 ] - kitware: [ 4 ] - kitware/cmake: [ 4 ] - microsoft: [ 5, 6 ] - microsoft/openocd: [ 5, 6 ] - ninja: [ 7 ] - ninja-build: [ 7 ] - ninja-build/ninja: [ 7 ] - openocd: [ 5, 6 ] - pico: [ 8 ] - pico-sdk: [ 8 ] - raspberrypi: [ 8 ] - raspberrypi/pico: [ 8 ] - raspberrypi/pico-sdk: [ 8 ] - sdk: [ 8 ] - termite: [ 3 ] - tools: [ 1, 2, 3, 4, 5, 6, 7 ] - tools/arduino: [ 1, 2 ] - tools/arduino/arduino: [ 1, 2 ] - tools/arduino/arduino-cli: [ 2 ] - tools/arduino/arduino-ide: [ 1 ] - tools/compuphase: [ 3 ] - tools/compuphase/termite: [ 3 ] - tools/kitware: [ 4 ] - tools/kitware/cmake: [ 4 ] - tools/microsoft: [ 5, 6 ] - tools/microsoft/openocd: [ 5, 6 ] - tools/ninja: [ 7 ] - tools/ninja-build: [ 7 ] - tools/ninja-build/ninja: [ 7 ] - SemverKey/info.version: - keys: - 0.11.0-ms1: [ 5 ] - 0.11.0: [ 6 ] - 0.18.3: [ 2 ] - 1.3.0: [ 8 ] - 1.10.2: [ 7 ] - 1.18.15: [ 1 ] - 3.4.0: [ 3 ] - 3.20.1: [ 4 ] - 2020.10.0: [ 0 ] - StringKey/info.summary: - keys: - Arduino IDE: [ 1, 2 ] - Free and open on-chip debugging: [ 5, 6 ] - GCC compiler for ARM CPUs.: [ 0 ] - Kitware's cmake tool: [ 4 ] - Ninja is a small build system with a focus on speed.: [ 7 ] - Termite is an easy to use and easy to configure RS232 terminal.: [ 3 ] - The Raspberry Pi Pico SDK: [ 8 ] - words: - ARM: [ 0 ] - Arduino: [ 1, 2 ] - CPUs: [ 0 ] - CPUs.: [ 0 ] - Free: [ 5, 6 ] - GCC: [ 0 ] - IDE: [ 1, 2 ] - Kitware: [ 4 ] - Kitware's: [ 4 ] - Ninja: [ 7 ] - Pi: [ 8 ] - Pico: [ 8 ] - RS232: [ 3 ] - Raspberry: [ 8 ] - SDK: [ 8 ] - Termite: [ 3 ] - The: [ 8 ] - a: [ 7 ] - an: [ 3 ] - and: [ 3, 5, 6 ] - build: [ 7 ] - chip: [ 5, 6 ] - cmake: [ 4 ] - compiler: [ 0 ] - configure: [ 3 ] - debugging: [ 5, 6 ] - easy: [ 3 ] - focus: [ 7 ] - for: [ 0 ] - is: [ 3, 7 ] - on: [ 5, 6, 7 ] - on-chip: [ 5, 6 ] - open: [ 5, 6 ] - s: [ 4 ] - small: [ 7 ] - speed: [ 7 ] - speed.: [ 7 ] - system: [ 7 ] - terminal: [ 3 ] - terminal.: [ 3 ] - to: [ 3 ] - tool: [ 4 ] - use: [ 3 ] - with: [ 7 ] diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-cli-0.18.3.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-cli-0.18.3.json deleted file mode 100644 index 95d46bf029..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-cli-0.18.3.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "info": { - "id": "tools/arduino/arduino-cli", - "version": "0.18.3", - "description": "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. This software can be used with any Arduino board.", - "summary": "Arduino IDE" - }, - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "Arduino": { - "role": "originator" - } - }, - "demands": { - "windows and x64": { - "install": { - "unzip": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Windows_64bit.zip", - "sha256": "b92ae2923edab07e7d39ac8fdc54500bf5198868522d7acfa5090de970cf9603" - } - }, - "windows and x86": { - "install": { - "unzip": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Windows_32bit.zip", - "sha256": "b8fa3f2c614557decf6ebe6688bc635b9260a220305be139d2368c437d4c3cfa" - } - }, - "windows": { - "exports": { - "tools": { - "arduino-cli": "arduino-cli.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "linux and x86": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_32bit.tar.gz", - "sha256": "fe238a22579905866ed9e6582a0d6078060f29a9de3dbbb47b3931ef9a5f1f08", - "strip": 1 - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_64bit.tar.gz", - "sha256": "80fb4547fb869086769dade348040864ae77b30d13cf6786d384bebccf4eb7eb", - "strip": 1 - } - }, - "linux and arm64": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_ARM64.tar.gz", - "sha256": "13eb5ab0edb9a8f20768e7e0e5b967140f0fac7f84ef4f78c0dae0c8f13cdb73", - "strip": 1 - } - }, - "not windows": { - "exports": { - "tools": { - "arduino-cli": "arduino-cli" - }, - "paths": { - "PATH": "." - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-ide-1.18.15.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-ide-1.18.15.json deleted file mode 100644 index d5bd75a898..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/arduino/arduino-ide-1.18.15.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "info": { - "id": "tools/arduino/arduino-ide", - "version": "1.18.15", - "description": "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. This software can be used with any Arduino board.", - "summary": "Arduino IDE" - }, - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "Arduino": { - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://downloads.arduino.cc/arduino-1.8.15-windows.zip", - "sha256": "C53E7D291EDEBCDB58FFA34AEB53C5B777D814CEA8030297F06116ED0598D139", - "strip": 1 - }, - "exports": { - "tools": { - "arduino": "arduino.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "linux and x86": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linux32.tar.xz", - "sha512": "02a10831c7125144ac6f701528f9d176a1a7ac0df6d9391d31d6758ae8f3dea3f8b8390320c7e7d3efb9ed45fb79527caa798ad354bc8a857c2f9c42f4612a8f", - "strip": 2 - } - }, - "linux and x64": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz", - "sha512": "ae84a8f62cbd3ecf5400a357ac5ebd04cbc80b31a2fbc80f280850465f7460ad3a02b32830021ef980b72c60d52eb65a4fc551988c91d01b25e8d646596175f8", - "strip": 2 - } - }, - "linux and arm64": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linuxaarch64.tar.xz", - "sha512": "22b4e5f3a79723bb09d85107facfe7d367d8a1aa347447e935481823192bd2390bfe0e5e694a5e2ee6addb59ec269a72eb829f8f791fb8641000179884bcfff2", - "strip": 2 - } - }, - "not windows": { - "exports": { - "tools": { - "arduino": "arduino" - }, - "paths": { - "PATH": "." - } - } - } - } -} diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/compuphase/termite-3.4.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/compuphase/termite-3.4.0.json deleted file mode 100644 index 691231b80c..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/compuphase/termite-3.4.0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "info": { - "id": "tools/compuphase/termite", - "version": "3.4.0", - "description": "Termite is an easy to use and easy to configure RS232 terminal. It uses an interface similar to that of \"messenger\" or \"chat\" programs, with a large window that contains all received data and an edit line for typing in strings to transmit.", - "summary": "Termite is an easy to use and easy to configure RS232 terminal." - }, - "contacts": { - "Alan Leung": { - "email": "alleu@microsoft.com", - "role": "publisher" - }, - "CompuPhase": { - "email": "info@compuphase.com", - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://www.compuphase.com/software/termite-3.4.zip", - "sha256": "e72eddaabe1375dc9422d20b359206d242bf0745f47f60ce37d21e9dd905ba51" - }, - "exports": { - "tools": { - "termite": "bin/Termite.exe" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/kitware/cmake-3.20.1.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/kitware/cmake-3.20.1.json deleted file mode 100644 index 7387c6fa31..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/kitware/cmake-3.20.1.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "info": { - "id": "tools/kitware/cmake", - "version": "3.20.1", - "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.", - "summary": "Kitware's cmake tool" - }, - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "demands": { - "windows and x64": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "windows and x86": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-i386.zip", - "sha256": "650026534e66dabe0ed6be3422e86fabce5fa86d43927171ea8b8dfd0877fc9d", - "strip": 1 - } - }, - "windows": { - "exports": { - "tools": { - "cmake": "bin/cmake.exe", - "cmake_gui": "bin/cmake-gui.exe", - "ctest": "bin/ctest.exe" - }, - "paths": { - "PATH": "bin" - } - } - }, - "osx": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-macos-universal.tar.gz", - "sha256": "44143d47fdcc7fc3042576c6a8b661e3b65a18143666f74d6e8d93ca3ab5cd95", - "strip": 3 - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz", - "sha256": "B8C141BD7A6D335600AB0A8A35E75AF79F95B837F736456B5532F4D717F20A09", - "strip": 1 - } - }, - "linux and arm64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-aarch64.tar.gz", - "sha256": "2761a222c14a15b9bdf1bdb4a17c10806757b7ed3bc26a84523f042ec212b76c", - "strip": 1 - } - }, - "not windows": { - "exports": { - "tools": { - "cmake": "bin/cmake", - "cmake_gui": "bin/cmake-gui", - "ctest": "bin/ctest" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0-ms1.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0-ms1.json deleted file mode 100644 index 67e28f1956..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0-ms1.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "info": { - "id": "tools/microsoft/openocd", - "version": "0.11.0-ms1", - "description": "OpenOCD provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support including: (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD programming; debug target support (e.g. ARM, MIPS): single-stepping, breakpoints/watchpoints, gprof profiling, etc; flash chip drivers (e.g. CFI, NAND, internal flash); embedded TCL interpreter for easy scripting. Several network interfaces are available for interacting with OpenOCD: telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a \"remote target\" for source-level debugging of embedded systems using the GNU GDB program (and the others who talk GDB protocol, e.g. IDA Pro). This build of OpenOCD includes additional vendor extensions from Azure Sphere, Raspberry Pi, and STMicroelectronics, plus improved RTOS support.", - "summary": "Free and open on-chip debugging" - }, - "contacts": { - "Ben McMorran": { - "email": "bemcmorr@microsoft.com", - "role": [ - "publisher", - "originator" - ] - }, - "OpenOCD (upstream)": { - "email": "openocd-user@lists.sourceforge.net", - "role": "other" - } - }, - "demands": { - "windows and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0-ms1/openocd-ms-v0.11.0-ms1-i686-w64-mingw32.tar.gz", - "sha256": "dabe82ecc1aa1b1aa6d28216ee74d5702b9147fc74796990e14a7fa5644744a1" - }, - "exports": { - "tools": { - "openocd": "bin/openocd.exe" - }, - "paths": { - "PATH": "bin" - } - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0-ms1/openocd-ms-v0.11.0-ms1-linux.tar.gz", - "sha256": "e70a1405f5ffeb87d9487b49fe40171fe896fbd7d01a51b12cffdfb6d2b0501b", - "strip": 1 - }, - "exports": { - "tools": { - "openocd": "bin/openocd" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0.json deleted file mode 100644 index 6a3defb0f9..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/microsoft/openocd-0.11.0.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "info": { - "id": "tools/microsoft/openocd", - "version": "0.11.0", - "description": "OpenOCD provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support including: (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD programming; debug target support (e.g. ARM, MIPS): single-stepping, breakpoints/watchpoints, gprof profiling, etc; flash chip drivers (e.g. CFI, NAND, internal flash); embedded TCL interpreter for easy scripting. Several network interfaces are available for interacting with OpenOCD: telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a \"remote target\" for source-level debugging of embedded systems using the GNU GDB program (and the others who talk GDB protocol, e.g. IDA Pro). This build of OpenOCD includes additional vendor extensions from Azure Sphere, Raspberry Pi, and STMicroelectronics.", - "summary": "Free and open on-chip debugging" - }, - "contacts": { - "Ben McMorran": { - "email": "bemcmorr@microsoft.com", - "role": [ - "publisher", - "originator" - ] - }, - "OpenOCD (upstream)": { - "email": "openocd-user@lists.sourceforge.net", - "role": "other" - } - }, - "demands": { - "windows and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0/openocd-ms-v0.11.0-i686-w64-mingw32.tar.gz", - "sha256": "f15c1b604f5f138a2731511143dcbbd565fa4dfed8f392abc599acea65177523" - }, - "exports": { - "tools": { - "openocd": "bin/openocd.exe" - }, - "paths": { - "PATH": "./bin" - } - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0/openocd-ms-v0.11.0-linux.tar.gz", - "sha256": "bfa359756d0cad2d3a2fa72a8416d369960732dd25f262397b66048db7a9c570", - "strip": 1 - }, - "exports": { - "tools": { - "openocd": "./bin/openocd" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/ninja-build/ninja-1.10.2.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/ninja-build/ninja-1.10.2.json deleted file mode 100644 index 3ec55b5d5b..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/ninja-build/ninja-1.10.2.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "info": { - "id": "tools/ninja-build/ninja", - "version": "1.10.2", - "description": "Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects, it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible.", - "summary": "Ninja is a small build system with a focus on speed." - }, - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "ninja-build": { - "email": "ninja-build@googlegroups.com", - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip", - "sha256": "bbde850d247d2737c5764c927d1071cbb1f1957dcabda4a130fa8547c12c695f" - }, - "exports": { - "tools": { - "ninja": "ninja.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "osx": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip", - "sha256": "6fa359f491fac7e5185273c6421a000eea6a2f0febf0ac03ac900bd4d80ed2a5" - } - }, - "linux": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip", - "sha256": "763464859c7ef2ea3a0a10f4df40d2025d3bb9438fcb1228404640410c0ec22d" - } - }, - "not windows": { - "exports": { - "tools": { - "ninja": "ninja" - }, - "paths": { - "PATH": "." - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/raspberrypi/pico-sdk-1.3.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/raspberrypi/pico-sdk-1.3.0.json deleted file mode 100644 index 48b485c6db..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855/tools/raspberrypi/pico-sdk-1.3.0.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "info": { - "id": "raspberrypi/pico-sdk", - "version": "1.3.0", - "description": "The Raspberry Pi Pico SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.", - "summary": "The Raspberry Pi Pico SDK" - }, - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - } - }, - "requires": { - "compilers/arm/gcc": "2020.10.0", - "tools/kitware/cmake": "3.20.1" - }, - "install": { - "git": "https://github.com/raspberrypi/pico-sdk/", - "commit": "1.3.0", - "options": [ - "recurse", - "full" - ] - }, - "exports": { - "paths": { - "PICO_SDK_PATH": "./" - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/compilers/arm/gcc/gcc-2020.10.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/compilers/arm/gcc/gcc-2020.10.0.json deleted file mode 100644 index ad16e3ccfa..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/compilers/arm/gcc/gcc-2020.10.0.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id": "compilers/arm/gcc", - "version": "2020.10.0", - "description": "The GNU Arm Embedded Toolchain is a ready-to-use, open-source suite of tools for C, C++ and assembly programming. The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.", - "summary": "GCC compiler for ARM CPUs.", - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip", - "sha256": "90057B8737B888C53CA5AEE332F1F73C401D6D3873124D2C2906DF4347EBEF9E", - "strip": 1 - }, - "exports": { - "paths": { - "PATH": "bin" - } - } - }, - "linux and arm64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-aarch64-linux.tar.bz2", - "sha256": "343D8C812934FE5A904C73583A91EDD812B1AC20636EB52DE04135BB0F5CF36A", - "strip": 1 - } - }, - "linux and x64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2", - "sha256": "21134CAA478BBF5352E239FBC6E2DA3038F8D2207E089EFC96C3B55F1EDCD618", - "strip": 1 - } - }, - "osx and x64": { - "install": { - "untar": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-mac.tar.bz2", - "sha256": "BED12DE3565D4EB02E7B58BE945376EACA79A8AE3EBB785EC7344E7E2DB0BDC0", - "strip": 1 - } - }, - "not windows": { - "exports": { - "paths": { - "PATH": "bin" - } - } - }, - "linux": { - "warning": "Ensure libncurses5 is installed with your system package manager before running arm-none-eabi-gdb." - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/index.yaml b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/index.yaml deleted file mode 100644 index 96a1188eb8..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/index.yaml +++ /dev/null @@ -1,130 +0,0 @@ -# MANIFEST-INDEX -items: - [ - compilers/arm/gcc/gcc-2020.10.0.json, tools/arduino/arduino-cli-0.18.3.json, tools/arduino/arduino-ide-1.18.15.json, tools/compuphase/termite-3.4.0.json, tools/kitware/cmake-3.20.1.json, tools/microsoft/openocd-0.11.0-ms1.json, tools/microsoft/openocd-0.11.0.json, tools/ninja-build/ninja-1.10.2.json, tools/raspberrypi/pico-sdk-1.3.0.json - ] -indexes: - IdentityKey/id: - keys: - compilers/arm/gcc: [ 0 ] - raspberrypi/pico-sdk: [ 8 ] - tools/arduino/arduino-cli: [ 1 ] - tools/arduino/arduino-ide: [ 2 ] - tools/compuphase/termite: [ 3 ] - tools/kitware/cmake: [ 4 ] - tools/microsoft/openocd: [ 5, 6 ] - tools/ninja-build/ninja: [ 7 ] - words: - arduino: [ 1, 2 ] - arduino-cli: [ 1 ] - arduino-ide: [ 2 ] - arduino/arduino: [ 1, 2 ] - arduino/arduino-cli: [ 1 ] - arduino/arduino-ide: [ 2 ] - arm: [ 0 ] - arm/gcc: [ 0 ] - build: [ 7 ] - build/ninja: [ 7 ] - cli: [ 1 ] - cmake: [ 4 ] - compilers: [ 0 ] - compilers/arm: [ 0 ] - compilers/arm/gcc: [ 0 ] - compuphase: [ 3 ] - compuphase/termite: [ 3 ] - gcc: [ 0 ] - ide: [ 2 ] - kitware: [ 4 ] - kitware/cmake: [ 4 ] - microsoft: [ 5, 6 ] - microsoft/openocd: [ 5, 6 ] - ninja: [ 7 ] - ninja-build: [ 7 ] - ninja-build/ninja: [ 7 ] - openocd: [ 5, 6 ] - pico: [ 8 ] - pico-sdk: [ 8 ] - raspberrypi: [ 8 ] - raspberrypi/pico: [ 8 ] - raspberrypi/pico-sdk: [ 8 ] - sdk: [ 8 ] - termite: [ 3 ] - tools: [ 1, 2, 3, 4, 5, 6, 7 ] - tools/arduino: [ 1, 2 ] - tools/arduino/arduino: [ 1, 2 ] - tools/arduino/arduino-cli: [ 1 ] - tools/arduino/arduino-ide: [ 2 ] - tools/compuphase: [ 3 ] - tools/compuphase/termite: [ 3 ] - tools/kitware: [ 4 ] - tools/kitware/cmake: [ 4 ] - tools/microsoft: [ 5, 6 ] - tools/microsoft/openocd: [ 5, 6 ] - tools/ninja: [ 7 ] - tools/ninja-build: [ 7 ] - tools/ninja-build/ninja: [ 7 ] - SemverKey/version: - keys: - 0.11.0-ms1: [ 5 ] - 0.11.0: [ 6 ] - 0.18.3: [ 1 ] - 1.3.0: [ 8 ] - 1.10.2: [ 7 ] - 1.18.15: [ 2 ] - 3.4.0: [ 3 ] - 3.20.1: [ 4 ] - 2020.10.0: [ 0 ] - StringKey/summary: - keys: - Arduino IDE: [ 1, 2 ] - Free and open on-chip debugging: [ 5, 6 ] - GCC compiler for ARM CPUs.: [ 0 ] - Kitware's cmake tool: [ 4 ] - Ninja is a small build system with a focus on speed.: [ 7 ] - Termite is an easy to use and easy to configure RS232 terminal.: [ 3 ] - The Raspberry Pi Pico SDK: [ 8 ] - words: - ARM: [ 0 ] - Arduino: [ 1, 2 ] - CPUs: [ 0 ] - CPUs.: [ 0 ] - Free: [ 5, 6 ] - GCC: [ 0 ] - IDE: [ 1, 2 ] - Kitware: [ 4 ] - Kitware's: [ 4 ] - Ninja: [ 7 ] - Pi: [ 8 ] - Pico: [ 8 ] - RS232: [ 3 ] - Raspberry: [ 8 ] - SDK: [ 8 ] - Termite: [ 3 ] - The: [ 8 ] - a: [ 7 ] - an: [ 3 ] - and: [ 3, 5, 6 ] - build: [ 7 ] - chip: [ 5, 6 ] - cmake: [ 4 ] - compiler: [ 0 ] - configure: [ 3 ] - debugging: [ 5, 6 ] - easy: [ 3 ] - focus: [ 7 ] - for: [ 0 ] - is: [ 3, 7 ] - on: [ 5, 6, 7 ] - on-chip: [ 5, 6 ] - open: [ 5, 6 ] - s: [ 4 ] - small: [ 7 ] - speed: [ 7 ] - speed.: [ 7 ] - system: [ 7 ] - terminal: [ 3 ] - terminal.: [ 3 ] - to: [ 3 ] - tool: [ 4 ] - use: [ 3 ] - with: [ 7 ] diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-cli-0.18.3.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-cli-0.18.3.json deleted file mode 100644 index af21d15b7e..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-cli-0.18.3.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "id": "tools/arduino/arduino-cli", - "version": "0.18.3", - "description": "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. This software can be used with any Arduino board.", - "summary": "Arduino IDE", - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "Arduino": { - "role": "originator" - } - }, - "demands": { - "windows and x64": { - "install": { - "unzip": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Windows_64bit.zip", - "sha256": "b92ae2923edab07e7d39ac8fdc54500bf5198868522d7acfa5090de970cf9603" - } - }, - "windows and x86": { - "install": { - "unzip": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Windows_32bit.zip", - "sha256": "b8fa3f2c614557decf6ebe6688bc635b9260a220305be139d2368c437d4c3cfa" - } - }, - "windows": { - "exports": { - "tools": { - "arduino-cli": "arduino-cli.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "linux and x86": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_32bit.tar.gz", - "sha256": "fe238a22579905866ed9e6582a0d6078060f29a9de3dbbb47b3931ef9a5f1f08", - "strip": 1 - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_64bit.tar.gz", - "sha256": "80fb4547fb869086769dade348040864ae77b30d13cf6786d384bebccf4eb7eb", - "strip": 1 - } - }, - "linux and arm64": { - "install": { - "untar": "https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_ARM64.tar.gz", - "sha256": "13eb5ab0edb9a8f20768e7e0e5b967140f0fac7f84ef4f78c0dae0c8f13cdb73", - "strip": 1 - } - }, - "not windows": { - "exports": { - "tools": { - "arduino-cli": "arduino-cli" - }, - "paths": { - "PATH": "." - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-ide-1.18.15.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-ide-1.18.15.json deleted file mode 100644 index cea20f42f0..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/arduino/arduino-ide-1.18.15.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "tools/arduino/arduino-ide", - "version": "1.18.15", - "description": "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. This software can be used with any Arduino board.", - "summary": "Arduino IDE", - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "Arduino": { - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://downloads.arduino.cc/arduino-1.8.15-windows.zip", - "sha256": "C53E7D291EDEBCDB58FFA34AEB53C5B777D814CEA8030297F06116ED0598D139", - "strip": 1 - }, - "exports": { - "tools": { - "arduino": "arduino.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "linux and x86": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linux32.tar.xz", - "sha512": "02a10831c7125144ac6f701528f9d176a1a7ac0df6d9391d31d6758ae8f3dea3f8b8390320c7e7d3efb9ed45fb79527caa798ad354bc8a857c2f9c42f4612a8f", - "strip": 2 - } - }, - "linux and x64": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz", - "sha512": "ae84a8f62cbd3ecf5400a357ac5ebd04cbc80b31a2fbc80f280850465f7460ad3a02b32830021ef980b72c60d52eb65a4fc551988c91d01b25e8d646596175f8", - "strip": 2 - } - }, - "linux and arm64": { - "install": { - "untar": "https://downloads.arduino.cc/arduino-1.8.15-linuxaarch64.tar.xz", - "sha512": "22b4e5f3a79723bb09d85107facfe7d367d8a1aa347447e935481823192bd2390bfe0e5e694a5e2ee6addb59ec269a72eb829f8f791fb8641000179884bcfff2", - "strip": 2 - } - }, - "not windows": { - "exports": { - "tools": { - "arduino": "arduino" - }, - "paths": { - "PATH": "." - } - } - } - } -} diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/compuphase/termite-3.4.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/compuphase/termite-3.4.0.json deleted file mode 100644 index dbb23fa768..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/compuphase/termite-3.4.0.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "id": "tools/compuphase/termite", - "version": "3.4.0", - "description": "Termite is an easy to use and easy to configure RS232 terminal. It uses an interface similar to that of \"messenger\" or \"chat\" programs, with a large window that contains all received data and an edit line for typing in strings to transmit.", - "summary": "Termite is an easy to use and easy to configure RS232 terminal.", - "contacts": { - "Alan Leung": { - "email": "alleu@microsoft.com", - "role": "publisher" - }, - "CompuPhase": { - "email": "info@compuphase.com", - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://www.compuphase.com/software/termite-3.4.zip", - "sha256": "e72eddaabe1375dc9422d20b359206d242bf0745f47f60ce37d21e9dd905ba51" - }, - "exports": { - "tools": { - "termite": "bin/Termite.exe" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/kitware/cmake-3.20.1.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/kitware/cmake-3.20.1.json deleted file mode 100644 index 72ae6fc2ce..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/kitware/cmake-3.20.1.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "id": "tools/kitware/cmake", - "version": "3.20.1", - "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.", - "summary": "Kitware's cmake tool", - "contacts": { - "Garrett Serack": { - "email": "garretts@microsoft.com", - "role": "publisher" - }, - "Kitware": { - "email": "kitware@kitware.com", - "role": "originator" - } - }, - "demands": { - "windows and x64": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.zip", - "sha256": "056378cb599353479c3a8aa2654454b8a3eaa3c8c0872928ba7e09c3ec50774c", - "strip": 1 - } - }, - "windows and x86": { - "install": { - "unzip": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-i386.zip", - "sha256": "650026534e66dabe0ed6be3422e86fabce5fa86d43927171ea8b8dfd0877fc9d", - "strip": 1 - } - }, - "windows": { - "exports": { - "tools": { - "cmake": "bin/cmake.exe", - "cmake_gui": "bin/cmake-gui.exe", - "ctest": "bin/ctest.exe" - }, - "paths": { - "PATH": "bin" - } - } - }, - "osx": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-macos-universal.tar.gz", - "sha256": "44143d47fdcc7fc3042576c6a8b661e3b65a18143666f74d6e8d93ca3ab5cd95", - "strip": 3 - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz", - "sha256": "B8C141BD7A6D335600AB0A8A35E75AF79F95B837F736456B5532F4D717F20A09", - "strip": 1 - } - }, - "linux and arm64": { - "install": { - "untar": "https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-aarch64.tar.gz", - "sha256": "2761a222c14a15b9bdf1bdb4a17c10806757b7ed3bc26a84523f042ec212b76c", - "strip": 1 - } - }, - "not windows": { - "exports": { - "tools": { - "cmake": "bin/cmake", - "cmake_gui": "bin/cmake-gui", - "ctest": "bin/ctest" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0-ms1.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0-ms1.json deleted file mode 100644 index f6d49b9260..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0-ms1.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id": "tools/microsoft/openocd", - "version": "0.11.0-ms1", - "description": "OpenOCD provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support including: (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD programming; debug target support (e.g. ARM, MIPS): single-stepping, breakpoints/watchpoints, gprof profiling, etc; flash chip drivers (e.g. CFI, NAND, internal flash); embedded TCL interpreter for easy scripting. Several network interfaces are available for interacting with OpenOCD: telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a \"remote target\" for source-level debugging of embedded systems using the GNU GDB program (and the others who talk GDB protocol, e.g. IDA Pro). This build of OpenOCD includes additional vendor extensions from Azure Sphere, Raspberry Pi, and STMicroelectronics, plus improved RTOS support.", - "summary": "Free and open on-chip debugging", - "contacts": { - "Ben McMorran": { - "email": "bemcmorr@microsoft.com", - "role": [ - "publisher", - "originator" - ] - }, - "OpenOCD (upstream)": { - "email": "openocd-user@lists.sourceforge.net", - "role": "other" - } - }, - "demands": { - "windows and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0-ms1/openocd-ms-v0.11.0-ms1-i686-w64-mingw32.tar.gz", - "sha256": "dabe82ecc1aa1b1aa6d28216ee74d5702b9147fc74796990e14a7fa5644744a1" - }, - "exports": { - "tools": { - "openocd": "bin/openocd.exe" - }, - "paths": { - "PATH": "bin" - } - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0-ms1/openocd-ms-v0.11.0-ms1-linux.tar.gz", - "sha256": "e70a1405f5ffeb87d9487b49fe40171fe896fbd7d01a51b12cffdfb6d2b0501b", - "strip": 1 - }, - "exports": { - "tools": { - "openocd": "bin/openocd" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0.json deleted file mode 100644 index 55b7f3c4e9..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/microsoft/openocd-0.11.0.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id": "tools/microsoft/openocd", - "version": "0.11.0", - "description": "OpenOCD provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support including: (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD programming; debug target support (e.g. ARM, MIPS): single-stepping, breakpoints/watchpoints, gprof profiling, etc; flash chip drivers (e.g. CFI, NAND, internal flash); embedded TCL interpreter for easy scripting. Several network interfaces are available for interacting with OpenOCD: telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a \"remote target\" for source-level debugging of embedded systems using the GNU GDB program (and the others who talk GDB protocol, e.g. IDA Pro). This build of OpenOCD includes additional vendor extensions from Azure Sphere, Raspberry Pi, and STMicroelectronics.", - "summary": "Free and open on-chip debugging", - "contacts": { - "Ben McMorran": { - "email": "bemcmorr@microsoft.com", - "role": [ - "publisher", - "originator" - ] - }, - "OpenOCD (upstream)": { - "email": "openocd-user@lists.sourceforge.net", - "role": "other" - } - }, - "demands": { - "windows and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0/openocd-ms-v0.11.0-i686-w64-mingw32.tar.gz", - "sha256": "f15c1b604f5f138a2731511143dcbbd565fa4dfed8f392abc599acea65177523" - }, - "exports": { - "tools": { - "openocd": "bin/openocd.exe" - }, - "paths": { - "PATH": "./bin" - } - } - }, - "linux and x64": { - "install": { - "untar": "https://github.com/microsoft/openocd/releases/download/ms-v0.11.0/openocd-ms-v0.11.0-linux.tar.gz", - "sha256": "bfa359756d0cad2d3a2fa72a8416d369960732dd25f262397b66048db7a9c570", - "strip": 1 - }, - "exports": { - "tools": { - "openocd": "./bin/openocd" - }, - "paths": { - "PATH": "bin" - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/ninja-build/ninja-1.10.2.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/ninja-build/ninja-1.10.2.json deleted file mode 100644 index 120191b62a..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/ninja-build/ninja-1.10.2.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "id": "tools/ninja-build/ninja", - "version": "1.10.2", - "description": "Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects, it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible.", - "summary": "Ninja is a small build system with a focus on speed.", - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - }, - "ninja-build": { - "email": "ninja-build@googlegroups.com", - "role": "originator" - } - }, - "demands": { - "windows": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip", - "sha256": "bbde850d247d2737c5764c927d1071cbb1f1957dcabda4a130fa8547c12c695f" - }, - "exports": { - "tools": { - "ninja": "ninja.exe" - }, - "paths": { - "PATH": "." - } - } - }, - "osx": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip", - "sha256": "6fa359f491fac7e5185273c6421a000eea6a2f0febf0ac03ac900bd4d80ed2a5" - } - }, - "linux": { - "install": { - "unzip": "https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip", - "sha256": "763464859c7ef2ea3a0a10f4df40d2025d3bb9438fcb1228404640410c0ec22d" - } - }, - "not windows": { - "exports": { - "tools": { - "ninja": "ninja" - }, - "paths": { - "PATH": "." - } - } - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/raspberrypi/pico-sdk-1.3.0.json b/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/raspberrypi/pico-sdk-1.3.0.json deleted file mode 100644 index 7cec7ff597..0000000000 --- a/vcpkg-artifacts/test-resources/vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30/tools/raspberrypi/pico-sdk-1.3.0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "id": "raspberrypi/pico-sdk", - "version": "1.3.0", - "description": "The Raspberry Pi Pico SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.", - "summary": "The Raspberry Pi Pico SDK", - "contacts": { - "Marc Goodner": { - "email": "mgoodner@microsoft.com", - "role": "publisher" - } - }, - "requires": { - "compilers/arm/gcc": "2020.10.0", - "tools/kitware/cmake": "3.20.1" - }, - "install": { - "git": "https://github.com/raspberrypi/pico-sdk/", - "commit": "1.3.0", - "options": [ - "recurse", - "full" - ] - }, - "exports": { - "paths": { - "PICO_SDK_PATH": "./" - } - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/test/core/SuiteLocal.ts b/vcpkg-artifacts/test/core/SuiteLocal.ts deleted file mode 100644 index 40827dd594..0000000000 --- a/vcpkg-artifacts/test/core/SuiteLocal.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { statSync } from 'fs'; -import { rm } from 'fs/promises'; -import { join, resolve } from 'path'; -import { LocalFileSystem } from '../../fs/local-filesystem'; -import { Session } from '../../session'; -import { Uri } from '../../util/uri'; -import { uniqueTempFolder } from './uniqueTempFolder'; - -// eslint-disable-next-line @typescript-eslint/no-require-imports -require('../../exports'); - -function resourcesFolder(from = __dirname): string { - for (;;) { - try { - const resources = join(from, 'test-resources'); - const s = statSync(resources); - s.isDirectory(); - return resources; - } - catch { - // shh! - } - - const up = resolve(from, '..'); - strict.notEqual(up, from, 'O_o unable to find root folder'); - from = up; - } -} - -export class SuiteLocal { - readonly tempFolder = uniqueTempFolder(); - readonly session: Session; - readonly fs: LocalFileSystem; - readonly resourcesFolder = resourcesFolder(); - readonly tempFolderUri: Uri; - readonly resourcesFolderUri: Uri; - - constructor() { - this.tempFolder = uniqueTempFolder(); - this.session = new Session(this.tempFolder, {}, { - vcpkgCommand: undefined, - homeFolder: join(this.tempFolder, 'vcpkg_root'), - vcpkgArtifactsRoot: join(this.tempFolder, 'artifacts'), - vcpkgDownloads: join(this.tempFolder, 'downloads'), - vcpkgRegistriesCache: join(this.tempFolder, 'registries'), - }); - - this.fs = new LocalFileSystem(this.session); - this.tempFolderUri = this.fs.file(this.tempFolder); - this.resourcesFolderUri = this.fs.file(this.resourcesFolder); - // set the debug=1 in the environment to have the debug messages dumped during testing - if (process.env['DEBUG'] || process.env['debug']) { - this.session.channels.on('debug', (text, msec) => { - SuiteLocal.log(`[${msec}msec] ${text}`); - }); - } - } - - async after() { - await rm(this.tempFolder, { recursive: true }); - } - static log(args: any) { - console['log'](args); - } -} diff --git a/vcpkg-artifacts/test/core/amf-tests.ts b/vcpkg-artifacts/test/core/amf-tests.ts deleted file mode 100644 index e3cb08e53a..0000000000 --- a/vcpkg-artifacts/test/core/amf-tests.ts +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { readFile } from 'fs/promises'; -import { join } from 'path'; -import { MetadataFile } from '../../amf/metadata-file'; -import { strictSequenceEqual } from '../sequence-equal'; -import { SuiteLocal } from './SuiteLocal'; - -// sample test using decorators. -describe('Amf', () => { - const local = new SuiteLocal(); - - after(local.after.bind(local)); - - it('readProfile', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'sample1.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./sample1.json', content, local.session); - - strict.ok(doc.isFormatValid); - strictSequenceEqual(doc.validate(), []); - - strict.equal(doc.id, 'sample1', 'name incorrect'); - strict.equal(doc.version, '1.2.3', 'version incorrect'); - }); - - it('reads file with nupkg', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'repo', 'sdks', 'microsoft', 'windows.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./windows.json', content, local.session); - - strict.ok(doc.isFormatValid); - strictSequenceEqual(doc.validate(), []); - }); - - it('load/persist an artifact', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'example-artifact.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./example-artifact.json', content, local.session); - - strict.ok(doc.isFormatValid); - strictSequenceEqual(doc.validate(), []); - }); - - it('profile checks', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'sample1.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./sample1.json', content, local.session); - - strict.ok(doc.isFormatValid, 'Ensure that it is valid json'); - strictSequenceEqual(doc.validate(), []); - - strictSequenceEqual(doc.contacts.get('Bob Smith')!.roles, ['fallguy', 'otherguy'], 'Should return the two roles'); - doc.contacts.get('Bob Smith')!.roles.delete('fallguy'); - - strictSequenceEqual(doc.contacts.get('Bob Smith')!.roles, ['otherguy'], 'Should return the remaining role'); - - doc.contacts.get('Bob Smith')!.roles.add('the dude'); - - doc.contacts.get('Bob Smith')!.roles.add('the dude'); // shouldn't add this one - - strictSequenceEqual(doc.contacts.get('Bob Smith')!.roles, ['otherguy', 'the dude'], 'Should return only two roles'); - - const k = doc.contacts.add('James Brown'); - - k.email = 'jim@contoso.net'; - - strict.equal(doc.contacts.keys.length, 3, 'Should have 3 contacts'); - - doc.contacts.delete('James Brown'); - - - strict.equal(doc.contacts.keys.length, 2, 'Should have 2 contacts'); - - doc.contacts.delete('James Brown'); // this is ok. - - // version can be coerced to be a string (via tostring) - strict.equal(doc.requires.get('foo/bar/bin')?.raw == '~2.0.0', true, 'Version must match'); - - // can we get the normalized range? - strict.equal(doc.requires.get('foo/bar/bin')!.range.range, '>=2.0.0 <2.1.0-0', 'The canonical ranges should match'); - - // no resolved version means undefined. - strict.equal(doc.requires.get('foo/bar/bin')!.resolved, undefined, 'Version must match'); - - // the setter is actually smart enough, but typescript does not allow heterogeneous accessors (yet! https://github.com/microsoft/TypeScript/issues/2521) - doc.requires.set('just/a/version', '1.2.3'); - strict.equal(doc.requires.get('just/a/version')!.raw, '1.2.3', 'Should be a static version range'); - - // set it with a struct - doc.requires.set('range/with/resolved', { range: '1.*', resolved: '1.0.0' }); - strict.equal(doc.requires.get('range/with/resolved')!.raw, '1.* 1.0.0'); - - strict.equal(doc.exports.tools.get('CC'), 'foo/bar/cl.exe', 'should have a value'); - strict.equal(doc.exports.tools.get('CXX'), 'bin/baz/cl.exe', 'should have a value'); - strict.equal(doc.exports.tools.get('Whatever'), 'some/tool/path/foo', 'should have a value'); - - doc.exports.tools.delete('CXX'); - strict.equal(doc.exports.tools.keys.length, 2, 'should only have two tools now'); - - strictSequenceEqual(doc.exports.environment.get('test'), ['abc'], 'variables should be an array'); - strictSequenceEqual(doc.exports.environment.get('cxxflags'), ['foo=bar', 'bar=baz'], 'variables should be an array'); - - doc.exports.environment.add('test').add('another value'); - strictSequenceEqual(doc.exports.environment.get('test'), ['abc', 'another value'], 'variables should be an array of two items now'); - - doc.exports.paths.add('bin').add('hello/there'); - strict.deepEqual(doc.exports.paths.get('bin')?.length, 3, 'there should be three paths in bin now'); - - strictSequenceEqual(doc.conditionalDemands.keys, ['windows and arm'], 'should have one conditional demand'); - }); - - it('read invalid json file', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'errors.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./errors.json', content, local.session); - - strict.equal(doc.isFormatValid, false, 'this document should have errors'); - strict.equal(doc.formatErrors.length, 2, 'This document should have two error'); - - strict.equal(doc.id, 'bob', 'name incorrect'); - strict.equal(doc.version, '1.0.2', 'version incorrect'); - }); - - it('read empty json file', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'empty.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./empty.json', content, local.session); - - strict.ok(doc.isFormatValid); - - const validationErrors = Array.from(doc.validate(), (error) => doc.formatVMessage(error)); - strictSequenceEqual(validationErrors, [ - './empty.json:1:1 FieldMissing, Missing identity \'id\'', - './empty.json:1:1 FieldMissing, Missing version \'version\'' - ]); - const [firstError] = doc.validate(); - strict.equal(doc.formatVMessage(firstError), './empty.json:1:1 FieldMissing, Missing identity \'id\'', 'Should have an error about id'); - }); - - it('validation errors', async () => { - const content = await (await readFile(join(local.resourcesFolder, 'validation-errors.json'))).toString('utf-8'); - const doc = await MetadataFile.parseConfiguration('./validation-errors.json', content, local.session); - - strict.ok(doc.isFormatValid); - - const validationErrors = Array.from(doc.validate(), (error) => doc.formatVMessage(error)); - strictSequenceEqual(validationErrors,[ - './validation-errors.json:5:15 InvalidChild, Unexpected \'goober )\' found in $', - './validation-errors.json:8:13 InvalidChild, Unexpected \'goober\' found in $', - './validation-errors.json:11:13 InvalidChild, Unexpected \'floopy\' found in $', - './validation-errors.json:12:29 InvalidChild, Unexpected \'windows and target:x64\' found in $', - './validation-errors.json:3:16 InvalidChild, Unexpected \'nothing\' found in $.info', - './validation-errors.json:2:11 FieldMissing, Missing identity \'info.id\'', - './validation-errors.json:2:11 FieldMissing, Missing version \'info.version\'' - ]); - }); -}); diff --git a/vcpkg-artifacts/test/core/dependency-resolver-tests.ts b/vcpkg-artifacts/test/core/dependency-resolver-tests.ts deleted file mode 100644 index 281163c20f..0000000000 --- a/vcpkg-artifacts/test/core/dependency-resolver-tests.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { selectArtifacts } from '../../cli/artifacts'; -import { RegistryDatabase, RegistryResolver } from '../../registries/registries'; -import { strict } from 'assert'; -import { SuiteLocal } from './SuiteLocal'; - -describe('Dependency resolver', () => { - const local = new SuiteLocal(); - - after(local.after.bind(local)); - - it('Topologically sorts', async () => { - const db = new RegistryDatabase(); - const localRegistryUri = local.resourcesFolderUri.join('topo-sort-registry'); - const localRegistryStr = localRegistryUri.toString(); - await db.loadRegistry(local.session, localRegistryUri); - const registryContext = new RegistryResolver(db); - registryContext.add(localRegistryUri, 'topo'); - - const resolved = await selectArtifacts(local.session, new Map([['alpha', '*'], ['foxtrot', '1.0.0'], ['delta', '1.0']]), registryContext, 2); - strict.ok(resolved); - // beta and echo being transposed would also be a correct order. - // alpha and foxtrot being transposed would also be a correct order. - strict.deepStrictEqual(resolved.map(a => [a.uniqueId, a.initialSelection, a.depth, a.requestedVersion]), [ - [localRegistryStr + '::delta::1.0.0', true, 4, '1.0'], - [localRegistryStr + '::charlie::1.0.0', false, 3, undefined], - [localRegistryStr + '::bravo::1.0.0', false, 2, undefined], - [localRegistryStr + '::echo::1.0.0', false, 2, undefined], - [localRegistryStr + '::alpha::1.0.0', true, 1, '*'], - [localRegistryStr + '::foxtrot::1.0.0', true, 1, '1.0.0'] - ]); - }); -}); diff --git a/vcpkg-artifacts/test/core/index-tests.ts b/vcpkg-artifacts/test/core/index-tests.ts deleted file mode 100644 index 5a62d92828..0000000000 --- a/vcpkg-artifacts/test/core/index-tests.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -import { describe, it } from 'mocha'; -import { SemVer } from 'semver'; -import { Index, IndexSchema, SemverKey, StringKey } from '../../registries/indexer'; -import { strictSequenceEqual } from '../sequence-equal'; - -interface TestData { - id: string, - version: SemVer; - summary?: string; - description?: string; - contacts?: Record; - }> -} - - -/** An Index implementation for TestData */ -class MyIndex extends IndexSchema { - id = new StringKey(this, (i) => i.id, 'StringKey/info.id'); - version = new SemverKey(this, (i) => new SemVer(i.version), 'SemverKey/info.version'); - description = new StringKey(this, (i) => i.description, 'StringKey/info.description'); -} - -// sample test using decorators. -describe('Index Tests', () => { - it('Create index from some data', () => { - const index = new Index(MyIndex); - - index.insert({ - id: 'bob', - version: new SemVer('1.2.3') - }, 'foo/bob'); - - index.insert({ - id: 'wham/blam/sam', - version: new SemVer('0.0.4'), - description: 'this is a test' - }, 'other/sam'); - - index.insert({ - id: 'tom', - version: new SemVer('2.3.4'), - contacts: { - 'bob Smith': { - email: 'garrett@contoso.org' - }, - 'rob Smith': { - email: 'tarrett@contoso.org' - }, - } - }, 'foo/tom'); - - index.insert({ - id: 'sam/blam/bam', - version: new SemVer('0.3.1'), - description: 'this is a test' - }, 'sam/blam/bam'); - - const data = index.serialize(); - const index2 = new Index(MyIndex); - index2.deserialize(data); - const results2 = index.where. - version.greaterThan(new SemVer('0.3.0')). - items; - strictSequenceEqual(results2, [ 'sam/blam/bam', 'foo/bob', 'foo/tom' ]); - }); -}); diff --git a/vcpkg-artifacts/test/core/linq-tests.ts b/vcpkg-artifacts/test/core/linq-tests.ts deleted file mode 100644 index 506cbbc3a4..0000000000 --- a/vcpkg-artifacts/test/core/linq-tests.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import * as assert from 'assert'; -import { linq } from '../../util/linq'; - -const anArray = ['A', 'B', 'C', 'D', 'E']; - -describe('Linq', () => { - it('distinct', async () => { - - const items = ['one', 'two', 'two', 'three']; - const distinctArray = linq.values(items).distinct().toArray(); - assert.deepStrictEqual(distinctArray, ['one', 'two', 'three']); - - const dic = { - happy: 'hello', - sad: 'hello', - more: 'name', - maybe: 'foo', - }; - - const distinctDictionaryValues = linq.values(dic).distinct().toArray(); - assert.deepStrictEqual(distinctDictionaryValues, ['hello', 'name', 'foo']); - }); - - it('iterating through collections', async () => { - // items are items. - assert.strictEqual([...linq.values(anArray)].join(','), anArray.join(',')); - assert.strictEqual(linq.values(anArray).count(), 5); - }); -}); diff --git a/vcpkg-artifacts/test/core/local-file-system-tests.ts b/vcpkg-artifacts/test/core/local-file-system-tests.ts deleted file mode 100644 index 5a5eb589c7..0000000000 --- a/vcpkg-artifacts/test/core/local-file-system-tests.ts +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { pipeline as origPipeline, Writable } from 'stream'; -import { promisify } from 'util'; -import { FileType } from '../../fs/filesystem'; -import { hash } from '../../util/hash'; -import { SuiteLocal } from './SuiteLocal'; - -const pipeline = promisify(origPipeline); - -function writeAsync(writable: Writable, chunk: Buffer): Promise { - return new Promise((resolve, reject) => { - if (writable.write(chunk, (error: Error | null | undefined) => { - // callback gave us an error. - if (error) { - reject(error); - } - })) { - // returned true, we're good to go. - resolve(); - } else { - // returned false - // we were told to wait for it to drain. - writable.once('drain', resolve); - writable.once('error', reject); - } - }); -} - -describe('LocalFileSystemTests', () => { - const local = new SuiteLocal(); - const fs = local.fs; - - after(local.after.bind(local)); - it('create/delete folder', async () => { - - const tmp = local.tempFolderUri; - - // create a path to a folder - const someFolder = tmp.join('someFolder'); - - // create the directory - await fs.createDirectory(someFolder); - - // is there a directory there? - strict.ok(await fs.isDirectory(someFolder), `the directory ${someFolder.fsPath} should exist`); - - // delete it - await fs.delete(someFolder, { recursive: true }); - - // make sure it's gone! - strict.ok(!(await fs.isDirectory(someFolder)), `the directory ${someFolder.fsPath} should not exist`); - - }); - - it('create/read file', async () => { - const tmp = local.tempFolderUri; - - const file = tmp.join('hello.txt'); - const expectedText = 'hello world'; - const expectedBuffer = Buffer.from(expectedText, 'utf8'); - - await fs.writeFile(file, expectedBuffer); - - // is there a file there? - strict.ok(await fs.isFile(file), `the file ${file.fsPath} is not present`); - - // read it back - const actualBuffer = await fs.readFile(file); - strict.deepEqual(expectedBuffer, actualBuffer, 'contents should be the same'); - const actualText = actualBuffer.toString(); - strict.equal(expectedText, actualText, 'text should be equal too'); - - }); - - it('readDirectory', async () => { - const thisFolder = fs.file(__dirname); - - // look in the current folder - const files = await fs.readDirectory(thisFolder); - - // find this file - const found = files.find(each => each[0].fsPath.indexOf('local-file-system') > -1); - - // should be a file, right? - strict.ok(found?.[1] && FileType.File, `${__filename} should be a path`); - - }); - - it('read/write stream', async () => { - const tmp = local.tempFolderUri; - - const thisFile = fs.file(__filename); - const outputFile = tmp.join('output.txt'); - - const outStream = await fs.writeStream(outputFile); - const outStreamDone = new Promise((resolve, reject) => { - outStream.once('close', resolve); - outStream.once('error', reject); - }); - - let text = ''; - // you can iterate thru a stream with 'for await' without casting because I forced the return type to be AsnycIterable - for await (const chunk of await fs.readStream(thisFile)) { - text += chunk.toString('utf8'); - await writeAsync(outStream, chunk); - } - // close the stream once we're done. - outStream.end(); - - await outStreamDone; - - strict.equal((await fs.stat(outputFile)).size, (await fs.stat(thisFile)).size, 'outputFile should be the same length as the input file'); - strict.equal((await fs.stat(thisFile)).size, text.length, 'buffer should be the same size as the input file'); - }); - - it('calculate hashes', async () => { - const path = local.resourcesFolderUri.join('small-file.txt'); - - strict.equal(await hash(await fs.readStream(path), path, 0, 'sha256', {}), '9cfed8b9e45f47e735098c399fb523755e4e993ac64d81171c93efbb523a57e6', 'hash should match'); - strict.equal(await hash(await fs.readStream(path), path, 0, 'sha384', {}), '8168d029154548a4e1dd5212b722b03d6220f212f8974f6bd45e71715b13945e343c9d1097f8e393db22c8a07d8cf6f6', 'hash should match'); - strict.equal(await hash(await fs.readStream(path), path, 0, 'sha512', {}), '1bacd5dd190731b5c3d2a2ad61142b4054137d6adff5fb085543dcdede77e4a1446225ca31b2f4699b0cda4534e91ea372cf8d73816df3577e38700c299eab5e', 'hash should match'); - }); - - it('reads blocks via open', async () => { - const file = local.resourcesFolderUri.join('small-file.txt'); - const handle = await file.openFile(); - let bytesRead = 0; - for await (const chunk of handle.readStream(0, 3)) { - bytesRead += chunk.length; - strict.equal(chunk.length, 4, 'chunk should be 4 bytes long'); - strict.equal(chunk.toString('utf-8'), 'this', 'chunk should be a word'); - } - strict.equal(bytesRead, 4, 'Stream should read some bytes'); - - bytesRead = 0; - // should be able to read that same chunk again. - for await (const chunk of handle.readStream(0, 3)) { - bytesRead += chunk.length; - strict.equal(chunk.length, 4, 'chunk should be 4 bytes long'); - strict.equal(chunk.toString('utf-8'), 'this', 'chunk should be a word'); - } - strict.equal(bytesRead, 4, 'Stream should read some bytes'); - - bytesRead = 0; - for await (const chunk of handle.readStream()) { - bytesRead += chunk.length; - strict.equal(chunk.byteLength, 23, 'chunk should be 23 bytes long'); - strict.equal(chunk.toString('utf-8'), 'this is a small file.\n\n', 'File contents should equal known result'); - } - strict.equal(bytesRead, 23, 'Stream should read some bytes'); - - await handle.close(); - - - }); - it('reads blocks via open in a large file', async () => { - const file = local.resourcesFolderUri.join('large-file.txt'); - const handle = await file.openFile(); - let bytesRead = 0; - for await (const chunk of handle.readStream()) { - if (bytesRead === 0) { - strict.equal(chunk.length, 32768, 'first chunk should be 32768 bytes long'); - } - else { - strict.equal(chunk.length, 4134, 'second chunk should be 4134 bytes long'); - } - bytesRead += chunk.length; - } - strict.equal(bytesRead, 36902, 'Stream should read some bytes'); - - await handle.close(); - }); - - it('read/write stream with pipe ', async () => { - const tmp = local.tempFolderUri; - - const thisFile = fs.file(__filename); - const thisFileText = (await fs.readFile(thisFile)).toString(); - const outputFile = tmp.join('output2.txt'); - - const inputStream = await fs.readStream(thisFile); - const outStream = await fs.writeStream(outputFile); - await pipeline(inputStream, outStream); - - strict.ok(fs.isFile(outputFile), `there should be a file at ${outputFile.fsPath}`); - - const outFileText = (await fs.readFile(outputFile)).toString(); - strict.equal(outFileText, thisFileText); - - // this will throw if it fails. - await fs.delete(outputFile); - - // make sure it's gone! - strict.ok(!(await fs.isFile(outputFile)), `the file ${outputFile.fsPath} should not exist`); - }); - - it('can copy files', async () => { - // now copy the files from the test folder - const files = await local.fs.copy(local.resourcesFolderUri.join('vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855'), local.tempFolderUri.join('copy-test-target')); - strict.ok(files == 10, `There should be at exactly 10 files copied. Copied ${files}`); - }); -}); diff --git a/vcpkg-artifacts/test/core/media-query-tests.ts b/vcpkg-artifacts/test/core/media-query-tests.ts deleted file mode 100644 index 492a0c0a32..0000000000 --- a/vcpkg-artifacts/test/core/media-query-tests.ts +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { parseQuery } from '../../mediaquery/media-query'; -import { strictSequenceEqual } from '../sequence-equal'; - -describe('MediaQuery', () => { - it('windows', async () => { - const queryList = parseQuery('windows'); - strict.equal(queryList.length, 1, 'should be just one query'); - strict.equal(queryList.queries[0].expressions.length, 1, 'should be just one expression'); - strict.equal(queryList.queries[0].expressions[0].feature, 'windows'); - }); - - it('windows and arm', async () => { - const queryList = parseQuery('windows and arm'); - strict.equal(queryList.length, 1, 'should be just one query'); - strict.equal(queryList.queries[0].expressions.length, 2, 'should be two expressions'); - strictSequenceEqual(queryList.queries[0].expressions.map(each => each.feature), ['windows', 'arm']); - }); - - it('target:x64', async () => { - const queryList = parseQuery('target:x64'); - strict.equal(queryList.length, 1, 'should be just one query'); - strict.equal(queryList.queries[0].expressions.length, 1, 'should be one expression'); - strict.equal(queryList.queries[0].expressions[0].feature, 'target', `feature should say target (got ${queryList.queries[0].expressions[0].feature})`); - strict.equal(queryList.queries[0].expressions[0].constant, 'x64', 'constant should say x64'); - }); - - it('just test the parser for good queries', async () => { - parseQuery('foo and bar'); - parseQuery('foo and (bar)'); - parseQuery('foo and (bar:100)'); - parseQuery('foo and (bar:"hello")'); - parseQuery('foo and (bar:"hello") and buzz'); - parseQuery('not foo and not bar'); - }); - - it('test for known bad query strings', async () => { - - strict.equal(parseQuery('!').error?.message, 'Expected expression, found "!"'); - strict.equal(parseQuery('foo and !').error?.message, 'Expected expression, found "!"'); - strict.equal(parseQuery('foo or (bar:100)').error?.message, 'Expected comma, found "or"'); - strict.equal(parseQuery('not not bar').error?.message, 'Expression specified NOT twice'); - strict.equal(parseQuery('"hello" and bar').error?.message, 'Expected expression, found "\\"hello\\""'); - strict.equal(parseQuery('foo and (bar: : 200 )').error?.message, 'Expected one of {Number, Boolean, Identifier, String}, found token ":"'); - strict.equal(parseQuery('"').error?.message, 'Unexpected end of file while searching for \'"\''); - strict.equal(parseQuery('foo:0x01fz').error?.message, 'Expected comma, found "z"'); - strict.equal(parseQuery('foo:?100').error?.message, 'Expected one of {Number, Boolean, Identifier, String}, found token "?"'); - }); - - it('positive matches', async () => { - strict.ok(parseQuery('foo').match({ foo: true }), 'foo was present, it should match!'); - strict.ok(parseQuery('foo').match({ foo: null }), 'foo was present, it should match!'); - - strict.ok(parseQuery('foo:false').match({}), 'foo was not present, it should match!'); - strict.ok(parseQuery('foo:true').match({ foo: true }), 'foo was true, it should match!'); - strict.ok(parseQuery('foo:true').match({ foo: null }), 'foo was true, it should match!'); - strict.ok(parseQuery('foo and windows').match({ foo: true, windows: true, books: true }), 'foo,windows was present, it should match!'); - strict.ok(parseQuery('windows and x64 and target:amd64, osx').match({ windows: true, x64: true, target: 'amd64' }), 'should match'); - strict.ok(parseQuery('windows and (x64) and (target:amd64), osx').match({ windows: true, x64: true, target: 'amd64' }), 'should match'); - strict.ok(parseQuery('windows and x64 and target:amd64, osx').match({ osx: true }), 'should match'); - strict.ok(parseQuery('not windows').match({ windows: false, linux: true }), 'it should match!'); - }); - - it('negative matches', async () => { - strict.ok(!parseQuery('not foo').match({ foo: true }), 'foo was present, it should not match!'); - strict.ok(!parseQuery('not foo').match({ foo: null }), 'foo was present, it should not match!'); - strict.ok(!parseQuery('foo').match({ foo: false }), 'foo was false, it should not match!'); - strict.ok(!parseQuery('not foo:true').match({ foo: true }), 'foo was true, it should not match!'); - strict.ok(!parseQuery('not foo:true').match({ foo: null }), 'foo was true, it should not match!'); - - - strict.ok(!parseQuery('foo').match({}), 'foo was not present, it should not match!'); - strict.ok(!parseQuery('not foo:false').match({}), 'foo was not present, it should match false!'); - strict.ok(!parseQuery('bar and windows').match({ foo: true, windows: true, books: true }), 'bar was not , it should not match!'); - strict.ok(!parseQuery('windows and x64 and target:amd64, osx').match({ linux: true }), 'should not match'); - strict.ok(!parseQuery('not windows and not linux').match({ windows: false, linux: true }), 'it should not match!'); - }); -}); diff --git a/vcpkg-artifacts/test/core/msbuild-tests.ts b/vcpkg-artifacts/test/core/msbuild-tests.ts deleted file mode 100644 index ecdee712af..0000000000 --- a/vcpkg-artifacts/test/core/msbuild-tests.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Activation } from '../../artifacts/activation'; -import { strict } from 'assert'; -import { platform } from 'os'; -import { SuiteLocal } from './SuiteLocal'; - -describe('MSBuild Generator', () => { - const local = new SuiteLocal(); - - after(local.after.bind(local)); - - it('Generates roots without a trailing slash', async () => { - const activation = await Activation.start(local.session, false); - const expectedPosix = 'c:/tmp'; - const expected = (platform() === 'win32') ? expectedPosix.replaceAll('/', '\\') : expectedPosix; - strict.equal(activation.msBuildProcessPropertyValue('{root}', local.fs.file('c:/tmp')), expected); - strict.equal(activation.msBuildProcessPropertyValue('{root}', local.fs.file('c:/tmp/')), expected); - }); - - it('Generates locations in order', async () => { - const activation = await Activation.start(local.session, false); - - // Note that only "addMSBuildProperty" has an effect on the output for now but that we'll probably - // need to respond to the others in the future. - (]>>[ - ['z', 'zse&tting'], - ['a', 'asend', 'third']] - ]).forEach(([key, value]) => activation.addProperty(key, typeof value === 'string' ? [value] : value)); - - activation.addLocation('somepath', local.fs.file('c:/tmp')); - activation.addPath('include', [local.fs.file('c:/tmp'), local.fs.file('c:/tmp2')]); - activation.addDefine('VERY_POSIX', '1'); - - const fileWithNoSlash = local.fs.file('c:/tmp'); - const fileWithSlash = local.fs.file('c:/tmp/'); - activation.addMSBuildProperty('a', '$(a);fir{root}st', fileWithNoSlash); - activation.addMSBuildProperty('a', '$(a);second', fileWithNoSlash); - activation.addMSBuildProperty('a', '$(a);{root}hello', fileWithNoSlash); - activation.addMSBuildProperty('b', '$(x);first', fileWithSlash); - activation.addMSBuildProperty('b', '$(b);se{root}cond', fileWithSlash); - activation.addMSBuildProperty('a', '$(a);third', fileWithNoSlash); - activation.addMSBuildProperty('b', 'third', fileWithSlash); - activation.addMSBuildProperty('b', '$(b);{root}world', fileWithSlash); - - activation.addMSBuildProperty('xml chars', '\'"<>& and $ look funny when escaped', fileWithSlash); - - const expectedPosix = ` - - - $(a);firc:/tmpst - $(a);second - $(a);c:/tmphello - $(x);first - $(b);sec:/tmpcond - $(a);third - third - $(b);c:/tmpworld - '"<>& and $ look funny when escaped - -`; - - const expected = (platform() === 'win32') - ? expectedPosix.replaceAll('c:/tmp', 'c:\\tmp').replaceAll('c:/', 'c:\\') - : expectedPosix; - strict.equal(activation.generateMSBuild(), expected); - }); -}); diff --git a/vcpkg-artifacts/test/core/registry-resolver-tests.ts b/vcpkg-artifacts/test/core/registry-resolver-tests.ts deleted file mode 100644 index c5611ade78..0000000000 --- a/vcpkg-artifacts/test/core/registry-resolver-tests.ts +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { Artifact } from '../../artifacts/artifact'; -import { Registry, RegistryDatabase, RegistryResolver, SearchCriteria } from '../../registries/registries'; -import { Uri } from '../../util/uri'; -import { SuiteLocal } from './SuiteLocal'; - -class FakeRegistry implements Registry { - constructor(public readonly location: Uri) { - } - - get count() { return 1; } - - async search(_criteria?: SearchCriteria): Promise]>> { - throw new Error('not implemented'); - } - - load(_force?: boolean): Promise { return Promise.resolve(); } - save(): Promise { return Promise.resolve(); } - update(_displayName?: string): Promise { return Promise.resolve(); } - regenerate(_normalize?: boolean): Promise { return Promise.resolve(); } -} - -describe('Registry resolver', () => { - const local = new SuiteLocal(); - - after(local.after.bind(local)); - - const appleUri = local.fs.parseUri('https://example.com/apple.zip'); - const appleRegistry = new FakeRegistry(appleUri); - const bananaUri = local.fs.parseUri('https://example.com/banana.zip'); - const bananaRegistry = new FakeRegistry(appleUri); - const cherryUri = local.fs.parseUri('https://example.com/cherry.zip'); - const cherryRegistry = new FakeRegistry(appleUri); - const alphaUri = local.fs.parseUri('https://example.com/alpha.zip'); - const alphaRegistry = new FakeRegistry(alphaUri); - const andromedaUri = local.fs.parseUri('https://example.com/andromeda.zip'); - const andromedaRegistry = new FakeRegistry(alphaUri); - - const db = new RegistryDatabase(); - db.add(appleUri, appleRegistry); - db.add(bananaUri, bananaRegistry); - db.add(cherryUri, cherryRegistry); - db.add(alphaUri, alphaRegistry); - db.add(andromedaUri, andromedaRegistry); - - const globalContext = new RegistryResolver(db); - globalContext.add(appleUri, 'a'); - globalContext.add(bananaUri, 'b'); - globalContext.add(alphaUri, 'apple'); - - const projectContext = new RegistryResolver(db); - projectContext.add(appleUri, 'apple'); - projectContext.add(cherryUri, 'cherry'); - - const combined = globalContext.with(projectContext); - - it('Knows names in the project', () => { - strict.equal(combined.getRegistryByName('apple'), appleRegistry); - strict.equal(combined.getRegistryByName('cherry'), cherryRegistry); - }); - - it('Projects do not know different names from the same URI from the global context', () => { - strict.equal(projectContext.getRegistryByName('a'), undefined); - strict.equal(projectContext.getRegistryByName('b'), undefined); - }); - - it('Knows only URIs from either context', () => { - strict.equal(combined.getRegistryByUri(appleUri), appleRegistry); - strict.equal(combined.getRegistryByUri(bananaUri), bananaRegistry); - strict.equal(combined.getRegistryByUri(cherryUri), cherryRegistry); - strict.equal(combined.getRegistryByUri(alphaUri), alphaRegistry); - strict.equal(combined.getRegistryByUri(andromedaUri), undefined); // database knows but context doesn't - }); - - it('Chooses names of identical URIs from the project', () => { - strict.equal(combined.getRegistryName(appleUri), 'apple'); - strict.equal(combined.getRegistryDisplayName(appleUri), 'apple'); - strict.equal(combined.getRegistryName(cherryUri), 'cherry'); - strict.equal(combined.getRegistryDisplayName(cherryUri), 'cherry'); - }); - - it('Chooses names not in the project from the global configuration', () => { - strict.equal(combined.getRegistryName(bananaUri), 'b'); // not in project, so global name is used - strict.equal(combined.getRegistryDisplayName(bananaUri), 'b'); - }); - - it('Does not know names with different meaning in the project', () => { - // Global called this 'apple', but project called 'apple' appleUri, so it can only be displayed as - // the full URI (in []s) - strict.equal(combined.getRegistryName(alphaUri), undefined); // not in project, so global name is used - strict.equal(combined.getRegistryDisplayName(alphaUri), '[https://example.com/alpha.zip]'); - }); -}); diff --git a/vcpkg-artifacts/test/core/regression-tests.ts b/vcpkg-artifacts/test/core/regression-tests.ts deleted file mode 100644 index 177c6dd7e8..0000000000 --- a/vcpkg-artifacts/test/core/regression-tests.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { SuiteLocal } from './SuiteLocal'; - -describe('Regressions', () => { - const local = new SuiteLocal(); - - after(local.after.bind(local)); - - // These 2 registry loads ensure that we can process both the 'old' and 'new' index.yaml files - // regression discovered in https://github.com/microsoft/vcpkg-ce-catalog/pull/33 - - it('Loads 2ffbc04d6856a1d03c5de0ab94404f90636f7855 registry', async () => { - await local.session.registryDatabase.loadRegistry(local.session, - local.resourcesFolderUri.join('vcpkg-ce-catalog-2ffbc04d6856a1d03c5de0ab94404f90636f7855')); - }); - - it('Loads d471612be63b2fb506ab5f47122da460f5aa4d30 registry', async () => { - await local.session.registryDatabase.loadRegistry(local.session, - local.resourcesFolderUri.join('vcpkg-ce-catalog-d471612be63b2fb506ab5f47122da460f5aa4d30')); - }); -}); diff --git a/vcpkg-artifacts/test/core/sample-tests.ts b/vcpkg-artifacts/test/core/sample-tests.ts deleted file mode 100644 index 72002e851f..0000000000 --- a/vcpkg-artifacts/test/core/sample-tests.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { sanitizePath } from '../../artifacts/artifact'; -import { strict } from 'assert'; -import { describe, it } from 'mocha'; - -describe('sanitization of paths', () => { - it('makes nice clean paths', () => { - strict.equal(sanitizePath(''), ''); - strict.equal(sanitizePath('.'), ''); - strict.equal(sanitizePath('..'), ''); - strict.equal(sanitizePath('..../....'), ''); - strict.equal(sanitizePath('..../foo/....'), 'foo'); - strict.equal(sanitizePath('..../..foo/....'), '..foo'); - strict.equal(sanitizePath('.config'), '.config'); - strict.equal(sanitizePath('\\.config'), '.config'); - strict.equal(sanitizePath('..\\.config'), '.config'); - strict.equal(sanitizePath('/bar'), 'bar'); - strict.equal(sanitizePath('\\this\\is\\a//test/of//a\\path//..'), 'this/is/a/test/of/a/path'); - }); -}); diff --git a/vcpkg-artifacts/test/core/stream-tests.ts b/vcpkg-artifacts/test/core/stream-tests.ts deleted file mode 100644 index ff911614d7..0000000000 --- a/vcpkg-artifacts/test/core/stream-tests.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strictEqual } from 'assert'; -import { Channels } from '../../util/channels'; -import { SuiteLocal } from './SuiteLocal'; - -describe('StreamTests', () => { - const local = new SuiteLocal(); - after(local.after.bind(local)); - it('event emitter works', async () => { - - const expected = ['a', 'b', 'c', 'd']; - let i = 0; - - const session = local.session; - const m = new Channels(session); - m.on('message', (message) => { - // check that each message comes in order - strictEqual(message, expected[i], 'messages should be in order'); - i++; - }); - - for (const each of expected) { - m.message(each); - } - - strictEqual(expected.length, i, 'should have got the right number of messages'); - }); -}); diff --git a/vcpkg-artifacts/test/core/uniqueTempFolder.ts b/vcpkg-artifacts/test/core/uniqueTempFolder.ts deleted file mode 100644 index eec287c5b3..0000000000 --- a/vcpkg-artifacts/test/core/uniqueTempFolder.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { mkdtempSync } from 'fs'; -import { tmpdir } from 'os'; -import { join } from 'path'; - -export function uniqueTempFolder(): string { - return mkdtempSync(join(tmpdir(), '/ce-temp!')); -} diff --git a/vcpkg-artifacts/test/core/uri-tests.ts b/vcpkg-artifacts/test/core/uri-tests.ts deleted file mode 100644 index 16b0372d48..0000000000 --- a/vcpkg-artifacts/test/core/uri-tests.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strictEqual } from 'assert'; -import { SuiteLocal } from './SuiteLocal'; - -describe('Uri', () => { - const local = new SuiteLocal(); - const fs = local.fs; - - after(local.after.bind(local)); - const tempUrl = local.tempFolderUri; - const tempUrlForward = tempUrl.join().toString(); - - it('Converts slashes on join', () => { - const unixPath = fs.parseUri('/some/unixy/path').join(); - strictEqual(unixPath.toString(), 'file:///some/unixy/path'); - const windowsPath = fs.parseUri('C:\\Windows\\System32').join(); - strictEqual(windowsPath.toString(), 'C:/Windows/System32'); - }); - - it('Can go to a child path', () => { - const child = tempUrl.join('uriChild').toString(); - strictEqual(child, tempUrlForward + '/uriChild'); - }); - - it('Can go to parent path', () => { - const child = tempUrl.join('uriChild'); - const actual = child.parent.join().toString(); - strictEqual(actual.toString(), tempUrlForward); - }); -}); diff --git a/vcpkg-artifacts/test/core/util/curly-replacements-tests.ts b/vcpkg-artifacts/test/core/util/curly-replacements-tests.ts deleted file mode 100644 index 6835931032..0000000000 --- a/vcpkg-artifacts/test/core/util/curly-replacements-tests.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { replaceCurlyBraces } from '../../../util/curly-replacements'; -import { strict } from 'assert'; - -describe('replaceCurlyBraces', () => { - const replacements = new Map(); - replacements.set('exists', 'exists-replacement'); - replacements.set('another', 'some other replacement text'); - - it('DoesNotTouchLiterals', () => { - strict.equal(replaceCurlyBraces('some literal text', replacements), 'some literal text'); - }); - - it('DoesVariableReplacements', () => { - strict.equal(replaceCurlyBraces('some {exists} text', replacements), 'some exists-replacement text'); - }); - - it('DoesMultipleVariableReplacements', () => { - strict.equal(replaceCurlyBraces('some {exists} {another} text', replacements), 'some exists-replacement some other replacement text text'); - }); - - it('ThrowsForLeadingOnlyEscapes', () => { - strict.throws(() => { - replaceCurlyBraces('some {{exists} text', replacements); - }, new Error('Found a mismatched } in \'some {{exists} text\'. For a literal }, use }} instead.')); - }); - - it('ConsidersTerminalCurlyAsPartOfVariable', () => { - strict.throws(() => { - replaceCurlyBraces('some {exists}} text', replacements); - }, new Error('Found a mismatched } in \'some {exists}} text\'. For a literal }, use }} instead.')); - }); - - it('AllowsDoubleEscapes', () => { - strict.equal(replaceCurlyBraces('some {{{exists} text', replacements), 'some {exists-replacement text'); - strict.equal(replaceCurlyBraces('some {exists}}} text', replacements), 'some exists-replacement} text'); - strict.equal(replaceCurlyBraces('some {{exists}} text', replacements), 'some {exists} text'); - strict.equal(replaceCurlyBraces('some {{{exists}}} text', replacements), 'some {exists-replacement} text'); - strict.equal(replaceCurlyBraces('some {{{{{exists}}} text', replacements), 'some {{exists-replacement} text'); - }); - - it('ThrowsForUnmatchedCurlies', () => { - strict.throws(() => { - replaceCurlyBraces('these are }{ not matched', replacements); - }, new Error('Found a mismatched } in \'these are }{ not matched\'. For a literal }, use }} instead.')); - }); - - it('ThrowsForBadValues', () => { - strict.throws(() => { - replaceCurlyBraces('some {nonexistent} text', replacements); - }, new Error('Could not find a value for {nonexistent} in \'some {nonexistent} text\'. To write the literal value, use \'{{nonexistent}}\' instead.')); - }); - - it('ThrowsForMismatchedBeginCurlies', () => { - strict.throws(() => { - replaceCurlyBraces('some {nonexistent', replacements); - }, new Error('Found a mismatched { in \'some {nonexistent\'. For a literal {, use {{ instead.')); - }); - - it('ThrowsForMismatchedEndCurlies', () => { - strict.throws(() => { - replaceCurlyBraces('some }nonexistent', replacements); - }, new Error('Found a mismatched } in \'some }nonexistent\'. For a literal }, use }} instead.')); - }); -}); diff --git a/vcpkg-artifacts/test/core/util/percentage-scaler-tests.ts b/vcpkg-artifacts/test/core/util/percentage-scaler-tests.ts deleted file mode 100644 index 2fa40be4fb..0000000000 --- a/vcpkg-artifacts/test/core/util/percentage-scaler-tests.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { PercentageScaler } from '../../../util/percentage-scaler'; -import { strict, throws } from 'assert'; - -describe('PercentageScaler', () => { - it('ScalesPercentagesTo100', () => { - const uut = new PercentageScaler(0, 1000); - for (let idx = 0; idx < 1000; ++idx) { - strict.equal(uut.scalePosition(idx), idx / 10); - } - }); - - it('ScalesPercentagesToDifferentRanges', () => { - const uut = new PercentageScaler(0, 1000, 10, 20); - for (let idx = 0; idx < 10; ++idx) { - strict.equal(uut.scalePosition(idx * 100), 10 + idx); - } - }); - - it('ScalesZeroRangesAsMax', () => { - const uut = new PercentageScaler(0, 0, 0, 200); - strict.equal(uut.scalePosition(0), 200); - }); - - it('ScalesUniquePercentageRangesAsThatPercent', () => { - const uut = new PercentageScaler(0, 100, 200, 200); - for (let idx = -1; idx < 102; ++idx) { - strict.equal(uut.scalePosition(idx), 200); - } - }); - - it('ClampsDomain', () => { - const uut = new PercentageScaler(0, 10); - strict.equal(uut.scalePosition(Number.MIN_VALUE), 0); - strict.equal(uut.scalePosition(-100), 0); - strict.equal(uut.scalePosition(0), 0); - strict.equal(uut.scalePosition(1), 10); - strict.equal(uut.scalePosition(10), 100); - strict.equal(uut.scalePosition(11), 100); - strict.equal(uut.scalePosition(Number.MAX_VALUE), 100); - }); - - it('ValidatesParameters', () => { - throws(() => new PercentageScaler(0, -1)); // transposed domain range - new PercentageScaler(0, 0); // OK - new PercentageScaler(0, 0, 0, 0); // OK - throws(() => new PercentageScaler(0, 0, 0, -1)); // percentage range is reversed - }); -}); diff --git a/vcpkg-artifacts/test/sequence-equal.ts b/vcpkg-artifacts/test/sequence-equal.ts deleted file mode 100644 index 53d6b4858d..0000000000 --- a/vcpkg-artifacts/test/sequence-equal.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { fail, strict } from 'assert'; - -export function strictSequenceEqual(a: Iterable|undefined, e: Iterable|undefined, message?: string) { - if (a && e) { - strict.deepEqual([...a], [...e], message); - } else if (!a || !e) { - fail(message); - } -} diff --git a/vcpkg-artifacts/tsconfig.json b/vcpkg-artifacts/tsconfig.json deleted file mode 100644 index 438756c22a..0000000000 --- a/vcpkg-artifacts/tsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "compilerOptions": { - "alwaysStrict": true, - "forceConsistentCasingInFileNames": true, - "module": "es2022", - "moduleResolution": "node", - "noEmit": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitThis": true, - "inlineSourceMap": true, - "sourceRoot": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/vcpkg-artifacts", - "declarationMap": true, - "strict": true, - "declaration": true, - "stripInternal": true, - "noEmitHelpers": false, - "target": "ES2022", - "types": [ - "node" - ], - "lib": [ - "ES2022", - "DOM" - ], - "newLine": "LF" - }, - "include": [ - "eslint.config.mjs", - "./**/*.ts" - ], - "exclude": [ - "dist/**", - "node_modules/**" - ] -} \ No newline at end of file diff --git a/vcpkg-artifacts/util/channels.ts b/vcpkg-artifacts/util/channels.ts deleted file mode 100644 index 662e0175ff..0000000000 --- a/vcpkg-artifacts/util/channels.ts +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { EventEmitter } from 'node:events'; -import { Session } from '../session'; - -/** Event defintions for channel events */ -export interface ChannelEvents { - warning(text: string, msec: number): void; - error(text: string, msec: number): void; - message(text: string, msec: number): void; - debug(text: string, msec: number): void; -} - -/** - * @internal - * - * Tracks timing of events -*/ -export class Stopwatch { - start: number; - last: number; - constructor() { - this.last = this.start = process.uptime() * 1000; - } - get time() { - const now = process.uptime() * 1000; - const result = Math.floor(now - this.last); - this.last = now; - return result; - } - get total() { - const now = process.uptime() * 1000; - return Math.floor(now - this.start); - } -} - -/** Exposes a set of events that are used to communicate with the user - * - * Warning, Error, Message, Debug - */ -export class Channels extends EventEmitter { - /** @internal */ - readonly stopwatch: Stopwatch; - - warning(text: string | Array) { - if (typeof text === 'string') { - this.emit('warning', text, this.stopwatch.total); - } else { - text.forEach(t => this.emit('warning', t, this.stopwatch.total)); - } - } - error(text: string | Array) { - if (typeof text === 'string') { - this.emit('error', text, this.stopwatch.total); - } else { - text.forEach(t => this.emit('error', t, this.stopwatch.total)); - } - } - message(text: string | Array) { - if (typeof text === 'string') { - this.emit('message', text, this.stopwatch.total); - } else { - text.forEach(t => this.emit('message', t, this.stopwatch.total)); - } - } - debug(text: string | Array) { - if (typeof text === 'string') { - this.emit('debug', text, this.stopwatch.total); - } else { - text.forEach(t => this.emit('debug', t, this.stopwatch.total)); - } - } - constructor(session: Session) { - super(); - this.stopwatch = session.stopwatch; - } -} diff --git a/vcpkg-artifacts/util/checks.ts b/vcpkg-artifacts/util/checks.ts deleted file mode 100644 index 2a3c4a077f..0000000000 --- a/vcpkg-artifacts/util/checks.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isScalar, isSeq, YAMLMap } from 'yaml'; -import { i } from '../i18n'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Uri } from './uri'; - -/** @internal */ -export function isPrimitive(value: any): value is (string | number | boolean) { - switch (typeof value) { - case 'string': - case 'number': - case 'boolean': - return true; - } - return false; -} - -/** @internal */ -export function isNullish(value: any): value is null | undefined | '' | 0 { - return value === null || value === undefined || value === '' || value === 0; -} - -/** @internal */ -export function isIterable(source: any): source is Iterable { - return !!source && typeof (source) !== 'string' && !!source[Symbol.iterator]; -} - -export function* checkOptionalString(parent: YAMLMap, range: [number, number, number], name: string): Iterable { - switch (typeof parent.get(name)) { - case 'string': - case 'undefined': - break; - default: - yield { message: i`${name} must be a string`, range: range, category: ErrorKind.IncorrectType }; - } -} - -export function* checkOptionalBool(parent: YAMLMap, range: [number, number, number], name: string): Iterable { - switch (typeof parent.get(name)) { - case 'boolean': - case 'undefined': - break; - default: - yield { message: i`${name} must be a bool`, range: range, category: ErrorKind.IncorrectType }; - } -} - -function checkOptionalArrayOfStringsImpl(parent: YAMLMap, range: [number, number, number], name: string): boolean { - const val = parent.get(name); - if (isSeq(val)) { - for (const entry of val.items) { - if (!isScalar(entry) || typeof entry.value !== 'string') { - return true; - } - } - } else if (typeof val !== 'undefined') { - return true; - } - - return false; -} - -export function* checkOptionalArrayOfStrings(parent: YAMLMap, range: [number, number, number], name: string): Iterable { - if (checkOptionalArrayOfStringsImpl(parent, range, name)) { - yield { message: i`${name} must be an array of strings, or unset`, range: range, category: ErrorKind.IncorrectType }; - } -} - -export function isGithubRepo(uri: Uri): boolean { - return uri.authority.toLowerCase() === 'github.com' && !!(/\/[a-zA-Z0-9-_]*\/[a-zA-Z0-9-_]*$/g.exec(uri.path)); -} diff --git a/vcpkg-artifacts/util/curly-replacements.ts b/vcpkg-artifacts/util/curly-replacements.ts deleted file mode 100644 index 0d6905db06..0000000000 --- a/vcpkg-artifacts/util/curly-replacements.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../i18n'; - -export function replaceCurlyBraces(subject: string, properties: Map) { - // One of these tokens: - // {{ - // }} - // {variable} - // { - // } - // (anything that has no {}s) - const tokenRegex = /{{|}}|{([^}]+)}|{|}|[^{}]+/y; - const resultElements : Array = []; - for (;;) { - const thisMatch = tokenRegex.exec(subject); - if (thisMatch === null) { - return resultElements.join(''); - } - - const wholeMatch = thisMatch[0]; - if (wholeMatch === '{{') { - resultElements.push('{'); - continue; - } - - if (wholeMatch === '}}') { - resultElements.push('}'); - continue; - } - - if (wholeMatch === '{' || wholeMatch === '}') { - throw new Error(i`Found a mismatched ${wholeMatch} in '${subject}'. For a literal ${wholeMatch}, use ${wholeMatch}${wholeMatch} instead.`); - } - - const variableName = thisMatch[1]; - if (variableName) { - const variableValue = properties.get(variableName); - if (typeof variableValue !== 'string') { - throw new Error(i`Could not find a value for {${variableName}} in '${subject}'. To write the literal value, use '{{${variableName}}}' instead.`); - } - - resultElements.push(variableValue); - continue; - } - - resultElements.push(wholeMatch); - } -} diff --git a/vcpkg-artifacts/util/exceptions.ts b/vcpkg-artifacts/util/exceptions.ts deleted file mode 100644 index 4920627b7b..0000000000 --- a/vcpkg-artifacts/util/exceptions.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { i } from '../i18n'; -import { Uri } from './uri'; - -export class Failed extends Error { - fatal = true; -} - -export class RemoteFileUnavailable extends Error { - constructor(public uri: Array) { - super(); - } -} - -export class TargetFileCollision extends Error { - constructor(public uri: Uri, message: string) { - super(message); - } -} - -export class MultipleInstallsMatched extends Error { - constructor(public queries: Array) { - super(i`Matched more than one install block [${queries.join(',')}]`); - } -} - diff --git a/vcpkg-artifacts/util/exec-cmd.ts b/vcpkg-artifacts/util/exec-cmd.ts deleted file mode 100644 index 6e1875b2ea..0000000000 --- a/vcpkg-artifacts/util/exec-cmd.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ChildProcess, spawn, SpawnOptions } from 'child_process'; -import { lstat } from 'fs/promises'; - -export interface ExecOptions extends SpawnOptions { - onCreate?(cp: ChildProcess): void; - onStdOutData?(chunk: any): void; - onStdErrData?(chunk: any): void; -} - -export interface ExecResult { - stdout: string; - stderr: string; - env: NodeJS.ProcessEnv | undefined; - - /** - * Union of stdout and stderr. - */ - log: string; - error: Error | null; - code: number | null; - command: string, - args: Array, -} - -export function cmdlineToArray(text: string, result: Array = [], matcher = /[^\s"]+|"([^"]*)"/gi): Array { - text = text.replace(/\\"/g, '\ufffe'); - const match = matcher.exec(text); - if (match) { - result.push(match[1] ? match[1].replace(/\ufffe/g, '\\"') : match[0].replace(/\ufffe/g, '\\"')); - return cmdlineToArray(text, result, matcher); - } - - return result; -} - -export async function execute(command: string, cmdlineargs: Array, options: ExecOptions = {}): Promise { - try { - command = command.replace(/"/g, ''); - const k = await lstat(command); - if (k.isDirectory()) { - throw new Error(`Unable to call ${command} ${cmdlineargs.join(' ')} -- ${command} is a directory`); - } - } catch { - throw new Error(`Unable to call ${command} ${cmdlineargs.join(' ')} - -- ${command} is not a file `); - - } - - return new Promise((resolve, reject) => { - const cp = spawn(command, cmdlineargs.filter(each => each), { ...options, stdio: 'pipe' }); - if (options.onCreate) { - options.onCreate(cp); - } - - if (options.onStdOutData) { cp.stdout.on('data', options.onStdOutData); } - if (options.onStdErrData) { cp.stderr.on('data', options.onStdErrData); } - - let err = ''; - let out = ''; - let all = ''; - cp.stderr.on('data', (chunk) => { - err += chunk; - all += chunk; - }); - cp.stdout.on('data', (chunk) => { - out += chunk; - all += chunk; - }); - - cp.on('error', (err) => { - reject(err); - }); - - cp.on('close', (code) => { - return resolve({ - env: options.env, - stdout: out, - stderr: err, - log: all, - error: code ? new Error('Process Failed.') : null, - code, - command: command, - args: cmdlineargs, - }); - } - ); - }); -} diff --git a/vcpkg-artifacts/util/hash.ts b/vcpkg-artifacts/util/hash.ts deleted file mode 100644 index 1a127208fe..0000000000 --- a/vcpkg-artifacts/util/hash.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { fail } from 'assert'; -import { createHash } from 'crypto'; -import { Readable } from 'stream'; -import { ProgressTrackingStream } from '../fs/streams'; -import { HashVerifyEvents } from '../interfaces/events'; -import { Uri } from './uri'; - -// sha256, sha512, sha384 -export type Algorithm = 'sha256' | 'sha384' | 'sha512' - -export async function hash(stream: Readable, uri: Uri, size: number, algorithm: 'sha256' | 'sha384' | 'sha512' = 'sha256', events: Partial) { - stream = await stream; - - try { - const p = new ProgressTrackingStream(0, size); - p.on('progress', (filePercentage) => events.hashVerifyProgress?.(uri.fsPath, filePercentage)); - - for await (const chunk of stream.pipe(p).pipe(createHash(algorithm)).setEncoding('hex')) { - // it should be done reading here - return chunk; - } - } finally { - stream.destroy(); - } - fail('Should have returned a chunk from the pipe'); -} - -export interface Hash { - value?: string; - algorithm?: 'sha256' | 'sha384' | 'sha512' -} diff --git a/vcpkg-artifacts/util/intersect.ts b/vcpkg-artifacts/util/intersect.ts deleted file mode 100644 index d27d8db853..0000000000 --- a/vcpkg-artifacts/util/intersect.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * Creates an intersection object from two source objects. - * - * Typescript nicely supports defining intersection types (ie, Foo & Bar ) - * But if you have two seperate *instances*, and you want to use them as the implementation - * of that intersection, the language doesn't solve that for you. - * - * This function creates a strongly typed proxy type around the two objects, - * and returns members for the intersection of them. - * - * This works well for properties and member functions the same. - * - * Members in the primary object will take precedence over members in the secondary object if names conflict. - * - * This can also be used to "add" arbitrary members to an existing type (without mutating the original object) - * - * @example - * const combined = intersect( new Foo(), { test: () => { console.debug('testing'); } }); - * combined.test(); // writes out 'testing' to console - * - * @param primary primary object - members from this will have precedence. - * @param secondary secondary object - members from this will be used if primary does not have a member - */ -export function intersect(primary: T, secondary: T2, filters = ['constructor']): T & T2 { - // eslint-disable-next-line keyword-spacing - return new Proxy({ primary, secondary }, { - // member get proxy handler - get(target: { primary: T, secondary: T2 }, property: string | symbol) { - // check for properties on the objects first - const propertyName = property.toString(); - - // provide custom JON impl. - if (propertyName === 'toJSON') { - return () => { - const allKeys = this.ownKeys(); - const o = {}; - for (const i of allKeys) { - const v = this.get(target, i); - if (typeof v !== 'function') { - o[i] = v; - } - } - return o; - }; - } - - const pv = (target.primary)[property]; - const sv = (target.secondary)[property]; - - if (pv !== undefined) { - if (typeof pv === 'function') { - return pv.bind(primary); - } - return pv; - } - - if (sv !== undefined) { - if (typeof sv === 'function') { - return sv.bind(secondary); - } - return sv; - } - - return undefined; - }, - - // member set proxy handler - set(target: { primary: T, secondary: T2 }, property: string | symbol, value: any) { - const propertyName = property.toString(); - - if (Object.getOwnPropertyNames(target.primary).indexOf(propertyName) > -1) { - return (target.primary)[property] = value; - } - if (Object.getOwnPropertyNames(target.secondary).indexOf(propertyName) > -1) { - return (target.secondary)[property] = value; - } - return undefined; - }, - ownKeys(): ArrayLike { - return [...new Set([ - ...Object.getOwnPropertyNames(Object.getPrototypeOf(primary)), - ...Object.getOwnPropertyNames(primary), - ...Object.getOwnPropertyNames(Object.getPrototypeOf(secondary)), - ...Object.getOwnPropertyNames(secondary)].filter(each => filters.indexOf(each) === -1))]; - } - }); -} diff --git a/vcpkg-artifacts/util/linq.ts b/vcpkg-artifacts/util/linq.ts deleted file mode 100644 index 54524597fa..0000000000 --- a/vcpkg-artifacts/util/linq.ts +++ /dev/null @@ -1,460 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export type IndexOf = T extends Map ? T : T extends Array ? number : string; // eslint-disable-line @typescript-eslint/no-unused-vars - -/** performs a truthy check on the value, and calls onTrue when the condition is true,and onFalse when it's not */ -export function when(value: T, onTrue: (value: NonNullable) => void, onFalse: () => void = () => { /* */ }) { - return value ? onTrue(>value) : onFalse(); -} - -export interface IterableWithLinq extends Iterable { - linq: IterableWithLinq; - any(predicate?: (each: T) => boolean): boolean; - all(predicate: (each: T) => boolean): boolean; - bifurcate(predicate: (each: T) => boolean): Array>; - concat(more: Iterable): IterableWithLinq; - distinct(selector?: (each: T) => any): IterableWithLinq; - duplicates(selector?: (each: T) => any): IterableWithLinq; - first(predicate?: (each: T) => boolean): T | undefined; - selectNonNullable(selector: (each: T) => V): IterableWithLinq>; - select(selector: (each: T) => V): IterableWithLinq; - selectAsync(selector: (each: T) => V): AsyncGenerator; - selectMany(selector: (each: T) => Iterable): IterableWithLinq; - where(predicate: (each: T) => boolean): IterableWithLinq; - forEach(action: (each: T) => void): void; - aggregate(accumulator: (current: T | A, next: T) => A, seed?: T | A, resultAction?: (result?: T | A) => A | R): T | A | R | undefined; - toArray(): Array; - toObject(selector: (each: T) => [V, U]): Record; - results(): Promise; - toRecord(keySelector: (each: T) => string, selector: (each: T) => TValue): Record; - toMap(keySelector: (each: T) => TKey, selector: (each: T) => TValue): Map; - groupBy(keySelector: (each: T) => TKey, selector: (each: T) => TValue): Map>; - - /** - * Gets or sets the length of the iterable. This is a number one higher than the highest element defined in an array. - */ - count(): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - -} - -/* eslint-disable */ - -function linqify(iterable: Iterable | IterableIterator): IterableWithLinq { - if ((iterable)['linq'] === iterable) { - return >iterable; - } - const r = { - [Symbol.iterator]: iterable[Symbol.iterator].bind(iterable), - all: all.bind(iterable), - any: any.bind(iterable), - bifurcate: bifurcate.bind(iterable), - concat: concat.bind(iterable), - distinct: distinct.bind(iterable), - duplicates: duplicates.bind(iterable), - first: first.bind(iterable), - select: select.bind(iterable), - selectMany: selectMany.bind(iterable), - selectNonNullable: selectNonNullable.bind(iterable), - toArray: toArray.bind(iterable), - toObject: toObject.bind(iterable), - where: where.bind(iterable), - forEach: forEach.bind(iterable), - aggregate: aggregate.bind(iterable), - join: join.bind(iterable), - count: len.bind(iterable), - results: results.bind(iterable), - toMap: toMap.bind(iterable), - groupBy: groupBy.bind(iterable), - selectAsync: selectAsync.bind(iterable), - }; - r.linq = r; - return r; -} - -function len(this: Iterable): number { - return length(this); -} - -export function keys(source: Map | null | undefined): Iterable -export function keys>(source: Record | null | undefined): Iterable -export function keys>(source: Array | null | undefined): Iterable -export function keys(source: any | undefined | null): Iterable -export function keys(source: any): Iterable { - if (source) { - if (Array.isArray(source)) { - return >>(>source).keys(); - } - - if (source instanceof Map) { - return >(>source).keys(); - } - - if (source instanceof Set) { - throw new Error('Unable to iterate keys on a Set'); - } - - return >>Object.keys(source); - } - // undefined/null - return []; -} - - - -/** returns an IterableWithLinq<> for keys in the collection */ -function _keys(source: Map | null | undefined): IterableWithLinq -function _keys>(source: Record | null | undefined): IterableWithLinq -function _keys>(source: Array | null | undefined): IterableWithLinq -function _keys(source: any | undefined | null): IterableWithLinq -function _keys(source: any): IterableWithLinq { - if (source) { - if (Array.isArray(source)) { - return >>linqify((>source).keys()); - } - - if (source instanceof Map) { - return >linqify((>source).keys()); - } - - if (source instanceof Set) { - throw new Error('Unable to iterate keys on a Set'); - } - - return >>linqify((Object.keys(source))); - } - // undefined/null - return linqify([]); -} -function isIterable(source: any): source is Iterable { - return !!source && !!source[Symbol.iterator]; -} - -export function values | Record | Map)>(source: (Iterable | Array | Record | Map | Set) | null | undefined): Iterable { - if (source) { - // map - if (source instanceof Map || source instanceof Set) { - return source.values(); - } - - // any iterable source - if (isIterable(source)) { - return source; - } - - // dictionary (object keys) - return Object.values(source); - } - - // null/undefined - return []; -} -export const linq = { - values: _values, - entries: _entries, - keys: _keys, - find: _find, - startsWith: _startsWith, - join: _join -}; - -/** returns an IterableWithLinq<> for values in the collection - * - * @note - null/undefined/empty values are considered 'empty' -*/ -function _values(source: (Array | Record | Map | Set | Iterable) | null | undefined): IterableWithLinq { - return (source) ? linqify(values(source)) : linqify([]); -} - -export function entries | Record | Map | undefined | null)>(source: TSrc & (Array | Record | Map) | null | undefined): Iterable<[IndexOf, T]> { - if (source) { - if (Array.isArray(source)) { - return , T]>>source.entries(); - } - - if (source instanceof Map) { - return , T]>>source.entries(); - } - - if (source instanceof Set) { - throw new Error('Unable to iterate items on a Set (use values)'); - } - - return , T]>>Object.entries(source); - } - // undefined/null - return []; -} - -/** returns an IterableWithLinq<{key,value}> for the source */ -function _entries | Record | Map | undefined | null)>(source: TSrc & (Array | Record | Map) | null | undefined): IterableWithLinq<[IndexOf, T]> { - return linqify(source ? entries(source) : []) -} - -/** returns the first value where the key equals the match value (case-insensitive) */ -function _find | Record | Map | undefined | null)>(source: TSrc & (Array | Record | Map) | null | undefined, match: string): T | undefined { - return _entries(source).first(([key,]) => key.toString().localeCompare(match, undefined, { sensitivity: 'base' }) === 0)?.[1]; -} - -/** returns the first value where the key starts with the match value (case-insensitive) */ -function _startsWith | Record | Map | undefined | null)>(source: TSrc & (Array | Record | Map) | null | undefined, match: string): T | undefined { - match = match.toLowerCase(); - return _entries(source).first(([key,]) => key.toString().toLowerCase().startsWith(match))?.[1]; -} - -function _join(source: (Array | Record | Map | Set | Iterable) | null | undefined, delimiter: string): string { - return source ? _values(source).join(delimiter) : ''; -} - -export function length(source?: string | Iterable | Record | Array | Map | Set): number { - if (source) { - if (Array.isArray(source) || typeof (source) === 'string') { - return source.length; - } - if (source instanceof Map || source instanceof Set) { - return source.size; - } - if (isIterable(source)) { - return [...source].length; - } - return source ? Object.values(source).length : 0; - } - return 0; -} - -function toMap(this: Iterable, keySelector: (each: TElement) => TKey, selector: (each: TElement) => TValue): Map { - const result = new Map(); - for (const each of this) { - result.set(keySelector(each), selector(each)); - } - return result; -} - -function groupBy(this: Iterable, keySelector: (each: TElement) => TKey, selector: (each: TElement) => TValue): Map { - const result = new ManyMap(); - for (const each of this) { - result.push(keySelector(each), selector(each)); - } - return result; -} - -function any(this: Iterable, predicate?: (each: T) => boolean): boolean { - for (const each of this) { - if (!predicate || predicate(each)) { - return true; - } - } - return false; -} - -function all(this: Iterable, predicate: (each: T) => boolean): boolean { - for (const each of this) { - if (!predicate(each)) { - return false; - } - } - return true; -} - -function concat(this: Iterable, more: Iterable): IterableWithLinq { - return linqify(function* (this: Iterable) { - for (const each of this) { - yield each; - } - for (const each of more) { - yield each; - } - }.bind(this)()); -} - -function select(this: Iterable, selector: (each: T) => V): IterableWithLinq { - return linqify(function* (this: Iterable) { - for (const each of this) { - yield selector(each); - } - }.bind(this)()); -} - -async function* selectAsync(this: Iterable, selector: (each: T) => Promise) { - for (const each of this) { - yield selector(each) - } -} - - -function selectMany(this: Iterable, selector: (each: T) => Iterable): IterableWithLinq { - return linqify(function* (this: Iterable) { - for (const each of this) { - yield* selector(each); - } - }.bind(this)()); -} - -function where(this: Iterable, predicate: (each: T) => boolean): IterableWithLinq { - return linqify(function* (this: Iterable) { - for (const each of this) { - if (predicate(each)) { - yield each; - } - } - }.bind(this)()); -} - -function forEach(this: Iterable, action: (each: T) => void) { - for (const each of this) { - action(each); - } -} - -function aggregate(this: Iterable, accumulator: (current: T | A, next: T) => A, seed?: T | A, resultAction?: (result?: T | A) => A | R): T | A | R | undefined { - let result: T | A | undefined = seed; - for (const each of this) { - if (result === undefined) { - result = each; - continue; - } - result = accumulator(result, each); - } - return resultAction !== undefined ? resultAction(result) : result; -} - -function selectNonNullable(this: Iterable, selector: (each: T) => V): IterableWithLinq> { - return linqify(function* (this: Iterable) { - for (const each of this) { - const value = selector(each); - if (value) { - yield >value; - } - } - }.bind(this)()); -} - -function nonNullable(this: Iterable): IterableWithLinq> { - return linqify(function* (this: Iterable) { - for (const each of this) { - if (each) { - yield >each; - } - } - }.bind(this)()); -} - -function first(this: Iterable, predicate?: (each: T) => boolean): T | undefined { - for (const each of this) { - if (!predicate || predicate(each)) { - return each; - } - } - return undefined; -} - -function toArray(this: Iterable): Array { - return [...this]; -} - -function toObject(this: Iterable, selector: (each: T) => [string, V]): Record { - const result : Record = {}; - for (const each of this) { - const [key, value] = selector(each); - result[key] = value; - } - return result; -} - -async function results(this: Iterable): Promise { - await Promise.all([...this]); -} - - -function join(this: Iterable, separator: string): string { - return [...this].join(separator); -} - -function bifurcate(this: Iterable, predicate: (each: T) => boolean): Array> { - const result = [new Array(), new Array()]; - for (const each of this) { - result[predicate(each) ? 0 : 1].push(each); - } - return result; -} - -function distinct(this: Iterable, selector?: (each: T) => any): IterableWithLinq { - const hash: Record = {}; - return linqify(function* (this: Iterable) { - - if (!selector) { - selector = i => i; - } - for (const each of this) { - const k = JSON.stringify(selector(each)); - if (!hash[k]) { - hash[k] = true; - yield each; - } - } - }.bind(this)()); -} - -function duplicates(this: Iterable, selector?: (each: T) => any): IterableWithLinq { - const hash: Record = {}; - return linqify(function* (this: Iterable) { - - if (!selector) { - selector = i => i; - } - for (const each of this) { - const k = JSON.stringify(selector(each)); - if (hash[k] === undefined) { - hash[k] = false; - } else { - if (hash[k] === false) { - hash[k] = true; - yield each; - } - } - } - }.bind(this)()); -} - -/** A Map of Key: Array */ -export class ManyMap extends Map> { - /** - * Push the value into the array at key - * @param key the unique key in the map - * @param value the value to push to the collection at 'key' - */ - push(key: K, value: V) { - this.getOrDefault(key, []).push(value); - } -} - -export function countWhere(from: Iterable, predicate: (each: T) => Promise): Promise -export function countWhere(from: Iterable, predicate: (each: T) => boolean): number -export function countWhere(from: Iterable, predicate: (e: T) => boolean | Promise) { - let v = 0; - const all = []; - for (const each of from) { - const test = predicate(each); - if (test.then) { - all.push(test.then((antecedent: any) => { - if (antecedent) { - v++; - } - })); - continue; - } - if (test) { - v++; - } - } - if (all.length) { - return Promise.all(all).then(() => v); - } - return v; -} diff --git a/vcpkg-artifacts/util/manual-promise.ts b/vcpkg-artifacts/util/manual-promise.ts deleted file mode 100644 index 379341eb6f..0000000000 --- a/vcpkg-artifacts/util/manual-promise.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** -* A manually (or externally) controlled asynchronous Promise implementation -*/ -export class ManualPromise implements Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined): Promise { - return this.p.then(onfulfilled, onrejected); - } - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise { - return this.p.catch(onrejected); - } - finally(onfinally?: (() => void) | null | undefined): Promise { - return this.p.finally(onfinally); - } - - readonly [Symbol.toStringTag] = 'Promise'; - private p: Promise; - - /** - * A method to manually resolve the Promise. - */ - public resolve: (value?: T | PromiseLike | undefined) => void = (_v) => { /* */ }; - - /** - * A method to manually reject the Promise - */ - public reject: (_e: any) => void = (_e) => { /* */ }; - - private state: 'pending' | 'resolved' | 'rejected' = 'pending'; - - /** - * Returns true of the Promise has been Resolved or Rejected - */ - public get isCompleted(): boolean { - return this.state !== 'pending'; - } - - /** - * Returns true if the Promise has been Resolved. - */ - public get isResolved(): boolean { - return this.state === 'resolved'; - } - - /** - * Returns true if the Promise has been Rejected. - */ - public get isRejected(): boolean { - return this.state === 'rejected'; - } - - public constructor() { - this.p = new Promise((r, j) => { - this.resolve = (v: T | PromiseLike | undefined) => { this.state = 'resolved'; r(v); }; - this.reject = (e: any) => { this.state = 'rejected'; j(e); }; - }); - } -} - -export class LazyPromise extends ManualPromise { - public constructor(private action: () => Promise) { - super(); - } - - execute() { - this.action().then(v => this.resolve(v), e => this.reject(e)); - return this; - } -} diff --git a/vcpkg-artifacts/util/percentage-scaler.ts b/vcpkg-artifacts/util/percentage-scaler.ts deleted file mode 100644 index 40c384487a..0000000000 --- a/vcpkg-artifacts/util/percentage-scaler.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; - -export class PercentageScaler { - private readonly scaledDomainMax : number; - private readonly scaledPercentMax : number; - - private static clamp(test: number, min: number, max:number) : number { - if (test < min) { return min; } - if (test > max) { return max; } - return test; - } - - constructor(public readonly lowestDomain: number, public readonly highestDomain: number, - public readonly lowestPercentage = 0, public readonly highestPercentage = 100) { - strict.ok(lowestDomain <= highestDomain); - strict.ok(lowestPercentage <= highestPercentage); - this.scaledDomainMax = highestDomain - lowestDomain; - this.scaledPercentMax = highestPercentage - lowestPercentage; - } - - scalePosition(domain: number) : number { - if (this.scaledDomainMax === 0 || this.scaledPercentMax === 0) { - return this.highestPercentage; - } - const domainClamped = PercentageScaler.clamp(domain, this.lowestDomain, this.highestDomain); - const domainScaled = domainClamped - this.lowestDomain; - const domainProportion = domainScaled / this.scaledDomainMax; - const partialPercent = this.scaledPercentMax * domainProportion; - const percentage = this.lowestPercentage + partialPercent; - return Math.round(percentage * 10) / 10; - } -} diff --git a/vcpkg-artifacts/util/promise.ts b/vcpkg-artifacts/util/promise.ts deleted file mode 100644 index c5c02d7ee7..0000000000 --- a/vcpkg-artifacts/util/promise.ts +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { LazyPromise, ManualPromise } from './manual-promise'; - -/** a precrafted failed Promise */ -const waiting = Promise.reject(0xDEFACED); -waiting.catch(() => { /** */ }); - -/** - * Does a Promise.any(), and accept the one that first matches the predicate, or if all resolve, and none match, the first. - * - * @remarks WARNING - this requires Node 15+ - * @param from - * @param predicate - */ -export async function anyWhere(from: Iterable>, predicate: (value: T) => boolean) { - let unfulfilled = new Array>(); - const failed = new Array>(); - const completed = new Array(); - - // wait for something to succeed. if nothing suceeds, then this will throw. - const first = await Promise.any(from); - let success: T | undefined; - - while (true) { - for (const each of from) { - // if we had a winner, return now. - await Promise.any([each, waiting]).then(antecedent => { - if (predicate(antecedent)) { - success = antecedent; - return antecedent; - } - completed.push(antecedent); - return undefined; - }).catch(r => { - if (r === 0xDEFACED) { - // it's not done yet. - unfulfilled.push(each); - } else { - // oh, it returned and it was a failure. - failed.push(each); - } - return undefined; - }); - } - // we found one that passes muster! - if (success) { - return success; - } - - if (unfulfilled.length) { - // something completed successfully, but nothing passed the predicate yet. - // so hope remains eternal, lets rerun whats left with the unfulfilled. - from = unfulfilled; - unfulfilled = []; - continue; - } - - // they all finished - // but nothing hit the happy path. - break; - } - - // if we get here, then we're - // everything completed, but nothing passed the predicate - // give them the first to succeed - return first; -} - - -export class Queue { - private total = 0; - private active = 0; - private queue = new Array>(); - private whenZero: ManualPromise | undefined; - private rejections = new Array(); - - constructor(private maxConcurency = 8) { - } - - get count() { - return this.total; - } - - get done() { - return this.zero(); - } - - /** Will block until the queue hits the zero mark */ - private async zero(): Promise { - if (this.active) { - this.whenZero = this.whenZero || new ManualPromise(); - await this.whenZero; - } - if (this.rejections.length > 0) { - throw new AggregateError(this.rejections); - } - this.whenZero = undefined; - return this.total; - } - - private next() { - if (!(--this.active)) { - this.whenZero?.resolve(0); - } - - if (this.queue.length) { - this.queue.pop()?.execute().catch(async (e) => { this.rejections.push(e); throw e; }).finally(() => this.next()); - } - } - - /** - * Queues up actions for throttling the number of concurrent async tasks running at a given time. - * - * If the process has reached max concurrency, the action is deferred until the last item - * The last item - * @param action - */ - async enqueue(action: () => Promise): Promise { - strict.ok(!this.whenZero, 'items may not be added to the queue while it is being awaited'); - - this.active++; - this.total++; - - if (this.queue.length || this.active >= this.maxConcurency) { - const result = new LazyPromise(action); - this.queue.push(result); - return result; - } - - return action().catch(async (e) => { this.rejections.push(e); throw e; }).finally(() => this.next()); - } - - enqueueMany(iterable: Iterable, fn: (v: S) => Promise) { - for (const each of iterable) { - void this.enqueue(() => fn(each)); - } - return this; - } - -} diff --git a/vcpkg-artifacts/util/text.ts b/vcpkg-artifacts/util/text.ts deleted file mode 100644 index 3b3b01849b..0000000000 --- a/vcpkg-artifacts/util/text.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { TextDecoder } from 'util'; - -const decoder = new TextDecoder('utf-8'); - -export function decode(input?: NodeJS.ArrayBufferView | ArrayBuffer | null | undefined) { - return decoder.decode(input); -} -export function encode(content: string): Uint8Array { - return Buffer.from(content, 'utf-8'); -} - -export function equalsIgnoreCase(s1: string | undefined, s2: string | undefined): boolean { - return s1 === s2 || !!s1 && !!s2 && s1.localeCompare(s2, undefined, { sensitivity: 'base' }) === 0; -} diff --git a/vcpkg-artifacts/util/uri.ts b/vcpkg-artifacts/util/uri.ts deleted file mode 100644 index dc84af3db4..0000000000 --- a/vcpkg-artifacts/util/uri.ts +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { strict } from 'assert'; -import { dirname, join, relative } from 'path'; -import { Readable, Writable } from 'stream'; -import { URL } from 'url'; -import { URI } from 'vscode-uri'; -import { UriComponents } from 'vscode-uri/lib/umd/uri'; -import { FileStat, FileSystem, FileType, ReadHandle, WriteStreamOptions } from '../fs/filesystem'; -import { HashVerifyEvents } from '../interfaces/events'; -import { Algorithm, Hash, hash } from './hash'; -import { decode, encode } from './text'; - -/** - * This class is intended to be a drop-in replacement for the vscode uri - * class, but has a filesystem associated with it. - * - * By associating the filesystem with the URI, we can allow for file URIs - * to be scoped to a given filesystem (ie, a zip could be a filesystem ) - * - * Uniform Resource Identifier (URI) https://tools.ietf.org/html/rfc3986. - * This class is a simple parser which creates the basic component parts - * (https://tools.ietf.org/html/rfc3986#section-3) with minimal validation - * and encoding. - * - * - * ```txt - * foo://example.com:8042/over/there?name=ferret#nose - * \_/ \______________/\_________/ \_________/ \__/ - * | | | | | - * scheme authority path query fragment - * | _____________________|__ - * / \ / \ - * urn:example:animal:ferret:nose - * ``` - * - */ -export class Uri implements URI { - protected constructor(public readonly fileSystem: FileSystem, protected readonly uri: URI) { - - } - - static readonly invalid = new Uri(undefined, URI.parse('invalid:')); - - static isInvalid(uri?: Uri) { - return uri === undefined || Uri.invalid === uri; - } - /** - * scheme is the 'https' part of 'https://www.msft.com/some/path?query#fragment'. - * The part before the first colon. - */ - get scheme() { return this.uri.scheme; } - - /** - * authority is the 'www.msft.com' part of 'https://www.msft.com/some/path?query#fragment'. - * The part between the first double slashes and the next slash. - */ - get authority() { return this.uri.authority; } - - /** - * path is the '/some/path' part of 'https://www.msft.com/some/path?query#fragment'. - */ - get path() { return this.uri.path; } - - /** - * query is the 'query' part of 'https://www.msft.com/some/path?query#fragment'. - */ - get query() { return this.uri.query; } - - /** - * fragment is the 'fragment' part of 'https://www.msft.com/some/path?query#fragment'. - */ - get fragment() { return this.uri.fragment; } - - /** - * Creates a new Uri from a string, e.g. `https://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param value A string which represents an URI (see `URI#toString`). - */ - static parse(fileSystem: FileSystem, value: string, _strict?: boolean): Uri { - return new Uri(fileSystem, URI.parse(value, _strict)); - } - - /** - * Creates a new Uri from a string, and replaces 'vsix' schemes with file:// instead. - * - * @param value A string which represents a URI which may be a VSIX uri. - */ - static parseFilterVsix(fileSystem: FileSystem, value: string, _strict?: boolean, vsixBaseUri?: Uri): Uri { - const parsed = URI.parse(value, _strict); - if (vsixBaseUri && parsed.scheme === 'vsix') { - return vsixBaseUri.join(parsed.path); - } - - return new Uri(fileSystem, parsed); - } - - /** - * Creates a new URI from a file system path, e.g. `c:\my\files`, - * `/usr/home`, or `\\server\share\some\path`. - * - * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument - * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** - * `URI.parse('file://' + path)` because the path might contain characters that are - * interpreted (# and ?). See the following sample: - * ```ts -const good = URI.file('/coding/c#/project1'); -good.scheme === 'file'; -good.path === '/coding/c#/project1'; -good.fragment === ''; -const bad = URI.parse('file://' + '/coding/c#/project1'); -bad.scheme === 'file'; -bad.path === '/coding/c'; // path is now broken -bad.fragment === '/project1'; -``` - * - * @param path A file system path (see `URI#fsPath`) - */ - static file(fileSystem: FileSystem, path: string): Uri { - return new Uri(fileSystem, URI.file(path)); - } - - /** construct an Uri from the various parts */ - static from(fileSystem: FileSystem, components: { - scheme: string; - authority?: string; - path?: string; - query?: string; - fragment?: string; - }): Uri { - return new Uri(fileSystem, URI.from(components)); - } - - /** - * Join all arguments together and normalize the resulting Uri. - * - * Also ensures that slashes are all forward. - * */ - join(...paths: Array) { - return new Uri(this.fileSystem, this.with({ path: join(this.path, ...paths).replace(/\\/g, '/') })); - } - - relative(target: Uri): string { - strict.ok(target.authority === this.authority, `Uris '${target.toString()}' and '${this.toString()}' are not of the same base`); - return relative(this.path, target.path).replace(/\\/g, '/'); - } - - /** returns true if the uri represents a file:// resource. */ - get isLocal(): boolean { - return this.scheme === 'file' || this.scheme === 'vsix'; - } - - get isHttps(): boolean { - return this.scheme === 'https'; - } - /** - * Returns a string representing the corresponding file system path of this URI. - * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the - * platform specific path separator. - * - * * Will *not* validate the path for invalid characters and semantics. - * * Will *not* look at the scheme of this URI. - * * The result shall *not* be used for display purposes but for accessing a file on disk. - * - * - * The *difference* to `URI#path` is the use of the platform specific separator and the handling - * of UNC paths. See the below sample of a file-uri with an authority (UNC path). - * - * ```ts - const u = URI.parse('file://server/c$/folder/file.txt') - u.authority === 'server' - u.path === '/shares/c$/file.txt' - u.fsPath === '\\server\c$\folder\file.txt' - ``` - * - * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, - * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working - * with URIs that represent files on disk (`file` scheme). - */ - get fsPath(): string { - return this.uri.fsPath; - } - - /** Duplicates the current Uri, changing out any parts */ - with(change: { scheme?: string | undefined; authority?: string | null | undefined; path?: string | null | undefined; query?: string | null | undefined; fragment?: string | null | undefined; }): URI { - return new Uri(this.fileSystem, this.uri.with(change)); - } - - /** - * Creates a string representation for this URI. It's guaranteed that calling - * `URI.parse` with the result of this function creates an URI which is equal - * to this URI. - * - * * The result shall *not* be used for display purposes but for externalization or transport. - * * The result will be encoded using the percentage encoding and encoding happens mostly - * ignore the scheme-specific encoding rules. - * - * @param skipEncoding Do not encode the result, default is `false` - */ - toString(skipEncoding?: boolean): string { - return this.uri.toString(skipEncoding); - } - - get formatted(): string { - return this.scheme === 'file' ? this.uri.fsPath : this.uri.toString(); - } - - /** returns a JSON object with the components of the Uri */ - toJSON(): UriComponents { - return this.uri.toJSON(); - } - - toUrl(): URL { - return new URL(this.uri.toString()); - } - - /* Act on this uri */ - protected resolve(uriOrRelativePath?: Uri | string) { - return typeof uriOrRelativePath === 'string' ? this.join(uriOrRelativePath) : uriOrRelativePath ?? this; - } - - stat(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.stat(uri); - } - - readDirectory(uri?: Uri | string, options?: { recursive?: boolean }): Promise> { - uri = this.resolve(uri); - return uri.fileSystem.readDirectory(uri, options); - } - - async createDirectory(uri?: Uri | string): Promise { - uri = this.resolve(uri); - await uri.fileSystem.createDirectory(uri); - return uri; - } - - readFile(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.readFile(uri); - } - - async readUTF8(uri?: Uri | string): Promise { - return decode(await this.readFile(uri)); - } - - async tryReadUTF8(uri?: Uri | string): Promise { - try { - return await this.readUTF8(uri); - // eslint-disable-next-line no-empty - } catch { } - - return undefined; - } - - openFile(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.openFile(uri); - } - - readStream(start = 0, end = Infinity): Promise { - return this.fileSystem.readStream(this, { start, end }); - } - - async readBlock(start = 0, end = Infinity): Promise { - const stream = await this.fileSystem.readStream(this, { start, end }); - - let block = Buffer.alloc(0); - for await (const chunk of stream) { - block = Buffer.concat([block, chunk]); - } - return block; - } - - async writeFile(content: Uint8Array): Promise { - await this.fileSystem.writeFile(this, content); - return this; - } - - writeUTF8(content: string): Promise { - return this.writeFile(encode(content)); - } - - writeStream(options?: WriteStreamOptions): Promise { - return this.fileSystem.writeStream(this, options); - } - - delete(options?: { recursive?: boolean, useTrash?: boolean }): Promise { - return this.fileSystem.delete(this, options); - } - - exists(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.exists(uri); - } - - isFile(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.isFile(uri); - } - - isSymlink(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.isSymlink(uri); - } - - isDirectory(uri?: Uri | string): Promise { - uri = this.resolve(uri); - return uri.fileSystem.isDirectory(uri); - } - - async size(uri?: Uri | string): Promise { - return (await this.stat(uri)).size; - } - - async hash(algorithm?: Algorithm): Promise { - if (algorithm) { - - return await hash(await this.fileSystem.readStream(this), this, await this.size(), algorithm, {}); - } - return undefined; - } - - async hashValid(events: Partial, matchOptions?: Hash) { - if (matchOptions?.algorithm && await this.exists()) { - events.hashVerifyStart?.(this.fsPath); - const result = matchOptions.value?.toLowerCase() === await hash(await this.readStream(), this, await this.size(), matchOptions.algorithm, events); - events.hashVerifyComplete?.(this.fsPath); - return result; - } - return false; - } - - get parent(): Uri { - return new Uri(this.fileSystem, this.with({ - path: dirname(this.path) - })); - } -} - -export function isFilePath(uriOrPath?: Uri | string): boolean { - if (uriOrPath) { - if (uriOrPath instanceof Uri) { - return uriOrPath.scheme === 'file'; - } - if (uriOrPath.startsWith('file:')) { - return true; - } - return !!(/^[/\\.]|^[a-zA-Z]:/g.exec((uriOrPath || '').toString())); - } - return false; -} diff --git a/vcpkg-artifacts/vcpkg.ts b/vcpkg-artifacts/vcpkg.ts deleted file mode 100644 index 50bd5df702..0000000000 --- a/vcpkg-artifacts/vcpkg.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { spawn } from 'child_process'; -import { i } from './i18n'; -import { DownloadEvents } from './interfaces/events'; -import { Session } from './session'; -import { Uri } from './util/uri'; - -function streamVcpkg(vcpkgCommand: string | undefined, args: Array, listener: (chunk: any) => void): Promise { - return new Promise((accept, reject) => { - if (!vcpkgCommand) { - reject(i`VCPKG_COMMAND was not set`); - return; - } - - const subproc = spawn(vcpkgCommand, args, { stdio: ['ignore', 'pipe', 'pipe'] }); - subproc.stdout.on('data', listener); - subproc.stderr.pipe(process.stdout); - subproc.on('error', (err) => { reject(err); }); - subproc.on('close', (code: number) => { - if (code === 0) { - accept(); - return; - } - reject(i`Running vcpkg internally returned a nonzero exit code: ${code}`); - }); - }); -} - -async function runVcpkg(vcpkgCommand: string | undefined, args: Array): Promise { - let result = ''; - await streamVcpkg(vcpkgCommand, args, (chunk) => { result += chunk; }); - return result.trimEnd(); -} - -export function vcpkgFetch(session: Session, fetchKey: string): Promise { - return runVcpkg(session.vcpkgCommand, ['fetch', fetchKey, '--x-stderr-status']).then((output) => { - return output; - }, (error) => { - if (fetchKey === 'git') { - session.channels.warning('failed to fetch git, falling back to attempting to use git from the PATH'); - return Promise.resolve('git'); - } - - return Promise.reject(error); - }); -} - -export async function vcpkgExtract(session: Session, archive: string, target:string, strip?:number|string): Promise { - const args: Array = ['z-extract', archive, target]; - if (strip) - { - args.push(`--strip=${strip}`); - } - - return runVcpkg(session.vcpkgCommand, args); -} - -export async function vcpkgDownload(session: Session, destination: string, sha512: string | undefined, uris: Array, events: Partial) : Promise { - const args = ['x-download', destination, '--z-machine-readable-progress']; - if (sha512) { - args.push(`--sha512=${sha512}`); - } else { - args.push('--skip-sha512'); - } - - for (const uri of uris) { - events.downloadProgress?.(uri, destination, 0); - const uriArgs = [...args, `--url=${uri.toString()}`]; - try { - await streamVcpkg(session.vcpkgCommand, uriArgs, (chunk) => { - const match = /(\d+)(\.\d+)?%\s*$/.exec(chunk); - if (!match) { return; } - const number = parseFloat(match[1]); - // throwing out 100s avoids displaying temporarily full progress bars resulting from redirects getting resolved - if (number && number < 100) { - events.downloadProgress?.(uri, destination, number); - } - }); - - return; - } catch { - session.channels.warning(i`failed to download from ${uri.toString()}`); - } - } - - throw new Error(i`failed to download ${destination} from any source`); -} diff --git a/vcpkg-artifacts/yaml/BaseMap.ts b/vcpkg-artifacts/yaml/BaseMap.ts deleted file mode 100644 index 89e86d5b1a..0000000000 --- a/vcpkg-artifacts/yaml/BaseMap.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isScalar, isSeq } from 'yaml'; -import { Entity } from './Entity'; -import { ScalarSequence } from './ScalarSequence'; -import { EntityFactory, Node, Primitive, Yaml, YAMLSequence } from './yaml-types'; - - -export /** @internal */ abstract class BaseMap extends Entity { - - - get length(): number { - return this.exists() ? this.node.items.length : 0; - } - - getEntity = Yaml>(key: string, factory: EntityFactory): TEntity | undefined { - if (this.exists()) { - const v = this.node.get(key, true); - if (v) { - return new factory(v, this, key); - } - } - return undefined; - } - - getSequence(key: string, factory: EntityFactory | (new (node: Node, parent?: Yaml, key?: string) => ScalarSequence)) { - if (this.exists()) { - const v = this.node.get(key, true); - if (isSeq(v)) { - return new factory(v); - } - } - return undefined; - } - - getValue(key: string): Primitive | undefined { - if (this.exists()) { - const v = this.node.get(key, true); - if (isScalar(v)) { - return this.asPrimitive(v.value); - } - } - return undefined; - } - - delete(key: string) { - let result = false; - if (this.node) { - result = this.node.delete(key); - } - this.dispose(); - return result; - } - - clear() { - if (isMap(this.node) || isSeq(this.node)) { - this.node.items.length = 0; - } - this.dispose(true); - } -} diff --git a/vcpkg-artifacts/yaml/Coerce.ts b/vcpkg-artifacts/yaml/Coerce.ts deleted file mode 100644 index 4111641bb0..0000000000 --- a/vcpkg-artifacts/yaml/Coerce.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isScalar } from 'yaml'; -import { Primitive } from './yaml-types'; - - -export /** @internal */ class Coerce { - static String(value: any): string | undefined { - if (isScalar(value)) { - value = value.value; - } - return typeof value === 'string' ? value : undefined; - } - static Number(value: any): number | undefined { - if (isScalar(value)) { - value = value.value; - } - return typeof value === 'number' ? value : undefined; - } - static Boolean(value: any): boolean | undefined { - if (isScalar(value)) { - value = value.value; - } - return typeof value === 'boolean' ? value : undefined; - } - static Primitive(value: any): Primitive | undefined { - if (isScalar(value)) { - value = value.value; - } - switch (typeof value) { - case 'boolean': - case 'number': - case 'string': - return value; - } - return undefined; - } -} diff --git a/vcpkg-artifacts/yaml/CustomScalarMap.ts b/vcpkg-artifacts/yaml/CustomScalarMap.ts deleted file mode 100644 index d419871e6b..0000000000 --- a/vcpkg-artifacts/yaml/CustomScalarMap.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isScalar, Scalar } from 'yaml'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { BaseMap } from './BaseMap'; -import { EntityFactory, Yaml, YAMLDictionary } from './yaml-types'; - - -export /** @internal */ class CustomScalarMap> extends BaseMap { - protected constructor(protected factory: EntityFactory, node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(node, parent, key); - } - - add(key: string): TElement { - this.assert(true); - this.node.set(key, ''); - return this.get(key)!; - } - - - *[Symbol.iterator](): Iterator<[string, TElement]> { - if (this.node) { - for (const { key, value } of this.node.items) { - if (isScalar(value)) { - yield [key, new this.factory(value, this, key)]; - } - } - } - } - - get(key: string): TElement | undefined { - if (this.node) { - const v = this.node.get(key, true); - if (isScalar(v)) { - return new this.factory(v, this, key); - } - } - return undefined; - } - - set(key: string, value: TElement) { - if (value === undefined || value === null) { - throw new Error('Cannot set undefined or null to a map'); - } - - if (value.empty) { - throw new Error('Cannot set an empty entity to a map'); - } - - this.assert(true); // if we don't have a node at the moment, we need to create one. - - this.node.set(key, new Scalar(value)); - } - - override *validate(): Iterable { - yield* this.validateIsObject(); - } -} diff --git a/vcpkg-artifacts/yaml/Entity.ts b/vcpkg-artifacts/yaml/Entity.ts deleted file mode 100644 index a288857152..0000000000 --- a/vcpkg-artifacts/yaml/Entity.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isScalar, isSeq, Scalar } from 'yaml'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { isNullish } from '../util/checks'; -import { Node, Primitive, Yaml, YAMLDictionary } from './yaml-types'; - -/** An object that is backed by a YamlMAP node */ - -export /** @internal */ class Entity extends Yaml { - /**@internal*/ static override create(): YAMLDictionary { - return new YAMLDictionary(); - } - - protected setMember(name: string, value: Primitive | undefined): void { - this.assert(true); - - if (isNullish(value)) { - this.node.delete(name); - return; - } - - this.node.set(name, new Scalar(value)); - } - - protected getMember(name: string): Primitive | undefined { - return this.exists() ? this.node?.get(name, false) : undefined; - } - - override /** @internal */ *validate(): Iterable { - yield* super.validate(); - yield* this.validateIsObject(); - } - - has(key: string, kind?: 'sequence' | 'entity' | 'scalar'): boolean { - if (this.node) { - switch (kind) { - case 'sequence': - return isSeq(this.node.get(key)); - case 'entity': - return isMap(this.node.get(key)); - case 'scalar': - return isScalar(this.node.get(key)); - default: - return this.node.has(key); - } - } - return false; - } - - kind(key: string): 'sequence' | 'entity' | 'scalar' | 'string' | 'number' | 'boolean' | 'undefined' | undefined { - if (this.node) { - const v = this.node.get(key, true); - if (v === undefined) { - return 'undefined'; - } - - if (isSeq(v)) { - return 'sequence'; - } else if (isMap(v)) { - return 'entity'; - } else if (isScalar(v)) { - if (typeof v.value === 'string') { - return 'string'; - } else if (typeof v.value === 'number') { - return 'number'; - } else if (typeof v.value === 'boolean') { - return 'boolean'; - } - } - } - return undefined; - } - - childIs(key: string, kind: 'sequence' | 'entity' | 'scalar' | 'string' | 'number' | 'boolean'): boolean | undefined { - if (this.node) { - const v = this.node.get(key, true); - if (v === undefined) { - return undefined; - } - - switch (kind) { - case 'sequence': - return isSeq(v); - case 'entity': - return isMap(v); - case 'scalar': - return isScalar(v); - case 'string': - return isScalar(v) && typeof v.value === 'string'; - case 'number': - return isScalar(v) && typeof v.value === 'number'; - case 'boolean': - return isScalar(v) && typeof v.value === 'boolean'; - } - } - return false; - } -} diff --git a/vcpkg-artifacts/yaml/EntityMap.ts b/vcpkg-artifacts/yaml/EntityMap.ts deleted file mode 100644 index 22a94b7ad5..0000000000 --- a/vcpkg-artifacts/yaml/EntityMap.ts +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Dictionary } from '../interfaces/collections'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { BaseMap } from './BaseMap'; -import { EntityFactory, Node, Yaml, YAMLDictionary } from './yaml-types'; - - -export /** @internal */ abstract class EntityMap> extends BaseMap implements Dictionary, Iterable<[string, TElement]> { - protected constructor(protected factory: EntityFactory, node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(node, parent, key); - } - - get values(): Iterable { - return this.exists() ? this.node.items.map(each => new this.factory(each.value)) : []; - } - - *[Symbol.iterator](): Iterator<[string, TElement]> { - if (this.node) { - for (const each of this.node.items) { - const k = this.asString(each.key); - if (k) { - yield [k, new this.factory(each.value, this, k)]; - } - } - } - } - - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateIsObject(); - } - - add(key: string): TElement { - if (this.has(key)) { - return this.get(key)!; - } - this.assert(true); - const child = this.factory.create(); - this.set(key, child); - return new this.factory(this.factory.create(), this, key); - } - - get(key: string): TElement | undefined { - return this.getEntity(key, this.factory); - } - - set(key: string, value: TElement) { - if (value === undefined || value === null) { - throw new Error('Cannot set undefined or null to a map'); - } - - if (value.empty) { - throw new Error('Cannot set an empty entity to a map'); - } - - // if we don't have a node at the moment, we need to create one. - this.assert(true); - - this.node.set(key, value.node); - } -} diff --git a/vcpkg-artifacts/yaml/EntitySequence.ts b/vcpkg-artifacts/yaml/EntitySequence.ts deleted file mode 100644 index f04164529b..0000000000 --- a/vcpkg-artifacts/yaml/EntitySequence.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isMap, isScalar, isSeq } from 'yaml'; -import { EntityFactory, Yaml, YAMLDictionary, YAMLSequence } from './yaml-types'; - -/** - * EntitySequence is expressed as either a single entity or a sequence of entities. - */ - -export /** @internal */ class EntitySequence> extends Yaml { - protected constructor(protected factory: EntityFactory, node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(node, parent, key); - } - - static override create(): YAMLDictionary { - return new YAMLDictionary(); - } - get length(): number { - if (this.node) { - if (isSeq(this.node)) { - return this.node.items.length; - } - if (isMap(this.node)) { - return 1; - } - } - return 0; - } - - add(value: TElement) { - if (value === undefined || value === null) { - throw new Error('Cannot add undefined or null to a sequence'); - } - - if (value.empty) { - throw new Error('Cannot add an empty entity to a sequence'); - } - - if (!this.node) { - // if we don't have a node at the moment, we need to create one. - this.assert(true, value.node); - return; - } - - if (isMap(this.node)) { - // this is currently a single item. - // we need to convert it to a sequence - const n = this.node; - const seq = new YAMLSequence(); - seq.add(n); - this.node = seq; - - // fall thru to the sequnce add - } - - if (isSeq(this.node)) { - this.node.add(value.node); - return; - } - } - - get(index: number): TElement | undefined { - if (isSeq(this.node)) { - return this.node.items[index]; - } - - if (isScalar(this.node) && index === 0) { - return this.node.value; - } - - return undefined; - } - - *[Symbol.iterator](): Iterator { - if (isScalar(this.node)) { - return yield new this.factory(this.node); - } - yield* EntitySequence.generator(this); - } - - clear() { - if (isSeq(this.node)) { - // just make sure the collection is emptied first - this.node.items.length = 0; - } - this.dispose(true); - } - - protected static *generator>(sequence: EntitySequence) { - if (isSeq(sequence.node)) { - for (const item of sequence.node.items) { - yield new sequence.factory(item); - } - } - } -} diff --git a/vcpkg-artifacts/yaml/Options.ts b/vcpkg-artifacts/yaml/Options.ts deleted file mode 100644 index e9271a527e..0000000000 --- a/vcpkg-artifacts/yaml/Options.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Scalar } from 'yaml'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Yaml, YAMLSequence } from './yaml-types'; - - -export /** @internal */ class Options extends Yaml { - - static override create(): YAMLSequence { - return new YAMLSequence(); - } - - has(option: string) { - if (this.node) { - return this.node.items.some(each => each.value === option); - } - return false; - } - - set(option: string, value: boolean) { - this.assert(true); - if (value) { - this.node.add(new Scalar(option)); - } else { - this.node.delete(option); - } - } - - override *validate(): Iterable { - yield* super.validate(); - yield* this.validateIsSequence(); - } -} diff --git a/vcpkg-artifacts/yaml/ScalarMap.ts b/vcpkg-artifacts/yaml/ScalarMap.ts deleted file mode 100644 index e16f7d77a9..0000000000 --- a/vcpkg-artifacts/yaml/ScalarMap.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isScalar } from 'yaml'; -import { BaseMap } from './BaseMap'; -import { Primitive } from './yaml-types'; - - -export /** @internal */ class ScalarMap extends BaseMap { - get(key: string): TElement | undefined { - return this.getValue(key); - } - - set(key: string, value: TElement) { - this.assert(true); - this.node.set(key, value); - } - - add(key: string): TElement { - this.assert(true); - this.node.set(key, ''); - return this.getValue(key); - } - - *[Symbol.iterator](): Iterator<[string, TElement]> { - if (this.node) { - for (const { key, value } of this.node.items) { - if (isScalar(value)) { - yield [this.asString(key)!, this.asPrimitive(value)]; - } - } - } - } -} diff --git a/vcpkg-artifacts/yaml/ScalarSequence.ts b/vcpkg-artifacts/yaml/ScalarSequence.ts deleted file mode 100644 index 6a996803ed..0000000000 --- a/vcpkg-artifacts/yaml/ScalarSequence.ts +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isScalar, isSeq, Scalar, YAMLSeq } from 'yaml'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { Primitive, Yaml, YAMLScalar, YAMLSequence } from './yaml-types'; - -/** - * ScalarSequence is expressed as either a single scalar value or a sequence of scalar values. - */ - -export /** @internal */ class ScalarSequence extends Yaml | Scalar> { - static override create(): YAMLScalar { - return new YAMLScalar(''); - } - - get length(): number { - if (this.node) { - if (isSeq(this.node)) { - return this.node.items.length; - } - if (isScalar(this.node)) { - return 1; - } - } - return 0; - } - - has(value: TElement) { - for (const each of this) { - if (value === each) { - return true; - } - } - return false; - } - - add(value: TElement) { - if (value === undefined || value === null) { - throw new Error('Cannot add undefined or null to a sequence'); - } - - // check if the value is already in the set - if (this.has(value)) { - return; - } - - if (!this.node) { - // if we don't have a node at the moment, we need to create one. - this.assert(true); - (this.node).value = value; - return; - } - - if (isScalar(this.node)) { - // this is currently a single item. - // we need to convert it to a sequence - const n = this.node; - const seq = new YAMLSequence(); - seq.add(n); - this.dispose(true); - this.assert(true, seq); - // fall thru to the sequnce add - } - - if (isSeq(this.node)) { - this.node.add((new Scalar(value))); - } - } - - delete(value: TElement) { - if (isSeq(this.node)) { - for (let i = 0; i < this.node.items.length; i++) { - if (value === this.asPrimitive(this.node.items[i])) { - this.node.items.splice(i, 1); - return true; - } - } - } - if (isScalar(this.node) && this.node.value === value) { - this.dispose(true); - return true; - } - return false; - } - - get(index: number): TElement | undefined { - if (isSeq(this.node)) { - return this.node.items[index]; - } - - if (isScalar(this.node) && index === 0) { - return this.node.value; - } - - return undefined; - } - - *[Symbol.iterator](): Iterator { - if (isScalar(this.node)) { - return yield this.asPrimitive(this.node.value); - } - if (isSeq(this.node)) { - - for (const each of this.node.items.values()) { - const v = this.asPrimitive(each); - if (v !== undefined) { - yield v; - } - } - } - } - - clear() { - if (isSeq(this.node)) { - // just make sure the collection is emptied first - this.node.items.length = 0; - } - this.dispose(true); - } - - override *validate(): Iterable { - if (this.node && !isSeq(this.node) && !isScalar(this.node)) { - yield { - message: `'${this.fullName}' is not an sequence or primitive value`, - range: this, - category: ErrorKind.IncorrectType - }; - } - } -} diff --git a/vcpkg-artifacts/yaml/strings.ts b/vcpkg-artifacts/yaml/strings.ts deleted file mode 100644 index abd41e38e0..0000000000 --- a/vcpkg-artifacts/yaml/strings.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Dictionary, Strings as IStrings } from '../interfaces/collections'; -import { EntityMap } from './EntityMap'; -import { ScalarSequence } from './ScalarSequence'; -import { Yaml, YAMLDictionary, YAMLScalar, YAMLSequence } from './yaml-types'; - - -export class Strings extends ScalarSequence implements IStrings { - constructor(node?: YAMLSequence | YAMLScalar, parent?: Yaml, key?: string) { - super(node, parent, key); - } -} - -export class StringsMap extends EntityMap> implements Dictionary { - constructor(node?: YAMLDictionary, parent?: Yaml, key?: string) { - super(Strings, node, parent, key); - } -} \ No newline at end of file diff --git a/vcpkg-artifacts/yaml/yaml-types.ts b/vcpkg-artifacts/yaml/yaml-types.ts deleted file mode 100644 index 726f0d0227..0000000000 --- a/vcpkg-artifacts/yaml/yaml-types.ts +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isCollection, isMap, isScalar, isSeq, Scalar, YAMLMap, YAMLSeq } from 'yaml'; -import { ErrorKind } from '../interfaces/error-kind'; -import { ValidationMessage } from '../interfaces/validation-message'; -import { isNullish } from '../util/checks'; - -export class YAMLDictionary extends YAMLMap { } -export class YAMLSequence extends YAMLSeq { } -export class YAMLScalar extends Scalar { } -export type Primitive = string | number | boolean; -export type Node = YAMLDictionary | YAMLSequence | YAMLScalar; -export type Range = [number, number, number]; - -export /** @internal */ abstract class Yaml { - constructor(/** @internal */ node?: ThisType, protected parent?: Yaml, protected key?: string) { - this.node = node; - if (!(>(this.constructor)).create) { - throw new Error(`class ${this.constructor.name} is missing implementation for create`); - } - } - - get fullName(): string { - return !this.node ? '' : this.parent ? this.key ? `${this.parent.fullName}.${this.key}` : this.parent.fullName : this.key || '$'; - } - - /** returns the current node as a JSON string */ - toString(): string { - return this.node?.toJSON() ?? ''; - } - - get keys(): Array { - return this.exists() && isMap(this.node) ? this.node.items.map(each => this.asString(each.key)!) : []; - } - - /** - * Coercion function to string - * - * This will pass the coercion up to the parent if it exists - * (or otherwise overridden in the subclass) - * - * Which allows for value overriding - */ - protected asString(value: any): string | undefined { - if (this.parent) { - return this.parent.asString(value); - } - - return value === undefined ? undefined : (isScalar(value) ? value.value : value).toString(); - } - - /** - * Coercion function to number - * - * This will pass the coercion up to the parent if it exists - * (or otherwise overridden in the subclass) - * - * Which allows for value overriding - */ - asNumber(value: any): number | undefined { - if (this.parent) { - return this.parent.asNumber(value); - } - - if (isScalar(value)) { - value = value.value; - } - return typeof value === 'number' ? value : undefined; - } - - /** - * Coercion function to boolean - * - * This will pass the coercion up to the parent if it exists - * (or otherwise overridden in the subclass) - * - * Which allows for value overriding - */ - asBoolean(value: any): boolean | undefined { - if (this.parent) { - return this.parent.asBoolean(value); - } - - if (isScalar(value)) { - value = value.value; - } - return typeof value === 'boolean' ? value : undefined; - } - - /** - * Coercion function to any primitive - * - * This will pass the coercion up to the parent if it exists - * (or otherwise overridden in the subclass) - * - * Which allows for value overriding - */ - asPrimitive(value: any): Primitive | undefined { - if (this.parent) { - return this.parent.asPrimitive(value); - } - - if (isScalar(value)) { - value = value.value; - } - switch (typeof value) { - case 'boolean': - case 'number': - case 'string': - return value; - } - return undefined; - } - - - get root(): Yaml { - return this.parent ? this.parent.root : this; - } - - protected createNode(): ThisType { - return (>this.constructor).create(); - } - - /**@internal*/ static create() { - throw new Error('creator not Not implemented on base class.'); - } - - private _node: ThisType | undefined; - - get node(): ThisType | undefined { - if (this._node) { - return this._node; - } - - if (this.key && this.parent && isMap(this.parent?.node)) { - this._node = this.parent.node.get(this.key, true); - } - - return this._node; - } - - set node(n: ThisType | undefined) { - this._node = n; - } - - sourcePosition(key?: string | number): Range | undefined { - if (!this.node) { - return undefined; - } - if (key !== undefined) { - if ((isMap(this.node) || isSeq(this.node))) { - const node = this.node.get(key, true); - if (node) { - return node.range || undefined; - } - return undefined; - } - if (isScalar(this.node)) { - throw new Error('Scalar does not have a key to get a source position'); - } - } - return this.node?.range || undefined; - } - - /** will dispose of this object if it is empty (or forced) */ - dispose(force = false, deleteFromParent = true) { - if ((this.empty || force) && this.node) { - if (deleteFromParent) { - this.parent?.deleteChild(this); - } - this.node = undefined; - } - } - - /** if this node has any data, this should return false */ - get empty(): boolean { - if (isCollection(this.node)) { - return !(this.node?.items.length); - } else if (isScalar(this.node)) { - return !isNullish(this.node.value); - } - - return false; - } - - /** @internal */ exists(): this is Yaml & { node: ThisType } { - if (this.node) { - return true; - } - // well, if we're lazy and haven't instantiated it yet, check if it's created. - if (this.key && this.parent && isMap(this.parent.node)) { - this.node = this.parent.node.get(this.key); - if (this.node) { - return true; - } - } - return false; - } - /** @internal */ assert(recreateIfDisposed = false, node = this.node): asserts this is Yaml & { node: ThisType } { - if (this.node && this.node === node) { - return; // quick and fast - } - - if (recreateIfDisposed) { - // ensure that this node is the node we're supposed to be. - this.node = node; - - if (this.parent) { - // ensure that the parent is not disposed - (this.parent).assert(true); - - if (isMap(this.parent.node)) { - if (this.key) { - // we have a parent, and the key, we can add the node. - // let's just check if there is one first - this.node = this.node || this.parent.node.get(this.key) || this.createNode(); - this.parent.node.set(this.key, this.node); - return; - } - // the parent is a map, but we don't have a key, so we can't add the node. - throw new Error('Parent is a map, but we don\'t have a key'); - } - - if (isSeq(this.parent.node)) { - this.node = this.node || this.parent.node.get(this.key) || this.createNode(); - this.parent.node.add(this.node); - return; - } - - throw new Error('YAML parent is not a container.'); - } - } - throw new Error('YAML node is undefined'); - } - - protected deleteChild(child: Yaml) { - if (!child.node) { - // this child is already disposed - return; - } - - this.assert(); - - const node = this.node; - if (isMap(node)) { - if (child.key) { - node.delete(child.key); - child.dispose(true, false); - this.dispose(); // clean up if this is empty - return; - } - } - - if (isSeq(node)) { - // child is in some kind of collection. - // we should be able to find the child's index and remove it. - const items = node.items; - for (let i = 0; i < items.length; i++) { - if (items[i] === child.node) { - node.delete(i); - child.dispose(true, false); - this.dispose(); // clean up if this is empty - return; - } - } - - // if we get here, we didn't find the child. - // but, it's not in the object, so we're good I guess - throw new Error('Child Node not found trying to delete'); - } - - throw new Error('this node does not have children.'); - } - - *validate(): Iterable { - // shh. - } - - protected *validateChildKeys(keys: Array): Iterable { - if (isMap(this.node)) { - for (const key of this.keys) { - if (keys.indexOf(key) === -1) { - yield { - message: `Unexpected '${key}' found in ${this.fullName}`, - range: this.sourcePosition(key), - category: ErrorKind.InvalidChild, - }; - } - } - } - } - - protected *validateIsObject(): Iterable { - if (this.node && !isMap(this.node)) { - yield { - message: `'${this.fullName}' is not an object`, - range: this, - category: ErrorKind.IncorrectType - }; - } - } - protected *validateIsSequence(): Iterable { - if (this.node && !isSeq(this.node)) { - yield { - message: `'${this.fullName}' is not an object`, - range: this, - category: ErrorKind.IncorrectType - }; - } - } - - protected *validateIsSequenceOrPrimitive(): Iterable { - if (this.node && (!isSeq(this.node) && !isScalar(this.node))) { - yield { - message: `'${this.fullName}' is not a sequence or value`, - range: this, - category: ErrorKind.IncorrectType - }; - } - } - - protected *validateIsObjectOrPrimitive(): Iterable { - if (this.node && (!isMap(this.node) && !isScalar(this.node))) { - yield { - message: `'${this.fullName}' is not an object or value`, - range: this, - category: ErrorKind.IncorrectType - }; - } - } - - protected *validateChild(child: string, kind: 'string' | 'boolean' | 'number'): Iterable { - if (this.node && isMap(this.node)) { - if (this.node.has(child)) { - const c = this.node.get(child, true); - if (!isScalar(c) || typeof c.value !== kind) { - yield { - message: `'${this.fullName}.${child}' is not a ${kind} value`, - range: c.range!, - category: ErrorKind.IncorrectType - }; - } - } - } - } -} - -export /** @internal */ interface EntityFactory> extends NodeFactory { - /**@internal*/ new(node: TNode, parent?: Yaml, key?: string): TEntity; -} - -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -export /** @internal */ interface NodeFactory extends Function { - /**@internal*/ create(): TNode; -} diff --git a/vcpkg-artifacts/yaml/yaml.ts b/vcpkg-artifacts/yaml/yaml.ts deleted file mode 100644 index d19e49f866..0000000000 --- a/vcpkg-artifacts/yaml/yaml.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Document, Node, Pair, parseDocument, Scalar, visit, YAMLMap, YAMLSeq } from 'yaml'; - -/** @internal */ -export const createNode = (v: any, _b = true) => parseDocument('', { prettyErrors: false }).createNode(v, {}); - -/** @internal */ -export function getOrCreateMap(node: Document.Parsed | YAMLMap, name: string): YAMLMap { - let m = node.get(name); - if (m) { - return m; - } - - node.set(name, m = new YAMLMap()); - return m; -} - -export function getStrings(node: Document.Parsed | YAMLMap, name: string): Array { - const r = node.get(name); - if (r) { - if (r instanceof YAMLSeq) { - return r.items.map((each: any) => each.value); - } - if (typeof r === 'string') { - return [r]; - } - } - return []; -} - -/** values that can be either a single string, or an array of strings */ -export type StringOrStrings = string | Array; - -export function setStrings(node: Document.Parsed | YAMLMap, name: string, value: StringOrStrings) { - if (Array.isArray(value)) { - switch (value.length) { - case 0: - return node.set(name, undefined); - case 1: - return node.set(name, value[0]); - } - return node.set(name, createNode(value, true)); - } - node.set(name, value); -} - -export function getPair(from: YAMLMap, name: string): Pair | undefined { - return from.items.find((each: any) => (each.key).value === name); -} - -export function serialize(value: any) { - const document = new Document(value); - visit(document, { - Seq: (_k, n, _p) => { - // set arrays to [ ... ] instead of one value per line. - n.flow = true; - } - }); - return document.toString(); -} diff --git a/vcpkg-init/mint-standalone-bundle.ps1 b/vcpkg-init/mint-standalone-bundle.ps1 index 90389fb65c..4262d45540 100644 --- a/vcpkg-init/mint-standalone-bundle.ps1 +++ b/vcpkg-init/mint-standalone-bundle.ps1 @@ -108,8 +108,6 @@ try { Copy-Item -Path "$ArchIndependentSignedFilesRoot/scripts/posh-vcpkg.psm1" -Destination 'out/scripts/posh-vcpkg/posh-vcpkg.psm1' Copy-Item -Path "$ArchIndependentSignedFilesRoot/scripts/posh-vcpkg.psd1" -Destination 'out/scripts/posh-vcpkg/posh-vcpkg.psd1' - Copy-Item -Path "$ArchIndependentSignedFilesRoot/vcpkg-artifacts.mjs" -Destination 'out/vcpkg-artifacts.mjs' - New-Item -Path "out/.vcpkg-root" -ItemType "File" Set-Content -Path "out/vcpkg-bundle.json" ` -Value (ConvertTo-Json -InputObject $BundleConfig) ` diff --git a/vcpkg-init/vcpkg-init b/vcpkg-init/vcpkg-init index 3583e63c6b..7e92fa659a 100644 --- a/vcpkg-init/vcpkg-init +++ b/vcpkg-init/vcpkg-init @@ -4,7 +4,7 @@ # Licensed under the MIT License. # wrapper script for vcpkg -# this is intended to be dot-sourced and then you can use the vcpkg-shell() function. +# this is intended to be dot-sourced and then you can use vcpkg # check to see if we've been dot-sourced (should work for most POSIX shells) sourced=0 @@ -28,16 +28,20 @@ if [ $sourced -eq 0 ]; then exit fi -Z_VCPKG_bootstrap() { - VCPKG_BASE_VERSION='latest' +if [ -n "$VCPKG_ROOT" ]; then + export VCPKG_ROOT=$VCPKG_ROOT +else + export VCPKG_ROOT=~/.vcpkg +fi; - if [ $VCPKG_BASE_VERSION != 'latest' ] \ - && [ -f "${VCPKG_ROOT}/vcpkg" ] \ - && [ -f "${VCPKG_ROOT}/vcpkg-version.txt" ] \ - && [ "$(cat "${VCPKG_ROOT}/vcpkg-version.txt")" = $VCPKG_BASE_VERSION ]; then - return 0; - fi +mkdir -p "$VCPKG_ROOT" +VCPKG_BASE_VERSION='latest' + +if [ $VCPKG_BASE_VERSION = 'latest' ] \ + || [ ! -f "${VCPKG_ROOT}/vcpkg" ] \ + || [ ! -f "${VCPKG_ROOT}/vcpkg-version.txt" ] \ + || [ "$(cat "${VCPKG_ROOT}/vcpkg-version.txt")" != $VCPKG_BASE_VERSION ]; then echo installing vcpkg in $VCPKG_ROOT if [ "$(uname)" = "Darwin" ]; then @@ -55,56 +59,13 @@ Z_VCPKG_bootstrap() { chmod +x "${VCPKG_ROOT}/vcpkg" "${VCPKG_ROOT}/vcpkg" bootstrap-standalone - return 0; -} - -Z_VCPKG_cleanup() { - # clear things that we're not going to need for the long term - if [ -f "${Z_VCPKG_POSTSCRIPT}" ]; then - command rm "${Z_VCPKG_POSTSCRIPT}" + if [ $? -eq 1 ]; then + return 1; fi - unset Z_VCPKG_POSTSCRIPT - unset -f Z_VCPKG_bootstrap > /dev/null 2>&1 -} - -if [ -n "$VCPKG_ROOT" ]; then - export VCPKG_ROOT=$VCPKG_ROOT -else - export VCPKG_ROOT=~/.vcpkg -fi; - -mkdir -p "$VCPKG_ROOT" - -Z_VCPKG_bootstrap -if [ $? -eq 1 ]; then - Z_VCPKG_cleanup - return 1; fi # So, we're the real script then. -vcpkg-shell() { - # set the response file - # Generate 32 bits of randomness, to avoid clashing with concurrent executions. - export Z_VCPKG_POSTSCRIPT="$(mktemp).sh" - - # call vcpkg - # it picks up the Z_VCPKG_POSTSCRIPT environment variable to know where to dump the postscript - "${VCPKG_ROOT}/vcpkg" $@ - - # Call the post-invocation script if it is present, then delete it. - # This allows the invocation to potentially modify the caller's environment (e.g. PATH) - if [ -f "${Z_VCPKG_POSTSCRIPT}" ]; then - . "${Z_VCPKG_POSTSCRIPT}" - command rm "${Z_VCPKG_POSTSCRIPT}" - unset Z_VCPKG_POSTSCRIPT - fi - - Z_VCPKG_cleanup -} - # did they dotsource and have args go ahead and run it then! if [ "$#" -gt "0" ]; then - vcpkg-shell $@ + "${VCPKG_ROOT}/vcpkg" $@ fi - -Z_VCPKG_cleanup diff --git a/vcpkg-init/vcpkg-init.ps1 b/vcpkg-init/vcpkg-init.ps1 index dee073d2ef..82c20db700 100644 --- a/vcpkg-init/vcpkg-init.ps1 +++ b/vcpkg-init/vcpkg-init.ps1 @@ -6,7 +6,7 @@ if #ftw NEQ '' goto :init # Licensed under the MIT License. # wrapper script for vcpkg -# this is intended to be dot-sourced and then you can use the vcpkg-shell() function +# this is intended to be dot-sourced and then you can use vcpkg # Workaround for $IsWindows not existing in Windows PowerShell if (-Not (Test-Path variable:IsWindows)) { @@ -78,29 +78,8 @@ if(-Not (bootstrap-vcpkg)) { } # Export vcpkg to the current shell. -New-Module -name vcpkg -ArgumentList @($VCPKG) -ScriptBlock { - param($VCPKG) - function vcpkg-shell() { - # setup the postscript file - # Generate 31 bits of randomness, to avoid clashing with concurrent executions. - $env:Z_VCPKG_POSTSCRIPT = Join-Path ([System.IO.Path]::GetTempPath()) "VCPKG_tmp_$(Get-Random -SetSeed $PID).ps1" - & $VCPKG @args - # dot-source the postscript file to modify the environment - if (Test-Path $env:Z_VCPKG_POSTSCRIPT) { - $postscr = Get-Content -Raw $env:Z_VCPKG_POSTSCRIPT - if( $postscr ) { - iex $postscr - } - - Remove-Item -Force -ea 0 $env:Z_VCPKG_POSTSCRIPT - } - - Remove-Item env:Z_VCPKG_POSTSCRIPT - } -} | Out-Null - if ($args.Count -ne 0) { - return vcpkg-shell @args + return & $VCPKG @args } return @@ -141,12 +120,9 @@ IF ERRORLEVEL 1 ( SET Z_POWERSHELL_EXE= -:: Install the doskey -DOSKEY vcpkg-shell="%VCPKG_ROOT%\vcpkg-cmd.cmd" $* - :: If there were any arguments, also invoke vcpkg with them IF "%1"=="" GOTO fin -CALL "%VCPKG_ROOT%\vcpkg-cmd.cmd" %* + "%VCPKG_ROOT%\vcpkg.exe" %* :fin EXIT /B