From 5a46538c70d2e901f8db60be95f6435f035f9fe3 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 10:16:49 +0200 Subject: [PATCH 1/7] Simplify the repository layout [#320] Move the headers to include/webfront/ (included as ), the browser sources to js/core and js/developer, the tests to test/{unit,web, fuzz,cmake}, and the documentation, CI and container files to docs/, .github/ and .devcontainer/. Remove the historical prototype and the unused compressed header. Add the RepositoryLayout CTest case. The generated-provider include changed, so the developer distribution is bumped to 0.4.1; its publication is a separate maintainer step. --- .codescene/code-health-rules.json | 10 +- Dockerfile => .devcontainer/Dockerfile | 0 .devcontainer/devcontainer.json | 2 +- .gitattributes | 45 +- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 codecov.yml => .github/codecov.yml | 2 +- .github/workflows/BuildAndTest.yml | 24 +- .github/workflows/DeveloperDistribution.yml | 48 +-- .github/workflows/MddlogIntegration.yml | 4 +- .github/workflows/ReleaseVersion.yml | 2 +- .gitignore | 2 +- AGENTS.md | 30 +- CMakeLists.txt | 16 +- CTestConfig.cmake | 0 README.md | 4 +- assets/developer/bundles.json | 34 -- cmake/MddlogIntegration.cmake | 2 +- cmake/WKWebViewSupport.cmake | 2 +- cmake/WebKitGTKSupport.cmake | 4 +- cmake/WebView2Support.cmake | 2 +- {logging => cmake/mddlog}/Logger.cpp | 2 +- CHANGELOG.md => docs/CHANGELOG.md | 14 + docs/DEVELOPER_ENVIRONMENT.md | 24 +- Doxyfile.in => docs/Doxyfile.in | 0 {cmake => docs}/Doxygen.cmake | 0 docs/EMBEDDED_ASSETS.md | 18 +- docs/FRONTENDS.md | 10 +- docs/HTTP_ASSETS.md | 2 +- docs/PROJECT_STATUS.md | 33 +- docs/UI_COMPONENTS.md | 24 +- docs/WEBKITGTK.md | 2 +- docs/WKWEBVIEW.md | 4 +- docs/adr/ADR-001-coeur-cpp23-header-only.md | 6 +- ...DR-002-systemes-de-fichiers-composables.md | 8 +- .../ADR-003-protocole-binaire-et-bornes.md | 10 +- .../ADR-004-appels-asynchrones-et-erreurs.md | 6 +- .../ADR-005-evolution-reseau-asio-stdnet.md | 8 +- .../ADR-006-taches-structurees-et-arret.md | 6 +- docs/adr/ADR-007-frontends-explicites.md | 6 +- ...DR-008-contenu-de-confiance-et-origines.md | 6 +- ...DR-009-modules-et-assets-reproductibles.md | 8 +- ...ADR-010-composants-et-outils-optionnels.md | 8 +- docs/adr/ADR-011-diagnostics-optionnels.md | 8 +- docs/adr/ADR-012-preuves-et-tests.md | 4 +- docs/adr/README.md | 2 +- docs/mddlog-integration.md | 4 +- .../tools}/render-life-bootstrap.py | 0 examples/hello-world/HelloWorld.cpp | 2 +- examples/life/LifeDeveloper.cpp | 2 +- examples/life/LifeEmbedded.cpp | 2 +- include/WebFront220128.hpp.gz | Bin 12745 -> 0 bytes include/system/DeveloperReleaseData.hpp | 10 - include/system/TerminalModuleData.hpp | 343 --------------- include/system/ToolManagerModuleData.hpp | 392 ----------------- include/{ => webfront}/ApplicationOrigin.hpp | 0 include/{ => webfront}/ContentPolicy.hpp | 0 include/{ => webfront}/DeveloperApp.hpp | 0 include/{ => webfront}/JsFunction.hpp | 0 include/{ => webfront}/JsFunctionSender.hpp | 0 include/{ => webfront}/Task.hpp | 0 include/{ => webfront}/UISubscribers.hpp | 0 include/{ => webfront}/WebFront.hpp | 0 .../{ => webfront}/components/Terminal.hpp | 0 .../{ => webfront}/components/ToolManager.hpp | 0 .../{ => webfront}/details/C++20Support.hpp | 0 .../{ => webfront}/details/C++23Support.hpp | 0 include/{ => webfront}/frontend/Action.hpp | 0 include/{ => webfront}/frontend/CEF.hpp | 0 include/{ => webfront}/frontend/CEFPaths.hpp | 0 .../frontend/DefaultBrowser.hpp | 0 include/{ => webfront}/frontend/Frontend.hpp | 0 .../{ => webfront}/frontend/NativeWebView.hpp | 0 include/{ => webfront}/frontend/Url.hpp | 0 include/{ => webfront}/frontend/WKWebView.hpp | 0 include/{ => webfront}/frontend/WebKitGTK.hpp | 0 .../frontend/WebKitGTKPolicy.hpp | 0 include/{ => webfront}/frontend/WebView2.hpp | 0 .../{ => webfront}/http/AcceptEncoding.hpp | 0 include/{ => webfront}/http/BuffersPolicy.hpp | 0 include/{ => webfront}/http/Encodings.hpp | 0 include/{ => webfront}/http/Gzip.hpp | 0 include/{ => webfront}/http/HTTPServer.hpp | 0 include/{ => webfront}/http/MimeType.hpp | 0 include/{ => webfront}/http/WebSocket.hpp | 0 .../networking/BasicNetworking.hpp | 0 .../networking/NetworkingMock.hpp | 0 .../networking/SenderHeaders.hpp | 0 .../networking/TCPNetworkingStdnet.hpp | 0 .../{ => webfront}/networking/TCPSockets.hpp | 0 include/{ => webfront}/networking/Tasks.hpp | 0 include/{ => webfront}/system/BabelData.hpp | 0 include/{ => webfront}/system/BabelFS.hpp | 0 include/{ => webfront}/system/DefaultFS.hpp | 0 .../system/DeveloperBootstrapData.hpp | 0 include/{ => webfront}/system/DeveloperFS.hpp | 0 .../{ => webfront}/system/DeveloperFiles.hpp | 0 .../system/DeveloperIndexHtmlData.hpp | 0 .../{ => webfront}/system/DeveloperPaths.hpp | 0 .../webfront/system/DeveloperReleaseData.hpp | 10 + .../{ => webfront}/system/DeveloperStore.hpp | 0 .../system/FallbackIndexHtmlData.hpp | 0 .../system/FallbackModuleData.hpp | 0 include/{ => webfront}/system/FileSystem.hpp | 2 +- include/{ => webfront}/system/IndexFS.hpp | 0 .../{ => webfront}/system/JasmineBootData.hpp | 0 .../{ => webfront}/system/JasmineCssData.hpp | 0 include/{ => webfront}/system/JasmineFS.hpp | 0 .../system/JasmineFaviconData.hpp | 0 .../{ => webfront}/system/JasmineHtmlData.hpp | 0 .../{ => webfront}/system/JasmineJsData.hpp | 0 include/{ => webfront}/system/NativeFS.hpp | 0 include/{ => webfront}/system/PackageFS.hpp | 0 include/{ => webfront}/system/ReactFS.hpp | 0 .../system/ReactRuntimeData.hpp | 0 include/{ => webfront}/system/TerminalFS.hpp | 0 .../system/TerminalIndexHtmlData.hpp | 0 .../webfront/system/TerminalModuleData.hpp | 343 +++++++++++++++ .../{ => webfront}/system/ToolManagerFS.hpp | 0 .../webfront/system/ToolManagerModuleData.hpp | 393 ++++++++++++++++++ include/{ => webfront}/system/ToolStore.hpp | 0 .../{ => webfront}/system/WebFrontJsData.hpp | 0 .../{ => webfront}/system/WindowsCompat.hpp | 0 .../{ => webfront}/system/XtermCssData.hpp | 0 .../system/XtermFitAddonData.hpp | 0 .../{ => webfront}/system/XtermModuleData.hpp | 0 include/{ => webfront}/tooling/HexDump.hpp | 0 include/{ => webfront}/tooling/Logger.hpp | 0 include/{ => webfront}/tooling/LoggerApi.hpp | 0 .../{ => webfront}/tooling/MddlogLogger.hpp | 0 include/{ => webfront}/tooling/PathUtils.hpp | 2 +- include/{ => webfront}/utils/Json.hpp | 0 .../utils/TypeErasedFunction.hpp | 0 include/{ => webfront}/weblink/Messages.hpp | 0 .../{ => webfront}/weblink/PendingCalls.hpp | 0 include/{ => webfront}/weblink/WebLink.hpp | 0 {cmake => js/core}/EmbedTextAsset.cmake | 2 +- {assets => js/core}/WebFront.js | 0 {cmake => js/core}/WebFrontAssets.cmake | 38 +- .../core/bootstrap}/bootstrap.bundle.mjs | 0 .../core/bootstrap}/index.html | 0 {assets => js/core}/fallback/index.html | 0 .../core}/fallback/webfront-fallback.mjs | 0 .../developer}/components/terminal/index.html | 0 .../components/terminal/terminal.mjs | 2 +- .../developer}/components/tools/wf.mjs | 2 +- .../environment}/PACKAGES-LICENSE.txt | 0 .../developer/environment}/archive.mjs | 0 .../environment}/bootstrap-entry.mjs | 0 .../developer/environment}/bootstrap.mjs | 0 .../developer/environment}/bundler.mjs | 0 js/developer/environment/bundles.json | 34 ++ .../developer/environment}/compiler.mjs | 0 .../developer/environment}/conditions.mjs | 0 .../developer/environment}/embed.mjs | 4 +- .../developer/environment}/entry.mjs | 0 .../developer/environment}/io.mjs | 0 .../developer/environment}/lock.mjs | 0 .../environment}/packages.bundle.mjs | 0 .../developer/environment}/packages.mjs | 0 .../developer/environment}/paths.mjs | 0 .../developer/environment}/peers.mjs | 0 .../developer/environment}/pins.mjs | 0 .../developer/environment}/recipe.mjs | 0 .../developer/environment}/registry.mjs | 0 .../developer/environment}/resolve.mjs | 0 .../developer/environment}/runtime.mjs | 4 +- .../developer/environment}/starter.mjs | 0 .../developer/tools}/PUBLISHING.md | 14 +- .../developer/tools}/RELEASE_NOTES.md | 0 .../developer/tools}/archive-release.mjs | 2 +- .../developer/tools}/archive.mjs | 0 .../developer/tools}/build.mjs | 42 +- .../developer/tools}/check.mjs | 16 +- .../developer/tools}/distribution-check.mjs | 4 +- .../developer/tools}/distribution.json | 2 +- .../developer/tools}/fixtures.mjs | 12 +- .../developer/tools}/pages.mjs | 0 .../developer/tools}/release-check.mjs | 0 .../developer => js/developer/tools}/site.mjs | 4 +- .../developer/tools}/starters/pi/main.tsx | 0 .../developer/tools}/starters/pi/style.css | 0 .../assets => js/developer/vendor}/check.mjs | 6 +- .../assets => js/developer/vendor}/gzip.mjs | 2 +- .../developer/vendor}/package-lock.json | 0 .../developer/vendor}/package.json | 0 .../assets => js/developer/vendor}/update.mjs | 12 +- .../cmake}/CheckCEFTestingState.cmake | 4 +- .../cmake}/CheckFrontendGenerators.cmake | 4 +- .../cmake}/CheckFrontendSelection.cmake | 10 +- {cmake => test/cmake}/CheckNewcomerDocs.cmake | 2 +- .../cmake}/CheckReleaseVersion.cmake | 2 +- .../cmake}/CheckReleaseVersionTests.cmake | 8 +- test/cmake/CheckRepositoryLayout.cmake | 59 +++ .../cmake}/CheckWKWebViewSupport.cmake | 0 .../cmake}/CheckWebView2Architecture.cmake | 6 +- .../cmake}/CheckWebView2Toolchain.cmake | 0 .../cmake}/FrontendTestHelpers.cmake | 0 {cmake => test/cmake}/TestHardening.cmake | 0 .../cmake}/WKWebViewTestInfo.plist.in | 0 .../cmake}/WebKitGTKTestEnvironment.cmake | 0 test/{ => cmake}/cef-testing/CMakeLists.txt | 0 .../cef-testing/dependency/CMakeLists.txt | 0 test/{ => cmake}/consumer/CMakeLists.txt | 0 test/{ => cmake}/consumer/CheckOptions.cmake | 0 test/{ => cmake}/consumer/main.cpp | 2 +- test/{ => cmake}/frontends/CMakeLists.txt | 6 +- test/{ => cmake}/frontends/TestSupport.cmake | 0 {fuzz => test/fuzz}/CMakeLists.txt | 0 {fuzz => test/fuzz}/GzipFuzz.cpp | 2 +- {fuzz => test/fuzz}/HTTPFuzz.cpp | 2 +- {fuzz => test/fuzz}/MessagesFuzz.cpp | 2 +- {fuzz => test/fuzz}/README.md | 4 +- {fuzz => test/fuzz}/WebSocketFuzz.cpp | 2 +- {fuzz => test/fuzz}/corpus/gzip/bad-crc | Bin .../fuzz}/corpus/gzip/distanceCount31 | Bin .../fuzz}/corpus/gzip/distanceCount32 | Bin {fuzz => test/fuzz}/corpus/gzip/dynamic | Bin {fuzz => test/fuzz}/corpus/gzip/empty | Bin {fuzz => test/fuzz}/corpus/gzip/fixed | Bin .../fuzz}/corpus/gzip/invalidDistance | Bin {fuzz => test/fuzz}/corpus/gzip/missingEnd | Bin {fuzz => test/fuzz}/corpus/gzip/optional | Bin .../fuzz}/corpus/gzip/oversubscribed | Bin .../fuzz}/corpus/gzip/repeatOverflow | Bin .../fuzz}/corpus/gzip/repeatWithoutPrevious | Bin .../fuzz}/corpus/gzip/reserved-block | Bin .../fuzz}/corpus/gzip/reservedDistance | Bin .../fuzz}/corpus/gzip/reservedLiteral | Bin {fuzz => test/fuzz}/corpus/gzip/stored | Bin {fuzz => test/fuzz}/corpus/gzip/truncated | Bin .../fuzz}/corpus/http/accept-encoding | 0 {fuzz => test/fuzz}/corpus/http/get | 0 .../fuzz}/corpus/http/unknown-method | 0 {fuzz => test/fuzz}/corpus/http/upgrade | 0 .../fuzz}/corpus/http/version-overflow | 0 {fuzz => test/fuzz}/corpus/http/x-gzip | 0 {fuzz => test/fuzz}/corpus/messages/array-10 | Bin {fuzz => test/fuzz}/corpus/messages/array-11 | Bin {fuzz => test/fuzz}/corpus/messages/array-12 | Bin {fuzz => test/fuzz}/corpus/messages/array-13 | Bin {fuzz => test/fuzz}/corpus/messages/array-14 | Bin {fuzz => test/fuzz}/corpus/messages/array-15 | Bin {fuzz => test/fuzz}/corpus/messages/array-16 | Bin {fuzz => test/fuzz}/corpus/messages/array-17 | Bin {fuzz => test/fuzz}/corpus/messages/array-8 | Bin {fuzz => test/fuzz}/corpus/messages/array-9 | Bin {fuzz => test/fuzz}/corpus/messages/array-u8 | 0 .../fuzz}/corpus/messages/empty-small-string | Bin .../fuzz}/corpus/messages/empty-string | Bin .../fuzz}/corpus/messages/function-return | Bin {fuzz => test/fuzz}/corpus/messages/handshake | Bin .../fuzz}/corpus/messages/integer-overflow | Bin {fuzz => test/fuzz}/corpus/messages/number | Bin .../fuzz}/corpus/messages/print-call | Bin {fuzz => test/fuzz}/corpus/messages/tuple | Bin {fuzz => test/fuzz}/corpus/websocket/empty | Bin {fuzz => test/fuzz}/corpus/websocket/extended | Bin .../fuzz}/corpus/websocket/masked-hello | 0 .../fuzz}/corpus/websocket/oversized | Bin test/{ => unit}/AcceptEncodingTests.cpp | 2 +- test/{ => unit}/ApplicationTaskTests.cpp | 2 +- test/{ => unit}/ApplicationUrlTests.cpp | 2 +- test/{ => unit}/BabelFSTests.cpp | 2 +- test/{ => unit}/CEFMacrosTests.cpp | 4 +- test/{ => unit}/CEFPathsTests.cpp | 2 +- test/{ => unit}/CMakeLists.txt | 23 +- test/{ => unit}/ContentPolicyTests.cpp | 8 +- test/{ => unit}/DefaultFSTests.cpp | 4 +- test/{ => unit}/DeveloperTests.cpp | 6 +- test/{ => unit}/EmbeddedAssetChecks.hpp | 2 +- test/{ => unit}/EncodingsTests.cpp | 2 +- test/{ => unit}/FileSystemTests.cpp | 2 +- test/{ => unit}/FrontendContractTests.cpp | 4 +- test/{ => unit}/FrontendUrlTests.cpp | 4 +- test/{ => unit}/GzipFixtures.hpp | 0 test/{ => unit}/GzipTests.cpp | 2 +- test/{ => unit}/HTTPEncodingTests.cpp | 4 +- test/{ => unit}/HTTPServerTests.cpp | 6 +- test/{ => unit}/IndexFSTests.cpp | 8 +- test/{ => unit}/InjectableNetworking.hpp | 4 +- test/{ => unit}/InlineTaskScope.hpp | 2 +- test/{ => unit}/JSFunctionTests.cpp | 6 +- test/{ => unit}/JasmineFSTests.cpp | 2 +- test/{ => unit}/JsFunctionSenderTests.cpp | 2 +- test/{ => unit}/LifeTests.cpp | 2 +- test/{ => unit}/LoggerTests.cpp | 2 +- test/{ => unit}/MddlogHeaderConsumer.cpp | 2 +- test/{ => unit}/MddlogLoggerTests.cpp | 2 +- test/{ => unit}/MddlogTransportTests.cpp | 4 +- test/{ => unit}/MessagesTests.cpp | 8 +- test/{ => unit}/MimeTypeTests.cpp | 2 +- test/{ => unit}/Mocks.hpp | 2 +- test/{ => unit}/ModuleHTTPServerTests.cpp | 14 +- test/{ => unit}/NativeFSTests.cpp | 2 +- test/{ => unit}/ReactFSTests.cpp | 2 +- test/{ => unit}/SignalDemoTests.cpp | 2 +- test/{ => unit}/StdnetShutdownTests.cpp | 10 +- test/{ => unit}/StructuredShutdownTests.cpp | 6 +- test/{ => unit}/TemporaryDirectory.hpp | 0 test/{ => unit}/TerminalFSTests.cpp | 6 +- test/{ => unit}/TerminalTests.cpp | 2 +- test/{ => unit}/ToolManagerTests.cpp | 8 +- test/{ => unit}/ToolStoreTests.cpp | 4 +- test/{ => unit}/TypeErasedFunctionTests.cpp | 2 +- test/{ => unit}/UISubscribersTests.cpp | 2 +- test/{ => unit}/Version.hpp.in | 0 test/{ => unit}/WebFrontTests.cpp | 6 +- test/{ => unit}/WebKitGTKPolicyTests.cpp | 2 +- test/{ => unit}/WebLinkTests.cpp | 4 +- test/{ => unit}/WebSocketTests.cpp | 4 +- test/{ => unit}/WebView2ControllerMock.hpp | 2 +- test/{ => unit}/WebView2PolicyMocks.hpp | 2 +- test/{ => unit}/WebView2Tests.cpp | 2 +- {webtest => test/web}/CEFContentPolicy.cpp | 6 +- {webtest => test/web}/CMakeLists.txt | 4 +- .../web}/DeveloperEmbeddedTest.cpp | 6 +- {webtest => test/web}/DeveloperTest.cpp | 8 +- {webtest => test/web}/FrontendLifecycle.cpp | 4 +- {webtest => test/web}/JasmineTest.cpp | 42 +- {webtest => test/web}/LifeEmbeddedTest.cpp | 6 +- .../web}/RejectedWebSocketServer.hpp | 4 +- {webtest => test/web}/SpecRunner.html | 0 .../web}/WKWebViewClassImages.cpp | 2 +- .../web}/WKWebViewClassModule.cpp | 2 +- .../web}/WKWebViewHeaderConsumer.cpp | 2 +- {webtest => test/web}/WKWebViewLifecycle.cpp | 2 +- {webtest => test/web}/WebKitGTKLifecycle.cpp | 4 +- .../web}/WebView2HeaderConsumer.cpp | 2 +- {webtest => test/web}/WebView2Lifecycle.cpp | 4 +- {webtest => test/web}/content-policy.html | 0 {webtest => test/web}/developer-specs.mjs | 0 {webtest => test/web}/encoded path #.html | 0 {webtest => test/web}/fixtures/react.html | 0 .../web}/js/content-policy-specs.mjs | 0 {webtest => test/web}/js/module-fixture.mjs | 0 {webtest => test/web}/js/origin-probe.mjs | 0 {webtest => test/web}/js/react-demo-specs.mjs | 0 {webtest => test/web}/js/terminal-specs.mjs | 2 +- {webtest => test/web}/js/tools-specs.mjs | 4 +- {webtest => test/web}/js/webfront-specs.mjs | 0 {webtest => test/web}/no-bridge.html | 0 {webtest => test/web}/origin-probe.html | 0 {webtest => test/web}/policy-controls.html | 0 {webtest => test/web}/policy-escaped.html | 0 .../web}/registry/make_fixture.py | 4 +- {webtest => test/web}/registry/search.json | 0 .../tarballs/webfront-test-tool-1.0.0.tgz | Bin .../web}/registry/webfront-test-corrupt | 0 .../web}/registry/webfront-test-tool | 0 {webtest => test/web}/rejected-ready.html | 0 {webtest => test/web}/slow-page.html | 0 {webtest => test/web}/slow-resource.js | 0 webfront/DOM/HTTPServer.cpp | 21 - webfront/DOM/HTTPServer.vcxproj | 132 ------ webfront/DOM/HTTPServer.vcxproj.filters | 144 ------- webfront/DOM/http_connexion.cpp | 155 ------- webfront/DOM/http_connexion.h | 20 - webfront/DOM/http_request.cpp | 356 ---------------- webfront/DOM/http_request.h | 42 -- webfront/DOM/page.h | 29 -- webfront/DOM/socket_helper.h | 44 -- webfront/DOM/socket_server.cpp | 143 ------- webfront/DOM/socket_server.h | 34 -- webfront/DOM/thread_pool.cpp | 80 ---- webfront/DOM/thread_pool.h | 19 - webfront/DOM/webfront.cpp | 79 ---- webfront/DOM/webfront.h | 28 -- webfront/DOM/xmldoc.cpp | 33 -- webfront/DOM/xmldoc.h | 34 -- webfront/DOM/xmldoc_attr.cpp | 52 --- webfront/DOM/xmldoc_attr.h | 27 -- webfront/DOM/xmldoc_c_data_section.h | 14 - webfront/DOM/xmldoc_character_data.cpp | 144 ------- webfront/DOM/xmldoc_character_data.h | 28 -- webfront/DOM/xmldoc_comment.h | 18 - webfront/DOM/xmldoc_document.cpp | 122 ------ webfront/DOM/xmldoc_document.h | 54 --- webfront/DOM/xmldoc_document_fragment.h | 17 - webfront/DOM/xmldoc_document_type.cpp | 58 --- webfront/DOM/xmldoc_document_type.h | 29 -- webfront/DOM/xmldoc_dom_exception.h | 25 -- webfront/DOM/xmldoc_dom_implementation.cpp | 165 -------- webfront/DOM/xmldoc_dom_implementation.h | 30 -- webfront/DOM/xmldoc_element.cpp | 164 -------- webfront/DOM/xmldoc_element.h | 30 -- webfront/DOM/xmldoc_entity_reference.h | 17 - webfront/DOM/xmldoc_named_node_map.cpp | 141 ------- webfront/DOM/xmldoc_named_node_map.h | 31 -- webfront/DOM/xmldoc_node.cpp | 195 --------- webfront/DOM/xmldoc_node.h | 96 ----- webfront/DOM/xmldoc_node_list.h | 23 - webfront/DOM/xmldoc_processing_instruction.h | 22 - webfront/DOM/xmldoc_text.cpp | 29 -- webfront/DOM/xmldoc_text.h | 21 - webfront/net/Socket.hpp | 184 -------- webfront/net/SocketLibOS.hpp | 163 -------- webfront/net/TCPServer.hpp | 44 -- webfront/net/UDPSocket.hpp | 108 ----- webfront/system/Socket.hpp | 149 ------- webfront/system/SocketLibOS.hpp | 159 ------- webfront/system/UDPSocket.hpp | 107 ----- webfront/utils/Delegate.hpp | 59 --- webfront/utils/StringHash.hpp | 72 ---- 403 files changed, 1341 insertions(+), 5242 deletions(-) rename Dockerfile => .devcontainer/Dockerfile (100%) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) rename codecov.yml => .github/codecov.yml (90%) delete mode 100644 CTestConfig.cmake delete mode 100644 assets/developer/bundles.json rename {logging => cmake/mddlog}/Logger.cpp (99%) rename CHANGELOG.md => docs/CHANGELOG.md (81%) rename Doxyfile.in => docs/Doxyfile.in (100%) rename {cmake => docs}/Doxygen.cmake (100%) rename {tools/docs => docs/tools}/render-life-bootstrap.py (100%) delete mode 100644 include/WebFront220128.hpp.gz delete mode 100644 include/system/DeveloperReleaseData.hpp delete mode 100644 include/system/TerminalModuleData.hpp delete mode 100644 include/system/ToolManagerModuleData.hpp rename include/{ => webfront}/ApplicationOrigin.hpp (100%) rename include/{ => webfront}/ContentPolicy.hpp (100%) rename include/{ => webfront}/DeveloperApp.hpp (100%) rename include/{ => webfront}/JsFunction.hpp (100%) rename include/{ => webfront}/JsFunctionSender.hpp (100%) rename include/{ => webfront}/Task.hpp (100%) rename include/{ => webfront}/UISubscribers.hpp (100%) rename include/{ => webfront}/WebFront.hpp (100%) rename include/{ => webfront}/components/Terminal.hpp (100%) rename include/{ => webfront}/components/ToolManager.hpp (100%) rename include/{ => webfront}/details/C++20Support.hpp (100%) rename include/{ => webfront}/details/C++23Support.hpp (100%) rename include/{ => webfront}/frontend/Action.hpp (100%) rename include/{ => webfront}/frontend/CEF.hpp (100%) rename include/{ => webfront}/frontend/CEFPaths.hpp (100%) rename include/{ => webfront}/frontend/DefaultBrowser.hpp (100%) rename include/{ => webfront}/frontend/Frontend.hpp (100%) rename include/{ => webfront}/frontend/NativeWebView.hpp (100%) rename include/{ => webfront}/frontend/Url.hpp (100%) rename include/{ => webfront}/frontend/WKWebView.hpp (100%) rename include/{ => webfront}/frontend/WebKitGTK.hpp (100%) rename include/{ => webfront}/frontend/WebKitGTKPolicy.hpp (100%) rename include/{ => webfront}/frontend/WebView2.hpp (100%) rename include/{ => webfront}/http/AcceptEncoding.hpp (100%) rename include/{ => webfront}/http/BuffersPolicy.hpp (100%) rename include/{ => webfront}/http/Encodings.hpp (100%) rename include/{ => webfront}/http/Gzip.hpp (100%) rename include/{ => webfront}/http/HTTPServer.hpp (100%) rename include/{ => webfront}/http/MimeType.hpp (100%) rename include/{ => webfront}/http/WebSocket.hpp (100%) rename include/{ => webfront}/networking/BasicNetworking.hpp (100%) rename include/{ => webfront}/networking/NetworkingMock.hpp (100%) rename include/{ => webfront}/networking/SenderHeaders.hpp (100%) rename include/{ => webfront}/networking/TCPNetworkingStdnet.hpp (100%) rename include/{ => webfront}/networking/TCPSockets.hpp (100%) rename include/{ => webfront}/networking/Tasks.hpp (100%) rename include/{ => webfront}/system/BabelData.hpp (100%) rename include/{ => webfront}/system/BabelFS.hpp (100%) rename include/{ => webfront}/system/DefaultFS.hpp (100%) rename include/{ => webfront}/system/DeveloperBootstrapData.hpp (100%) rename include/{ => webfront}/system/DeveloperFS.hpp (100%) rename include/{ => webfront}/system/DeveloperFiles.hpp (100%) rename include/{ => webfront}/system/DeveloperIndexHtmlData.hpp (100%) rename include/{ => webfront}/system/DeveloperPaths.hpp (100%) create mode 100644 include/webfront/system/DeveloperReleaseData.hpp rename include/{ => webfront}/system/DeveloperStore.hpp (100%) rename include/{ => webfront}/system/FallbackIndexHtmlData.hpp (100%) rename include/{ => webfront}/system/FallbackModuleData.hpp (100%) rename include/{ => webfront}/system/FileSystem.hpp (99%) rename include/{ => webfront}/system/IndexFS.hpp (100%) rename include/{ => webfront}/system/JasmineBootData.hpp (100%) rename include/{ => webfront}/system/JasmineCssData.hpp (100%) rename include/{ => webfront}/system/JasmineFS.hpp (100%) rename include/{ => webfront}/system/JasmineFaviconData.hpp (100%) rename include/{ => webfront}/system/JasmineHtmlData.hpp (100%) rename include/{ => webfront}/system/JasmineJsData.hpp (100%) rename include/{ => webfront}/system/NativeFS.hpp (100%) rename include/{ => webfront}/system/PackageFS.hpp (100%) rename include/{ => webfront}/system/ReactFS.hpp (100%) rename include/{ => webfront}/system/ReactRuntimeData.hpp (100%) rename include/{ => webfront}/system/TerminalFS.hpp (100%) rename include/{ => webfront}/system/TerminalIndexHtmlData.hpp (100%) create mode 100644 include/webfront/system/TerminalModuleData.hpp rename include/{ => webfront}/system/ToolManagerFS.hpp (100%) create mode 100644 include/webfront/system/ToolManagerModuleData.hpp rename include/{ => webfront}/system/ToolStore.hpp (100%) rename include/{ => webfront}/system/WebFrontJsData.hpp (100%) rename include/{ => webfront}/system/WindowsCompat.hpp (100%) rename include/{ => webfront}/system/XtermCssData.hpp (100%) rename include/{ => webfront}/system/XtermFitAddonData.hpp (100%) rename include/{ => webfront}/system/XtermModuleData.hpp (100%) rename include/{ => webfront}/tooling/HexDump.hpp (100%) rename include/{ => webfront}/tooling/Logger.hpp (100%) rename include/{ => webfront}/tooling/LoggerApi.hpp (100%) rename include/{ => webfront}/tooling/MddlogLogger.hpp (100%) rename include/{ => webfront}/tooling/PathUtils.hpp (98%) rename include/{ => webfront}/utils/Json.hpp (100%) rename include/{ => webfront}/utils/TypeErasedFunction.hpp (100%) rename include/{ => webfront}/weblink/Messages.hpp (100%) rename include/{ => webfront}/weblink/PendingCalls.hpp (100%) rename include/{ => webfront}/weblink/WebLink.hpp (100%) rename {cmake => js/core}/EmbedTextAsset.cmake (98%) rename {assets => js/core}/WebFront.js (100%) rename {cmake => js/core}/WebFrontAssets.cmake (71%) rename {assets/developer => js/core/bootstrap}/bootstrap.bundle.mjs (100%) rename {assets/developer => js/core/bootstrap}/index.html (100%) rename {assets => js/core}/fallback/index.html (100%) rename {assets => js/core}/fallback/webfront-fallback.mjs (100%) rename {assets => js/developer}/components/terminal/index.html (100%) rename {assets => js/developer}/components/terminal/terminal.mjs (99%) rename {assets => js/developer}/components/tools/wf.mjs (99%) rename {assets/developer => js/developer/environment}/PACKAGES-LICENSE.txt (100%) rename {assets/developer => js/developer/environment}/archive.mjs (100%) rename {assets/developer => js/developer/environment}/bootstrap-entry.mjs (100%) rename {assets/developer => js/developer/environment}/bootstrap.mjs (100%) rename {assets/developer => js/developer/environment}/bundler.mjs (100%) create mode 100644 js/developer/environment/bundles.json rename {assets/developer => js/developer/environment}/compiler.mjs (100%) rename {assets/developer => js/developer/environment}/conditions.mjs (100%) rename {assets/developer => js/developer/environment}/embed.mjs (96%) rename {assets/developer => js/developer/environment}/entry.mjs (100%) rename {assets/developer => js/developer/environment}/io.mjs (100%) rename {assets/developer => js/developer/environment}/lock.mjs (100%) rename {assets/developer => js/developer/environment}/packages.bundle.mjs (100%) rename {assets/developer => js/developer/environment}/packages.mjs (100%) rename {assets/developer => js/developer/environment}/paths.mjs (100%) rename {assets/developer => js/developer/environment}/peers.mjs (100%) rename {assets/developer => js/developer/environment}/pins.mjs (100%) rename {assets/developer => js/developer/environment}/recipe.mjs (100%) rename {assets/developer => js/developer/environment}/registry.mjs (100%) rename {assets/developer => js/developer/environment}/resolve.mjs (100%) rename {assets/developer => js/developer/environment}/runtime.mjs (98%) rename {assets/developer => js/developer/environment}/starter.mjs (100%) rename {tools/developer => js/developer/tools}/PUBLISHING.md (87%) rename {tools/developer => js/developer/tools}/RELEASE_NOTES.md (100%) rename {tools/developer => js/developer/tools}/archive-release.mjs (93%) rename {tools/developer => js/developer/tools}/archive.mjs (100%) rename {tools/developer => js/developer/tools}/build.mjs (56%) rename {tools/developer => js/developer/tools}/check.mjs (95%) rename {tools/developer => js/developer/tools}/distribution-check.mjs (98%) rename {tools/developer => js/developer/tools}/distribution.json (74%) rename {tools/developer => js/developer/tools}/fixtures.mjs (75%) rename {tools/developer => js/developer/tools}/pages.mjs (100%) rename {tools/developer => js/developer/tools}/release-check.mjs (100%) rename {tools/developer => js/developer/tools}/site.mjs (95%) rename {tools/developer => js/developer/tools}/starters/pi/main.tsx (100%) rename {tools/developer => js/developer/tools}/starters/pi/style.css (100%) rename {tools/assets => js/developer/vendor}/check.mjs (90%) rename {tools/assets => js/developer/vendor}/gzip.mjs (85%) rename {tools/assets => js/developer/vendor}/package-lock.json (100%) rename {tools/assets => js/developer/vendor}/package.json (100%) rename {tools/assets => js/developer/vendor}/update.mjs (87%) rename {cmake => test/cmake}/CheckCEFTestingState.cmake (90%) rename {cmake => test/cmake}/CheckFrontendGenerators.cmake (87%) rename {cmake => test/cmake}/CheckFrontendSelection.cmake (98%) rename {cmake => test/cmake}/CheckNewcomerDocs.cmake (98%) rename {cmake => test/cmake}/CheckReleaseVersion.cmake (97%) rename {cmake => test/cmake}/CheckReleaseVersionTests.cmake (92%) create mode 100644 test/cmake/CheckRepositoryLayout.cmake rename {cmake => test/cmake}/CheckWKWebViewSupport.cmake (100%) rename {cmake => test/cmake}/CheckWebView2Architecture.cmake (95%) rename {cmake => test/cmake}/CheckWebView2Toolchain.cmake (100%) rename {cmake => test/cmake}/FrontendTestHelpers.cmake (100%) rename {cmake => test/cmake}/TestHardening.cmake (100%) rename {cmake => test/cmake}/WKWebViewTestInfo.plist.in (100%) rename {cmake => test/cmake}/WebKitGTKTestEnvironment.cmake (100%) rename test/{ => cmake}/cef-testing/CMakeLists.txt (100%) rename test/{ => cmake}/cef-testing/dependency/CMakeLists.txt (100%) rename test/{ => cmake}/consumer/CMakeLists.txt (100%) rename test/{ => cmake}/consumer/CheckOptions.cmake (100%) rename test/{ => cmake}/consumer/main.cpp (96%) rename test/{ => cmake}/frontends/CMakeLists.txt (97%) rename test/{ => cmake}/frontends/TestSupport.cmake (100%) rename {fuzz => test/fuzz}/CMakeLists.txt (100%) rename {fuzz => test/fuzz}/GzipFuzz.cpp (91%) rename {fuzz => test/fuzz}/HTTPFuzz.cpp (95%) rename {fuzz => test/fuzz}/MessagesFuzz.cpp (98%) rename {fuzz => test/fuzz}/README.md (92%) rename {fuzz => test/fuzz}/WebSocketFuzz.cpp (97%) rename {fuzz => test/fuzz}/corpus/gzip/bad-crc (100%) rename {fuzz => test/fuzz}/corpus/gzip/distanceCount31 (100%) rename {fuzz => test/fuzz}/corpus/gzip/distanceCount32 (100%) rename {fuzz => test/fuzz}/corpus/gzip/dynamic (100%) rename {fuzz => test/fuzz}/corpus/gzip/empty (100%) rename {fuzz => test/fuzz}/corpus/gzip/fixed (100%) rename {fuzz => test/fuzz}/corpus/gzip/invalidDistance (100%) rename {fuzz => test/fuzz}/corpus/gzip/missingEnd (100%) rename {fuzz => test/fuzz}/corpus/gzip/optional (100%) rename {fuzz => test/fuzz}/corpus/gzip/oversubscribed (100%) rename {fuzz => test/fuzz}/corpus/gzip/repeatOverflow (100%) rename {fuzz => test/fuzz}/corpus/gzip/repeatWithoutPrevious (100%) rename {fuzz => test/fuzz}/corpus/gzip/reserved-block (100%) rename {fuzz => test/fuzz}/corpus/gzip/reservedDistance (100%) rename {fuzz => test/fuzz}/corpus/gzip/reservedLiteral (100%) rename {fuzz => test/fuzz}/corpus/gzip/stored (100%) rename {fuzz => test/fuzz}/corpus/gzip/truncated (100%) rename {fuzz => test/fuzz}/corpus/http/accept-encoding (100%) rename {fuzz => test/fuzz}/corpus/http/get (100%) rename {fuzz => test/fuzz}/corpus/http/unknown-method (100%) rename {fuzz => test/fuzz}/corpus/http/upgrade (100%) rename {fuzz => test/fuzz}/corpus/http/version-overflow (100%) rename {fuzz => test/fuzz}/corpus/http/x-gzip (100%) rename {fuzz => test/fuzz}/corpus/messages/array-10 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-11 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-12 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-13 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-14 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-15 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-16 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-17 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-8 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-9 (100%) rename {fuzz => test/fuzz}/corpus/messages/array-u8 (100%) rename {fuzz => test/fuzz}/corpus/messages/empty-small-string (100%) rename {fuzz => test/fuzz}/corpus/messages/empty-string (100%) rename {fuzz => test/fuzz}/corpus/messages/function-return (100%) rename {fuzz => test/fuzz}/corpus/messages/handshake (100%) rename {fuzz => test/fuzz}/corpus/messages/integer-overflow (100%) rename {fuzz => test/fuzz}/corpus/messages/number (100%) rename {fuzz => test/fuzz}/corpus/messages/print-call (100%) rename {fuzz => test/fuzz}/corpus/messages/tuple (100%) rename {fuzz => test/fuzz}/corpus/websocket/empty (100%) rename {fuzz => test/fuzz}/corpus/websocket/extended (100%) rename {fuzz => test/fuzz}/corpus/websocket/masked-hello (100%) rename {fuzz => test/fuzz}/corpus/websocket/oversized (100%) rename test/{ => unit}/AcceptEncodingTests.cpp (99%) rename test/{ => unit}/ApplicationTaskTests.cpp (99%) rename test/{ => unit}/ApplicationUrlTests.cpp (98%) rename test/{ => unit}/BabelFSTests.cpp (92%) rename test/{ => unit}/CEFMacrosTests.cpp (92%) rename test/{ => unit}/CEFPathsTests.cpp (96%) rename test/{ => unit}/CMakeLists.txt (87%) rename test/{ => unit}/ContentPolicyTests.cpp (98%) rename test/{ => unit}/DefaultFSTests.cpp (97%) rename test/{ => unit}/DeveloperTests.cpp (99%) rename test/{ => unit}/EmbeddedAssetChecks.hpp (95%) rename test/{ => unit}/EncodingsTests.cpp (99%) rename test/{ => unit}/FileSystemTests.cpp (99%) rename test/{ => unit}/FrontendContractTests.cpp (99%) rename test/{ => unit}/FrontendUrlTests.cpp (98%) rename test/{ => unit}/GzipFixtures.hpp (100%) rename test/{ => unit}/GzipTests.cpp (99%) rename test/{ => unit}/HTTPEncodingTests.cpp (99%) rename test/{ => unit}/HTTPServerTests.cpp (99%) rename test/{ => unit}/IndexFSTests.cpp (94%) rename test/{ => unit}/InjectableNetworking.hpp (99%) rename test/{ => unit}/InlineTaskScope.hpp (87%) rename test/{ => unit}/JSFunctionTests.cpp (98%) rename test/{ => unit}/JasmineFSTests.cpp (96%) rename test/{ => unit}/JsFunctionSenderTests.cpp (99%) rename test/{ => unit}/LifeTests.cpp (97%) rename test/{ => unit}/LoggerTests.cpp (98%) rename test/{ => unit}/MddlogHeaderConsumer.cpp (95%) rename test/{ => unit}/MddlogLoggerTests.cpp (99%) rename test/{ => unit}/MddlogTransportTests.cpp (99%) rename test/{ => unit}/MessagesTests.cpp (99%) rename test/{ => unit}/MimeTypeTests.cpp (98%) rename test/{ => unit}/Mocks.hpp (96%) rename test/{ => unit}/ModuleHTTPServerTests.cpp (94%) rename test/{ => unit}/NativeFSTests.cpp (99%) rename test/{ => unit}/ReactFSTests.cpp (93%) rename test/{ => unit}/SignalDemoTests.cpp (97%) rename test/{ => unit}/StdnetShutdownTests.cpp (98%) rename test/{ => unit}/StructuredShutdownTests.cpp (98%) rename test/{ => unit}/TemporaryDirectory.hpp (100%) rename test/{ => unit}/TerminalFSTests.cpp (96%) rename test/{ => unit}/TerminalTests.cpp (99%) rename test/{ => unit}/ToolManagerTests.cpp (98%) rename test/{ => unit}/ToolStoreTests.cpp (99%) rename test/{ => unit}/TypeErasedFunctionTests.cpp (97%) rename test/{ => unit}/UISubscribersTests.cpp (99%) rename test/{ => unit}/Version.hpp.in (100%) rename test/{ => unit}/WebFrontTests.cpp (99%) rename test/{ => unit}/WebKitGTKPolicyTests.cpp (99%) rename test/{ => unit}/WebLinkTests.cpp (99%) rename test/{ => unit}/WebSocketTests.cpp (99%) rename test/{ => unit}/WebView2ControllerMock.hpp (98%) rename test/{ => unit}/WebView2PolicyMocks.hpp (99%) rename test/{ => unit}/WebView2Tests.cpp (99%) rename {webtest => test/web}/CEFContentPolicy.cpp (98%) rename {webtest => test/web}/CMakeLists.txt (97%) rename {webtest => test/web}/DeveloperEmbeddedTest.cpp (95%) rename {webtest => test/web}/DeveloperTest.cpp (97%) rename {webtest => test/web}/FrontendLifecycle.cpp (99%) rename {webtest => test/web}/JasmineTest.cpp (94%) rename {webtest => test/web}/LifeEmbeddedTest.cpp (97%) rename {webtest => test/web}/RejectedWebSocketServer.hpp (96%) rename {webtest => test/web}/SpecRunner.html (100%) rename {webtest => test/web}/WKWebViewClassImages.cpp (97%) rename {webtest => test/web}/WKWebViewClassModule.cpp (94%) rename {webtest => test/web}/WKWebViewHeaderConsumer.cpp (92%) rename {webtest => test/web}/WKWebViewLifecycle.cpp (99%) rename {webtest => test/web}/WebKitGTKLifecycle.cpp (98%) rename {webtest => test/web}/WebView2HeaderConsumer.cpp (85%) rename {webtest => test/web}/WebView2Lifecycle.cpp (99%) rename {webtest => test/web}/content-policy.html (100%) rename {webtest => test/web}/developer-specs.mjs (100%) rename {webtest => test/web}/encoded path #.html (100%) rename {webtest => test/web}/fixtures/react.html (100%) rename {webtest => test/web}/js/content-policy-specs.mjs (100%) rename {webtest => test/web}/js/module-fixture.mjs (100%) rename {webtest => test/web}/js/origin-probe.mjs (100%) rename {webtest => test/web}/js/react-demo-specs.mjs (100%) rename {webtest => test/web}/js/terminal-specs.mjs (98%) rename {webtest => test/web}/js/tools-specs.mjs (98%) rename {webtest => test/web}/js/webfront-specs.mjs (100%) rename {webtest => test/web}/no-bridge.html (100%) rename {webtest => test/web}/origin-probe.html (100%) rename {webtest => test/web}/policy-controls.html (100%) rename {webtest => test/web}/policy-escaped.html (100%) rename {webtest => test/web}/registry/make_fixture.py (95%) rename {webtest => test/web}/registry/search.json (100%) rename {webtest => test/web}/registry/tarballs/webfront-test-tool-1.0.0.tgz (100%) rename {webtest => test/web}/registry/webfront-test-corrupt (100%) rename {webtest => test/web}/registry/webfront-test-tool (100%) rename {webtest => test/web}/rejected-ready.html (100%) rename {webtest => test/web}/slow-page.html (100%) rename {webtest => test/web}/slow-resource.js (100%) delete mode 100644 webfront/DOM/HTTPServer.cpp delete mode 100644 webfront/DOM/HTTPServer.vcxproj delete mode 100644 webfront/DOM/HTTPServer.vcxproj.filters delete mode 100644 webfront/DOM/http_connexion.cpp delete mode 100644 webfront/DOM/http_connexion.h delete mode 100644 webfront/DOM/http_request.cpp delete mode 100644 webfront/DOM/http_request.h delete mode 100644 webfront/DOM/page.h delete mode 100644 webfront/DOM/socket_helper.h delete mode 100644 webfront/DOM/socket_server.cpp delete mode 100644 webfront/DOM/socket_server.h delete mode 100644 webfront/DOM/thread_pool.cpp delete mode 100644 webfront/DOM/thread_pool.h delete mode 100644 webfront/DOM/webfront.cpp delete mode 100644 webfront/DOM/webfront.h delete mode 100644 webfront/DOM/xmldoc.cpp delete mode 100644 webfront/DOM/xmldoc.h delete mode 100644 webfront/DOM/xmldoc_attr.cpp delete mode 100644 webfront/DOM/xmldoc_attr.h delete mode 100644 webfront/DOM/xmldoc_c_data_section.h delete mode 100644 webfront/DOM/xmldoc_character_data.cpp delete mode 100644 webfront/DOM/xmldoc_character_data.h delete mode 100644 webfront/DOM/xmldoc_comment.h delete mode 100644 webfront/DOM/xmldoc_document.cpp delete mode 100644 webfront/DOM/xmldoc_document.h delete mode 100644 webfront/DOM/xmldoc_document_fragment.h delete mode 100644 webfront/DOM/xmldoc_document_type.cpp delete mode 100644 webfront/DOM/xmldoc_document_type.h delete mode 100644 webfront/DOM/xmldoc_dom_exception.h delete mode 100644 webfront/DOM/xmldoc_dom_implementation.cpp delete mode 100644 webfront/DOM/xmldoc_dom_implementation.h delete mode 100644 webfront/DOM/xmldoc_element.cpp delete mode 100644 webfront/DOM/xmldoc_element.h delete mode 100644 webfront/DOM/xmldoc_entity_reference.h delete mode 100644 webfront/DOM/xmldoc_named_node_map.cpp delete mode 100644 webfront/DOM/xmldoc_named_node_map.h delete mode 100644 webfront/DOM/xmldoc_node.cpp delete mode 100644 webfront/DOM/xmldoc_node.h delete mode 100644 webfront/DOM/xmldoc_node_list.h delete mode 100644 webfront/DOM/xmldoc_processing_instruction.h delete mode 100644 webfront/DOM/xmldoc_text.cpp delete mode 100644 webfront/DOM/xmldoc_text.h delete mode 100644 webfront/net/Socket.hpp delete mode 100644 webfront/net/SocketLibOS.hpp delete mode 100644 webfront/net/TCPServer.hpp delete mode 100644 webfront/net/UDPSocket.hpp delete mode 100644 webfront/system/Socket.hpp delete mode 100644 webfront/system/SocketLibOS.hpp delete mode 100644 webfront/system/UDPSocket.hpp delete mode 100644 webfront/utils/Delegate.hpp delete mode 100644 webfront/utils/StringHash.hpp diff --git a/.codescene/code-health-rules.json b/.codescene/code-health-rules.json index 3077539b..a4f7355c 100644 --- a/.codescene/code-health-rules.json +++ b/.codescene/code-health-rules.json @@ -3,7 +3,7 @@ "rule_sets": [ { "matching_content_path": "third_party/**", - "matching_content_path_doc": "Vendored third-party code, refreshed only with cmake/UpdateXterm.cmake or tools/assets/update.mjs.", + "matching_content_path_doc": "Vendored third-party code, refreshed only with cmake/UpdateXterm.cmake or js/developer/vendor/update.mjs.", "rules": [ { "name": "Complex Method", "weight": 0.0 }, { "name": "Bumpy Road Ahead", "weight": 0.0 }, @@ -22,15 +22,15 @@ ] }, { - "matching_content_path": "include/components/Terminal.hpp", + "matching_content_path": "include/webfront/components/Terminal.hpp", "matching_content_path_doc": "A text command-line interface: its API and helpers take command names, help texts and command lines, which are strings by nature. Wrapping them in structs only to lower the ratio would make the public API (terminal.command(name, help, handler)) harder to read.", "rules": [ { "name": "String Heavy Function Arguments", "weight": 0.0 } ] }, { - "matching_content_path": "assets/developer/*.bundle.mjs", - "matching_content_path_doc": "Minified esbuild output of the sources next to it, checked in so that the bootstrap and package resolver need no Node.js at consumption time. It is regenerated by tools/developer/build.mjs --refresh-bootstrap and verified against assets/developer/bundles.json, never edited by hand; the readable sources are analysed instead.", + "matching_content_path": "js/*/**/*.bundle.mjs", + "matching_content_path_doc": "Minified esbuild output of the sources next to it, checked in so that the bootstrap and package resolver need no Node.js at consumption time. It is regenerated by js/developer/tools/build.mjs --refresh-bootstrap and verified against js/developer/environment/bundles.json, never edited by hand; the readable sources are analysed instead.", "rules": [ { "name": "Complex Method", "weight": 0.0 }, { "name": "Bumpy Road Ahead", "weight": 0.0 }, @@ -49,7 +49,7 @@ ] }, { - "matching_content_path": "include/system/DeveloperStore.hpp", + "matching_content_path": "include/webfront/system/DeveloperStore.hpp", "matching_content_path_doc": "The store implements the webfront.developer.* bridge callbacks, whose identifiers, project paths, offsets and flags arrive as primitives from the browser. Wrapping them in types only to lower the ratio would obscure the bridge contract.", "rules": [ { "name": "String Heavy Function Arguments", "weight": 0.0 }, diff --git a/Dockerfile b/.devcontainer/Dockerfile similarity index 100% rename from Dockerfile rename to .devcontainer/Dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3ed41f49..36f97be0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { "name": "C++", "build": { - "dockerfile": "../Dockerfile", + "dockerfile": "Dockerfile", "context": ".." }, "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], diff --git a/.gitattributes b/.gitattributes index 0e89bd2b..82f4bab2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -51,25 +51,26 @@ # Embedded headers hold the exact bytes of their text sources. Freshness tests # re-read those sources, so Windows checkouts must preserve LF for every asset. -assets/WebFront.js text eol=lf -include/system/WebFrontJsData.hpp text eol=lf -assets/fallback/index.html text eol=lf -assets/fallback/webfront-fallback.mjs text eol=lf -include/system/FallbackIndexHtmlData.hpp text eol=lf -include/system/FallbackModuleData.hpp text eol=lf -assets/components/terminal/* text eol=lf -assets/components/tools/* text eol=lf -include/system/ToolManagerModuleData.hpp text eol=lf +js/core/WebFront.js text eol=lf +js/core/bootstrap/* text eol=lf +include/webfront/system/WebFrontJsData.hpp text eol=lf +js/core/fallback/index.html text eol=lf +js/core/fallback/webfront-fallback.mjs text eol=lf +include/webfront/system/FallbackIndexHtmlData.hpp text eol=lf +include/webfront/system/FallbackModuleData.hpp text eol=lf +js/developer/components/terminal/* text eol=lf +js/developer/components/tools/* text eol=lf +include/webfront/system/ToolManagerModuleData.hpp text eol=lf third_party/xterm/* text eol=lf -include/system/TerminalIndexHtmlData.hpp text eol=lf -include/system/TerminalModuleData.hpp text eol=lf -include/system/XtermModuleData.hpp text eol=lf -include/system/XtermCssData.hpp text eol=lf -include/system/XtermFitAddonData.hpp text eol=lf +include/webfront/system/TerminalIndexHtmlData.hpp text eol=lf +include/webfront/system/TerminalModuleData.hpp text eol=lf +include/webfront/system/XtermModuleData.hpp text eol=lf +include/webfront/system/XtermCssData.hpp text eol=lf +include/webfront/system/XtermFitAddonData.hpp text eol=lf # The fake npm registry of the browser integration test: its packuments are served byte for byte. -webtest/registry/* text eol=lf -webtest/registry/tarballs/* binary +test/web/registry/* text eol=lf +test/web/registry/tarballs/* binary # Serialisation *.json text @@ -168,7 +169,7 @@ webtest/registry/tarballs/* binary # Fuzzer seeds retain exact protocol bytes, including HTTP CRLF. -fuzz/corpus/** binary +test/fuzz/corpus/** binary # Pinned third-party sources and generated dependency data keep exact bytes on Windows. third_party/react/* text eol=lf @@ -176,13 +177,13 @@ third_party/babel/* text eol=lf third_party/jasmine/* text eol=lf third_party/jasmine/*.png binary third_party/fflate/* text eol=lf -include/system/*Data.hpp text eol=lf +include/webfront/system/*Data.hpp text eol=lf # Browser-powered developer bootstrap sources and generated payloads. -assets/developer/* text eol=lf -tools/assets/package-lock.json text eol=lf +js/developer/environment/* text eol=lf +js/developer/vendor/package-lock.json text eol=lf # Starter archives and every hashed distribution input must be identical on Windows. -tools/developer/starters/pi/* text eol=lf +js/developer/tools/starters/pi/* text eol=lf examples/life/ui/* text eol=lf -tools/developer/* text eol=lf +js/developer/tools/* text eol=lf diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/codecov.yml b/.github/codecov.yml similarity index 90% rename from codecov.yml rename to .github/codecov.yml index cb759f37..a27a2211 100644 --- a/codecov.yml +++ b/.github/codecov.yml @@ -8,5 +8,5 @@ coverage: default: target: 95% ignore: - - "webtest/**" + - "test/web/**" - "examples/**" diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index cb18157a..a1de5d4e 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -55,7 +55,7 @@ jobs: with: node-version: 24 cache: npm - cache-dependency-path: tools/assets/package-lock.json + cache-dependency-path: js/developer/vendor/package-lock.json - uses: jwlawson/actions-setup-cmake@0d6a7d60b009d01c9e7523be22153ff8f19460d3 # v2 with: cmake-version: '4.4.4' @@ -63,7 +63,7 @@ jobs: - uses: actions/cache@v4 with: path: .cache/CPM - key: cpm-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/*.cmake', 'test/CMakeLists.txt') }} + key: cpm-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/*.cmake', 'test/unit/CMakeLists.txt') }} restore-keys: cpm-${{ runner.os }}- - name: Initialize MSVC environment if: runner.os == 'Windows' @@ -90,9 +90,9 @@ jobs: sccache --version - name: Prepare offline developer fixtures run: | - npm ci --prefix tools/assets --ignore-scripts - node tools/developer/build.mjs build-developer-environment - node tools/developer/fixtures.mjs build-developer-environment + npm ci --prefix js/developer/vendor --ignore-scripts + node js/developer/tools/build.mjs build-developer-environment + node js/developer/tools/fixtures.mjs build-developer-environment # ENABLE_CACHE controls automatic ccache discovery; the explicit sccache launcher stays enabled. - name: Configure run: >- @@ -208,18 +208,18 @@ jobs: shell: bash run: | set -euo pipefail - mkdir -p build-sanitizers/fuzz/artifacts + mkdir -p build-sanitizers/test/fuzz/artifacts for decoder in messages http websocket gzip; do - build-sanitizers/fuzz/fuzz_$decoder build-sanitizers/fuzz/corpus/$decoder \ + build-sanitizers/test/fuzz/fuzz_$decoder build-sanitizers/test/fuzz/corpus/$decoder \ -max_total_time=30 -timeout=5 -max_len=65536 -rss_limit_mb=1024 \ - -artifact_prefix=build-sanitizers/fuzz/artifacts/$decoder- + -artifact_prefix=build-sanitizers/test/fuzz/artifacts/$decoder- done - name: Upload fuzz findings if: failure() && matrix.sanitizer == 'address-undefined' uses: actions/upload-artifact@v4 with: name: fuzz-findings - path: build-sanitizers/fuzz/artifacts/ + path: build-sanitizers/test/fuzz/artifacts/ if-no-files-found: ignore web-integration: @@ -258,9 +258,9 @@ jobs: - name: Prepare offline developer environment and starter fixtures run: | - npm ci --prefix tools/assets --ignore-scripts - node tools/developer/build.mjs build-developer-environment - node tools/developer/fixtures.mjs build-developer-environment + npm ci --prefix js/developer/vendor --ignore-scripts + node js/developer/tools/build.mjs build-developer-environment + node js/developer/tools/fixtures.mjs build-developer-environment - name: Configure CEF integration build run: cmake . -B ${{github.workspace}}/build-cef -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=ON -DWEBFRONT_BUILD_EXAMPLES=OFF -DENABLE_TESTING=ON -DWEBFRONT_DEVELOPER_FIXTURES=${{github.workspace}}/build-developer-environment diff --git a/.github/workflows/DeveloperDistribution.yml b/.github/workflows/DeveloperDistribution.yml index 08bba2ad..8789fdcf 100644 --- a/.github/workflows/DeveloperDistribution.yml +++ b/.github/workflows/DeveloperDistribution.yml @@ -5,24 +5,24 @@ on: tags: ['developer-v*'] branches: [develop, master] paths: - - 'assets/developer/**' - - 'assets/components/tools/**' - - 'tools/developer/starters/pi/**' + - 'js/developer/environment/**' + - 'js/developer/components/tools/**' + - 'js/developer/tools/starters/pi/**' - 'examples/life/ui/**' - - 'tools/developer/**' - - 'tools/assets/package*.json' - - 'include/system/DeveloperReleaseData.hpp' + - 'js/developer/tools/**' + - 'js/developer/vendor/package*.json' + - 'include/webfront/system/DeveloperReleaseData.hpp' - '.github/workflows/DeveloperDistribution.yml' pull_request: branches: [develop, master] paths: - - 'assets/developer/**' - - 'assets/components/tools/**' - - 'tools/developer/starters/pi/**' + - 'js/developer/environment/**' + - 'js/developer/components/tools/**' + - 'js/developer/tools/starters/pi/**' - 'examples/life/ui/**' - - 'tools/developer/**' - - 'tools/assets/package*.json' - - 'include/system/DeveloperReleaseData.hpp' + - 'js/developer/tools/**' + - 'js/developer/vendor/package*.json' + - 'include/webfront/system/DeveloperReleaseData.hpp' - '.github/workflows/DeveloperDistribution.yml' workflow_dispatch: inputs: @@ -47,23 +47,23 @@ jobs: with: node-version: 24 cache: npm - cache-dependency-path: tools/assets/package-lock.json + cache-dependency-path: js/developer/vendor/package-lock.json - name: Install pinned maintenance dependencies - run: npm ci --prefix tools/assets --ignore-scripts + run: npm ci --prefix js/developer/vendor --ignore-scripts - name: Build and verify the environment and starter packages run: | - node tools/developer/build.mjs build-distribution - node tools/developer/build.mjs build-distribution-repeat + node js/developer/tools/build.mjs build-distribution + node js/developer/tools/build.mjs build-distribution-repeat cmp build-distribution/environment.tgz build-distribution-repeat/environment.tgz cmp build-distribution/pi-starter.tgz build-distribution-repeat/pi-starter.tgz cmp build-distribution/life-starter.tgz build-distribution-repeat/life-starter.tgz - cmp include/system/DeveloperReleaseData.hpp build-distribution/DeveloperReleaseData.hpp - node --test tools/developer/check.mjs tools/developer/distribution-check.mjs + cmp include/webfront/system/DeveloperReleaseData.hpp build-distribution/DeveloperReleaseData.hpp + node --test js/developer/tools/check.mjs js/developer/tools/distribution-check.mjs - name: Check the dedicated release tag if: startsWith(github.ref, 'refs/tags/developer-v') env: RELEASE_TAG: ${{ github.ref_name }} - run: node tools/developer/release-check.mjs "$RELEASE_TAG" + run: node js/developer/tools/release-check.mjs "$RELEASE_TAG" - uses: actions/upload-artifact@v4 with: name: developer-distribution @@ -97,7 +97,7 @@ jobs: name: developer-distribution path: build-distribution - name: Check the configured Pages source before pushing - run: node tools/developer/pages.mjs --check + run: node js/developer/tools/pages.mjs --check - name: Preserve existing versions and publish the static branch shell: bash run: | @@ -114,19 +114,19 @@ jobs: elif [ "$result" != 2 ]; then exit "$result" fi - node tools/developer/site.mjs build-distribution "$site" + node js/developer/tools/site.mjs build-distribution "$site" git -C "$site" config user.name "$GITHUB_ACTOR" git -C "$site" config user.email "$GITHUB_ACTOR@users.noreply.github.com" git -C "$site" add .nojekyll index.html developer if ! git -C "$site" diff --cached --quiet; then - version=$(node -p "require('./tools/developer/distribution.json').version") + version=$(node -p "require('./js/developer/tools/distribution.json').version") git -C "$site" commit -m "Publish developer packages $version [#288]" git -C "$site" push origin HEAD:refs/heads/gh-pages fi - name: Request the configured Pages build - run: node tools/developer/pages.mjs + run: node js/developer/tools/pages.mjs - name: Archive tagged packages in a dedicated prerelease if: startsWith(github.ref, 'refs/tags/developer-v') env: RELEASE_TAG: ${{ github.ref_name }} - run: node tools/developer/archive-release.mjs "$RELEASE_TAG" build-distribution + run: node js/developer/tools/archive-release.mjs "$RELEASE_TAG" build-distribution diff --git a/.github/workflows/MddlogIntegration.yml b/.github/workflows/MddlogIntegration.yml index 192d277e..d7f9e909 100644 --- a/.github/workflows/MddlogIntegration.yml +++ b/.github/workflows/MddlogIntegration.yml @@ -136,7 +136,7 @@ jobs: run: | for iteration in 1 2 3 4 5; do echo "Transport iteration $iteration" - ./build-sanitized/test/tests "[transport],[weblink]" --order rand + ./build-sanitized/test/unit/tests "[transport],[weblink]" --order rand done - name: Run every test once - run: ./build-sanitized/test/tests --order rand + run: ./build-sanitized/test/unit/tests --order rand diff --git a/.github/workflows/ReleaseVersion.yml b/.github/workflows/ReleaseVersion.yml index 851cc110..8134cfde 100644 --- a/.github/workflows/ReleaseVersion.yml +++ b/.github/workflows/ReleaseVersion.yml @@ -29,4 +29,4 @@ jobs: shell: bash run: | version=$(sed -n 's/^CMAKE_PROJECT_VERSION:STATIC=//p' build/CMakeCache.txt) - cmake -DROOT="$GITHUB_WORKSPACE" -DEXPECTED_VERSION="$version" -DRELEASE_TAG="$RELEASE_TAG" -P cmake/CheckReleaseVersion.cmake + cmake -DROOT="$GITHUB_WORKSPACE" -DEXPECTED_VERSION="$version" -DRELEASE_TAG="$RELEASE_TAG" -P test/cmake/CheckReleaseVersion.cmake diff --git a/.gitignore b/.gitignore index 61b050db..848e2955 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,4 @@ Thumbs.db .webfront/ # Maintenance-only npm tooling -/tools/assets/node_modules/ +/js/developer/vendor/node_modules/ diff --git a/AGENTS.md b/AGENTS.md index d8304aff..3f076a26 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,25 +12,25 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati ## Repository map -- `include/`: public header-only library. `WebFront.hpp` is the main orchestration API. -- `include/http/`: HTTP and WebSocket protocol implementation. -- `include/weblink/`: bridge message encoding and routing. -- `include/system/`: layered virtual filesystems and embedded web resources. -- `include/frontend/`: system-browser, CEF, optional Windows WebView2 and macOS WKWebView frontend adapters. -- `include/components/`: opt-in UI components (`Terminal.hpp`, `ToolManager.hpp`); their assets are served by embedded providers such as `include/system/TerminalFS.hpp`, and installed tools by `include/system/PackageFS.hpp` from `ToolStore.hpp`'s project directory. +- `include/webfront/`: public header-only library, included as ``. `WebFront.hpp` is the main orchestration API. +- `include/webfront/http/`: HTTP and WebSocket protocol implementation. +- `include/webfront/weblink/`: bridge message encoding and routing. +- `include/webfront/system/`: layered virtual filesystems and embedded web resources. +- `include/webfront/frontend/`: system-browser, CEF, optional Windows WebView2 and macOS WKWebView frontend adapters. +- `include/webfront/components/`: opt-in UI components (`Terminal.hpp`, `ToolManager.hpp`); their assets are served by embedded providers such as `include/webfront/system/TerminalFS.hpp`, and installed tools by `include/webfront/system/PackageFS.hpp` from `ToolStore.hpp`'s project directory. - `examples/`: only Hello World (`hello-world/`) and Game of Life (`life/`, with console, developer and embedded stages). -- `assets/`: readable browser bridge, fallback, component and developer-environment sources; production C++ remains header-only in `include/`. -- `tools/developer/starters/pi/`, `test/fixtures/`, `webtest/fixtures/`: retained package and regression fixtures, not public example applications. -- `test/`: Catch2 unit tests. -- `webtest/`: Jasmine real-browser integration test. -- `cmake/` and `.github/workflows/`: build support and CI. +- `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment, terminal/`wf` components, build and vendoring tools. Production C++ remains header-only in `include/webfront/`. +- `js/developer/tools/starters/pi/`, `test/fixtures/`, `test/web/fixtures/`: retained package and regression fixtures, not public example applications. +- `test/unit/`: Catch2 unit tests; `test/web/`: Jasmine real-browser integration test; `test/fuzz/`, `test/fixtures/`; `test/cmake/`: CMake test scripts and sub-projects. The `RepositoryLayout` CTest case pins the tracked root. +- `cmake/`: build modules (frontends, CEF, CPM, compiler options); `.github/`: workflows, `CONTRIBUTING.md`, `codecov.yml`. +- `.devcontainer/`: devcontainer and its Dockerfile; `docs/`: documentation, `CHANGELOG.md`, `Doxyfile.in`. - `third_party/xterm/`: vendored xterm.js distribution embedded by the terminal component; refresh it only with `cmake/UpdateXterm.cmake`. - `docs/PROJECT_STATUS.md`: evidence-based status snapshot and known limitations. - `docs/adr/README.md`: architecture decision index, Git history, tradeoffs and implementation rules; read the relevant ADRs before changing their contracts. - `docs/UI_COMPONENTS.md`: UI component architecture, the terminal component and the planned `wf` tool manager. - `docs/ISSUE_AUDIT.md`: recommendations for the current GitHub backlog. -The legacy `webfront/`, `tests/`, and `webtest` directories are not interchangeable: use `test/` for current C++ tests and `webtest/` for browser tests. Do not revive legacy code without a specific issue and regression coverage. +The historical `webfront/` prototype and the former top-level `webtest/` are gone: use `test/unit/` for current C++ tests and `test/web/` for browser tests. Do not revive legacy code without a specific issue and regression coverage. ## Build and test commands @@ -51,7 +51,7 @@ cmake --build build --parallel ctest --test-dir build --output-on-failure # Run one Catch2 scenario directly -./build/test/tests "Scenario: JsFunction" +./build/test/unit/tests "Scenario: JsFunction" # Linux real-browser integration test cmake -S . -B build-cef -DCMAKE_BUILD_TYPE=Release \ @@ -91,8 +91,8 @@ Exception: a purely C++ change that reuses an existing encoding, introduces no n ## Coding and testing conventions -- Use C++23, four-space indentation, the repository `.clang-format`, and the naming rules in `CONTRIBUTING.md`. -- Keep production implementation header-only under `include/`; `examples/` contains the two public examples; browser resources live in `assets/`. +- Use C++23, four-space indentation, the repository `.clang-format`, and the naming rules in `.github/CONTRIBUTING.md`. +- Keep production implementation header-only under `include/`; `examples/` contains the two public examples; browser resources live in `js/`. - Prefer standard-library facilities and explicit ownership. Keep public headers ODR-safe (`inline`/templates as appropriate). - Catch2 tests use `SCENARIO`/`GIVEN`/`WHEN`/`THEN` and deterministic mocks. - Jasmine tests use native modules and must report completion to C++, close themselves, return a meaningful process status, and have a CTest timeout. diff --git a/CMakeLists.txt b/CMakeLists.txt index 909465f0..7121eb19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,9 @@ if(WEBFRONT_USE_MDDLOG) include(cmake/MddlogPreProject.cmake) endif() -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/WebFront.hpp") +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/webfront/WebFront.hpp") set(VERSION_STRING_REGEX "inline constexpr std::string_view version = \"([0-9]+\\.[0-9]+\\.[0-9]+)\"") -file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/WebFront.hpp" VERSION_STRING REGEX ${VERSION_STRING_REGEX}) +file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/webfront/WebFront.hpp" VERSION_STRING REGEX ${VERSION_STRING_REGEX}) string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" VERSION_STRING "${VERSION_STRING}") project(WebFront LANGUAGES CXX VERSION ${VERSION_STRING}) @@ -43,7 +43,7 @@ if(MSVC AND NOT WEBFRONT_USE_MDDLOG AND WEBFRONT_IS_TOP_LEVEL) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") endif() -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_CURRENT_LIST_DIR}/js/core ${CMAKE_CURRENT_LIST_DIR}/docs ${CMAKE_CURRENT_LIST_DIR}/test/cmake) if(WEBFRONT_IS_TOP_LEVEL) include(StandardProjectSettings) include(PreventInSourceBuilds) @@ -54,7 +54,7 @@ target_compile_features(WebFront_options INTERFACE cxx_std_23) # actually providing , a command-line -D applies from the start of every translation # unit, so other standard headers (e.g. ) that gate their own integration on # this macro see it "on" before has been included and fail to compile. Let each -# toolchain's own / define it accurately; include/details/C++20Support.hpp +# toolchain's own / define it accurately; include/webfront/details/C++20Support.hpp # already falls back to a minimal std::format polyfill when a toolchain leaves it undefined. add_library(WebFront_warnings INTERFACE) @@ -71,7 +71,7 @@ include(Sanitizers) enable_sanitizers(WebFront_options) if(WEBFRONT_IS_TOP_LEVEL) - configure_file(Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile) + configure_file(docs/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile) include(Doxygen) enable_doxygen() @@ -109,13 +109,13 @@ if(ENABLE_TESTING OR ENABLE_FUZZING) endif() if(ENABLE_FUZZING) - add_subdirectory(fuzz) + add_subdirectory(test/fuzz) endif() if(ENABLE_TESTING) enable_testing() - add_subdirectory(test) - add_subdirectory(webtest) + add_subdirectory(test/unit) + add_subdirectory(test/web) endif() if(WEBFRONT_BUILD_EXAMPLES) diff --git a/CTestConfig.cmake b/CTestConfig.cmake deleted file mode 100644 index e69de29b..00000000 diff --git a/README.md b/README.md index df9e6d26..495ee15d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Register your simulation, bootstrap the tools, then build the interface in the a ```cpp -#include +#include #include using namespace std; @@ -220,4 +220,4 @@ CI runs one combined C++ / native-browser job per desktop platform on each code - Development project access is explicit and intended for trusted local code. Downloaded tools run with the application's bridge authority. Package scripts, native Node add-ons and Node APIs are unsupported. TypeScript is transformed without type checking. - Packaging, accessibility and native-engine deployment still need application-specific work. General DOM abstractions remain future work. See [project status](docs/PROJECT_STATUS.md) for known limitations. -[Developer environment reference](docs/DEVELOPER_ENVIRONMENT.md) · [UI components](docs/UI_COMPONENTS.md) · [architecture decisions](docs/adr/README.md) · [contributing](CONTRIBUTING.md) +[Developer environment reference](docs/DEVELOPER_ENVIRONMENT.md) · [UI components](docs/UI_COMPONENTS.md) · [architecture decisions](docs/adr/README.md) · [contributing](.github/CONTRIBUTING.md) diff --git a/assets/developer/bundles.json b/assets/developer/bundles.json deleted file mode 100644 index ca39e451..00000000 --- a/assets/developer/bundles.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "assets/developer/bootstrap.mjs": "534af4b3d07891338c3390e1d5e06c2fb6dd8df11ca6547735565b17f1b9cd70", - "assets/developer/bootstrap-entry.mjs": "ff8084f23f5acc721f97eb1ed0a454e7bfee1894de17d54f0100fa11f7ef8b77", - "assets/developer/packages.mjs": "faed29500a34c6ce24756d07bd4b47b9168ccec4bd49d12f00096a869637d74d", - "assets/developer/starter.mjs": "f8cdef1218ae14f8bbe49eae495d931cc29e33f74444f0e37d61aea416b9d750", - "assets/developer/paths.mjs": "6ebb626610756143c58762c87af18980802809d7f0f53d3b588e4b20e8db0161", - "assets/developer/runtime.mjs": "36847f4413928908ebc8a1909e608c783701b13274a289d81e43df0e5125a0e8", - "assets/developer/compiler.mjs": "3f7e187ca9a4c2645ef3823127457cad655919cbea3c7c0f22fb7ae2cc87e0e5", - "assets/developer/bundler.mjs": "b0ff79a1b0caa012c25ec7b7f121d7d50af1aa1651231d3dcf2f39470c4ea25c", - "assets/developer/entry.mjs": "b2b942443e3c74ae2c008392ba244d9b7e91db70ba1b4ebbe1357c455ebf51bb", - "assets/developer/conditions.mjs": "7f0ecba239480831e38985ccffd4c82309949924f4eb9d938e4ad1b09f5f36ed", - "assets/developer/io.mjs": "a155719c612e065c30272c0dfdc456df28b5efa90ca26f8cfcb55c9cb46de690", - "assets/developer/recipe.mjs": "809f2091c50ebd13d23f92de9876b584658dc687324f73d48ee9f1271319f1ed", - "assets/developer/registry.mjs": "f566f07ea066155ab7209d925cee2cf12a664ac51b07bc0ca3e3fd8fde49a9c8", - "assets/developer/archive.mjs": "1fb8b9c3c27219858597801104639bba1104c7a7d33973609cd556b5e5f81d2d", - "assets/developer/lock.mjs": "60d0ea14d24793cd5e85bbd4bb4bfe90d2c7d76c0d20ffc99f462595a6e57291", - "assets/developer/pins.mjs": "ddb2214a2e906cb117dc1bac0b5b056decd4f6c6e3d4713615176c1876db3534", - "assets/developer/peers.mjs": "e1d999892138682fc0134ef1f4d4b19b9a9ad8d7fb16e37fc9c6c684bd853896", - "assets/developer/resolve.mjs": "8b96b850af215be51f5cb85cc9c69e057afa04dfb8a57e572620c07059c17fa3", - "assets/developer/embed.mjs": "c8fb80998abecdd5fdeba77aa549ff638d849dc9fd7f34c896fb6c0c0bf15f34", - "tools/developer/starters/pi/main.tsx": "d3161b35db204ba54f782f711183e8d96aeff7c92d885c33a6ec168cf461e453", - "tools/developer/starters/pi/style.css": "360e2c7ae6d3699b00e18cbf67efbae7a8d8863d88926b31139e102cf38e5abd", - "examples/life/ui/main.tsx": "ed11a82aad1639eb6997af8b0fca4d5c5ed4c36422c22a74ac49ae73078d0a91", - "examples/life/ui/style.css": "9bb55eb0f0a3287e5b7dc78af9d69608b87ff42c4d9c8a653bc83a52fe293c44", - "assets/components/tools/wf.mjs": "6ee86d85ec96bf548ca25ea3ea3554b7dacbed7d047d6a9cfdc1e0f3f42de05e", - "tools/developer/distribution.json": "f17197a710d994a83dd35fbb983ae672ae00144bc81eb3f22a78bbaf5f26f658", - "tools/developer/build.mjs": "c486ac6816e7c18c51d4b75dd3b032616ee081a4461a4125a5c1753f00d36c8d", - "tools/developer/site.mjs": "d4b7112f0aa5f277f291505a3dce84e676fee9d4da386973af7c6df9885d4dd4", - "tools/developer/archive.mjs": "bfe9feeb5e4d4e1b7c44c4dec4dcbeab4ae59c2bf16a1d2b32cd6910a2b84e7b", - "tools/assets/package-lock.json": "eb545112b672f9dbf520125df1f44a878d62cc8e611f0e33baee36470ded4dec", - "assets/developer/bootstrap.bundle.mjs": "792fe7cf564bd12ac47fef419d8c71e2070925764a17706552e7d3f5d6ba2181", - "assets/developer/packages.bundle.mjs": "994c13a8b30a40ecea98414caa72a17927dcea81a1f62d47744b4f55d87005be", - "include/system/DeveloperReleaseData.hpp": "89dd809cf07eb5f3c11c772f385941b81cf78b94ad3719ab1c40e844c246bc76" -} diff --git a/cmake/MddlogIntegration.cmake b/cmake/MddlogIntegration.cmake index 84dca7b3..a4bfb708 100644 --- a/cmake/MddlogIntegration.cmake +++ b/cmake/MddlogIntegration.cmake @@ -101,7 +101,7 @@ function(webfront_add_mddlog) find_package(mddlog CONFIG REQUIRED) endif() - add_library(WebFront_mddlog STATIC "${PROJECT_SOURCE_DIR}/logging/Logger.cpp") + add_library(WebFront_mddlog STATIC "${PROJECT_SOURCE_DIR}/cmake/mddlog/Logger.cpp") add_library(WebFront::mddlog ALIAS WebFront_mddlog) target_compile_features(WebFront_mddlog PUBLIC cxx_std_23) set_target_properties(WebFront_mddlog PROPERTIES CXX_SCAN_FOR_MODULES ON) diff --git a/cmake/WKWebViewSupport.cmake b/cmake/WKWebViewSupport.cmake index 9f847074..4918e4a6 100644 --- a/cmake/WKWebViewSupport.cmake +++ b/cmake/WKWebViewSupport.cmake @@ -14,7 +14,7 @@ target_compile_options(WebFront INTERFACE "$<$:-fblocks>") target_link_libraries(WebFront INTERFACE "${WEBFRONT_COCOA_FRAMEWORK}" "${WEBFRONT_WEBKIT_FRAMEWORK}") function(webfront_add_wkwebview_tests) - get_filename_component(webtest_source_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../webtest" ABSOLUTE) + get_filename_component(webtest_source_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/web" ABSOLUTE) add_executable(wkwebview_lifecycle "${webtest_source_dir}/WKWebViewLifecycle.cpp" "${webtest_source_dir}/WKWebViewHeaderConsumer.cpp") target_link_libraries(wkwebview_lifecycle PRIVATE WebFront WebFront_warnings WebFront_options) diff --git a/cmake/WebKitGTKSupport.cmake b/cmake/WebKitGTKSupport.cmake index 61bbed7e..e5493b27 100644 --- a/cmake/WebKitGTKSupport.cmake +++ b/cmake/WebKitGTKSupport.cmake @@ -14,13 +14,13 @@ endif() target_compile_definitions(WebFront INTERFACE WEBFRONT_EMBED_WEBKITGTK) target_link_libraries(WebFront INTERFACE ${CMAKE_DL_LIBS}) -include("${CMAKE_CURRENT_LIST_DIR}/WebKitGTKTestEnvironment.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/../test/cmake/WebKitGTKTestEnvironment.cmake") function(webfront_add_webkitgtk_tests) foreach(name IN LISTS ARGN) webfront_configure_webkitgtk_test("${name}") endforeach() - set(source "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../webtest") + set(source "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/web") add_executable(webkitgtk_lifecycle "${source}/WebKitGTKLifecycle.cpp") target_link_libraries(webkitgtk_lifecycle PRIVATE WebFront_test_hardening WebFront WebFront_warnings WebFront_options) add_dependencies(webtest webkitgtk_lifecycle) diff --git a/cmake/WebView2Support.cmake b/cmake/WebView2Support.cmake index ace600ab..0b5ac033 100644 --- a/cmake/WebView2Support.cmake +++ b/cmake/WebView2Support.cmake @@ -59,7 +59,7 @@ target_link_libraries(WebFront INTERFACE # Register lifecycle coverage once, alongside the shared Jasmine runner; paths are module-relative. function(webfront_add_webview2_tests) - get_filename_component(webtest_source_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../webtest" ABSOLUTE) + get_filename_component(webtest_source_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/web" ABSOLUTE) add_executable(webview2_lifecycle "${webtest_source_dir}/WebView2Lifecycle.cpp" "${webtest_source_dir}/WebView2HeaderConsumer.cpp") diff --git a/logging/Logger.cpp b/cmake/mddlog/Logger.cpp similarity index 99% rename from logging/Logger.cpp rename to cmake/mddlog/Logger.cpp index 068d7847..96123a70 100644 --- a/logging/Logger.cpp +++ b/cmake/mddlog/Logger.cpp @@ -7,7 +7,7 @@ import mddlog.core.ring; import mddlog.adapter.logrecord; import mddlog.adapter.transportconsumer; -#include "tooling/LoggerApi.hpp" +#include namespace webfront::log { struct SinkHandle::Registration { diff --git a/CHANGELOG.md b/docs/CHANGELOG.md similarity index 81% rename from CHANGELOG.md rename to docs/CHANGELOG.md index b73fd4ca..1a8ddb91 100644 --- a/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,20 @@ ## Unreleased +### Changed + +- **Breaking:** library headers moved to `include/webfront/`; include them as ``, + ``, `` and so on. The former spellings (``, + ``, ``) are removed with no redirect headers, so these generic names no longer + risk colliding with other libraries; point consumers at `include/` and update their includes. + `include/WebFront220128.hpp.gz` and the historical `webfront/` prototype are removed. +- Repository root reduced to `.github`, `cmake`, `docs`, `examples`, `include`, `js`, `test` (and `third_party` + until #319). `assets/` and `tools/` become `js/core` and `js/developer`; `webtest/` becomes `test/web`, + `fuzz/` becomes `test/fuzz`, unit tests move to `test/unit`; `CHANGELOG.md`, `Doxyfile.in` move to `docs/`, + `CONTRIBUTING.md` and `codecov.yml` to `.github/`, `Dockerfile` to `.devcontainer/`. Moves keep Git history. +- Developer distribution 0.4.1 (pending `developer-v0.4.1` publication): generated providers include + ``. Published 0.4.0 remains immutable. + ## 0.4.0 - 2026-10-21 ### Changed diff --git a/docs/DEVELOPER_ENVIRONMENT.md b/docs/DEVELOPER_ENVIRONMENT.md index 0f935183..08152ec6 100644 --- a/docs/DEVELOPER_ENVIRONMENT.md +++ b/docs/DEVELOPER_ENVIRONMENT.md @@ -12,7 +12,7 @@ Do not ship developer mode as the distribution configuration. The 0.4 presentation update prepares developer distribution **0.4.0** with the revised Life text. It is not published as part of the repository cleanup. Before releasing this branch, publish the -prepared archives using [the package release procedure](../tools/developer/PUBLISHING.md). +prepared archives using [the package release procedure](../js/developer/tools/PUBLISHING.md). For local review, provision the generated archive as described below and pass its URL/integrity to `WebFrontLifeDeveloper`. Existing published versions remain unchanged. @@ -23,7 +23,7 @@ Enable the platform's native frontend in CMake: `WEBFRONT_EMBED_WKWEBVIEW=ON` on The default `webfront::WebFront` still opens the system browser. ```cpp -#include +#include #include std::bitset<1024> nextLife(const std::bitset<1024>& cells); // Existing C++ simulation. @@ -46,8 +46,8 @@ header generation. Both resulting headers were compiled and the applications pas native tests from empty working directories, with developer callbacks absent. Pages returned HTTP 200, CORS `*` and the pinned archive bytes. These checks supplement offline CTest fixtures. -The default configuration is generated in `include/system/DeveloperReleaseData.hpp` and targets -`https://ambroise-leclerc.github.io/WebFront/developer/0.4.0/environment.tgz`. This version is prepared but not yet published; use local provisioning for now. The configuration pins one version and +The default configuration is generated in `include/webfront/system/DeveloperReleaseData.hpp` and targets +`https://ambroise-leclerc.github.io/WebFront/developer/0.4.1/environment.tgz`. This version (generated providers now include ``) is prepared but not yet published until its `developer-v0.4.1` tag is pushed; use local provisioning for now. Published 0.4.0 stays immutable but targets the former include layout. The configuration pins one version and its SHA-512 rather than resolving a mutable `latest` channel. An explicit `DeveloperBootstrapOptions{.environment = url, .integrity = trustedHash}` still selects a different HTTPS/CORS repository or a same-origin test fixture. Users install neither npm nor Node.js. @@ -56,7 +56,7 @@ The environment archive contains pinned Life and PI starter descriptors. `wf cre verifies that separate archive, creates a new `ui` directory and prints the install/preview/embed commands. Existing directories are never replaced. The trusted environment hash protects both its own code and the starter descriptor; `provision.json` on the server is not a new trust anchor. -See [publication instructions](../tools/developer/PUBLISHING.md) for deployment and release checks. +See [publication instructions](../js/developer/tools/PUBLISHING.md) for deployment and release checks. The bootstrap verifies SHA-512 before unpacking or executing the archive, validates its manifest and paths, then publishes it under the application's local origin. The cached **archive** is @@ -119,7 +119,7 @@ determines the C++ provider name. The header is replaced only after all chunks a The distribution form has no project root or developer callbacks: ```cpp -#include +#include #include "Life.hpp" #include "generated/LifeUI.hpp" @@ -136,7 +136,7 @@ Reconfigure the native build with project sources, downloaded cache nor network. The PI starter remains available through `wf create pi` for existing projects and regression -coverage. Its sources are maintained under `tools/developer/starters/pi/`; the public C++ +coverage. Its sources are maintained under `js/developer/tools/starters/pi/`; the public C++ examples are limited to Hello World and Life. Existing embedded React/Babel providers remain supported. ## Dependencies, storage and limitations @@ -174,15 +174,15 @@ These commands require Node/npm **only for environment maintainers**. They prepa application developers can download. No command publishes anything to a registry automatically. ```sh -npm ci --prefix tools/assets --ignore-scripts -node tools/developer/build.mjs build-developer-environment --refresh-bootstrap -node tools/developer/fixtures.mjs build-developer-environment +npm ci --prefix js/developer/vendor --ignore-scripts +node js/developer/tools/build.mjs build-developer-environment --refresh-bootstrap +node js/developer/tools/fixtures.mjs build-developer-environment ``` `build.mjs` bundles the environment and compiler, includes esbuild.wasm, xterm styles and licenses, and writes deterministic `environment.tgz`, `life-starter.tgz`, `pi-starter.tgz`, `provision.json` and -`DeveloperReleaseData.hpp`. The version and public base URL are in `tools/developer/distribution.json`. Dependencies are -pinned in `tools/assets/package-lock.json`. `--refresh-bootstrap` additionally refreshes the two +`DeveloperReleaseData.hpp`. The version and public base URL are in `js/developer/tools/distribution.json`. Dependencies are +pinned in `js/developer/vendor/package-lock.json`. `--refresh-bootstrap` additionally refreshes the two checked-in JS bundles, their input checksums and the embedded bootstrap headers. Without that flag, it writes only to the output directory. The archives have the package identifiers `@webfront/developer-environment`, `@webfront/life-starter` and `@webfront/pi-starter`. They are distributed as static GitHub Pages downloads; no npm publication or diff --git a/Doxyfile.in b/docs/Doxyfile.in similarity index 100% rename from Doxyfile.in rename to docs/Doxyfile.in diff --git a/cmake/Doxygen.cmake b/docs/Doxygen.cmake similarity index 100% rename from cmake/Doxygen.cmake rename to docs/Doxygen.cmake diff --git a/docs/EMBEDDED_ASSETS.md b/docs/EMBEDDED_ASSETS.md index 23f64bf5..e8f49e18 100644 --- a/docs/EMBEDDED_ASSETS.md +++ b/docs/EMBEDDED_ASSETS.md @@ -15,9 +15,9 @@ Normal C++ consumer builds use checked-in headers and need neither Node.js nor n React 19 removed UMD builds and requires the automatic JSX transform ([upstream upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide)). -`tools/assets/update.mjs` bundles React, React DOM and `react/jsx-runtime` together as +`js/developer/vendor/update.mjs` bundles React, React DOM and `react/jsx-runtime` together as `/react@19.3.1/runtime.mjs`. This keeps hooks, DOM rendering and JSX on one React instance. -The import map in `webtest/fixtures/react.html` maps `react`, `react-dom/client` and `react/jsx-runtime` +The import map in `test/web/fixtures/react.html` maps `react`, `react-dom/client` and `react/jsx-runtime` to that runtime. Babel's custom `webfront-react` preset uses `runtime: "automatic"` and emits a native module. The JSX remains editable in the HTML file, without a consumer build step. Babel is served at `/babel-standalone@8.0.7/babel.min.js`. @@ -35,8 +35,8 @@ Run from the repository root: ```sh # Online, maintenance only: exact versions and transitive integrity hashes are in package-lock.json. -npm ci --prefix tools/assets --ignore-scripts -node tools/assets/update.mjs +npm ci --prefix js/developer/vendor --ignore-scripts +node js/developer/vendor/update.mjs # Refresh xterm only through its dedicated script, retaining readable upstream files and licenses. cmake -DXTERM_VERSION=6.0.0 -DFIT_VERSION=0.11.0 -P cmake/UpdateXterm.cmake @@ -45,12 +45,12 @@ cmake --build build --target webfront-embedded-assets ctest --test-dir build -R 'Asset.*Fresh|EmbeddedGzipContents' --output-on-failure ``` -`tools/assets/package.json` pins all six library versions and the maintenance tools; +`js/developer/vendor/package.json` pins all six library versions and the maintenance tools; `package-lock.json` pins the npm tarball URLs, integrity hashes, scheduler 0.28.0 and esbuild 0.28.2. When upgrading, recheck the registry's stable tags, update exact versions and the lockfile, then review sources, routes, tests, version inventory and size measurements together. `cmake/UpdateXterm.cmake` takes exact versions explicitly and records them in -`third_party/xterm/VERSION`. `tools/assets/update.mjs` records the other versions alongside +`third_party/xterm/VERSION`. `js/developer/vendor/update.mjs` records the other versions alongside their distribution files in `third_party/`. Compression uses the vendored **fflate 0.8.3** pure JavaScript `gzipSync` implementation @@ -60,9 +60,9 @@ its license are checked in, so the streams are identical across platforms withou The small bridge, fallback page and component modules remain identity encoded. `.gitattributes` keeps text sources and headers at LF; PNG files retain their binary bytes. -`cmake/EmbedTextAsset.cmake` packs the compressed bytes into big-endian words, with +`js/core/EmbedTextAsset.cmake` packs the compressed bytes into big-endian words, with `encoding = "gzip"` and `dataSize` excluding trailing word padding. CTest regenerates and compares -headers offline. `tools/assets/check.mjs` independently decodes the arrays using Node's zlib, +headers offline. `js/developer/vendor/check.mjs` independently decodes the arrays using Node's zlib, checks every decoded byte against the distribution file, validates gzip headers/padding, and checks React's named ESM exports. Catch2 exercises provider routes, reads across word boundaries, EOF, encoding metadata and HTTP Content-Encoding/Content-Length/MIME/body agreement. @@ -122,7 +122,7 @@ switch to a raw PNG favicon. The final total is 8,352 bytes above the xterm-only and **250,432 bytes below the original**. Major upgrades therefore do not uniformly shrink resources: React's combined DOM/JSX runtime and Jasmine grow while Babel shrinks. -Exact served lengths (without padding) are printed by `node tools/assets/check.mjs`: +Exact served lengths (without padding) are printed by `node js/developer/vendor/check.mjs`: xterm module 91,908; CSS 2,547; Fit 807; React runtime 72,925; Babel 563,586; Jasmine JS 75,638; HTML reporter 9,547; CSS 7,568; boot 1,073; PNG 1,486 bytes. diff --git a/docs/FRONTENDS.md b/docs/FRONTENDS.md index a609bd3e..31c546b6 100644 --- a/docs/FRONTENDS.md +++ b/docs/FRONTENDS.md @@ -2,7 +2,7 @@ [Back to the README](../README.md#use-webfront-in-your-project) -A frontend decides how the interface is displayed: the system browser (`DefaultBrowserFrontend`, the default), an embedded Chromium window (`CEFFrontend`) or an embedded native web view (`WebView2Frontend` on Windows, `WKWebViewFrontend` on macOS, `WebKitGTKFrontend` on Linux). The application code and interface assets do not change when the frontend does. Platform-specific notes live next to each frontend, for example [WebView2](WEBVIEW2.md) and [WKWebView](WKWEBVIEW.md). This page states the rules they all follow; the C++ concept is `frontend::FrontendType` in `include/frontend/Frontend.hpp`. +A frontend decides how the interface is displayed: the system browser (`DefaultBrowserFrontend`, the default), an embedded Chromium window (`CEFFrontend`) or an embedded native web view (`WebView2Frontend` on Windows, `WKWebViewFrontend` on macOS, `WebKitGTKFrontend` on Linux). The application code and interface assets do not change when the frontend does. Platform-specific notes live next to each frontend, for example [WebView2](WEBVIEW2.md) and [WKWebView](WKWEBVIEW.md). This page states the rules they all follow; the C++ concept is `frontend::FrontendType` in `include/webfront/frontend/Frontend.hpp`. ## The contract @@ -28,17 +28,17 @@ The [shared content policy](CONTENT_POLICY.md) defines bridge-origin authorizati ## Contract tests -`test/FrontendContractTests.cpp` uses a synchronized mock window and a server loop that stays active +`test/unit/FrontendContractTests.cpp` uses a synchronized mock window and a server loop that stays active until stopped. It verifies blocking until closure, execution on the calling thread, server-loop completion before `show()` returns or propagates an exception, and continued service after a `keepServerRunning` frontend returns. Standard and non-standard exceptions are covered, including startup failures before any window is created. Coordination waits have a 30-second upper bound. -`test/WebFrontTests.cpp` also checks initialization once per frontend type, retry after failed +`test/unit/WebFrontTests.cpp` also checks initialization once per frontend type, retry after failed initialization, frontend selection and unavailable-engine diagnostics. These tests need no GUI. ## Adding a frontend -1. Implement the type in `include/frontend/` following the contract above and include it from `Frontend.hpp`. Keep platform headers behind the option's macro. +1. Implement the type in `include/webfront/frontend/` following the contract above and include it from `Frontend.hpp`. Keep platform headers behind the option's macro. 2. Add its support module and one `webfront_register_frontend(...)` entry in `cmake/Frontends.cmake`, using the fields below. 3. Extend `FrontendSelection` coverage and run the shared Jasmine and lifecycle suites. Enabling the engine on a `TEST_PLATFORMS` platform automatically registers the seven shared lifecycle cases; `WEBFRONT_TEST_FRONTEND` selects its C++ type in both runners. @@ -62,7 +62,7 @@ Registry order determines the initial cache default: the first enabled embedded ## Lifecycle tests -`webtest/FrontendLifecycle.cpp` runs the same seven cases under the selected embedded engine: +`test/web/FrontendLifecycle.cpp` runs the same seven cases under the selected embedded engine: - `no-bridge`: close a page that never connects to the bridge and return from `show()`. - `early-close`: close immediately from the page's first script, before any bridge connection. diff --git a/docs/HTTP_ASSETS.md b/docs/HTTP_ASSETS.md index 6c7f7eb5..6dc822aa 100644 --- a/docs/HTTP_ASSETS.md +++ b/docs/HTTP_ASSETS.md @@ -46,7 +46,7 @@ All bundled assets fit under the 4 MiB default; custom applications can override their existing buffer policy: ```cpp -#include +#include #include struct AppBuffers : webfront::http::DefaultBuffersPolicy { diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index ea9bdf27..00b743db 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -1,16 +1,27 @@ # WebFront project status +## Repository layout (#320, epic #303) + +The root now holds only `.github`, `cmake`, `docs`, `examples`, `include`, `js`, `test` and `third_party` +(removed by #319), plus tool configuration files. Headers moved to `include/webfront/` and are included +as ``; the former ``, `` or `` spellings are +removed without redirect headers (see `docs/CHANGELOG.md`). Browser sources live in `js/core/` +(bridge, fallback, bootstrap loader and embedding modules) and `js/developer/` (environment, terminal +components, build tools, vendoring tools); tests live in `test/{unit,web,fuzz,fixtures,cmake}`. The CTest +case `RepositoryLayout` enforces the root. The generated-provider include changed, so the developer +distribution is bumped to 0.4.1 and awaits its `developer-v0.4.1` publication. + ## Release 0.4.0 (#200, 2026-10-21) `webfront::version` and the CMake project version are 0.4.0. The release presents the repository (examples, README, assets layout) and streamlines CI; it adds no library functionality, see -`CHANGELOG.md`. The developer distribution 0.4.0 is published and archived as `developer-v0.4.0`; +`docs/CHANGELOG.md`. The developer distribution 0.4.0 is published and archived as `developer-v0.4.0`; published 0.1.0 to 0.4.0 remain immutable. APIs and packaging remain experimental. ## Repository presentation for 0.4 (2026-10-21) - Public examples now live in `examples/`: Hello World and the three stages of Game of Life. - Browser bridge/component/bootstrap sources live in `assets/`; the library remains header-only. + Browser bridge/component/bootstrap sources live in `js/`; the library remains header-only. PI and Signal Studio resources required by regression tests remain fixtures, without public demo targets. - The README starts with Hello World and a linked Life thumbnail, then walks through the native bootstrap, dependency installation, preview and offline embedding. No library feature is added. @@ -115,7 +126,7 @@ Status snapshot: 2026-07-19. Optional mddlog integration note: 2026-10-02. Newco `webfront::version` and the CMake project version are 0.3.0. The release adds packed `std::bitset` bridge values (#289) and the opt-in developer environment with its packed Life demonstration (#288); -see `CHANGELOG.md`. The developer distribution 0.3.1 is published and archived as `developer-v0.3.1`; +see `docs/CHANGELOG.md`. The developer distribution 0.3.1 is published and archived as `developer-v0.3.1`; published 0.1.0 to 0.3.1 remain immutable. APIs and packaging remain experimental. ## Release 0.2.0 and native frontend epic (#253, 2026-10-19) @@ -125,7 +136,7 @@ Compile-time alias checks, CMake selector fixtures and the Windows WebView2, macOS WKWebView and Linux WebKitGTK browser/lifecycle CI lanes cover the delivered scope. Existing runtime and packaging limitations remain documented below. -`webfront::version` in `include/WebFront.hpp` is the version source for CMake. +`webfront::version` in `include/webfront/WebFront.hpp` is the version source for CMake. The C++ version scenario compares the compiled constant with `PROJECT_VERSION`; `ReleaseVersionConsistency` also checks version tags at HEAD without network access. The release-version workflow checks the actual tag on tag pushes and published @@ -215,7 +226,7 @@ See [WebKitGTK notes](WEBKITGTK.md). stalled on that existing regression. Each C++ scenario has a 60-second timeout. UBSan diagnostics fail the process. The ASan lane also runs each of three libFuzzer targets for 30 seconds. - `ENABLE_FUZZING=ON` builds bridge-message, HTTP-request and WebSocket-frame fuzzers - with ASan+UBSan. Seed corpora derive from existing unit examples and live in `fuzz/`; + with ASan+UBSan. Seed corpora derive from existing unit examples and live in `test/fuzz/`; writable copies stay in the build tree and CI uploads reproducer artifacts on failure. HTTP and WebSocket harnesses exercise partial receives; WebSocket decoding rejects oversized advertised lengths before allocating their payloads. @@ -277,12 +288,12 @@ See [WebKitGTK notes](WEBKITGTK.md). ## UI components: the terminal and the tool manager -- First opt-in UI component (#230), designed in [UI_COMPONENTS.md](UI_COMPONENTS.md): `webfront::Terminal` (`include/components/Terminal.hpp`) registers C++ commands behind an embedded xterm.js 6.0.0 terminal (`fs::TerminalFS`, served under `webfront/components/terminal/`; composed with `fs::DefaultFSWith<>`). The standalone terminal target was removed in 0.4; see the component API example in [UI_COMPONENTS.md](UI_COMPONENTS.md). The bridge protocol is unchanged. +- First opt-in UI component (#230), designed in [UI_COMPONENTS.md](UI_COMPONENTS.md): `webfront::Terminal` (`include/webfront/components/Terminal.hpp`) registers C++ commands behind an embedded xterm.js 6.0.0 terminal (`fs::TerminalFS`, served under `webfront/components/terminal/`; composed with `fs::DefaultFSWith<>`). The standalone terminal target was removed in 0.4; see the component API example in [UI_COMPONENTS.md](UI_COMPONENTS.md). The bridge protocol is unchanged. - Line editing, history and Tab completion run in the browser; C++ receives whole lines and returns the output as the Promise result. A command exception rejects the Promise and is printed as an error. Output is capped at 60000 bytes because bridge strings carry a 16-bit length. -- Covered by Catch2 (`TerminalTests.cpp`, `TerminalFSTests.cpp`), five asset freshness CTest cases and Jasmine specs (`webtest/js/terminal-specs.mjs`) in the browser integration test. +- Covered by Catch2 (`TerminalTests.cpp`, `TerminalFSTests.cpp`), five asset freshness CTest cases and Jasmine specs (`test/web/js/terminal-specs.mjs`) in the browser integration test. - Verified 2026-10-14 on Linux (GCC 16.1, Unix Makefiles generator): CEF-off build with all 100 CTest cases passing; the example driven in headless Chromium (commands, errors, quoting, completion, history, `help`, `clear`); and the Jasmine suite, terminal specs included, run in headless Chromium through a scratch copy of the runner that replaces `CEFFrontend`. A deliberately broken terminal spec made that run fail. **Not verified:** the CEF/Xvfb CTest itself, Windows, macOS and Clang. - Limitations: no output streaming, no cancellation, no per-browser sessions, and single-row line redraw (see the design note). -- The `wf` tool manager (#234, npm-hosted web tools installed during debugging): `webfront::ToolManager` (`include/components/ToolManager.hpp`) stores tools with `fs::ToolStore` under `.webfront/tools/`, records them in `webfront-tools.lock.json`, serves them with `fs::PackageFS` under `webfront/tools/` and runs `wf list`, `wf remove` and `wf help` in C++. `wf search`, `wf install` and `wf open` run in the page, in `wf.mjs` (`assets/components/tools/`, served by `fs::ToolManagerFS`), a terminal extension module loaded through the new `Terminal::extension()`: it fetches the packument and tarball, checks the SHA-512 `dist.integrity` with `crypto.subtle`, gunzips with `DecompressionStream`, reads the ustar archive (pax and prefixed paths included) and sends the files in 256 KiB chunks through `webfront.pkg.*`, after refusing archives unpacking to more than 256 MiB. Ctrl+C interrupts it through the `signal` the terminal passes to browser commands. The registry is set by `ToolManagerOptions::registry`. The standalone tools target was removed in 0.4; the component remains documented in [UI_COMPONENTS.md](UI_COMPONENTS.md). Covered by `ToolStoreTests.cpp`, `ToolManagerTests.cpp`, `TerminalTests.cpp` and the Jasmine specs `webtest/js/tools-specs.mjs`, which install a fixture package from a fake registry served by the test (`webtest/registry/`, regenerated by `make_fixture.py`) into a temporary directory. +- The `wf` tool manager (#234, npm-hosted web tools installed during debugging): `webfront::ToolManager` (`include/webfront/components/ToolManager.hpp`) stores tools with `fs::ToolStore` under `.webfront/tools/`, records them in `webfront-tools.lock.json`, serves them with `fs::PackageFS` under `webfront/tools/` and runs `wf list`, `wf remove` and `wf help` in C++. `wf search`, `wf install` and `wf open` run in the page, in `wf.mjs` (`js/developer/components/tools/`, served by `fs::ToolManagerFS`), a terminal extension module loaded through the new `Terminal::extension()`: it fetches the packument and tarball, checks the SHA-512 `dist.integrity` with `crypto.subtle`, gunzips with `DecompressionStream`, reads the ustar archive (pax and prefixed paths included) and sends the files in 256 KiB chunks through `webfront.pkg.*`, after refusing archives unpacking to more than 256 MiB. Ctrl+C interrupts it through the `signal` the terminal passes to browser commands. The registry is set by `ToolManagerOptions::registry`. The standalone tools target was removed in 0.4; the component remains documented in [UI_COMPONENTS.md](UI_COMPONENTS.md). Covered by `ToolStoreTests.cpp`, `ToolManagerTests.cpp`, `TerminalTests.cpp` and the Jasmine specs `test/web/js/tools-specs.mjs`, which install a fixture package from a fake registry served by the test (`test/web/registry/`, regenerated by `make_fixture.py`) into a temporary directory. - Verified 2026-10-15 on macOS (Apple clang, CEF off): all CTest cases pass except `AddSubdirectoryConsumer`, which fails locally because of the outdated libc++ headers of the Command Line Tools; the Jasmine suite, tools specs included, run in Chromium through a scratch copy of the runner that replaces `CEFFrontend` (one terminal spec, "reports an application without terminal functions", fails there as it does on develop, because that browser gave its unsized terminal a two-column width); `WebFrontTools` driven against registry.npmjs.org (`wf help`, `wf search`, `wf list`, `wf install left-pad` downloaded, verified and refused as not a tool). **Not verified locally:** the CEF/Xvfb CTest (Linux only; the macOS CEF build of `webtest` fails inside stdexec), Windows. - Limitations of the tool manager: no semver ranges (an exact version or a dist-tag), no dependencies (a tool must bundle what it uses), no progress bar beyond step messages, sequential chunk uploads, and the trust model of `npm install`. - Found while building it: the C++ encoder wrapped the 16-bit length of strings over 65535 bytes (#231, fixed: such strings now fail explicitly, see "Implemented baseline"); `MimeType::toString()` mapped `csv` to `text/css` (#232, fixed: a `static_assert` now ties the name table to the enum); with GCC 16.1 and the Ninja generator, CMake's module dependency scanning (`-fmodules-ts`) crashes the compiler inside stdexec, while Unix Makefiles builds work. @@ -314,7 +325,7 @@ The minimum demonstration milestone is deliberately narrower than the long-term - The browser integration is a timeout-bounded CTest test for CEF-enabled Linux builds and runs under Xvfb in a focused CI job, built with GCC and with Clang. CEF's `NO_UNIQUE_ADDRESS`, `ALWAYS_INLINE` and `NOINLINE` macros break stdexec headers included after CEF's headers, which only Clang 19+ (and, by stdexec's configuration, MSVC) reveals (#243): `frontend/CEF.hpp` includes `networking/SenderHeaders.hpp`, which lists every stdnet and stdexec header WebFront uses, first, and the Catch2 case `CEFMacrosTests.cpp` compiles `WebFront.hpp` after those macros. Verified 2026-10-16 on Linux with Clang 22: the CEF build of `webtest` failed before the fix and `WebFrontBrowserIntegration` passes after it. Not verified: CEF with MSVC or Apple clang. - `WEBFRONT_EMBED_CEF=ON` uses CEF 154.0.34 (Chromium 154.0.8037.98, package `ambroise-leclerc/CEF@154.0.34`). An existing CEF 137 build directory must be reconfigured from scratch. On Windows, `libEGL.dll`, `libGLESv2.dll`, `dxcompiler.dll`, `dxil.dll` and `vk_swiftshader_icd.json` are copied only when the distribution ships them (CEF 154 has no ANGLE DLLs, #249). Verified 2026-10-16 on Linux (GCC 16.1, Unix Makefiles): the CEF build with all 138 CTest cases passing, `WebFrontBrowserIntegration` included, and the CEF-off build with all 137; with Clang 22, the CEF build of `webtest` and `WebFrontBrowserIntegration`. **Not verified:** CEF 154 on Windows and macOS (the macOS ARM64 framework requires macOS 13.0+). The earlier multi-example build intermittently raced while copying CEF `locales/` to its shared output directory. The retained examples now use `/examples`. - The bridge carries all JavaScript numeric typed-array variants in both directions. C++ `std::vector`, `std::array`, and `std::span` values use the matching typed-array encoding, while decoded parameters own their storage. -- `assets/WebFront.js` is the readable browser bridge source. CMake deterministically regenerates the embedded `include/system/WebFrontJsData.hpp` asset and CTest rejects a stale generated copy. +- `js/core/WebFront.js` is the readable browser bridge source. CMake deterministically regenerates the embedded `include/webfront/system/WebFrontJsData.hpp` asset and CTest rejects a stale generated copy. - Encoded HTTP assets (#274): accepted gzip is served unchanged; otherwise the server decodes gzip to identity with the decoded length, no `Content-Encoding` and `Vary: Accept-Encoding`. The default decoded-byte budget is 4 MiB and applications can override it through their buffer @@ -324,7 +335,7 @@ The minimum demonstration milestone is deliberately narrower than the long-term Regression tests and gzip/HTTP fuzzers cover decoding and encoding preferences. Verified 2026-10-19 on Linux for #274: the CEF-off build/CTest suite, CEF/Xvfb integration and WebKitGTK integration passed. The macOS results above describe earlier platform validation. -- First-party bridge/component text assets are embedded **verbatim rather than compressed**, so `HTTPServer` serves them without a `Content-Encoding` header. Deflate streams are not reproducible across the zlib builds on our macOS, Linux, and Windows runners, so a pre-compressed blob could not be verified by the staleness check. Restoring compression — either a reproducible build-time gzip or on-the-fly compression keyed on `Accept-Encoding` — is tracked as a follow-up. The fallback HTML and module have readable sources under `assets/fallback/`; `favicon.ico` uses gzip. Legacy third-party Jasmine/React/Babel assets now use gzip for WKWebView local-HTTP compatibility (#258); their decoded payloads are unchanged. Regenerate the text headers with `cmake --build build --target webfront-embedded-assets`. Sources and generated headers use LF on every platform so the CTest freshness checks compare identical bytes. +- First-party bridge/component text assets are embedded **verbatim rather than compressed**, so `HTTPServer` serves them without a `Content-Encoding` header. Deflate streams are not reproducible across the zlib builds on our macOS, Linux, and Windows runners, so a pre-compressed blob could not be verified by the staleness check. Restoring compression — either a reproducible build-time gzip or on-the-fly compression keyed on `Accept-Encoding` — is tracked as a follow-up. The fallback HTML and module have readable sources under `js/core/fallback/`; `favicon.ico` uses gzip. Legacy third-party Jasmine/React/Babel assets now use gzip for WKWebView local-HTTP compatibility (#258); their decoded payloads are unchanged. Regenerate the text headers with `cmake --build build --target webfront-embedded-assets`. Sources and generated headers use LF on every platform so the CTest freshness checks compare identical bytes. - The fallback page awaits `webFront.ready` to display the initial bridge connection result. This promise resolves after the handshake acknowledgement and rejects if the initial connection fails or closes; it does not track later disconnects. Jasmine exercises failure against a test-owned HTTP server on an OS-assigned loopback port that rejects WebSocket upgrades, including the case where the application never consumes `ready`. - WebSocket writes own their payload buffers until asynchronous completion and are serialized per connection. - The HTTP server looks files up by the request path without its query string (`/app.js?v=2` serves `app.js`); the path is cut at the first `?` before percent-decoding, so an encoded `%3F` stays part of the file name, and the `..` check applies to the decoded path only. The query is not passed to filesystems. @@ -359,7 +370,7 @@ The minimum demonstration milestone is deliberately narrower than the long-term The Windows CI matrix runs the shared Jasmine bridge suite and timed lifecycle tests under WebView2; CEF/Xvfb remains the Linux lane. The WebView2 browser label runs separately with `--no-tests=error`. CI's Evergreen bootstrapper URL is mutable; a downloaded installer must carry a valid Microsoft signature, and installed executable versions are logged. -- Embedded frontend lifecycle coverage is shared through `webtest/FrontendLifecycle.cpp` (#256), +- Embedded frontend lifecycle coverage is shared through `test/web/FrontendLifecycle.cpp` (#256), selected with `WEBFRONT_TEST_FRONTEND` alongside Jasmine. Each registered test platform inherits seven timeout-bounded `web-integration` cases: no bridge, immediate page closure, rejected ready, failed initial navigation, encoded paths, blocked navigation/popups and an explicit navigation diff --git a/docs/UI_COMPONENTS.md b/docs/UI_COMPONENTS.md index 05a73d08..50980a5c 100644 --- a/docs/UI_COMPONENTS.md +++ b/docs/UI_COMPONENTS.md @@ -14,9 +14,9 @@ A component has four parts. | Part | Rule | Terminal | | --- | --- | --- | -| Assets | An embedded `fs::Provider` serving under the reserved prefix `webfront/components//`, so it never collides with a development document root or the application's own pages. Readable sources live in `assets/components//`, third-party code in `third_party/`, and generated headers are checked in and kept fresh by CTest, like `WebFront.js`. | `fs::TerminalFS` (`include/system/TerminalFS.hpp`) | -| Browser module | A native ES module exporting `mount(element, options)`. It depends only on the global `webFront` bridge and its own assets (relative imports), and waits for `webFront.ready`. | `assets/components/terminal/terminal.mjs` | -| C++ façade | A header under `include/components/` that registers its bridge functions under `webfront..`. `BasicWF::cppFunction` ignores a second registration of the same name, so the prefix is what keeps components and applications apart. | `webfront::Terminal` (`include/components/Terminal.hpp`) | +| Assets | An embedded `fs::Provider` serving under the reserved prefix `webfront/components//`, so it never collides with a development document root or the application's own pages. Readable sources live in `js/developer/components//`, third-party code in `third_party/`, and generated headers are checked in and kept fresh by CTest, like `WebFront.js`. | `fs::TerminalFS` (`include/webfront/system/TerminalFS.hpp`) | +| Browser module | A native ES module exporting `mount(element, options)`. It depends only on the global `webFront` bridge and its own assets (relative imports), and waits for `webFront.ready`. | `js/developer/components/terminal/terminal.mjs` | +| C++ façade | A header under `include/webfront/components/` that registers its bridge functions under `webfront..`. `BasicWF::cppFunction` ignores a second registration of the same name, so the prefix is what keeps components and applications apart. | `webfront::Terminal` (`include/webfront/components/Terminal.hpp`) | | Wire format | Only the existing bridge types: scalars, strings (at most 65535 bytes), tuples and numeric typed arrays. Lists of words cross as `"\n"`-separated strings. A component never changes `Messages.hpp` or `WebFront.js`. | `run(line) -> output`, `complete(line) -> candidates` | Assets are added to an application through its filesystem type. `fs::DefaultFSWith` is @@ -28,13 +28,13 @@ using TerminalApp = webfront::BasicWF` alone does not pull them in. +grow, and `#include ` alone does not pull them in. ## The terminal component ```cpp -#include -#include +#include +#include int main() { webfront::TerminalApp app; @@ -177,7 +177,7 @@ header-only C++ library. ### Browser side (implemented) -`assets/components/tools/wf.mjs` is served by `fs::ToolManagerFS` at +`js/developer/components/tools/wf.mjs` is served by `fs::ToolManagerFS` at `webfront/components/tools/wf.mjs` and added to the terminal by `ToolManager`. Besides the `commands` it exports `search`, `install`, `installed`, `open`, `readTar`, `gunzip`, `verifyIntegrity` and `parseSpec`, so other pages can use them. @@ -201,21 +201,21 @@ header-only C++ library. browser blocks the window, it prints the URL instead. The browser integration test serves a fake registry: packuments and a fixture tarball in -`webtest/registry/` (regenerated by `make_fixture.py`, which also writes a packument with a wrong +`test/web/registry/` (regenerated by `make_fixture.py`, which also writes a packument with a wrong integrity), and a search endpoint answered by the test. Tools are installed into a temporary directory, never into the source tree. ### C++ side (implemented) ```cpp -#include +#include webfront::ToolsApp app; // DefaultFSWith webfront::Terminal terminal{app}; webfront::ToolManager tools{app, terminal}; // adds 'wf' and the webfront.pkg.* functions ``` -- `fs::ToolStore` (`include/system/ToolStore.hpp`, with the small JSON reader of `include/utils/Json.hpp`) validates npm names (`@scope/` allowed), +- `fs::ToolStore` (`include/webfront/system/ToolStore.hpp`, with the small JSON reader of `include/webfront/utils/Json.hpp`) validates npm names (`@scope/` allowed), versions and paths, stages and commits installations, and reads and writes the lock file through a temporary file renamed over it. The lock file is read strictly, and a record whose name, version or entry could leave the tools directory is rejected. Names, versions and paths may not @@ -225,7 +225,7 @@ webfront::ToolManager tools{app, terminal}; // adds 'wf' and the webfront.pkg.* set of pending installations within the process; versions differing only by case, which name the same directory on a case-insensitive volume, replace each other without losing files. Once the lock file is written, a directory that cannot be deleted is left behind instead of failing the operation. -- `fs::BasicPackageFS` (`include/system/PackageFS.hpp`) takes the project directory from +- `fs::BasicPackageFS` (`include/webfront/system/PackageFS.hpp`) takes the project directory from `Location::get()`; `fs::PackageFS` uses the working directory at startup (`fs::CurrentDirectory`). `ToolManager` must use the same `Location`. - `webfront.pkg.list(first)` returns the `name\tversion\tentry URL\ttitle` lines of the tools from @@ -263,7 +263,7 @@ production plugin system. - Core gaps 1 and 2 above, for progress and output streaming initiated by C++ (done in #233). - A filesystem provider writing outside the build tree, with tests using temporary directories. - Browser tests that use a local fake registry: tests must not need the public network (done: - `webtest/js/tools-specs.mjs`). + `test/web/js/tools-specs.mjs`). ## Browser-powered developer environment diff --git a/docs/WEBKITGTK.md b/docs/WEBKITGTK.md index d320b34c..34ae02e1 100644 --- a/docs/WEBKITGTK.md +++ b/docs/WEBKITGTK.md @@ -4,7 +4,7 @@ WebKitGTKFrontend is an optional GTK 4 embedded window using the distribution's WebKitGTK 6.0 runtime. It never changes the system-browser default. ```cpp -#include +#include using App = webfront::WebFrontWithFrontend; int main() { App app; diff --git a/docs/WKWEBVIEW.md b/docs/WKWEBVIEW.md index 33e620f3..af0efe3e 100644 --- a/docs/WKWEBVIEW.md +++ b/docs/WKWEBVIEW.md @@ -19,7 +19,7 @@ integrity=$(node -p "require('./build-developer-environment/provision.json').int For HelloWorld or your application, select the adapter in C++: ```cpp -#include +#include using App = webfront::WebFrontWithFrontend; int main() { @@ -34,7 +34,7 @@ There is no engine download, SDK package or separate runtime installation. ## Implementation and lifetime -The adapter stays header-only under `include/frontend/WKWebView.hpp`. It sends public Cocoa/WebKit +The adapter stays header-only under `include/webfront/frontend/WKWebView.hpp`. It sends public Cocoa/WebKit messages through the Objective-C runtime and registers delegate/view classes once. It compiles as C++23, without an Objective-C++ `.mm` source or ARC. Clang's Blocks extension (`-fblocks`, inherited through `WebFront::WebFront`) supplies WebKit's decision-handler calling convention. CMake links diff --git a/docs/adr/ADR-001-coeur-cpp23-header-only.md b/docs/adr/ADR-001-coeur-cpp23-header-only.md index 459e9158..056182cb 100644 --- a/docs/adr/ADR-001-coeur-cpp23-header-only.md +++ b/docs/adr/ADR-001-coeur-cpp23-header-only.md @@ -68,14 +68,14 @@ est une exception optionnelle documentée par l’ADR-011. de `src/` servent aux exemples. Aucune bibliothèque compilée ne saurait devenir obligatoire. - Préférer la façade simple dans un nouvel exemple ; n’exposer `BasicWF` que si une variation réelle de provider, filesystem, politique ou frontend le justifie. -- Respecter C++23, les concepts et conventions de `CONTRIBUTING.md`. Ne pas confondre le +- Respecter C++23, les concepts et conventions de `.github/CONTRIBUTING.md`. Ne pas confondre le vocabulaire sender fourni par stdnet avec une bibliothèque réseau standard déjà disponible. - Ne pas imposer avertissements, sanitizers, couverture ou choix de linker au projet parent. ## Sources et vérification -- [API et composition](../../include/WebFront.hpp), [CMake](../../CMakeLists.txt), - [conventions](../../CONTRIBUTING.md), [état du projet](../PROJECT_STATUS.md). +- [API et composition](../../include/webfront/WebFront.hpp), [CMake](../../CMakeLists.txt), + [conventions](../../.github/CONTRIBUTING.md), [état du projet](../PROJECT_STATUS.md). - Vérifier `WebFrontTests.cpp`, `DefaultFSTests.cpp`, `AddSubdirectoryConsumer` et `NewcomerDocsMatchExamples` dans CTest. - Voir [ADR-002](ADR-002-systemes-de-fichiers-composables.md), diff --git a/docs/adr/ADR-002-systemes-de-fichiers-composables.md b/docs/adr/ADR-002-systemes-de-fichiers-composables.md index db237e00..7a817ce2 100644 --- a/docs/adr/ADR-002-systemes-de-fichiers-composables.md +++ b/docs/adr/ADR-002-systemes-de-fichiers-composables.md @@ -121,8 +121,8 @@ un store restent optionnels et demandent un emplacement adapté à la cible. ## Sources et vérification -- [DefaultFS](../../include/system/DefaultFS.hpp), [FileSystem](../../include/system/FileSystem.hpp), - [NativeFS](../../include/system/NativeFS.hpp). -- Tests : [FileSystemTests](../../test/FileSystemTests.cpp), [DefaultFSTests](../../test/DefaultFSTests.cpp), - [ModuleHTTPServerTests](../../test/ModuleHTTPServerTests.cpp). +- [DefaultFS](../../include/webfront/system/DefaultFS.hpp), [FileSystem](../../include/webfront/system/FileSystem.hpp), + [NativeFS](../../include/webfront/system/NativeFS.hpp). +- Tests : [FileSystemTests](../../test/unit/FileSystemTests.cpp), [DefaultFSTests](../../test/unit/DefaultFSTests.cpp), + [ModuleHTTPServerTests](../../test/unit/ModuleHTTPServerTests.cpp). - Voir [ADR-009](ADR-009-modules-et-assets-reproductibles.md) et [ADR-010](ADR-010-composants-et-outils-optionnels.md). diff --git a/docs/adr/ADR-003-protocole-binaire-et-bornes.md b/docs/adr/ADR-003-protocole-binaire-et-bornes.md index e058cbdd..71fa8897 100644 --- a/docs/adr/ADR-003-protocole-binaire-et-bornes.md +++ b/docs/adr/ADR-003-protocole-binaire-et-bornes.md @@ -32,7 +32,7 @@ arguments et corrompu les messages. Que soit préservé le protocole binaire de `weblink/Messages.hpp` et de la source `src/WebFront.js`. -Note de renommage (0.4) : la source JavaScript est désormais `assets/WebFront.js` ; ce déplacement ne modifie pas le protocole décrit ici. +Note de renommage (0.4) : la source JavaScript est désormais `js/core/WebFront.js` ; ce déplacement ne modifie pas le protocole décrit ici. Les messages d’appel et de retour portent des identifiants de corrélation sur 16 bits. Les types pris en charge sont les scalaires, chaînes, tuples, tableaux numériques typés et `std::bitset` ; les objets JavaScript arbitraires et objets DOM ne traversent pas automatiquement le pont. @@ -90,8 +90,8 @@ refusé dès l’en-tête, fragments compris. Les trames de contrôle ont leur p ## Sources et vérification -- [Codec C++](../../include/weblink/Messages.hpp), [codec JS](../../assets/WebFront.js), - [politique de buffers](../../include/http/BuffersPolicy.hpp). -- Tests : [MessagesTests](../../test/MessagesTests.cpp), [WebSocketTests](../../test/WebSocketTests.cpp), - [spécifications navigateur](../../webtest/js/webfront-specs.mjs). +- [Codec C++](../../include/webfront/weblink/Messages.hpp), [codec JS](../../js/core/WebFront.js), + [politique de buffers](../../include/webfront/http/BuffersPolicy.hpp). +- Tests : [MessagesTests](../../test/unit/MessagesTests.cpp), [WebSocketTests](../../test/unit/WebSocketTests.cpp), + [spécifications navigateur](../../test/web/js/webfront-specs.mjs). - Voir [ADR-004](ADR-004-appels-asynchrones-et-erreurs.md) et [ADR-012](ADR-012-preuves-et-tests.md). diff --git a/docs/adr/ADR-004-appels-asynchrones-et-erreurs.md b/docs/adr/ADR-004-appels-asynchrones-et-erreurs.md index 089d1162..5e4038b6 100644 --- a/docs/adr/ADR-004-appels-asynchrones-et-erreurs.md +++ b/docs/adr/ADR-004-appels-asynchrones-et-erreurs.md @@ -70,8 +70,8 @@ ordinaires sont déduites ; les lambdas génériques et opérateurs surchargés ## Sources et vérification -- [API C++](../../include/WebFront.hpp), [fonctions JS](../../include/JsFunction.hpp), +- [API C++](../../include/webfront/WebFront.hpp), [fonctions JS](../../include/webfront/JsFunction.hpp), [exécution asynchrone](../ASYNC_EXECUTION.md). -- Tests : [JSFunctionTests](../../test/JSFunctionTests.cpp), [WebLinkTests](../../test/WebLinkTests.cpp), - [webfront-specs](../../webtest/js/webfront-specs.mjs). +- Tests : [JSFunctionTests](../../test/unit/JSFunctionTests.cpp), [WebLinkTests](../../test/unit/WebLinkTests.cpp), + [webfront-specs](../../test/web/js/webfront-specs.mjs). - Voir [ADR-003](ADR-003-protocole-binaire-et-bornes.md) et [ADR-006](ADR-006-taches-structurees-et-arret.md). diff --git a/docs/adr/ADR-005-evolution-reseau-asio-stdnet.md b/docs/adr/ADR-005-evolution-reseau-asio-stdnet.md index 10243434..cbe58cee 100644 --- a/docs/adr/ADR-005-evolution-reseau-asio-stdnet.md +++ b/docs/adr/ADR-005-evolution-reseau-asio-stdnet.md @@ -103,8 +103,8 @@ d’un autre thread, mais les opérations réseau se dénouent sur le thread du - [P4100R1 (WG21, 2026)](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4100r1.pdf) : document d’information sur une démarche de réseau pour C++29 ; il éclaire l’horizon des travaux sans présumer d’une adoption. -- [Provider stdnet](../../include/networking/TCPNetworkingStdnet.hpp), - [tâches](../../include/networking/Tasks.hpp), [en-têtes sender](../../include/networking/SenderHeaders.hpp). -- Tests : [StdnetShutdownTests](../../test/StdnetShutdownTests.cpp), - [HTTPServerTests](../../test/HTTPServerTests.cpp), [CEFMacrosTests](../../test/CEFMacrosTests.cpp). +- [Provider stdnet](../../include/webfront/networking/TCPNetworkingStdnet.hpp), + [tâches](../../include/webfront/networking/Tasks.hpp), [en-têtes sender](../../include/webfront/networking/SenderHeaders.hpp). +- Tests : [StdnetShutdownTests](../../test/unit/StdnetShutdownTests.cpp), + [HTTPServerTests](../../test/unit/HTTPServerTests.cpp), [CEFMacrosTests](../../test/unit/CEFMacrosTests.cpp). - Voir [ADR-006](ADR-006-taches-structurees-et-arret.md). diff --git a/docs/adr/ADR-006-taches-structurees-et-arret.md b/docs/adr/ADR-006-taches-structurees-et-arret.md index 62b94bc1..d2310246 100644 --- a/docs/adr/ADR-006-taches-structurees-et-arret.md +++ b/docs/adr/ADR-006-taches-structurees-et-arret.md @@ -73,7 +73,7 @@ prévaut entre résultat, arrêt et déconnexion. ## Sources et vérification -- [Contrat détaillé](../ASYNC_EXECUTION.md), [TaskScope](../../include/networking/Tasks.hpp). -- Tests : [StructuredShutdownTests](../../test/StructuredShutdownTests.cpp), - [ApplicationTaskTests](../../test/ApplicationTaskTests.cpp), [JsFunctionSenderTests](../../test/JsFunctionSenderTests.cpp). +- [Contrat détaillé](../ASYNC_EXECUTION.md), [TaskScope](../../include/webfront/networking/Tasks.hpp). +- Tests : [StructuredShutdownTests](../../test/unit/StructuredShutdownTests.cpp), + [ApplicationTaskTests](../../test/unit/ApplicationTaskTests.cpp), [JsFunctionSenderTests](../../test/unit/JsFunctionSenderTests.cpp). - Exemple compilé : [AwaitBrowser.cpp (historique 0.3)](https://github.com/ambroise-leclerc/WebFront/blob/30665cab6e1d68636ef160d8c2f34bd29bff601f/src/AwaitBrowser.cpp). diff --git a/docs/adr/ADR-007-frontends-explicites.md b/docs/adr/ADR-007-frontends-explicites.md index e38bef76..58a3a354 100644 --- a/docs/adr/ADR-007-frontends-explicites.md +++ b/docs/adr/ADR-007-frontends-explicites.md @@ -85,8 +85,8 @@ Un frontend indisponible reste déclaré et échoue avec un diagnostic indiquant ## Sources et vérification -- [Contrat](../FRONTENDS.md), [concept](../../include/frontend/Frontend.hpp), +- [Contrat](../FRONTENDS.md), [concept](../../include/webfront/frontend/Frontend.hpp), [configuration](../../cmake/Frontends.cmake). -- Tests : [FrontendContractTests](../../test/FrontendContractTests.cpp), - [frontend scenarios](../../test/frontends/CMakeLists.txt), [webtest](../../webtest/CMakeLists.txt). +- Tests : [FrontendContractTests](../../test/unit/FrontendContractTests.cpp), + [frontend scenarios](../../test/cmake/frontends/CMakeLists.txt), [webtest](../../test/web/CMakeLists.txt). - Voir [ADR-008](ADR-008-contenu-de-confiance-et-origines.md). diff --git a/docs/adr/ADR-008-contenu-de-confiance-et-origines.md b/docs/adr/ADR-008-contenu-de-confiance-et-origines.md index d6f1b3a1..a8e33696 100644 --- a/docs/adr/ADR-008-contenu-de-confiance-et-origines.md +++ b/docs/adr/ADR-008-contenu-de-confiance-et-origines.md @@ -64,7 +64,7 @@ WebFront cible du contenu de confiance, sans TLS ni authentification intégrés. ## Sources et vérification - [Politique et capacités détaillées](../CONTENT_POLICY.md), - [ContentPolicy](../../include/ContentPolicy.hpp). -- Tests : [ContentPolicyTests](../../test/ContentPolicyTests.cpp), - [content-policy-specs](../../webtest/js/content-policy-specs.mjs). + [ContentPolicy](../../include/webfront/ContentPolicy.hpp). +- Tests : [ContentPolicyTests](../../test/unit/ContentPolicyTests.cpp), + [content-policy-specs](../../test/web/js/content-policy-specs.mjs). - Voir [ADR-007](ADR-007-frontends-explicites.md) et [ADR-010](ADR-010-composants-et-outils-optionnels.md). diff --git a/docs/adr/ADR-009-modules-et-assets-reproductibles.md b/docs/adr/ADR-009-modules-et-assets-reproductibles.md index 53491ef4..117c4ddc 100644 --- a/docs/adr/ADR-009-modules-et-assets-reproductibles.md +++ b/docs/adr/ADR-009-modules-et-assets-reproductibles.md @@ -32,7 +32,7 @@ locaux servent les ressources. React, Babel, Jasmine et xterm sont distribués a et licences traçables ; React partage un environnement ESM local pour DOM, hooks et JSX. Les sources lisibles résident dans `src/` et `third_party/` ; les en-têtes générés sont versionnés. -La maintenance utilise `tools/assets/`, les versions exactes et le lockfile. Les distributions +La maintenance utilise `js/developer/vendor/`, les versions exactes et le lockfile. Les distributions JS/CSS volumineuses sont compressées avec le fflate vendored, paramètres fixes dont `mtime=0`. Les petits scripts du bridge et des composants restent en identity. Les contrôles CTest régénèrent et comparent hors ligne après configuration des dépendances. @@ -71,7 +71,7 @@ un échec de décodage ou dépassement du budget donne 500. ## Sources et vérification - [Maintenance des assets](../EMBEDDED_ASSETS.md), [contrat HTTP](../HTTP_ASSETS.md), - [génération](../../cmake/WebFrontAssets.cmake). -- Tests : `Asset.*Fresh`, `EmbeddedGzipContents`, [HTTPEncodingTests](../../test/HTTPEncodingTests.cpp), - [React dans le navigateur](../../webtest/js/react-demo-specs.mjs). + [génération](../../js/core/WebFrontAssets.cmake). +- Tests : `Asset.*Fresh`, `EmbeddedGzipContents`, [HTTPEncodingTests](../../test/unit/HTTPEncodingTests.cpp), + [React dans le navigateur](../../test/web/js/react-demo-specs.mjs). - Voir [ADR-002](ADR-002-systemes-de-fichiers-composables.md). diff --git a/docs/adr/ADR-010-composants-et-outils-optionnels.md b/docs/adr/ADR-010-composants-et-outils-optionnels.md index c1ef71fb..bdbe6adf 100644 --- a/docs/adr/ADR-010-composants-et-outils-optionnels.md +++ b/docs/adr/ADR-010-composants-et-outils-optionnels.md @@ -26,7 +26,7 @@ outils web distribués par npm. ## Décision -Que chaque composant réunisse une façade C++ sous `include/components/`, un fournisseur de +Que chaque composant réunisse une façade C++ sous `include/webfront/components/`, un fournisseur de ressources embarquées, un module ES exportant `mount(element, options)` et les types du pont. Les noms de callbacks utilisent `webfront..`. Les assets sont optionnels, absents de `WebFront` tant que les providers correspondants ne sont pas sélectionnés. @@ -79,7 +79,7 @@ l’autorité du bridge de l’application ; c’est une fonction de développem ## Sources et vérification - [Architecture des composants et limites](../UI_COMPONENTS.md), - [Terminal](../../include/components/Terminal.hpp), [ToolManager](../../include/components/ToolManager.hpp). -- Tests : [UISubscribersTests](../../test/UISubscribersTests.cpp), - [ToolStoreTests](../../test/ToolStoreTests.cpp), [tools-specs](../../webtest/js/tools-specs.mjs). + [Terminal](../../include/webfront/components/Terminal.hpp), [ToolManager](../../include/webfront/components/ToolManager.hpp). +- Tests : [UISubscribersTests](../../test/unit/UISubscribersTests.cpp), + [ToolStoreTests](../../test/unit/ToolStoreTests.cpp), [tools-specs](../../test/web/js/tools-specs.mjs). - Voir [ADR-002](ADR-002-systemes-de-fichiers-composables.md) et [ADR-008](ADR-008-contenu-de-confiance-et-origines.md). diff --git a/docs/adr/ADR-011-diagnostics-optionnels.md b/docs/adr/ADR-011-diagnostics-optionnels.md index 62a88f42..582aebd5 100644 --- a/docs/adr/ADR-011-diagnostics-optionnels.md +++ b/docs/adr/ADR-011-diagnostics-optionnels.md @@ -25,7 +25,7 @@ sans que ses contraintes de modules C++ gagnent les applications clientes. Que `WEBFRONT_USE_MDDLOG=OFF` demeure le réglage par défaut. `tooling/Logger.hpp` est l’entrée commune ; l’option activée sélectionne la façade et lie l’adaptateur statique `WebFront_mddlog` (`WebFront::mddlog`). -`logging/Logger.cpp` est la seule unité consommatrice des modules. Les consommateurs incluent +`cmake/mddlog/Logger.cpp` est la seule unité consommatrice des modules. Les consommateurs incluent des en-têtes et n’importent pas les modules mddlog. L’option et les contraintes de toolchain sont cohérentes dans toutes les unités de traduction. @@ -67,7 +67,7 @@ sans promesse de persistance d’audit ou de livraison garantie. ## Sources et vérification - [Contrat et matrice mddlog](../mddlog-integration.md), - [façade](../../include/tooling/Logger.hpp), [adaptateur](../../logging/Logger.cpp). -- Tests : [LoggerTests](../../test/LoggerTests.cpp), [MddlogLoggerTests](../../test/MddlogLoggerTests.cpp), - [MddlogTransportTests](../../test/MddlogTransportTests.cpp). + [façade](../../include/webfront/tooling/Logger.hpp), [adaptateur](../../cmake/mddlog/Logger.cpp). +- Tests : [LoggerTests](../../test/unit/LoggerTests.cpp), [MddlogLoggerTests](../../test/unit/MddlogLoggerTests.cpp), + [MddlogTransportTests](../../test/unit/MddlogTransportTests.cpp). - Voir [ADR-001](ADR-001-coeur-cpp23-header-only.md) et [ADR-006](ADR-006-taches-structurees-et-arret.md). diff --git a/docs/adr/ADR-012-preuves-et-tests.md b/docs/adr/ADR-012-preuves-et-tests.md index ec66e3b8..4f2c894b 100644 --- a/docs/adr/ADR-012-preuves-et-tests.md +++ b/docs/adr/ADR-012-preuves-et-tests.md @@ -27,7 +27,7 @@ comme sous-projet constituent elles aussi des contrats observables. ## Décision Que Catch2, sous `test/`, vérifie unités, états et erreurs à l’aide de simulacres déterministes. -Jasmine sous `webtest/` exécute les modules dans un vrai moteur, attend le reporting vers +Jasmine sous `test/web/` exécute les modules dans un vrai moteur, attend le reporting vers C++, se ferme et fournit un statut de processus significatif. CTest borne les tests par des timeouts. La CI Linux utilise CEF/Xvfb ; les moteurs natifs ont leurs suites de cycle de vie lorsque configurés. @@ -71,7 +71,7 @@ préexistant, ni d’une intervention humaine, ni du réseau public après confi ## Sources et vérification - [Guide contributeur](../../AGENTS.md), [CI](../../.github/workflows/BuildAndTest.yml), - [CMake des tests](../../test/CMakeLists.txt), [runner navigateur](../../webtest/CMakeLists.txt). + [CMake des tests](../../test/unit/CMakeLists.txt), [runner navigateur](../../test/web/CMakeLists.txt). - Commandes de référence : [README](../../README.md) et [frontends](../FRONTENDS.md). - Toute nouvelle architecture doit préciser ses preuves attendues, ses échecs observables et les limites encore ouvertes dans [PROJECT_STATUS](../PROJECT_STATUS.md). diff --git a/docs/adr/README.md b/docs/adr/README.md index 17978706..581d622e 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -109,6 +109,6 @@ Keep previous rows and update the current version in the index. ## Chemins depuis la version 0.4 -Les exemples publics résident dans `examples/` et les ressources web lisibles dans `assets/`. +Les exemples publics résident dans `examples/` et les ressources web lisibles dans `js/`. Les mentions de `src/` dans les décisions précédentes décrivent l’ancienne organisation ; elles ne changent pas les contrats. Les démonstrations supprimées restent consultables dans l’historique Git. diff --git a/docs/mddlog-integration.md b/docs/mddlog-integration.md index b6816293..728379fc 100644 --- a/docs/mddlog-integration.md +++ b/docs/mddlog-integration.md @@ -4,8 +4,8 @@ header-only and builds with CMake 3.31, its usual compilers and generators. It neither searches for mddlog nor selects CMake's experimental `import std` gate. -With `ON`, WebFront owns `include/tooling/MddlogLogger.hpp`, the shared declarations -in `include/tooling/LoggerApi.hpp`, and `logging/Logger.cpp`. `tooling/Logger.hpp` +With `ON`, WebFront owns `include/webfront/tooling/MddlogLogger.hpp`, the shared declarations +in `include/webfront/tooling/LoggerApi.hpp`, and `cmake/mddlog/Logger.cpp`. `tooling/Logger.hpp` selects the facade through the `WEBFRONT_USE_MDDLOG=1` definition supplied by the `WebFront` target. The `WebFront_mddlog` static library (`WebFront::mddlog`) compiles the sole module-consuming translation unit. Linking `WebFront` supplies the definition diff --git a/tools/docs/render-life-bootstrap.py b/docs/tools/render-life-bootstrap.py similarity index 100% rename from tools/docs/render-life-bootstrap.py rename to docs/tools/render-life-bootstrap.py diff --git a/examples/hello-world/HelloWorld.cpp b/examples/hello-world/HelloWorld.cpp index 0a90ed71..aaa55a73 100644 --- a/examples/hello-world/HelloWorld.cpp +++ b/examples/hello-world/HelloWorld.cpp @@ -1,4 +1,4 @@ -#include +#include // Switching to an embedded Chromium window only changes this alias (CEF must be enabled at // configure time with -DWEBFRONT_EMBED_CEF=ON): diff --git a/examples/life/LifeDeveloper.cpp b/examples/life/LifeDeveloper.cpp index 7bc2c8d6..2def185f 100644 --- a/examples/life/LifeDeveloper.cpp +++ b/examples/life/LifeDeveloper.cpp @@ -1,5 +1,5 @@ #include "Life.hpp" -#include +#include #include diff --git a/examples/life/LifeEmbedded.cpp b/examples/life/LifeEmbedded.cpp index fb5f4b80..66c65cee 100644 --- a/examples/life/LifeEmbedded.cpp +++ b/examples/life/LifeEmbedded.cpp @@ -1,4 +1,4 @@ -#include +#include #include WEBFRONT_LIFE_ASSETS_HEADER #include "Life.hpp" diff --git a/include/WebFront220128.hpp.gz b/include/WebFront220128.hpp.gz deleted file mode 100644 index 621b1ca9508a1c40a59041464947b975749f7785..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12745 zcmV;)F*eR0iwFptZ|h?K16O5YMsja%bTTq9F)}zVXmD@<+&%kq+eVMScc%Zte!2M^ zDwZFT9XFL_^%TcxJ@q4FDb3yVavDlp+5Ae8I+C)JbNs&_fPHXxNy@V0Hl0&vVsal? z0E@)}SS-7>wZ;BD@N>@EFSoW^TkY+3o3-{j+uNO&FTek83#m~nQ( zClOC4vUZ$?e98vNjI)^MH%a@=DDVS<98!#L+@>_;q|%_BbJaqj0~5`X{Qzs*zsa^|xnp78I# zgZFS605+o!$7efjdX4d&UPmWK{j*X3?9J#D9-tCx!kE`o@;C^m1%$Kn)8n(#{(ltR zj1t{8oB4G7smXSfY+R0fM|J95>ms4_SM()82%aXAOiL zW!!||r*nS`M$a9{lPnLQk6V@k|Ex0T8H}C2+2?F418hq`u_FIG=b2N!h(j1o6c%hE zzK{Cv-kltcMo_|-?tnl>dFqFG27O|G#q%9_SIF9&enkF-Lzye;Bb%#B+w#LG2WH-I;0$hXzFnjwo1MA24 zfU7a&HBSW;5ZeO@TbB{!_cUtC|7Q`VJoEe@7^T;KwBVzZPkG7#)F?;XytTaHH5%*| zH~@k?8BP2w@4oMOIh5|RI}0^hNo-hC}a99MxE8)`8-6f&AD|C#|?}a8z{m&&G2ujFSVRJvW3(7k28Zb`M-aWvt z(j-pq1C=jed$LOSr#VkU+OeW7(7yIC(PfgtM9=J@1Y1Tf(K>>h$E z8m&fg1v{sUc!C?RA6dmSkipdMojIhI@CvK2FJmzd^ZS{z$}Eeb(RIjgR=}frVk*E+ z!-&H^3G2fyt^iuYyeOIYj?h%_GnrR(P5CANw4CiLiF+jvT+Z7JG`H~^K88gc=eU;_ zrG^D(?D2;3G`82b+|L)Fq>LR6JE00I+IKqr3ARqs{c_b&9Ly6i6Dz8YlS4p`f2yjx z;8_yECQwl|Ad{$~;t=)O>&0|h+3j?ZqxRDELVp%)8B>KOPpDI?ld768#!)!wh!^}> zt-J<{6aIWdz0r{HcVD zO%33poe95y2&jp@NrSnCX@v=n6*SmZijKy}%X{L$R!@thHI{&?^+7z=4?GDoHb}WG z`Wd4p(Vn7C8p{3Enz-M7y7)z}Y?*AbPJx`HP+>>lm|7_ z@~bd2s_syVNGj6s8rD(AWxV37!B=BiZCZp(7UE|}bgl3iZ5}LoW?wPCPcMGuF&ya_ zHw;54uWKNJTXZW34KnsIfYCtQEZ) z6)VDeDheu$G!1&tyPv;9=B)*d-v=M7m6OD0nAoNW$itwa*6f23sb$fs$e0_)*P&9$ z6Jj~}H5f`5^wwDLFz)Edds-$Lcu9V(hMmPOja#5L&lOPA&;1B|pH*2X+!hMpQMbqQ z@u_gFmApsdyE13%@IAcpQxoSQMO+`t@G)*!BjNRRC1?flaZ|7sY?7b&7m&4lZk~cP zbGDw8u+>(sNdo!gHXXe`U)mnIHB|3aB?M(Rg&=NJ>;-jArrz+Y@VkG<`1Uxix|Mu; zOdqnf{4KFH^uo8}?UU_^e;1@5ygB}5h<}4!@+oK|*ni{g@^3)nQ|+985-E0MqdFj7 zD|480%~*%Uizu4ssk2`0?zMsInQGe*Qqw;o~iJVIBhry$I#IX4LJ!d##D@xBw}G4=Aj<}-=M2kEv_F1{Wtw#pWS5sD6oTP zA<%^&Mszq0+=RA++)wkx+&k_6di3G^;*HmCvNj0!n(E)!FU_b4MD#pHL!*IrvMJ^`pXn1^j^yd6MsIm{q zA_`tdm`Ek6KAgWldGq=NP&I=8rXWqCB;$e)p1~kNYE@K;I*4jdwfe__$s0GAu=uKlG5p%|isgT^aNjmfMQ=Vo1CHLN*U!3-b zqtl}SFzIO2KY@Ad506H#-@ko(biuwbr@`Bc^V8AbKL^93({knU&u8Zs@aJrBbb;A+ zS^-N+wwrdmzV4TDO3DM8b8%2`@@_a7Ui7>*MO_1dDfp(+2&c>wq&D2M3t|HS800CP z2A4)Tq*3%B&hdgdSt-vJQSK>l%>wYcWVPG-1kd8%rkvNpN8BBGAt}R=Hp4jMY3^;y zKx>{zGs7d^;*rU-&a;Mf%ws4~0mMENahe#^c_lN+)KmP^JQd8$6R9Lji%w*-U?_N! z!ZL=MAY-JztCqTX926z-WzVCgo0DXLF%P!ITHD*(f-cl9GHcOQG4*?u8VJ{myZV-G z8ZPPoFLVUW8dm`5G%lrADMh8TFH6{qjz1YdI_%jqcLhGB6jw>`%5qsRk&6MJRNFK; z^aUZLzW@V4{f07mYszZCClMO5o@@=YT#o>Dqvs)HM}FbAXsn|A?j2%LF~&cOF^Ub? zV4X|I{RXgQ2NkA{YXsqj9PxPcP*Z55wVL@u?N%{+etAC}U6^JM7JRsHY#!0-!^LV= z&r$#9{_&Y(?|ikfqcsAECAM7AzCqs9nK!U>;)FV=Y)0j!$b8DfcLI?N)~Yc6UC*Z5 zt2r|!PpB#_$*Okqk`x9H_mQ@WD+7DQm4Q}g=T&EW`>_s`W`lVbpq>|`GtAt|P6r^u zd?6D?V|iF#*J>tsA=}mQRb`uz3a$ne&SAk%;2+=4OcMZ9PTDE}xShWy0O-uMWe^ff zur<=#L|2vAw#wM4odjp9msPrFW}@8Ji6p6ZHwK|E0F=Fne)c(@knZrX#o8LS_2H?3 zY0O$V*OB03_t6dYr#9fB-}q_JrQtjR1P~ilL5#13d2f(w3E7XQ_-ScR$g-P5WCn;=xOGJ?jlTIg5Jx0FhVkQDTQrUftHY@ZMU1|Eu6#J8` zqOBJ=i7&QDuE+>4$we`_U$vEB3N;(RoRV*lZeGpj@@kpbWZGYIFRjlq4S6Hr#S2B_ z^lXBKdF98KJYxweO&@E7UMt@*s}_a|29&A%g@1apn9T)=t8SHxJd83i#PTd^oen0_ ze8jyBym0a5i**e|FY#QS`|hh(ari4=hnvjgX_;uv|)x1X!YR`Dl8fbdp@o&MSL zO7R#sJyfE)DM0Bg+tp%9^5?*i$+P-+K=YXlCZ5Whg%$kobYznr>=EMLC<$}Jq8h;> z&BQv-8dSBrxx&@!DYkZHp0c441%H9DH{PoTKB~6snjA-ZioU3cJVGUm1DK%$)p=hQ zn9y2#`)qxk%1hBRbn8Wrf3jB;iEl{6p0no_fh+}`s3}j8?y5;^6KU&$N550|j}F`- z_EQG+44$6Z0WOz=&+Ha|0&6NJPyJ}1iJ$6h-f9vHY&~q;Wjk&56MMe-9Q2Mk1{7j_ z2dmsT;@xsC{8wypL6dlZG+HNiqCM1dFnqFUhUJdDPE#_6n+PeUFB>w4%bcjCF9`ZLDNnxfEL6-?c7 zQpxK${Xv+`@%$_RHee$>Gb>!8t6^L~UL6hAy={aGI`u z2-s?;Syup^T|fjXllkXSth=bhIU9s}SNmTrfVKmmT@65^)G|{>EN zR|pTaittdo-D&^O*=;Ykd25WRnA5#UX(s9`OR_jCc~3@NkuI-F)*AG&fQaWR#%fk- z3+>>6Jv~u5^+f<&)RWspt6G?Q*_EI2U^LIuu0s||wS2dBrlL4gae1TVepSPbo*1#@ zdrNGR`BNYRT*~-LxFqu>sPw@KwZpvKURdiXAqcx;qO(f&il(EG9)(yJQsL-e5P;d6^D{M zqravt7D8`(+=5@D;h=ZgAN*Q_Udv*Xgw5vu=P2=m6CS@stFsExB}lcZkRrUS zf%bMs7|6*vnBWyd8Rj&3eXult$4iJG)s@PysqxLO!f7tdyW-e#DY7`Yz&89yP7;CG z*T-055m5IsGr&`8wfDeX$S~Oo{Kqfww1aD%3SREX5}0~fxeJfm;_+n@{15TC*JSNo z@%RHM5ZUdO2Ki$XC@O_y1@%{?UXYCtx>r(C(Uv`EhcSLp?OOpKwe{$ z>1T9Ko%go$zVq?UB}oglWM19mh@=@h?Jcpnj3GAcN_oTQPQ{w3#pIIbZ@~xPHY$!} z50n{gvTNVj{m~VuBBnmJMY-O zT!~eq6!idq`_nTcVrghwV$>h7Q#Gn9T6Goex{4i90S?kK9)Re-E96^oz!v!>-HWxL zx?0M_?x~lG>04u_5bCRGn8K2Ij(Yn!Lp7I)RTSn6aJuM&a&vT2tJDLp`^4T}B9x0kjXSb)qHXd833fl-Xf6 zY14c;Fpy{=vwtupupF~gw$MQ(@^%PLp(YG0Pnu--kA0R}3v!#X=SnTV*dJohy?P$O zu13NTQG1RZOj>13M1GQm2`$|zT1smOrOD7>Vh^{Ngk8jH2@><(6Hpqq)nv#b+6(1* zYAs_G5${a333Bh{%bmSaFxUjE#Rdjn8~6&MJkuv9Dz z#8R;^7E8s#a4Z!IBeGQds*>m*D~PU4U!&zq&VmvnG=U0H8i)D4{sF>}<~G?{mX@If zj!=q}RPA|_t9f+IW3BIS*w&s1?dA&|JF`+N{Va+19Y|yc6^Ht^OHY-a0fcTEk=tzv zo78BO1iEh(TiOI@$DVczbE#vs6RpG_Mh^#bKQ@o_>dx>q|6cS2IQ@m33g9a9t>W`G z)z)CKrrpu(&*~H^V+AZx8QE5*X=avViD&e6G(EjCLTpxB*%m#p6~t3kWvQ+RLk8ZB zS&=21^F?+w8vBz!yxQ(4;yOfZ5!!epKqV5zm2Xv$l>ryuCo)K|T`uF4xKO(qs9rQ8 zK1Ivo4M&kqOJQ5Ff;t_!fljgQP^2C>Eln^K5|g5)uK9^`VgauqGn;vC-6^TXT!N|z zQP2XiM%$c>`DGYWj(8#PrW|6zgrDNakTd*9au|bwhH8aw!1-|ihF!?%YsdkS#KL@2 z_jHXvJVhbSfH9{ny{53uus+OL%z2QpS(0*j(4v*@9MSNW5HC*zO3tM~Oe!2Q2R<$X z!((h7Q0kCW5zek>p6j9qsyf)LE#w(m{Wtj!zvDm0sPos?*+1FtM|UH#mCtMQG~e8x zTq8$ND3!P%P@*?q>g2+^S4|OO*@2gX7n*Wbywn3 zn_N&#pdt+n6SIKUf4aVoCh!ZvrQ&2yz}zo`L^IU_Yxr+v=tcZWhnyUk)z^+J5^eSy zd)-Z#Pp%jyPvy2V0b;-z>0*$d0al~Qp8F)oJ~!Ry86?}8IhB)Ou41q9 z2-d~N(rkK&#h4U*vA)btXIWWE8_aBEigJTOoMwr2&8dtI@fHNcVP+s-C63GIw93Q4 zU&Y!nj(=CgWRA1yM*_rhJjP%%|FOSZN-S`l%A0^F9E%wblVu&%J!t z&5VZGQ7UO{n$&Bf#mLCSUs)8L29Bv|oo6qZSfzmLPri*qW2>+De-cnc-M))ZdZn*glYb^5S{G@I+>!!FZw*ro8C0ulvy67(x%ekjPV1S^&$+P;Y59t=@h}~Ylms4tr zs!}RWO)oS4DH31EXG0fm-;Rz_st5|W_@AAKyM3jDsU%kS?#0Cx`PKF=R+b_+o6?-`wE}9 zcck(9v9pPZ9KI;Iq$3+~kttY+G)KC`3f}BwlP*qBPMA0+D@w{oMEEOK(5A@H0@~~2 zsihRAlCpc%`mx=kRbZ)CEB+$3tR^JXiDIInFVs!rJ#)) zxmaC@gi;XK_Yl|!qct9hkBY@M@ibV@f&{WycpDF!+msiHK5 z3TZ1OPMiJDwR|vsj4Iws4BnSwaEMmNwD^wqu6F| zhx4m8vmsFB-s&>^gJv4Lifo!$a6sQYu}@R=@nU#+D-3Hz#1VW2%=*kaH#_Enhkt|sIA{EoKv4rw~S zPjz*BU)4IvZ7N$|$eQrA1t()xp~}6LVhsRX4w&RjJ8)*~JJW=>n}|hlYK(Yi8t_hr z!n#44xAU`Qaq{7d%TOj{TBJ@&G_5ke|cojh)@jUUy$j z7fi(-1|TmksFztWr*-7Knj-zeUY8p3lhB_(wTu(YSre=q4Og_ zl7t|iRF3fX>&w5D1AFsY6*b!2VxP%2mAs0-9gjar*O4cu z6{NtZPp2(veSR zF+Q*!19p)Ctd|c=7HI^MLz0K24H_hX#fm|#=}6KdMnmZ4nlLL4E}LmZg|Y zl_{`sUtTD;c@5E;*vqLUGM3TM;H zG5AjmK45T!!7&COG5Az2Xggp2J7)hc4E`H~|G}V#!8rzf3qHv!QdYlObS;i#q3iIZZWvS;2wi-7(8I`e;70{XkyU9U>SoI3|28% z!{8+b>lkccuzO7Ac-)kNdgoI z8WoBCrq7@XBGMHcSh4a}*`KlS7m`|je!tDxcY)b8vpuXw1m!=|q#q{(mF0Uwo6- zyQ=+0WLEr5B3+UlOijsWmK>mdr7;UfH-wWzTs8OXgHmYxYHTEDt#WI zs~&QtLZ76!Ekj`V?oCJ%p|o`%%IOBXS3r{FXv>ZL$-@n_k;F$+dv>y-MoKMOMI(h? z(_aGG2+Ar83(`16JBi1}x3!lmtF7fmvj#JHcfYf@v%8K4n%_3ocX#$W`(1o)HkMnf zD=*jZxwE|2>NfWqYWbjt?>Ra?Jy}~hebi~{+yPT|0dsW34as63zJpF_O=jxgM7Wtm zbvmtx|KR9)i4WO8g;E=4WlU&cL4U?!-4(ku7PTXOi`G`E(sz-=XQiFv#q`5isy&>X zvPleyU5oSNcb7R}6)vlhUCNaIRZ+lvE6Xj?x4{I*`ouzX?@{#MN#hhTsot9S)>m&W zd>g2@Wqga(+X}wjpR6}rW^bt>%Jn`PysW|Bg@tM)&1VGmKm>RZt$-NNI3@lsL<>8q zNlC&4*hy+p(t03e+0&+V>qQlUimf;7ikV)iR3HklxqJ#J7LV)ZvAM#Y*G^$hYlc6` z_dpCj@UsgG!{CmD?xhQ&^RI@!`AU+eB|ba!`Lh0h}2Un`6Vfd_o*&&J65esg!X zv)7rUMn8;&&dyq^)7)Dt_D$i19K;Eme0%7P0mi}w{KtjkSNM-a9sr6nP^d<@n(PPS z`}UX4YteFW`{*3qoCV_XJQOROzk{QvC|r`dVDyZIiRa=ClD_E zoJ`M%?+9>?^FJr&Cb?y>bDG8p*3yn1)s`XNjy})xIW2%!+!&b9otSkVQGJqC5_dVc zQj+MV97zyGn2Q+7=&RrvR0KF) znLLrLMSHO@VEP>uv#=et=zyF6rnTs>H|<}+pK%IlhqzaJJOMP-qK}E(Gti=%1bj_@ z0`iYF<2=3VcL_S)_y4U@5@p(K@C1-7@P-l=irnWg+I^98hb@r)(l zqY59)GDJ4*GM`iq3$ZvT$QpOO7*n=-Gv zJ9{O&1R^4@Nax`F`)&t5Ws1mt&nvapecL_mmiUJRk>nLRI6QuH@cxK@N|I4tsl%P) z&g+uZCZf6AG6zS;4jzy|bBlbG=w?N3b4wh5*y(ibiV^7-+IMg3GJ2f2)TO)yh>V%a znsPkBd=sKRp|oj$N*5C!Z!RZ5@NyFHVWT~!%?xhGr+A_ zG$|GGif|P>zF;*G^^S(7;#Jn$PCw+J&tgZpla)MKmWG&42Qd^m8w(;Os8}hz{PiaN zs|v?wrOJ$V-2~bUm$vUFmv|Lv`GZj(hoj3vkvEBs@b;uP#UG`523pa`nF=N5 zChh``aTVKYG-}a#Z=hr-5M?nY8Bh0N%`>3)6?%Vz=4|NFoK7!S8%-??u}`P^v5+96 zb4am?Zk9=mLsLl?y1_6y#m7`kg?-!efTN2|#6wZ`Vv^m??t ziEY^4oDQd>c)J8k_UTx1DN&0B$hag@HG;`+{X+4Oe7N1>*M3YrDnYu1-jf2W}xGp#Lp93JJ)y6!R-o6 z9jZ3+y+t<2Z0Lgddo?)T0v=afvmcMXH8JMR!Ad*O zOCT}NXHIQZqtcN|i*%yp=nl(|znc69e|X7;ubFJSy@A>=@bW9JXL7$EPa}#7Fl-yO)R0rq~CyB=!FWr1q%U2Os;;K1~Yw08Q|+Lti+d$0ymee#Fv}+ zk`=kR43>f3Fqv+Wa3<(2lL=n@MHltAFEIxOVirSVdur*)>7!u21lDH7>IG2<&%GNo z?E?syzX7bON0gehON~v*s6dlVo?Jmv{RSx^Gz(|h*g#dkB-HG zoh%hE?MUDB*Gc#6fAh-AQK{^oo$m{yi{U6vA7DLmjjkuASJ7lVp5izgjQh7ZIedWk ziik90P0Ospz(Vb6DDiwE{`z)@GU4L{PcLsLL+Kp>bv`Jejw<600h%(3hbWa55sPO! zumUVEmF@WY#Sj)irFy+2t|&Dm)@~;^V|Oz`_PuIZyX{NyCe2LQo_(&Yz#-yt%fezL zwZ2@GvldqClXyg0A!n50aZ?7pe$`9Q5EgA<)82^r@)C?$QZcU6kYQkoEj$!MRQ)2h zynNQE7+0I^mj?aY2r%A0SVxH{t`3ktYyjoWRalZkP=^j)(7qW$z0r$lnRfMya^+wKU&#W%4H!i_jB9 zK$}XO9g&$=6FWzngTrE>wYuKj+22`R>~1ty7FS;G?JRDrc6Js!t2?`mz0UgTZnIg+ zwhEoAfvOu3a}c|aXHaL2dNT)oq4gjCImge=>&eMQZ!|)avD?e5Q+|pb9#u&1p5qu{ zk8~mLx51g9!lnSZJRXiy2$JYe_9_fnL(YMoA(ZNTbD~0Fnjnp|Ojoj4xeM z!r2yIR=_=C4EhQ(aoRRyUVJmjJ=;0itO;%W^;IDAzsuH(661kgT5>#RfU%CP)@4PY ztBsslc+bXOL^Agbo^-_dxqHC7tA&Ct>Gz5|dbm5BplxuVSf))dE(>utM)5++{MV8} zrQf6s5mcng&!EfhTFfLOb{7zjQh6X$`O+fe)g8x8&q|8GZoS< z-#pW2R`R>s(u1c}Afi3*nhgc@Y^??;B^Jz!LL#OI&Zwl1G$pjWp!^F9H3tFae9Ddw zkzw8$6;ln6-lt4)hQgW~%OXIIW^Z@m=>D}Ib=(ZZwfwk4Kk5i7c;!cv>VR86o)(Bk zm4d7yn8u=$_#X9hc(uiR@)lxU7&7HP_2TI8jnOG8n(W3G<4Md!ORtn0D=X9Tqn2go zva^TS@(ZSxN&!ky#DEGlKn2O=BGl`;H^u88MPYI7^8^E7 zd08p9fRc2U3~G{s6W3i84IVkk zV`4z2#PZ5LLXg*GN-%-lTzy@ozf|>|u5L-nc9u^09=)*ho;E}LW942M=;VyY_ zjkHr0gU(f=6jmB;3JNtMrC^23ciLv6q6y!fgm{7MIt8O&M9l_y-p2NlgNga-=MJ_y z47Tu4GZJ6^$gqcq7<0VU)gNu&9ABSrco)T+MnoP*%I#=`5UN22%>|8txuo!U z;?sf><$pE_{BT1vzy5PcK(*hWXFexpqH$I?1?DiPM6fG79;ntW1$khwW1bPp&F&7J z)quch@n4c0Ol79!YM?fH;r2t-`5qDGyP3FG1;Nl2It)`+_6llpmKi9mN=hOD2_T3c zT*MX;4m38~b5KHSF4UXBncLO5&I>aD{v;vG>X{%qX>}j$6grmpF1gHflsgRDA>4=e zA?6zd|62MFkbXX8&&FXGDgLY(xs&E6VeVCM!jw>d*%0|*#zxz4ABUlG!>S<{Y-5FMLzLIK#L0>`ex#@?j!;brF{4 zsfuKkle^AJO@w_f(;cSmBHujQKJuleNzKtbp>{sk{yR-a1U%|v1X|=Vs1^SUkYQpg zw;1Q3d_Rf1lzkuHGpK=EW`EduzSWBX7pEcYqSw?!p5DLmj|S$uA;Bdrt8;?-MY3yb zWWHi85Z*g*e^I$pKj*I0?bD|Tf73a_S|{w#LmkHhUh%N2Mxnq7UBF>(n@}5=x`Z-x z0`gXI?KT#F<(y^xa<}N`{{oljawpW-l7&vyaW1xTli>z?I(f)ameClSXoC!^uchnr zbH~{^e}z?;*Vr6x$8-rYRe01-QI@HdB;>lSuBLPoq}ItSW-G36n3YRZG;s9J&)$6n zqG~qjYRb>~a*hDvU*qiKE60U=2IPKEDoi6|3GmwIxxK`C=tmUp++ThVWwgZC%TPbZ zo4R5gjKdGpC>clS11%=+l<30*wG~;@>+m*Sxv(!ktWB zECuIIGs-fDS&(vrqf;}YKsRbG?z`{)PLKF{>X+Ony}F$a#`j5u$pWZLCt}ae$J47U zMaTlgGn-bNs{2m!vjk=3ZVqo;LS;Zw$=#1(=tJZt7p9NUBebu@!Y%>O4%ew%?mbWf zn4Gf2i!VRRcu#iD%CDtn3Ei_Z=nV$Ysx)Bzc>{>9W$PJ{%J5cHLjC1-)FU0tF|6jt zq$%}n>dU;ckVU_?zz7rScyvdSnRsB}US$>PCWD(XdVz@5!&dY{0jSG|if$)1tLiw6 z#h+?H9lg|76s)=$SoVCOGpF(NOep*~;_{BnfivrE8lTDUi%Y|Upw3YrTzxl~V>E;= z2-Vv6L?Oh;+k~Wljl?>|*lPrcI!Iza-`O}}ONAUM|BWhT%D)QbQy9_hDX=0awjl7= z1FU@tLl$#T7!?w-%p$c4LUVc1dl&RPsJ}2w&xoM3@|80~NjHA?jB5w3TyXIcx^sb{ z${l*{v}k>Aaa;2Oqgs*KV5AdvTZ4N+g}XBL{qkuxVNc+=jJ2xe*4d$SqV_P^OQ#b> z_6ex_ink}8%Dd`=7gFG9PJz29lm_>#t0*!U6tMTZAzFYdCbZj2hy9OlY%ia>1&338 zuSM6xZ)7bm6Bj7u$!DMv5dr5V^KdfLu1cveQ`B0z}TOb2xC-WrQa>_B7KmOkhRsd{99X1?0^| zG_@DFyJ&G+h~cGUXfrM(t{=4g>{%*2`Re%Lb_prlYhCc#aJushR{f*h`BIp=1s6vnBf=Pl{Q#CND`MN7JV{@haGSEE8!5buzHf+{xPi`V_3 zeq)i(<7k@m+fXELookcTAxvSoK^@_I&>s!aRRc{$ - -namespace webfront::developer::release { -inline constexpr std::string_view version{"0.4.0"}; -inline constexpr std::string_view environment{"https://ambroise-leclerc.github.io/WebFront/developer/0.4.0/environment.tgz"}; -inline constexpr std::string_view integrity{"sha512-CElEaA68ASX+2Wsq6Z8Ax0jxMFEHLqsAJ1xQk4URRClXWLVywsQ5EBW4dFCJXdkGQVeZWzJvHE5uhhHBHbxEfw=="}; -} // namespace webfront::developer::release diff --git a/include/system/TerminalModuleData.hpp b/include/system/TerminalModuleData.hpp deleted file mode 100644 index a6741acc..00000000 --- a/include/system/TerminalModuleData.hpp +++ /dev/null @@ -1,343 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace webfront::fs::generated { - -struct TerminalModuleData { - static constexpr std::string_view encoding{}; - static constexpr std::size_t dataSize{13028}; - static constexpr std::array data{ - 0x2f2f2f2040627269, 0x6566205765624672, 0x6f6e74207465726d, 0x696e616c20636f6d, 0x706f6e656e743a20, - 0x616e20787465726d, 0x2e6a73207465726d, 0x696e616c2077686f, 0x7365206c696e6520, 0x656469746f722073, - 0x656e647320656163, 0x682076616c696461, 0x7465640a2f2f2f20, 0x6c696e6520746f20, 0x74686520432b2b20, - 0x636f6d6d616e6473, 0x2072656769737465, 0x726564207468726f, 0x7567682077656266, 0x726f6e743a3a5465, - 0x726d696e616c2028, 0x696e636c7564652f, 0x636f6d706f6e656e, 0x74732f5465726d69, 0x6e616c2e68707029, - 0x2c0a2f2f2f20756e, 0x6c65737320612062, 0x726f777365722063, 0x6f6d6d616e64206f, 0x6620616e20657874, - 0x656e73696f6e206d, 0x6f64756c65202854, 0x65726d696e616c3a, 0x3a657874656e7369, 0x6f6e292068616e64, - 0x6c65732069742066, 0x697273742e0a0a69, 0x6d706f7274207b54, 0x65726d696e616c7d, 0x2066726f6d20222e, - 0x2f787465726d2e6d, 0x6a73223b0a696d70, 0x6f7274207b466974, 0x4164646f6e7d2066, 0x726f6d20222e2f61, - 0x64646f6e2d666974, 0x2e6d6a73223b0a0a, 0x636f6e737420616e, 0x7369203d207b0a20, 0x2020207265643a20, - 0x287465787429203d, 0x3e20605c7831625b, 0x33316d247b746578, 0x747d5c7831625b30, 0x6d602c0a20202020, - 0x636c656172546f45, 0x6e643a20225c7831, 0x625b4b222c0a2020, 0x2020636c65617253, 0x637265656e3a2022, - 0x5c7831625b324a5c, 0x7831625b334a5c78, 0x31625b48222c0a20, 0x2020206c6566743a, 0x2028636f756e7429, - 0x203d3e2028636f75, 0x6e74203e2030203f, 0x20605c7831625b24, 0x7b636f756e747d44, 0x60203a202222292c, - 0x0a7d3b0a0a66756e, 0x6374696f6e20636f, 0x6d6d6f6e50726566, 0x697828776f726473, 0x29207b0a20202020, - 0x72657475726e2077, 0x6f7264732e726564, 0x7563652828707265, 0x6669782c20776f72, 0x6429203d3e207b0a, - 0x2020202020202020, 0x636f6e7374206c69, 0x6d6974203d204d61, 0x74682e6d696e2870, 0x72656669782e6c65, - 0x6e6774682c20776f, 0x72642e6c656e6774, 0x68293b0a20202020, 0x202020206c657420, 0x6c656e677468203d, - 0x20303b0a20202020, 0x202020207768696c, 0x6520286c656e6774, 0x68203c206c696d69, 0x7420262620707265, - 0x6669785b6c656e67, 0x74685d203d3d3d20, 0x776f72645b6c656e, 0x6774685d290a2020, 0x2020202020202020, - 0x20202b2b6c656e67, 0x74683b0a20202020, 0x2020202072657475, 0x726e207072656669, 0x782e736c69636528, - 0x302c206c656e6774, 0x68293b0a20202020, 0x7d293b0a7d0a0a2f, 0x2f20526561647320, 0x61206c696e652066, - 0x6f7220746f6b656e, 0x697a6528292c206f, 0x6e6520776f726420, 0x7061727420617420, 0x612074696d652e0a, - 0x636c617373205363, 0x616e6e6572207b0a, 0x20202020636f6e73, 0x74727563746f7228, 0x6c696e6529207b0a, - 0x2020202020202020, 0x746869732e6c696e, 0x65203d206c696e65, 0x3b0a202020202020, 0x2020746869732e69, - 0x6e646578203d2030, 0x3b0a202020207d0a, 0x0a20202020676574, 0x20646f6e65282920, 0x7b0a202020202020, - 0x202072657475726e, 0x20746869732e696e, 0x646578203d3d3d20, 0x746869732e6c696e, 0x652e6c656e677468, - 0x3b0a202020207d0a, 0x0a202020206e6578, 0x742870726f626c65, 0x6d29207b0a202020, 0x2020202020696620, - 0x28746869732e646f, 0x6e65290a20202020, 0x2020202020202020, 0x7468726f77206e65, 0x772053796e746178, - 0x4572726f72287072, 0x6f626c656d293b0a, 0x2020202020202020, 0x72657475726e2074, 0x6869732e6c696e65, - 0x5b746869732e696e, 0x6465782b2b5d3b0a, 0x202020207d0a0a20, 0x2020202f2f205468, 0x6520636f6e74656e, - 0x74206f6620612071, 0x756f746564207374, 0x72696e672077686f, 0x7365206f70656e69, 0x6e672071756f7465, - 0x2077617320726561, 0x642e20496e736964, 0x6520646f75626c65, 0x2071756f74657320, 0x61206261636b736c, - 0x6173680a20202020, 0x2f2f206573636170, 0x657320746865206e, 0x6578742063686172, 0x61637465723b206f, - 0x6e6520656e64696e, 0x6720746865206c69, 0x6e65207374617973, 0x206c69746572616c, 0x2c20616e64207468, - 0x65206d697373696e, 0x6720636c6f73696e, 0x672071756f74650a, 0x202020202f2f2069, 0x73207265706f7274, - 0x6564206e6578742e, 0x0a2020202071756f, 0x7465642871756f74, 0x6529207b0a202020, 0x20202020206c6574, - 0x20636f6e74656e74, 0x203d2022223b0a20, 0x2020202020202066, 0x6f7220286c657420, 0x63686172203d2074, - 0x6869732e6e657874, 0x2822556e7465726d, 0x696e617465642071, 0x756f746522293b20, 0x6368617220213d3d, - 0x2071756f74653b20, 0x63686172203d2074, 0x6869732e6e657874, 0x2822556e7465726d, 0x696e617465642071, - 0x756f74652229290a, 0x2020202020202020, 0x20202020636f6e74, 0x656e74202b3d2071, 0x756f7465203d3d3d, - 0x2027222720262620, 0x63686172203d3d3d, 0x20225c5c22202626, 0x2021746869732e64, 0x6f6e65203f207468, - 0x69732e6e65787428, 0x29203a2063686172, 0x3b0a202020202020, 0x202072657475726e, 0x20636f6e74656e74, - 0x3b0a202020207d0a, 0x0a202020202f2f20, 0x5768617420606368, 0x6172602c20726561, 0x64206f7574736964, - 0x652071756f746573, 0x2c20616464732074, 0x6f20746865206375, 0x7272656e7420776f, 0x72642e0a20202020, - 0x7061727428636861, 0x7229207b0a202020, 0x2020202020696620, 0x2863686172203d3d, 0x3d20225c5c22290a, - 0x2020202020202020, 0x2020202072657475, 0x726e20746869732e, 0x6e65787428225472, 0x61696c696e672062, - 0x61636b736c617368, 0x22293b0a20202020, 0x2020202069662028, 0x63686172203d3d3d, 0x20222722207c7c20, - 0x63686172203d3d3d, 0x20272227290a2020, 0x2020202020202020, 0x202072657475726e, 0x20746869732e7175, - 0x6f74656428636861, 0x72293b0a20202020, 0x2020202072657475, 0x726e20636861723b, 0x0a202020207d0a7d, - 0x0a0a2f2f2f205370, 0x6c6974732061206c, 0x696e6520696e746f, 0x20776f726473206c, 0x696b65207465726d, - 0x696e616c3a3a746f, 0x6b656e697a652069, 0x6e20432b2b3a2077, 0x6869746573706163, 0x6520736570617261, - 0x74657320776f7264, 0x732c2073696e676c, 0x652071756f746573, 0x0a2f2f2f206b6565, 0x7020746865697220, - 0x636f6e74656e7420, 0x766572626174696d, 0x2c20646f75626c65, 0x2071756f74657320, 0x6b65657020697420, - 0x62757420686f6e6f, 0x72206261636b736c, 0x6173682065736361, 0x7065732c20616e64, 0x20616e20756e7175, - 0x6f7465640a2f2f2f, 0x206261636b736c61, 0x7368206573636170, 0x657320746865206e, 0x6578742063686172, - 0x61637465722e2054, 0x68726f7773206120, 0x53796e7461784572, 0x726f72206f6e2061, 0x6e20756e7465726d, - 0x696e617465642071, 0x756f7465206f7220, 0x6120747261696c69, 0x6e670a2f2f2f2062, 0x61636b736c617368, - 0x2e0a6578706f7274, 0x2066756e6374696f, 0x6e20746f6b656e69, 0x7a65286c696e6529, 0x207b0a2020202063, - 0x6f6e737420776f72, 0x6473203d205b5d3b, 0x0a20202020636f6e, 0x7374207363616e6e, 0x6572203d206e6577, - 0x205363616e6e6572, 0x286c696e65293b0a, 0x202020206c657420, 0x776f7264203d206e, 0x756c6c3b20202f2f, - 0x206e756c6c206265, 0x747765656e20776f, 0x7264730a20202020, 0x7768696c65202821, 0x7363616e6e65722e, - 0x646f6e6529207b0a, 0x2020202020202020, 0x636f6e7374206368, 0x6172203d20736361, 0x6e6e65722e6e6578, - 0x7428293b0a202020, 0x2020202020636f6e, 0x7374207365706172, 0x61746f72203d2063, 0x686172203d3d3d20, - 0x222022207c7c2063, 0x686172203d3d3d20, 0x225c74223b0a2020, 0x2020202020206966, 0x2028736570617261, - 0x746f722026262077, 0x6f726420213d3d20, 0x6e756c6c290a2020, 0x2020202020202020, 0x2020776f7264732e, - 0x7075736828776f72, 0x64293b0a20202020, 0x20202020776f7264, 0x203d207365706172, 0x61746f72203f206e, - 0x756c6c203a202877, 0x6f7264203f3f2022, 0x2229202b20736361, 0x6e6e65722e706172, 0x742863686172293b, - 0x0a202020207d0a20, 0x2020206966202877, 0x6f726420213d3d20, 0x6e756c6c290a2020, 0x202020202020776f, - 0x7264732e70757368, 0x28776f7264293b0a, 0x2020202072657475, 0x726e20776f726473, 0x3b0a7d0a0a2f2f20, - 0x42726f7773657220, 0x636f6d6d616e6420, 0x6f75747075742075, 0x73657320225c6e22, 0x206c696e6520656e, - 0x64696e67732c2063, 0x6f6e766572746564, 0x206c696b6520432b, 0x2b206f7574707574, 0x2e0a636f6e737420, - 0x746f5465726d696e, 0x616c54657874203d, 0x2028746578742920, 0x3d3e20746578742e, 0x7265706c61636528, - 0x2f283f3c215c7229, 0x5c6e2f672c20225c, 0x725c6e22293b0a0a, 0x2f2f2f2052756e73, 0x2061206c696e653a, - 0x20612062726f7773, 0x657220636f6d6d61, 0x6e64206f66206063, 0x6f6d6d616e647360, 0x202861204d617020, - 0x66726f6d20636f6d, 0x6d616e64206e616d, 0x6520746f2068616e, 0x646c657229207768, 0x656e206f6e652069, - 0x730a2f2f2f207265, 0x6769737465726564, 0x20666f7220697473, 0x2066697273742077, 0x6f726420616e6420, - 0x646f6573206e6f74, 0x2072657475726e20, 0x756e646566696e65, 0x642c20656c736520, 0x6072756e496e4370, - 0x70286c696e652960, 0x2e2041206c696e65, 0x20746861740a2f2f, 0x2f2063616e6e6f74, 0x2062652073706c69, - 0x7420676f65732074, 0x6f20432b2b2c2077, 0x6869636820726570, 0x6f72747320746865, 0x206572726f722e20, - 0x42726f7773657220, 0x636f6d6d616e6473, 0x2067657420607369, 0x676e616c602c2077, 0x6869636820437472, - 0x6c2b430a2f2f2f20, 0x61626f7274732077, 0x6974682074686520, 0x726561736f6e2045, 0x72726f722822496e, - 0x7465727275707465, 0x6422293b20612043, 0x2b2b20636f6d6d61, 0x6e642063616e6e6f, 0x7420626520696e74, - 0x6572727570746564, 0x2e0a6578706f7274, 0x206173796e632066, 0x756e6374696f6e20, 0x72756e4c696e6528, - 0x6c696e652c207b63, 0x6f6d6d616e64732c, 0x2072756e496e4370, 0x702c207772697465, 0x2c20627269646765, - 0x2c207369676e616c, 0x203d206e65772041, 0x626f7274436f6e74, 0x726f6c6c65722829, 0x2e7369676e616c7d, - 0x29207b0a20202020, 0x6c657420776f7264, 0x733b0a2020202074, 0x7279207b0a202020, 0x2020202020776f72, - 0x6473203d20746f6b, 0x656e697a65286c69, 0x6e65293b0a202020, 0x207d206361746368, 0x20286572726f7229, - 0x207b0a2020202020, 0x2020207265747572, 0x6e2072756e496e43, 0x7070286c696e6529, 0x3b0a202020207d0a, - 0x20202020636f6e73, 0x742068616e646c65, 0x72203d20776f7264, 0x732e6c656e677468, 0x203e2030203f2063, - 0x6f6d6d616e64732e, 0x67657428776f7264, 0x735b305d29203a20, 0x756e646566696e65, 0x643b0a2020202069, - 0x6620282168616e64, 0x6c6572290a202020, 0x2020202020726574, 0x75726e2072756e49, 0x6e437070286c696e, - 0x65293b0a20202020, 0x636f6e7374206f75, 0x74707574203d2061, 0x776169742068616e, 0x646c657228776f72, - 0x64732e736c696365, 0x2831292c207b0a20, 0x202020202020206c, 0x696e652c0a202020, 0x2020202020627269, - 0x6467652c0a202020, 0x2020202020736967, 0x6e616c2c0a202020, 0x2020202020777269, 0x74653a2028746578, - 0x7429203d3e207772, 0x69746528746f5465, 0x726d696e616c5465, 0x787428537472696e, 0x6728746578742929, - 0x292c0a2020202020, 0x20202072756e496e, 0x4370703a20282920, 0x3d3e2072756e496e, 0x437070286c696e65, - 0x292c0a202020207d, 0x293b0a2020202072, 0x657475726e206f75, 0x74707574203d3d3d, 0x20756e646566696e, - 0x6564203f2072756e, 0x496e437070286c69, 0x6e6529203a20746f, 0x5465726d696e616c, 0x5465787428537472, - 0x696e67286f757470, 0x757429293b0a7d0a, 0x0a2f2f2f20496d70, 0x6f72747320746865, 0x20657874656e7369, - 0x6f6e206d6f64756c, 0x6573206c69737465, 0x6420627920432b2b, 0x2028225c6e222d73, 0x6570617261746564, - 0x2055524c73292061, 0x6e6420636f6c6c65, 0x6374732074686569, 0x722062726f777365, 0x720a2f2f2f20636f, - 0x6d6d616e64732e20, 0x41206d6f64756c65, 0x2074686174206661, 0x696c7320746f206c, 0x6f61642069732072, - 0x65706f7274656420, 0x616e6420736b6970, 0x7065642e0a617379, 0x6e632066756e6374, 0x696f6e206c6f6164, - 0x457874656e73696f, 0x6e732875726c732c, 0x2077726974652920, 0x7b0a20202020636f, 0x6e737420636f6d6d, - 0x616e6473203d206e, 0x6577204d61702829, 0x3b0a20202020666f, 0x722028636f6e7374, 0x2075726c206f6620, - 0x75726c732e73706c, 0x697428225c6e2229, 0x2e66696c74657228, 0x28656e7472792920, 0x3d3e20656e747279, - 0x20213d3d20222229, 0x29207b0a20202020, 0x2020202074727920, 0x7b0a202020202020, 0x202020202020636f, - 0x6e7374206d6f6475, 0x6c65203d20617761, 0x697420696d706f72, 0x742875726c293b0a, 0x2020202020202020, - 0x20202020666f7220, 0x28636f6e7374205b, 0x6e616d652c206861, 0x6e646c65725d206f, 0x66204f626a656374, - 0x2e656e7472696573, 0x286d6f64756c652e, 0x636f6d6d616e6473, 0x203f3f207b7d2929, 0x0a20202020202020, - 0x2020202020202020, 0x20636f6d6d616e64, 0x732e736574286e61, 0x6d652c2068616e64, 0x6c6572293b0a2020, - 0x2020202020207d20, 0x6361746368202865, 0x72726f7229207b0a, 0x2020202020202020, 0x2020202077726974, - 0x6528616e73692e72, 0x656428605465726d, 0x696e616c20657874, 0x656e73696f6e2024, 0x7b75726c7d206661, - 0x696c656420746f20, 0x6c6f61643a20247b, 0x6572726f723f2e6d, 0x657373616765203f, 0x3f206572726f727d, - 0x6029202b20225c72, 0x5c6e22293b0a2020, 0x2020202020207d0a, 0x202020207d0a2020, 0x202072657475726e, - 0x20636f6d6d616e64, 0x733b0a7d0a0a2f2f, 0x2045646974696e67, 0x206b6579732c2061, 0x7320787465726d2e, - 0x6a73207265706f72, 0x7473207468656d20, 0x696e206f6e446174, 0x612c206d61707065, 0x6420746f204c696e, - 0x65456469746f7220, 0x616374696f6e732e, 0x0a636f6e7374206b, 0x6579416374696f6e, 0x73203d206e657720, - 0x4d6170285b0a2020, 0x20205b225c72222c, 0x2028656469746f72, 0x29203d3e20656469, 0x746f722e7375626d, - 0x697428295d2c0a20, 0x2020205b225c7837, 0x66222c2028656469, 0x746f7229203d3e20, 0x656469746f722e65, - 0x72617365282d3129, 0x5d2c0a202020205b, 0x225c62222c202865, 0x6469746f7229203d, 0x3e20656469746f72, - 0x2e6572617365282d, 0x31295d2c0a202020, 0x205b225c7831625b, 0x337e222c20286564, 0x69746f7229203d3e, - 0x20656469746f722e, 0x6572617365283029, 0x5d2c0a202020205b, 0x225c7831625b4422, 0x2c2028656469746f, - 0x7229203d3e206564, 0x69746f722e6d6f76, 0x65546f2865646974, 0x6f722e637572736f, 0x72202d2031295d2c, - 0x0a202020205b225c, 0x7831625b43222c20, 0x28656469746f7229, 0x203d3e2065646974, 0x6f722e6d6f766554, - 0x6f28656469746f72, 0x2e637572736f7220, 0x2b2031295d2c0a20, 0x2020205b225c7831, 0x625b48222c202865, - 0x6469746f7229203d, 0x3e20656469746f72, 0x2e6d6f7665546f28, 0x30295d2c0a202020, 0x205b225c7831624f, - 0x48222c2028656469, 0x746f7229203d3e20, 0x656469746f722e6d, 0x6f7665546f283029, 0x5d2c0a202020205b, - 0x225c783031222c20, 0x28656469746f7229, 0x203d3e2065646974, 0x6f722e6d6f766554, 0x6f2830295d2c0a20, - 0x2020205b225c7831, 0x625b46222c202865, 0x6469746f7229203d, 0x3e20656469746f72, 0x2e6d6f7665546f28, - 0x656469746f722e63, 0x686172732e6c656e, 0x677468295d2c0a20, 0x2020205b225c7831, 0x624f46222c202865, - 0x6469746f7229203d, 0x3e20656469746f72, 0x2e6d6f7665546f28, 0x656469746f722e63, 0x686172732e6c656e, - 0x677468295d2c0a20, 0x2020205b225c7830, 0x35222c2028656469, 0x746f7229203d3e20, 0x656469746f722e6d, - 0x6f7665546f286564, 0x69746f722e636861, 0x72732e6c656e6774, 0x68295d2c0a202020, 0x205b225c7831625b, - 0x41222c2028656469, 0x746f7229203d3e20, 0x656469746f722e72, 0x6563616c6c282d31, 0x295d2c0a20202020, - 0x5b225c7831625b42, 0x222c202865646974, 0x6f7229203d3e2065, 0x6469746f722e7265, 0x63616c6c2831295d, - 0x2c0a202020205b22, 0x5c74222c20286564, 0x69746f7229203d3e, 0x20656469746f722e, 0x747261636b286564, - 0x69746f722e636f6d, 0x706c6574654c696e, 0x652829295d2c0a20, 0x2020205b225c7830, 0x33222c2028656469, - 0x746f7229203d3e20, 0x656469746f722e63, 0x616e63656c4c696e, 0x6528295d2c0a2020, 0x20205b225c783063, - 0x222c202865646974, 0x6f7229203d3e2065, 0x6469746f722e7265, 0x6472617728616e73, 0x692e636c65617253, - 0x637265656e295d2c, 0x0a202020205b225c, 0x783135222c202865, 0x6469746f7229203d, 0x3e20656469746f72, - 0x2e6b696c6c426566, 0x6f7265437572736f, 0x7228295d2c0a5d29, 0x3b0a0a2f2f2f204c, 0x696e652065646974, - 0x6f72206472697665, 0x6e20627920746865, 0x207465726d696e61, 0x6c277320696e7075, 0x7420646174612e20, - 0x6077726974652874, 0x6578742960206469, 0x73706c6179732074, 0x6578743b20607275, 0x6e286c696e652960, - 0x20616e640a2f2f2f, 0x2060636f6d706c65, 0x7465286c696e6529, 0x602072657475726e, 0x2050726f6d697365, - 0x73206f6620746865, 0x20432b2b206f7574, 0x70757420616e6420, 0x6f6620225c6e222d, 0x7365706172617465, - 0x6420636f6d706c65, 0x74696f6e2063616e, 0x646964617465732e, 0x0a6578706f727420, 0x636c617373204c69, - 0x6e65456469746f72, 0x207b0a2020202063, 0x6f6e737472756374, 0x6f72287b77726974, 0x652c2072756e2c20, - 0x636f6d706c657465, 0x2c2070726f6d7074, 0x7d29207b0a202020, 0x2020202020746869, 0x732e777269746520, - 0x3d2077726974653b, 0x0a20202020202020, 0x20746869732e7275, 0x6e203d2072756e3b, 0x0a20202020202020, - 0x20746869732e636f, 0x6d706c657465203d, 0x20636f6d706c6574, 0x653b0a2020202020, 0x202020746869732e, - 0x61626f7274203d20, 0x6e756c6c3b0a2020, 0x2020202020207468, 0x69732e70726f6d70, 0x74203d2070726f6d, - 0x70743b0a20202020, 0x2020202074686973, 0x2e6368617273203d, 0x205b5d3b0a202020, 0x2020202020746869, - 0x732e637572736f72, 0x203d20303b0a2020, 0x2020202020207468, 0x69732e686973746f, 0x7279203d205b5d3b, - 0x0a20202020202020, 0x20746869732e6869, 0x73746f7279496e64, 0x6578203d20303b0a, 0x2020202020202020, - 0x746869732e627573, 0x79203d206e756c6c, 0x3b0a202020207d0a, 0x0a20202020676574, 0x206c696e65282920, - 0x7b0a202020202020, 0x202072657475726e, 0x20746869732e6368, 0x6172732e6a6f696e, 0x282222293b0a2020, - 0x20207d0a0a202020, 0x202f2f2f20526573, 0x6f6c766573206f6e, 0x6365206e6f20636f, 0x6d6d616e64206f72, - 0x20636f6d706c6574, 0x696f6e2069732070, 0x656e64696e672e0a, 0x202020206173796e, 0x63207768656e4964, - 0x6c652829207b0a20, 0x2020202020202077, 0x68696c6520287468, 0x69732e6275737929, 0x0a20202020202020, - 0x2020202020617761, 0x697420746869732e, 0x627573793b0a2020, 0x20207d0a0a202020, 0x2073686f7750726f, - 0x6d70742829207b0a, 0x2020202020202020, 0x746869732e777269, 0x746528746869732e, 0x70726f6d7074293b, - 0x0a202020207d0a0a, 0x2020202068616e64, 0x6c65286461746129, 0x207b0a2020202020, 0x2020206966202874, - 0x6869732e62757379, 0x290a202020202020, 0x2020202020207265, 0x7475726e20746869, 0x732e696e74657272, - 0x7570742864617461, 0x293b0a2020202020, 0x202020636f6e7374, 0x20616374696f6e20, 0x3d206b6579416374, - 0x696f6e732e676574, 0x2864617461293b0a, 0x2020202020202020, 0x6966202861637469, 0x6f6e290a20202020, - 0x2020202020202020, 0x72657475726e2061, 0x6374696f6e287468, 0x6973293b0a202020, 0x2020202020696620, - 0x2821646174612e73, 0x7461727473576974, 0x6828225c78316222, 0x29290a2020202020, 0x2020202020202072, - 0x657475726e207468, 0x69732e696e736572, 0x7454657874286461, 0x7461293b0a202020, 0x207d0a0a20202020, - 0x2f2f205768696c65, 0x206120636f6d6d61, 0x6e642072756e732c, 0x204374726c2b4320, 0x61626f7274732069, - 0x7473207369676e61, 0x6c206f6e63652061, 0x6e6420746865206f, 0x74686572206b6579, 0x7320617265206967, - 0x6e6f7265642e0a20, 0x202020696e746572, 0x7275707428646174, 0x6129207b0a202020, 0x2020202020636f6e, - 0x73742072756e6e69, 0x6e67203d20746869, 0x732e61626f72743f, 0x2e7369676e616c2e, 0x61626f7274656420, - 0x3d3d3d2066616c73, 0x653b0a2020202020, 0x2020206966202864, 0x61746120213d3d20, 0x225c78303322207c, - 0x7c202172756e6e69, 0x6e67290a20202020, 0x2020202020202020, 0x72657475726e3b0a, 0x2020202020202020, - 0x746869732e777269, 0x746528225e435c72, 0x5c6e22293b0a2020, 0x2020202020207468, 0x69732e61626f7274, - 0x2e61626f7274286e, 0x6577204572726f72, 0x2822496e74657272, 0x7570746564222929, 0x3b0a202020207d0a, - 0x0a202020202f2f20, 0x5479706564206f72, 0x2070617374656420, 0x746578743a207072, 0x696e7461626c6520, - 0x6368617261637465, 0x7273206172652069, 0x6e7365727465642c, 0x2061206361727269, 0x6167652072657475, - 0x726e207375626d69, 0x747320746865206c, 0x696e650a20202020, 0x2f2f20616e642074, 0x6865207265737420, - 0x6f662061206d756c, 0x74692d6c696e6520, 0x7061737465206973, 0x2064726f70706564, 0x2c2073696e636520, - 0x636f6d6d616e6473, 0x2072756e206f6e65, 0x2061742061207469, 0x6d652e0a20202020, 0x696e736572745465, - 0x7874286461746129, 0x207b0a2020202020, 0x202020636f6e7374, 0x205b746578742c20, 0x2e2e2e726573745d, - 0x203d20646174612e, 0x73706c697428225c, 0x7222293b0a202020, 0x2020202020746869, 0x732e696e73657274, - 0x2841727261792e66, 0x726f6d2874657874, 0x292e66696c746572, 0x2828636861722920, 0x3d3e206368617220, - 0x3e3d202220222026, 0x2620636861722021, 0x3d3d20225c783766, 0x2229293b0a202020, 0x2020202020696620, - 0x28726573742e6c65, 0x6e677468203e2030, 0x290a202020202020, 0x2020202020207265, 0x7475726e20746869, - 0x732e7375626d6974, 0x28293b0a20202020, 0x7d0a0a2020202069, 0x6e73657274286368, 0x61727329207b0a20, - 0x2020202020202069, 0x6620286368617273, 0x2e6c656e67746820, 0x3d3d3d2030290a20, 0x2020202020202020, - 0x2020207265747572, 0x6e3b0a2020202020, 0x202020746869732e, 0x63686172732e7370, 0x6c69636528746869, - 0x732e637572736f72, 0x2c20302c202e2e2e, 0x6368617273293b0a, 0x2020202020202020, 0x746869732e637572, - 0x736f72202b3d2063, 0x686172732e6c656e, 0x6774683b0a202020, 0x2020202020746869, 0x732e726564726177, - 0x28293b0a20202020, 0x7d0a0a2020202065, 0x72617365286f6666, 0x73657429207b0a20, 0x2020202020202063, - 0x6f6e737420696e64, 0x6578203d20746869, 0x732e637572736f72, 0x202b206f66667365, 0x743b0a2020202020, - 0x2020206966202869, 0x6e646578203c2030, 0x207c7c20696e6465, 0x78203e3d20746869, 0x732e63686172732e, - 0x6c656e677468290a, 0x2020202020202020, 0x2020202072657475, 0x726e3b0a20202020, 0x2020202074686973, - 0x2e63686172732e73, 0x706c69636528696e, 0x6465782c2031293b, 0x0a20202020202020, 0x20746869732e6375, - 0x72736f72203d2069, 0x6e6465783b0a2020, 0x2020202020207468, 0x69732e7265647261, 0x7728293b0a202020, - 0x207d0a0a20202020, 0x6b696c6c4265666f, 0x7265437572736f72, 0x2829207b0a202020, 0x2020202020746869, - 0x732e63686172732e, 0x73706c6963652830, 0x2c20746869732e63, 0x7572736f72293b0a, 0x2020202020202020, - 0x746869732e637572, 0x736f72203d20303b, 0x0a20202020202020, 0x20746869732e7265, 0x6472617728293b0a, - 0x202020207d0a0a20, 0x2020206d6f766554, 0x6f28706f73697469, 0x6f6e29207b0a2020, 0x202020202020636f, - 0x6e73742063757273, 0x6f72203d204d6174, 0x682e6d617828302c, 0x204d6174682e6d69, 0x6e28746869732e63, - 0x686172732e6c656e, 0x6774682c20706f73, 0x6974696f6e29293b, 0x0a20202020202020, 0x2069662028637572, - 0x736f72203d3d3d20, 0x746869732e637572, 0x736f72290a202020, 0x2020202020202020, 0x2072657475726e3b, - 0x0a20202020202020, 0x20746869732e6375, 0x72736f72203d2063, 0x7572736f723b0a20, 0x2020202020202074, - 0x6869732e72656472, 0x617728293b0a2020, 0x20207d0a0a202020, 0x20726563616c6c28, 0x646972656374696f, - 0x6e29207b0a202020, 0x2020202020636f6e, 0x737420696e646578, 0x203d20746869732e, 0x686973746f727949, - 0x6e646578202b2064, 0x6972656374696f6e, 0x3b0a202020202020, 0x202069662028696e, 0x646578203c203020, - 0x7c7c20696e646578, 0x203e20746869732e, 0x686973746f72792e, 0x6c656e677468290a, 0x2020202020202020, - 0x2020202072657475, 0x726e3b0a20202020, 0x2020202074686973, 0x2e686973746f7279, 0x496e646578203d20, - 0x696e6465783b0a20, 0x2020202020202074, 0x6869732e63686172, 0x73203d2041727261, 0x792e66726f6d2869, - 0x6e646578203d3d3d, 0x20746869732e6869, 0x73746f72792e6c65, 0x6e677468203f2022, 0x22203a2074686973, - 0x2e686973746f7279, 0x5b696e6465785d29, 0x3b0a202020202020, 0x2020746869732e63, 0x7572736f72203d20, - 0x746869732e636861, 0x72732e6c656e6774, 0x683b0a2020202020, 0x202020746869732e, 0x7265647261772829, - 0x3b0a202020207d0a, 0x0a2020202063616e, 0x63656c4c696e6528, 0x29207b0a20202020, 0x2020202074686973, - 0x2e77726974652822, 0x5e435c725c6e2229, 0x3b0a202020202020, 0x2020746869732e63, 0x68617273203d205b, - 0x5d3b0a2020202020, 0x202020746869732e, 0x637572736f72203d, 0x20303b0a20202020, 0x2020202074686973, - 0x2e686973746f7279, 0x496e646578203d20, 0x746869732e686973, 0x746f72792e6c656e, 0x6774683b0a202020, - 0x2020202020746869, 0x732e73686f775072, 0x6f6d707428293b0a, 0x202020207d0a0a20, 0x2020202f2f205265, - 0x7772697465732074, 0x68652070726f6d70, 0x7420616e64207468, 0x65206c696e652069, 0x6e20706c6163652c, - 0x207468656e206d6f, 0x7665732074686520, 0x637572736f722062, 0x61636b20746f2069, 0x747320706f736974, - 0x696f6e2e0a202020, 0x2072656472617728, 0x707265666978203d, 0x20225c722229207b, 0x0a20202020202020, - 0x20746869732e7772, 0x6974652870726566, 0x6978202b20746869, 0x732e70726f6d7074, 0x202b20746869732e, - 0x6c696e65202b2061, 0x6e73692e636c6561, 0x72546f456e64202b, 0x20616e73692e6c65, 0x667428746869732e, - 0x63686172732e6c65, 0x6e677468202d2074, 0x6869732e63757273, 0x6f7229293b0a2020, 0x20207d0a0a202020, - 0x20747261636b2870, 0x726f6d6973652920, 0x7b0a202020202020, 0x2020746869732e62, 0x757379203d207072, - 0x6f6d6973652e6669, 0x6e616c6c79282829, 0x203d3e207b0a2020, 0x2020202020202020, 0x2020746869732e62, - 0x757379203d206e75, 0x6c6c3b0a20202020, 0x202020207d293b0a, 0x2020202020202020, 0x72657475726e2074, - 0x6869732e62757379, 0x3b0a202020207d0a, 0x0a20202020737562, 0x6d69742829207b0a, 0x2020202020202020, - 0x636f6e7374206c69, 0x6e65203d20746869, 0x732e6c696e653b0a, 0x2020202020202020, 0x746869732e777269, - 0x746528225c725c6e, 0x22293b0a20202020, 0x2020202074686973, 0x2e6368617273203d, 0x205b5d3b0a202020, - 0x2020202020746869, 0x732e637572736f72, 0x203d20303b0a2020, 0x2020202020206966, 0x20286c696e652e74, - 0x72696d282920213d, 0x3d20222220262620, 0x746869732e686973, 0x746f72792e617428, 0x2d312920213d3d20, - 0x6c696e65290a2020, 0x2020202020202020, 0x2020746869732e68, 0x6973746f72792e70, 0x757368286c696e65, - 0x293b0a2020202020, 0x202020746869732e, 0x686973746f727949, 0x6e646578203d2074, 0x6869732e68697374, - 0x6f72792e6c656e67, 0x74683b0a20202020, 0x2020202072657475, 0x726e20746869732e, 0x747261636b287468, - 0x69732e6578656375, 0x7465286c696e6529, 0x293b0a202020207d, 0x0a0a202020206173, 0x796e632065786563, - 0x757465286c696e65, 0x29207b0a20202020, 0x2020202074686973, 0x2e61626f7274203d, 0x206e65772041626f, - 0x7274436f6e74726f, 0x6c6c657228293b0a, 0x2020202020202020, 0x747279207b0a2020, 0x2020202020202020, - 0x2020636f6e737420, 0x6f7574707574203d, 0x2061776169742074, 0x6869732e72756e28, 0x6c696e652c207468, - 0x69732e61626f7274, 0x2e7369676e616c29, 0x3b0a202020202020, 0x2020202020202f2f, 0x205468652070726f, - 0x6d70742073746172, 0x7473206f6e206120, 0x6e6577206c696e65, 0x2c20756e6c657373, 0x20746865206f7574, - 0x70757420616c7265, 0x61647920656e6473, 0x206f6e65206f7220, 0x6c65617665732074, 0x68650a2020202020, - 0x202020202020202f, 0x2f20637572736f72, 0x20617420686f6d65, 0x2028737563682061, 0x7320746865202763, - 0x6c6561722720636f, 0x6d6d616e64292e0a, 0x2020202020202020, 0x2020202069662028, 0x6f7574707574290a, - 0x2020202020202020, 0x2020202020202020, 0x746869732e777269, 0x7465286f75747075, 0x742e656e64735769, - 0x746828225c6e2229, 0x207c7c206f757470, 0x75742e656e647357, 0x69746828225c7831, 0x625b482229203f20, - 0x6f7574707574203a, 0x206f757470757420, 0x2b20225c725c6e22, 0x293b0a2020202020, 0x2020207d20636174, - 0x636820286572726f, 0x7229207b0a202020, 0x2020202020202020, 0x20746869732e7772, 0x69746528616e7369, - 0x2e72656428604572, 0x726f723a20247b65, 0x72726f723f2e6d65, 0x7373616765203f3f, 0x206572726f727d60, - 0x29202b20225c725c, 0x6e22293b0a202020, 0x20202020207d0a20, 0x2020202020202074, 0x6869732e73686f77, - 0x50726f6d70742829, 0x3b0a202020207d0a, 0x0a20202020617379, 0x6e6320636f6d706c, 0x6574654c696e6528, - 0x29207b0a20202020, 0x202020202f2f204f, 0x6e6c792074686520, 0x636f6d6d616e6420, 0x6e616d6520697320, - 0x636f6d706c657465, 0x642c20616e64206f, 0x6e6c792077697468, 0x2074686520637572, 0x736f722061742074, - 0x686520656e64206f, 0x6620746865206c69, 0x6e652e0a20202020, 0x2020202069662028, 0x746869732e637572, - 0x736f7220213d3d20, 0x746869732e636861, 0x72732e6c656e6774, 0x68290a2020202020, 0x2020202020202072, - 0x657475726e3b0a20, 0x2020202020202063, 0x6f6e7374206c696e, 0x65203d2074686973, 0x2e6c696e653b0a20, - 0x202020202020206c, 0x65742063616e6469, 0x64617465733b0a20, 0x2020202020202074, 0x7279207b0a202020, - 0x2020202020202020, 0x2063616e64696461, 0x746573203d202861, 0x7761697420746869, 0x732e636f6d706c65, - 0x7465286c696e6529, 0x292e73706c697428, 0x225c6e22292e6669, 0x6c7465722828776f, 0x726429203d3e2077, - 0x6f726420213d3d20, 0x2222293b0a202020, 0x20202020207d2063, 0x6174636820286572, 0x726f7229207b0a20, - 0x2020202020202020, 0x2020207265747572, 0x6e3b0a2020202020, 0x2020207d0a202020, 0x2020202020696620, - 0x2863616e64696461, 0x7465732e6c656e67, 0x7468203d3d3d2030, 0x290a202020202020, 0x2020202020207265, - 0x7475726e3b0a2020, 0x202020202020636f, 0x6e737420636f6d70, 0x6c6574696f6e203d, 0x2063616e64696461, - 0x7465732e6c656e67, 0x7468203d3d3d2031, 0x203f2063616e6469, 0x64617465735b305d, 0x202b20222022203a, - 0x20636f6d6d6f6e50, 0x7265666978286361, 0x6e64696461746573, 0x293b0a2020202020, 0x2020206966202863, - 0x6f6d706c6574696f, 0x6e2e6c656e677468, 0x203e206c696e652e, 0x6c656e677468290a, 0x2020202020202020, - 0x2020202072657475, 0x726e20746869732e, 0x696e736572742841, 0x727261792e66726f, 0x6d28636f6d706c65, - 0x74696f6e2e736c69, 0x6365286c696e652e, 0x6c656e6774682929, 0x293b0a2020202020, 0x202020746869732e, - 0x777269746528225c, 0x725c6e22202b2063, 0x616e646964617465, 0x732e6a6f696e2822, 0x20202229202b2022, - 0x5c725c6e22293b0a, 0x2020202020202020, 0x746869732e726564, 0x72617728293b0a20, 0x2020207d0a7d0a0a, - 0x2f2f2f204d6f756e, 0x7473206120746572, 0x6d696e616c20696e, 0x2060656c656d656e, 0x7460206f6e636520, - 0x7468652057656246, 0x726f6e7420627269, 0x6467652069732072, 0x656164792e205265, 0x7475726e73207468, - 0x6520787465726d20, 0x5465726d696e616c, 0x2c0a2f2f2f206974, 0x73206c696e652065, 0x6469746f7220616e, - 0x6420612060666c75, 0x7368282960207265, 0x736f6c76696e6720, 0x7768656e20657665, 0x7279207772697465, - 0x2068617320626565, 0x6e2072656e646572, 0x65642e0a6578706f, 0x7274206173796e63, 0x2066756e6374696f, - 0x6e206d6f756e7428, 0x656c656d656e742c, 0x207b627269646765, 0x203d20676c6f6261, 0x6c546869732e7765, - 0x6246726f6e742c20, 0x7465726d696e616c, 0x4f7074696f6e7320, 0x3d207b7d7d203d20, 0x7b7d29207b0a2020, - 0x2020636f6e737420, 0x7465726d696e616c, 0x203d206e65772054, 0x65726d696e616c28, 0x7b0a202020202020, - 0x2020637572736f72, 0x426c696e6b3a2074, 0x7275652c0a202020, 0x2020202020636f6e, 0x76657274456f6c3a, - 0x2066616c73652c0a, 0x2020202020202020, 0x666f6e7446616d69, 0x6c793a202775692d, 0x6d6f6e6f73706163, - 0x652c202243617363, 0x6164696120436f64, 0x65222c2022536f75, 0x72636520436f6465, 0x2050726f222c204d, - 0x656e6c6f2c20436f, 0x6e736f6c61732c20, 0x6d6f6e6f73706163, 0x65272c0a20202020, 0x202020207468656d, - 0x653a207b6261636b, 0x67726f756e643a20, 0x2223306431313137, 0x222c20666f726567, 0x726f756e643a2022, - 0x2365366564663322, 0x7d2c0a2020202020, 0x2020202e2e2e7465, 0x726d696e616c4f70, 0x74696f6e732c0a20, - 0x2020207d293b0a20, 0x202020636f6e7374, 0x20666974203d206e, 0x6577204669744164, 0x646f6e28293b0a20, - 0x2020207465726d69, 0x6e616c2e6c6f6164, 0x4164646f6e286669, 0x74293b0a20202020, 0x7465726d696e616c, - 0x2e6f70656e28656c, 0x656d656e74293b0a, 0x202020206669742e, 0x66697428293b0a20, 0x2020206e65772052, - 0x6573697a654f6273, 0x6572766572282829, 0x203d3e206669742e, 0x6669742829292e6f, 0x6273657276652865, - 0x6c656d656e74293b, 0x0a0a202020206c65, 0x74206c6173745772, 0x697465203d205072, 0x6f6d6973652e7265, - 0x736f6c766528293b, 0x0a20202020636f6e, 0x7374207772697465, 0x203d202874657874, 0x29203d3e207b0a20, - 0x202020202020206c, 0x6173745772697465, 0x203d206e65772050, 0x726f6d6973652828, 0x7265736f6c766529, - 0x203d3e207465726d, 0x696e616c2e777269, 0x746528746578742c, 0x207265736f6c7665, 0x29293b0a20202020, - 0x7d3b0a2020202063, 0x6f6e737420666c75, 0x7368203d20282920, 0x3d3e206c61737457, 0x726974653b0a0a20, - 0x202020747279207b, 0x0a20202020202020, 0x2061776169742062, 0x72696467652e7265, 0x6164793b0a202020, - 0x207d206361746368, 0x20286572726f7229, 0x207b0a2020202020, 0x2020207772697465, 0x28616e73692e7265, - 0x642860436f6e6e65, 0x6374696f6e20746f, 0x2074686520617070, 0x6c69636174696f6e, 0x206661696c65643a, - 0x20247b6572726f72, 0x3f2e6d6573736167, 0x65203f3f20657272, 0x6f727d6029202b20, 0x225c725c6e22293b, - 0x0a20202020202020, 0x2072657475726e20, 0x7b7465726d696e61, 0x6c2c20656469746f, 0x723a206e756c6c2c, - 0x20666c7573687d3b, 0x0a202020207d0a0a, 0x20202020636f6e73, 0x742063616c6c203d, 0x20286e616d652920, - 0x3d3e206272696467, 0x652e63707046756e, 0x6374696f6e286077, 0x656266726f6e742e, 0x7465726d696e616c, - 0x2e247b6e616d657d, 0x60293b0a20202020, 0x6c65742070726f6d, 0x70742c2062616e6e, 0x65722c2065787465, - 0x6e73696f6e733b0a, 0x2020202074727920, 0x7b0a202020202020, 0x20205b70726f6d70, 0x742c2062616e6e65, - 0x722c20657874656e, 0x73696f6e735d203d, 0x2061776169742050, 0x726f6d6973652e61, 0x6c6c285b63616c6c, - 0x282270726f6d7074, 0x222928292c206361, 0x6c6c282262616e6e, 0x6572222928292c20, 0x63616c6c28226578, - 0x74656e73696f6e73, 0x222928295d293b0a, 0x202020207d206361, 0x7463682028657272, 0x6f7229207b0a2020, - 0x2020202020202f2f, 0x20466f7220657861, 0x6d706c6520612070, 0x6167652073657276, 0x656420627920616e, - 0x206170706c696361, 0x74696f6e20776974, 0x686f757420776562, 0x66726f6e743a3a54, 0x65726d696e616c2e, - 0x0a20202020202020, 0x2077726974652861, 0x6e73692e72656428, 0x605465726d696e61, 0x6c20756e61766169, - 0x6c61626c653a2024, 0x7b6572726f723f2e, 0x6d65737361676520, 0x3f3f206572726f72, 0x7d6029202b20225c, - 0x725c6e22293b0a20, 0x2020202020202072, 0x657475726e207b74, 0x65726d696e616c2c, 0x20656469746f723a, - 0x206e756c6c2c2066, 0x6c7573687d3b0a20, 0x2020207d0a202020, 0x20636f6e73742063, 0x6f6d6d616e647320, - 0x3d20617761697420, 0x6c6f616445787465, 0x6e73696f6e732865, 0x7874656e73696f6e, 0x732c207772697465, - 0x293b0a2020202063, 0x6f6e73742072756e, 0x496e437070203d20, 0x63616c6c28227275, 0x6e22293b0a202020, - 0x20636f6e73742072, 0x756e203d20286c69, 0x6e652c207369676e, 0x616c29203d3e2072, 0x756e4c696e65286c, - 0x696e652c207b636f, 0x6d6d616e64732c20, 0x72756e496e437070, 0x2c2077726974652c, 0x206272696467652c, - 0x207369676e616c7d, 0x293b0a2020202063, 0x6f6e737420656469, 0x746f72203d206e65, 0x77204c696e654564, - 0x69746f72287b7772, 0x6974652c2072756e, 0x2c20636f6d706c65, 0x74653a2063616c6c, 0x2822636f6d706c65, - 0x746522292c207072, 0x6f6d70747d293b0a, 0x2020202069662028, 0x62616e6e6572290a, 0x2020202020202020, - 0x7772697465286261, 0x6e6e65722e726570, 0x6c616365416c6c28, 0x225c6e222c20225c, 0x725c6e2229202b20, - 0x225c725c6e22293b, 0x0a20202020656469, 0x746f722e73686f77, 0x50726f6d70742829, 0x3b0a202020207465, - 0x726d696e616c2e6f, 0x6e44617461282864, 0x61746129203d3e20, 0x656469746f722e68, 0x616e646c65286461, - 0x746129293b0a2020, 0x20207465726d696e, 0x616c2e666f637573, 0x28293b0a20202020, 0x72657475726e207b, - 0x7465726d696e616c, 0x2c20656469746f72, 0x2c20666c7573687d, 0x3b0a7d0a00000000 - }; -}; - -} // namespace webfront::fs::generated diff --git a/include/system/ToolManagerModuleData.hpp b/include/system/ToolManagerModuleData.hpp deleted file mode 100644 index 7b3efb04..00000000 --- a/include/system/ToolManagerModuleData.hpp +++ /dev/null @@ -1,392 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace webfront::fs::generated { - -struct ToolManagerModuleData { - static constexpr std::string_view encoding{}; - static constexpr std::size_t dataSize{14997}; - static constexpr std::array data{ - 0x2f2f2f2040627269, 0x65662042726f7773, 0x6572207369646520, 0x6f66207468652077, 0x6620746f6f6c206d, - 0x616e616765722028, 0x23323334292c2061, 0x207465726d696e61, 0x6c20657874656e73, 0x696f6e2061646465, - 0x642062790a2f2f2f, 0x2077656266726f6e, 0x743a3a546f6f6c4d, 0x616e616765722028, 0x696e636c7564652f, - 0x636f6d706f6e656e, 0x74732f546f6f6c4d, 0x616e616765722e68, 0x7070292e20277766, 0x2073656172636827, - 0x2c2027776620696e, 0x7374616c6c272061, 0x6e640a2f2f2f2027, 0x7766206f70656e27, 0x2072756e20686572, - 0x652c206265636175, 0x7365207468652064, 0x6f776e6c6f616420, 0x737065616b732048, 0x545450533b202777, - 0x66206c697374272c, 0x202777662072656d, 0x6f76652720616e64, 0x202777662068656c, 0x70272072756e0a2f, - 0x2f2f20696e20432b, 0x2b2e20416e20696e, 0x7374616c6c617469, 0x6f6e206665746368, 0x6573207468652070, - 0x61636b756d656e74, 0x20616e6420746865, 0x2074617262616c6c, 0x2066726f6d207468, 0x65206e706d207265, - 0x6769737472792c20, 0x636865636b732074, 0x68650a2f2f2f2074, 0x617262616c6c2773, 0x205348412d353132, - 0x20696e7465677269, 0x74792c20756e7061, 0x636b732069742061, 0x6e642073656e6473, 0x206974732066696c, - 0x6573207468726f75, 0x6768207765626672, 0x6f6e742e706b672e, 0x626567696e2c0a2f, 0x2f2f202e77726974, - 0x6546696c6520616e, 0x64202e636f6d6d69, 0x742e0a0a636f6e73, 0x7420626c6f636b53, 0x697a65203d203531, - 0x323b0a2f2f2f2046, 0x696c65732063726f, 0x7373207468652062, 0x726964676520696e, 0x206368756e6b7320, - 0x6f66207468697320, 0x6d616e7920627974, 0x65733b2074686520, 0x62726f7773657220, 0x73656e6473206120, - 0x6c61726765206f6e, 0x6520696e20736576, 0x6572616c0a2f2f2f, 0x20576562536f636b, 0x6574206672616d65, - 0x732c207768696368, 0x2074686520736572, 0x7665722072656173, 0x73656d626c65732e, 0x0a6578706f727420, - 0x636f6e7374206368, 0x756e6b53697a6520, 0x3d20323536202a20, 0x313032343b0a2f2f, 0x2f204c6172676573, - 0x7420756e7061636b, 0x6564207461726261, 0x6c6c206163636570, 0x7465642c20616761, 0x696e737420646563, - 0x6f6d707265737369, 0x6f6e20626f6d6273, 0x2e0a6578706f7274, 0x20636f6e7374206d, 0x6178556e7061636b, - 0x6564427974657320, 0x3d20323536202a20, 0x31303234202a2031, 0x3032343b0a636f6e, 0x7374207574663820, - 0x3d206e6577205465, 0x78744465636f6465, 0x7228293b0a0a2f2f, 0x2f2053706c697473, 0x20226e616d655b40, - 0x76657273696f6e5d, 0x222c207768657265, 0x20746865206e616d, 0x65206d6179206265, 0x2073636f70656420, - 0x28224073636f7065, 0x2f6e616d6540312e, 0x302e3022292e2054, 0x6865207665727369, 0x6f6e206973202222, - 0x0a2f2f2f20776865, 0x6e20616273656e74, 0x2e0a6578706f7274, 0x2066756e6374696f, 0x6e20706172736553, - 0x7065632873706563, 0x29207b0a20202020, 0x636f6e7374206174, 0x203d20737065632e, 0x696e6465784f6628, - 0x2240222c20737065, 0x632e737461727473, 0x5769746828224022, 0x29203f2031203a20, 0x30293b0a20202020, - 0x72657475726e2061, 0x74203c2030203f20, 0x7b6e616d653a2073, 0x7065632c20766572, 0x73696f6e3a202222, - 0x7d203a207b6e616d, 0x653a20737065632e, 0x736c69636528302c, 0x206174292c207665, 0x7273696f6e3a2073, - 0x7065632e736c6963, 0x65286174202b2031, 0x297d3b0a7d0a0a66, 0x756e6374696f6e20, 0x7265676973747279, - 0x4261736528726567, 0x697374727929207b, 0x0a20202020636f6e, 0x7374206261736520, 0x3d206e6577205552, - 0x4c28726567697374, 0x72792c20676c6f62, 0x616c546869732e6c, 0x6f636174696f6e3f, 0x2e68726566293b0a, - 0x2020202069662028, 0x21626173652e7061, 0x74686e616d652e65, 0x6e64735769746828, 0x222f2229290a2020, - 0x2020202020206261, 0x73652e706174686e, 0x616d65202b3d2022, 0x2f223b0a20202020, 0x72657475726e2062, - 0x6173653b0a7d0a0a, 0x2f2f205468652072, 0x6567697374727920, 0x656e636f64657320, 0x74686520736c6173, - 0x68206f6620612073, 0x636f706564206e61, 0x6d652e0a636f6e73, 0x74207061636b756d, 0x656e7455726c203d, - 0x2028626173652c20, 0x6e616d6529203d3e, 0x206e65772055524c, 0x286e616d652e7265, 0x706c61636528222f, - 0x222c202225326622, 0x292c206261736529, 0x3b0a0a6173796e63, 0x2066756e6374696f, 0x6e2066657463684f, - 0x6b2875726c2c2066, 0x65746368496d706c, 0x2c207369676e616c, 0x29207b0a20202020, 0x636f6e7374207265, - 0x73706f6e7365203d, 0x2061776169742066, 0x65746368496d706c, 0x2875726c2c207b73, 0x69676e616c7d293b, - 0x0a20202020696620, 0x2821726573706f6e, 0x73652e6f6b290a20, 0x2020202020202074, 0x68726f77206e6577, - 0x204572726f722860, 0x247b75726c7d3a20, 0x4854545020247b72, 0x6573706f6e73652e, 0x7374617475737d60, - 0x293b0a2020202072, 0x657475726e207265, 0x73706f6e73653b0a, 0x7d0a0a6173796e63, 0x2066756e6374696f, - 0x6e2066657463684a, 0x736f6e2875726c2c, 0x206665746368496d, 0x706c2c207369676e, 0x616c29207b0a2020, - 0x202072657475726e, 0x2028617761697420, 0x66657463684f6b28, 0x75726c2c20666574, 0x6368496d706c2c20, - 0x7369676e616c2929, 0x2e6a736f6e28293b, 0x0a7d0a0a66756e63, 0x74696f6e20726573, 0x6f6c76654d616e69, - 0x6665737428706163, 0x6b756d656e742c20, 0x6e616d652c207265, 0x7175657374656429, 0x207b0a2020202063, - 0x6f6e737420746167, 0x203d207265717565, 0x73746564207c7c20, 0x226c617465737422, 0x3b0a20202020636f, - 0x6e73742076657273, 0x696f6e203d207061, 0x636b756d656e745b, 0x22646973742d7461, 0x6773225d3f2e5b74, - 0x61675d203f3f2072, 0x6571756573746564, 0x3b0a20202020636f, 0x6e7374206d616e69, 0x66657374203d2070, - 0x61636b756d656e74, 0x2e76657273696f6e, 0x733f2e5b76657273, 0x696f6e5d3b0a2020, 0x202069662028216d, - 0x616e696665737429, 0x0a20202020202020, 0x207468726f77206e, 0x6577204572726f72, 0x2860247b6e616d65, - 0x7d20686173206e6f, 0x2076657273696f6e, 0x2027247b7461677d, 0x2760293b0a202020, 0x2072657475726e20, - 0x6d616e6966657374, 0x3b0a7d0a0a2f2f2f, 0x20436865636b7320, 0x6279746573206167, 0x61696e737420616e, - 0x2053524920696e74, 0x6567726974792073, 0x7472696e67202822, 0x7368613531322d3c, 0x6261736536343e22, - 0x2c20706f73736962, 0x6c79207365766572, 0x616c206861736865, 0x730a2f2f2f207365, 0x7061726174656420, - 0x6279207370616365, 0x732920616e642072, 0x657475726e732074, 0x6865206d61746368, 0x696e672022736861, - 0x3531322de280a622, 0x20686173682e204f, 0x6e6c79205348412d, 0x3531322069732061, 0x636365707465642e, - 0x0a6578706f727420, 0x6173796e63206675, 0x6e6374696f6e2076, 0x6572696679496e74, 0x6567726974792862, - 0x797465732c20696e, 0x7465677269747929, 0x207b0a2020202063, 0x6f6e737420657870, 0x6563746564203d20, - 0x537472696e672869, 0x6e74656772697479, 0x203f3f202222290a, 0x2020202020202020, 0x2e73706c6974282f, - 0x5c732b2f290a2020, 0x2020202020202e66, 0x696c746572282868, 0x61736829203d3e20, 0x686173682e737461, - 0x7274735769746828, 0x227368613531322d, 0x2229290a20202020, 0x202020202e6d6170, 0x2828686173682920, - 0x3d3e20686173682e, 0x73706c697428223f, 0x22295b305d293b0a, 0x2020202069662028, 0x6578706563746564, - 0x2e6c656e67746820, 0x3d3d3d2030290a20, 0x2020202020202074, 0x68726f77206e6577, 0x204572726f722822, - 0x546865207061636b, 0x6167652068617320, 0x6e6f205348412d35, 0x313220696e746567, 0x7269747922293b0a, - 0x2020202069662028, 0x21676c6f62616c54, 0x6869732e63727970, 0x746f3f2e73756274, 0x6c65290a20202020, - 0x202020207468726f, 0x77206e6577204572, 0x726f722822496e74, 0x6567726974792063, 0x6865636b73206e65, - 0x6564206120736563, 0x75726520636f6e74, 0x6578742028687474, 0x7073206f72206c6f, 0x63616c686f737429, - 0x22293b0a20202020, 0x636f6e7374206469, 0x67657374203d206e, 0x65772055696e7438, 0x4172726179286177, - 0x6169742063727970, 0x746f2e737562746c, 0x652e646967657374, 0x28225348412d3531, 0x32222c2062797465, - 0x7329293b0a202020, 0x20636f6e73742061, 0x637475616c203d20, 0x227368613531322d, 0x22202b2062746f61, - 0x2841727261792e66, 0x726f6d2864696765, 0x73742c2028627974, 0x6529203d3e205374, 0x72696e672e66726f, - 0x6d43686172436f64, 0x6528627974652929, 0x2e6a6f696e282222, 0x29293b0a20202020, 0x6966202821657870, - 0x65637465642e696e, 0x636c756465732861, 0x637475616c29290a, 0x2020202020202020, 0x7468726f77206e65, - 0x77204572726f7228, 0x60496e7465677269, 0x747920636865636b, 0x206661696c65643a, 0x2065787065637465, - 0x6420247b65787065, 0x637465645b305d7d, 0x2c20676f7420247b, 0x61637475616c7d60, 0x293b0a2020202072, - 0x657475726e206163, 0x7475616c3b0a7d0a, 0x0a2f2f2f2047756e, 0x7a69707320627974, 0x65732c206661696c, - 0x696e67206f6e6365, 0x206d6f7265207468, 0x616e20606c696d69, 0x7460206279746573, 0x20636f6d65206f75, - 0x742e0a6578706f72, 0x74206173796e6320, 0x66756e6374696f6e, 0x2067756e7a697028, 0x62797465732c206c, - 0x696d6974203d206d, 0x6178556e7061636b, 0x6564427974657329, 0x207b0a2020202063, 0x6f6e737420726561, - 0x646572203d206e65, 0x7720426c6f62285b, 0x62797465735d292e, 0x73747265616d2829, 0x2e70697065546872, - 0x6f756768286e6577, 0x204465636f6d7072, 0x657373696f6e5374, 0x7265616d2822677a, 0x69702229292e6765, - 0x7452656164657228, 0x293b0a2020202063, 0x6f6e737420636875, 0x6e6b73203d205b5d, 0x3b0a202020206c65, - 0x7420746f74616c20, 0x3d20303b0a202020, 0x20666f7220286c65, 0x742072656164203d, 0x2061776169742072, - 0x65616465722e7265, 0x616428293b202172, 0x6561642e646f6e65, 0x3b2072656164203d, 0x2061776169742072, - 0x65616465722e7265, 0x6164282929207b0a, 0x2020202020202020, 0x746f74616c202b3d, 0x20726561642e7661, - 0x6c75652e6c656e67, 0x74683b0a20202020, 0x2020202069662028, 0x746f74616c203e20, 0x6c696d697429207b, - 0x0a20202020202020, 0x2020202020617761, 0x6974207265616465, 0x722e63616e63656c, 0x28293b0a20202020, - 0x2020202020202020, 0x7468726f77206e65, 0x77204572726f7228, 0x6054686520746172, 0x62616c6c20756e70, - 0x61636b7320746f20, 0x6d6f726520746861, 0x6e20247b6c696d69, 0x747d206279746573, 0x60293b0a20202020, - 0x202020207d0a2020, 0x2020202020206368, 0x756e6b732e707573, 0x6828726561642e76, 0x616c7565293b0a20, - 0x2020207d0a202020, 0x2072657475726e20, 0x6e65772055696e74, 0x3841727261792861, 0x77616974206e6577, - 0x20426c6f62286368, 0x756e6b73292e6172, 0x7261794275666665, 0x722829293b0a7d0a, 0x0a2f2f2041204e55, - 0x4c2d7465726d696e, 0x6174656420686561, 0x646572206669656c, 0x642e0a66756e6374, 0x696f6e2074657874, - 0x28626c6f636b2c20, 0x6f66667365742c20, 0x6c656e6774682920, 0x7b0a20202020636f, 0x6e7374206669656c, - 0x64203d20626c6f63, 0x6b2e737562617272, 0x6179286f66667365, 0x742c206f66667365, 0x74202b206c656e67, - 0x7468293b0a202020, 0x20636f6e73742065, 0x6e64203d20666965, 0x6c642e696e646578, 0x4f662830293b0a20, - 0x2020207265747572, 0x6e20757466382e64, 0x65636f646528656e, 0x64203c2030203f20, 0x6669656c64203a20, - 0x6669656c642e7375, 0x6261727261792830, 0x2c20656e6429293b, 0x0a7d0a0a2f2f2041, 0x6e206f6374616c20, - 0x6e756d6265722c20, 0x6f72206120626173, 0x652d323536206f6e, 0x65207768656e2074, 0x6865206669727374, - 0x2062797465206861, 0x7320697473206869, 0x6768206269742073, 0x65742028474e5520, 0x616e642073746172, - 0x292e0a66756e6374, 0x696f6e206e756d62, 0x657228626c6f636b, 0x2c206f6666736574, 0x2c206c656e677468, - 0x29207b0a20202020, 0x69662028626c6f63, 0x6b5b6f6666736574, 0x5d20262030783830, 0x290a202020202020, - 0x202072657475726e, 0x20626c6f636b2e73, 0x7562617272617928, 0x6f6666736574202b, 0x20312c206f666673, - 0x6574202b206c656e, 0x677468292e726564, 0x756365282876616c, 0x75652c2062797465, 0x29203d3e2076616c, - 0x7565202a20323536, 0x202b20627974652c, 0x20626c6f636b5b6f, 0x66667365745d2026, 0x2030783766293b0a, - 0x20202020636f6e73, 0x7420646967697473, 0x203d207465787428, 0x626c6f636b2c206f, 0x66667365742c206c, - 0x656e677468292e74, 0x72696d28293b0a20, 0x2020206966202821, 0x2f5e5b302d375d2a, 0x242f2e7465737428, - 0x6469676974732929, 0x0a20202020202020, 0x207468726f77206e, 0x6577204572726f72, 0x2822436f72727570, - 0x7420746172206865, 0x6164657222293b0a, 0x2020202072657475, 0x726e206469676974, 0x73203d3d3d202222, - 0x203f2030203a2070, 0x61727365496e7428, 0x6469676974732c20, 0x38293b0a7d0a0a66, 0x756e6374696f6e20, - 0x7665726966794368, 0x65636b73756d2868, 0x656164657229207b, 0x0a202020206c6574, 0x2073756d203d2030, - 0x3b0a20202020666f, 0x7220286c65742069, 0x6e646578203d2030, 0x3b20696e64657820, 0x3c20626c6f636b53, - 0x697a653b202b2b69, 0x6e646578290a2020, 0x2020202020207375, 0x6d202b3d20696e64, 0x6578203e3d203134, - 0x3820262620696e64, 0x6578203c20313536, 0x203f203078323020, 0x3a20686561646572, 0x5b696e6465785d3b, - 0x0a20202020696620, 0x286e756d62657228, 0x6865616465722c20, 0x3134382c20382920, 0x213d3d2073756d29, - 0x0a20202020202020, 0x207468726f77206e, 0x6577204572726f72, 0x2822436f72727570, 0x7420746172206865, - 0x6164657220636865, 0x636b73756d22293b, 0x0a7d0a0a2f2f2022, 0x3c6c656e6774683e, 0x203c6b65793e3d3c, - 0x76616c75653e5c6e, 0x22207265636f7264, 0x73206f6620612070, 0x617820657874656e, 0x6465642068656164, - 0x65723b206c656e67, 0x74687320636f756e, 0x742062797465732e, 0x0a66756e6374696f, 0x6e20706178526563, - 0x6f72647328646174, 0x6129207b0a202020, 0x20636f6e73742072, 0x65636f726473203d, 0x207b7d3b0a202020, - 0x206c6574206f6666, 0x736574203d20303b, 0x0a20202020776869, 0x6c6520286f666673, 0x6574203c20646174, - 0x612e6c656e677468, 0x29207b0a20202020, 0x20202020636f6e73, 0x7420737061636520, 0x3d20646174612e69, - 0x6e6465784f662830, 0x7832302c206f6666, 0x736574293b0a2020, 0x202020202020636f, 0x6e7374206c656e67, - 0x7468203d20737061, 0x6365203c2030203f, 0x204e614e203a204e, 0x756d626572287574, 0x66382e6465636f64, - 0x6528646174612e73, 0x7562617272617928, 0x6f66667365742c20, 0x7370616365292929, 0x3b0a202020202020, - 0x2020696620282128, 0x6c656e677468203e, 0x203029207c7c206f, 0x6666736574202b20, 0x6c656e677468203e, - 0x20646174612e6c65, 0x6e677468290a2020, 0x2020202020202020, 0x20207468726f7720, 0x6e6577204572726f, - 0x722822436f727275, 0x7074207061782068, 0x656164657222293b, 0x0a20202020202020, 0x20636f6e73742072, - 0x65636f7264203d20, 0x757466382e646563, 0x6f64652864617461, 0x2e73756261727261, 0x7928737061636520, - 0x2b20312c206f6666, 0x736574202b206c65, 0x6e677468202d2031, 0x29293b0a20202020, 0x20202020636f6e73, - 0x7420657175616c73, 0x203d207265636f72, 0x642e696e6465784f, 0x6628223d22293b0a, 0x2020202020202020, - 0x7265636f7264735b, 0x7265636f72642e73, 0x6c69636528302c20, 0x657175616c73295d, 0x203d207265636f72, - 0x642e736c69636528, 0x657175616c73202b, 0x2031293b0a202020, 0x20202020206f6666, 0x736574202b3d206c, - 0x656e6774683b0a20, 0x2020207d0a202020, 0x2072657475726e20, 0x7265636f7264733b, 0x0a7d0a0a2f2f2054, - 0x686520656e747279, 0x2077686f73652068, 0x6561646572207374, 0x6172747320617420, 0x606f666673657460, - 0x3a20697473206865, 0x616465722c207479, 0x706520666c61672c, 0x206461746120616e, 0x6420746865206f66, - 0x66736574206f6620, 0x746865206e657874, 0x0a2f2f20656e7472, 0x792e0a66756e6374, 0x696f6e2072656164, - 0x456e747279286172, 0x63686976652c206f, 0x666673657429207b, 0x0a20202020636f6e, 0x7374206865616465, - 0x72203d2061726368, 0x6976652e73756261, 0x72726179286f6666, 0x7365742c206f6666, 0x736574202b20626c, - 0x6f636b53697a6529, 0x3b0a202020207665, 0x7269667943686563, 0x6b73756d28686561, 0x646572293b0a2020, - 0x2020636f6e737420, 0x73697a65203d206e, 0x756d626572286865, 0x616465722c203132, 0x342c203132293b0a, - 0x20202020636f6e73, 0x7420737461727420, 0x3d206f6666736574, 0x202b20626c6f636b, 0x53697a653b0a2020, - 0x2020696620287374, 0x617274202b207369, 0x7a65203e20617263, 0x686976652e6c656e, 0x677468290a202020, - 0x2020202020746872, 0x6f77206e65772045, 0x72726f7228225472, 0x756e636174656420, 0x7461722061726368, - 0x69766522293b0a20, 0x2020207265747572, 0x6e207b0a20202020, 0x2020202068656164, 0x65722c0a20202020, - 0x2020202074797065, 0x3a20686561646572, 0x5b3135365d203d3d, 0x3d2030203f202230, 0x22203a2053747269, - 0x6e672e66726f6d43, 0x686172436f646528, 0x6865616465725b31, 0x35365d292c0a2020, 0x2020202020206461, - 0x74613a2061726368, 0x6976652e73756261, 0x7272617928737461, 0x72742c2073746172, 0x74202b2073697a65, - 0x292c0a2020202020, 0x2020206e6578743a, 0x207374617274202b, 0x204d6174682e6365, 0x696c2873697a6520, - 0x2f20626c6f636b53, 0x697a6529202a2062, 0x6c6f636b53697a65, 0x2c0a202020207d3b, 0x0a7d0a0a2f2f2041, - 0x6e20617263686976, 0x6520656e64732061, 0x742074776f207a65, 0x726f20626c6f636b, 0x733b206f6e652069, - 0x7320656e6f756768, 0x20746f2073746f70, 0x2e0a66756e637469, 0x6f6e206973456e64, 0x2861726368697665, - 0x2c206f6666736574, 0x29207b0a20202020, 0x72657475726e206f, 0x6666736574202b20, 0x626c6f636b53697a, - 0x65203e2061726368, 0x6976652e6c656e67, 0x7468207c7c206172, 0x63686976652e7375, 0x626172726179286f, - 0x66667365742c206f, 0x6666736574202b20, 0x626c6f636b53697a, 0x65292e6576657279, 0x2828627974652920, - 0x3d3e206279746520, 0x3d3d3d2030293b0a, 0x7d0a0a2f2f205468, 0x65206e616d652066, 0x69656c64206f6620, - 0x6120757374617220, 0x6865616465722c20, 0x6166746572206974, 0x7320707265666978, 0x206669656c642e0a, - 0x66756e6374696f6e, 0x2068656164657250, 0x6174682868656164, 0x657229207b0a2020, 0x2020636f6e737420, - 0x6e616d65203d2074, 0x6578742868656164, 0x65722c20302c2031, 0x3030293b0a202020, 0x20636f6e73742070, - 0x7265666978203d20, 0x7465787428686561, 0x6465722c20323537, 0x2c203529203d3d3d, 0x2022757374617222, - 0x203f207465787428, 0x6865616465722c20, 0x3334352c20313535, 0x29203a2022223b0a, 0x2020202072657475, - 0x726e207072656669, 0x78203f2060247b70, 0x72656669787d2f24, 0x7b6e616d657d6020, 0x3a206e616d653b0a, - 0x7d0a0a2f2f20456e, 0x7472696573206e61, 0x6d696e6720746865, 0x206e657874206f6e, 0x653a206120706178, - 0x20657874656e6465, 0x6420686561646572, 0x20616e6420612047, 0x4e55206c6f6e6720, 0x6e616d652e204120, - 0x70617820676c6f62, 0x616c206865616465, 0x72206e616d65730a, 0x2f2f206e6f746869, 0x6e67205765624672, - 0x6f6e742075736573, 0x2e0a636f6e737420, 0x6e616d65456e7472, 0x696573203d207b0a, 0x20202020783a2028, - 0x6e616d65732c2064, 0x61746129203d3e20, 0x287b2e2e2e6e616d, 0x65732c207061783a, 0x207061785265636f, - 0x7264732864617461, 0x292e706174687d29, 0x2c0a202020204c3a, 0x20286e616d65732c, 0x206461746129203d, - 0x3e20287b2e2e2e6e, 0x616d65732c206c6f, 0x6e673a2074657874, 0x28646174612c2030, 0x2c20646174612e6c, - 0x656e677468297d29, 0x2c0a20202020673a, 0x20286e616d657329, 0x203d3e206e616d65, 0x732c0a7d3b0a0a2f, - 0x2f2f205265616473, 0x2061207461722061, 0x7263686976652028, 0x75737461722c2077, 0x6974682070617820, - 0x616e6420474e5520, 0x6c6f6e67206e616d, 0x65732920616e6420, 0x72657475726e7320, 0x6974732072656775, - 0x6c61722066696c65, 0x732061730a2f2f2f, 0x207b706174682c20, 0x62797465737d2c20, 0x696e206172636869, - 0x7665206f72646572, 0x2e20446972656374, 0x6f726965732c206c, 0x696e6b7320616e64, 0x206f746865722065, - 0x6e74726965732061, 0x726520736b697070, 0x65642e0a6578706f, 0x72742066756e6374, 0x696f6e2072656164, - 0x5461722861726368, 0x69766529207b0a20, 0x202020636f6e7374, 0x2066696c6573203d, 0x205b5d3b0a202020, - 0x206c6574206e616d, 0x6573203d207b7d3b, 0x0a20202020666f72, 0x20286c6574206f66, 0x66736574203d2030, - 0x3b20216973456e64, 0x2861726368697665, 0x2c206f6666736574, 0x293b29207b0a2020, 0x202020202020636f, - 0x6e7374207b686561, 0x6465722c20747970, 0x652c20646174612c, 0x206e6578747d203d, 0x2072656164456e74, - 0x7279286172636869, 0x76652c206f666673, 0x6574293b0a202020, 0x20202020206f6666, 0x736574203d206e65, - 0x78743b0a20202020, 0x2020202069662028, 0x4f626a6563742e68, 0x61734f776e286e61, 0x6d65456e74726965, - 0x732c207479706529, 0x29207b0a20202020, 0x2020202020202020, 0x6e616d6573203d20, 0x6e616d65456e7472, - 0x6965735b74797065, 0x5d286e616d65732c, 0x2064617461293b0a, 0x2020202020202020, 0x20202020636f6e74, - 0x696e75653b0a2020, 0x2020202020207d0a, 0x2020202020202020, 0x6966202874797065, 0x203d3d3d20223022, - 0x207c7c2074797065, 0x203d3d3d20223722, 0x290a202020202020, 0x2020202020206669, 0x6c65732e70757368, - 0x287b706174683a20, 0x6e616d65732e7061, 0x78203f3f206e616d, 0x65732e6c6f6e6720, 0x3f3f206865616465, - 0x7250617468286865, 0x61646572292c2062, 0x797465733a206461, 0x74617d293b0a2020, 0x2020202020206e61, - 0x6d6573203d207b7d, 0x3b0a202020207d0a, 0x2020202072657475, 0x726e2066696c6573, 0x3b0a7d0a0a2f2f2f, - 0x205468652066696c, 0x6573206f6620616e, 0x206e706d20746172, 0x62616c6c20627920, 0x706174682072656c, - 0x617469766520746f, 0x2074686520706163, 0x6b61676520726f6f, 0x743a207468652066, 0x6972737420706174, - 0x6820636f6d706f6e, 0x656e740a2f2f2f20, 0x286e6f726d616c6c, 0x7920227061636b61, 0x67652f2229206973, - 0x2072656d6f766564, 0x2c206173206e706d, 0x20646f65732e2041, 0x206c617465722065, 0x6e74727920726570, - 0x6c6163657320616e, 0x206561726c696572, 0x206f6e652e0a6675, 0x6e6374696f6e2070, 0x61636b6167654669, - 0x6c657328656e7472, 0x69657329207b0a20, 0x202020636f6e7374, 0x2066696c6573203d, 0x206e6577204d6170, - 0x28293b0a20202020, 0x666f722028636f6e, 0x7374207b70617468, 0x2c2062797465737d, 0x206f6620656e7472, - 0x69657329207b0a20, 0x2020202020202063, 0x6f6e73742072656c, 0x6174697665203d20, 0x706174682e726570, - 0x6c616365282f5e28, 0x5c2e3f5c2f292b2f, 0x2c202222292e7370, 0x6c697428222f2229, 0x2e736c6963652831, - 0x292e6a6f696e2822, 0x2f22293b0a202020, 0x2020202020696620, 0x2872656c61746976, 0x6520213d3d202222, - 0x290a202020202020, 0x2020202020206669, 0x6c65732e73657428, 0x72656c6174697665, 0x2c20627974657329, - 0x3b0a202020207d0a, 0x2020202072657475, 0x726e2066696c6573, 0x3b0a7d0a0a66756e, 0x6374696f6e207061, - 0x636b6167654a736f, 0x6e2866696c65732c, 0x206e616d652c2076, 0x657273696f6e2920, 0x7b0a20202020636f, - 0x6e7374206d616e69, 0x66657374203d2066, 0x696c65732e676574, 0x28227061636b6167, 0x652e6a736f6e2229, - 0x3b0a202020206966, 0x2028216d616e6966, 0x657374290a202020, 0x2020202020746872, 0x6f77206e65772045, - 0x72726f722860247b, 0x6e616d657d40247b, 0x76657273696f6e7d, 0x20686173206e6f20, 0x7061636b6167652e, - 0x6a736f6e60293b0a, 0x20202020636f6e73, 0x7420706b67203d20, 0x4a534f4e2e706172, 0x736528757466382e, - 0x6465636f6465286d, 0x616e696665737429, 0x293b0a2020202069, 0x662028706b672e6e, 0x616d6520213d3d20, - 0x6e616d65207c7c20, 0x706b672e76657273, 0x696f6e20213d3d20, 0x76657273696f6e29, 0x0a20202020202020, - 0x207468726f77206e, 0x6577204572726f72, 0x2860546865206172, 0x636869766520636f, 0x6e7461696e732024, - 0x7b706b672e6e616d, 0x657d40247b706b67, 0x2e76657273696f6e, 0x7d2c206e6f742024, 0x7b6e616d657d4024, - 0x7b76657273696f6e, 0x7d60293b0a202020, 0x2072657475726e20, 0x706b673b0a7d0a0a, 0x636f6e7374206973, - 0x546f6f6c203d2028, 0x6669656c6429203d, 0x3e206669656c643f, 0x2e6b696e64203d3d, 0x3d2022746f6f6c22, - 0x2026262074797065, 0x6f66206669656c64, 0x2e656e747279203d, 0x3d3d202273747269, 0x6e67223b0a0a6675, - 0x6e6374696f6e2074, 0x6f6f6c4f66286669, 0x6c65732c206e616d, 0x652c207665727369, 0x6f6e29207b0a2020, - 0x2020636f6e737420, 0x746f6f6c203d2070, 0x61636b6167654a73, 0x6f6e2866696c6573, 0x2c206e616d652c20, - 0x76657273696f6e29, 0x2e77656266726f6e, 0x743b0a2020202069, 0x662028216973546f, 0x6f6c28746f6f6c29, - 0x290a202020202020, 0x20207468726f7720, 0x6e6577204572726f, 0x722860247b6e616d, 0x657d206973206e6f, - 0x7420612057656246, 0x726f6e7420746f6f, 0x6c3a206974732070, 0x61636b6167652e6a, 0x736f6e2068617320, - 0x6e6f207765626672, 0x6f6e74206669656c, 0x642077697468206b, 0x696e642022746f6f, 0x6c2220616e642061, - 0x6e20656e74727960, 0x293b0a2020202072, 0x657475726e207b65, 0x6e7472793a20746f, 0x6f6c2e656e747279, - 0x2e7265706c616365, 0x282f5e285c2e5c2f, 0x292b2f2c20222229, 0x2c207469746c653a, 0x20747970656f6620, - 0x746f6f6c2e746974, 0x6c65203d3d3d2022, 0x737472696e672220, 0x3f20746f6f6c2e74, 0x69746c65203a206e, - 0x616d657d3b0a7d0a, 0x0a636f6e73742070, 0x6b6746756e637469, 0x6f6e203d20286272, 0x696467652c206e61, - 0x6d6529203d3e2062, 0x72696467652e6370, 0x7046756e6374696f, 0x6e28607765626672, 0x6f6e742e706b672e, - 0x247b6e616d657d60, 0x293b0a0a2f2f2f20, 0x4f7074696f6e7320, 0x7368617265642062, 0x7920736561726368, - 0x282920616e642069, 0x6e7374616c6c2829, 0x3a0a2f2f2f202020, 0x6272696467652020, 0x2020746865205765, - 0x6246726f6e742062, 0x7269646765202867, 0x6c6f62616c546869, 0x732e77656246726f, 0x6e74290a2f2f2f20, - 0x2020726567697374, 0x7279202074686520, 0x6e706d2072656769, 0x737472792055524c, 0x202864656661756c, - 0x743a207765626672, 0x6f6e742e706b672e, 0x7265676973747279, 0x28292c2073657420, 0x696e20546f6f6c4d, - 0x616e616765724f70, 0x74696f6e73290a2f, 0x2f2f202020666574, 0x6368202020202074, 0x6865206665746368, - 0x2066756e6374696f, 0x6e0a2f2f2f202020, 0x7369676e616c2020, 0x2020616e2041626f, 0x72745369676e616c, - 0x2073746f7070696e, 0x672074686520646f, 0x776e6c6f61647320, 0x616e642074686520, 0x75706c6f61640a61, - 0x73796e632066756e, 0x6374696f6e207365, 0x7474696e6773287b, 0x627269646765203d, 0x20676c6f62616c54, - 0x6869732e77656246, 0x726f6e742c207265, 0x6769737472792c20, 0x66657463683a2066, 0x65746368496d706c, - 0x203d20282e2e2e61, 0x72677329203d3e20, 0x676c6f62616c5468, 0x69732e6665746368, 0x282e2e2e61726773, - 0x292c207369676e61, 0x6c7d203d207b7d29, 0x207b0a2020202072, 0x657475726e207b62, 0x72696467652c2066, - 0x65746368496d706c, 0x2c207369676e616c, 0x2c20626173653a20, 0x7265676973747279, 0x4261736528726567, - 0x6973747279203f3f, 0x2028617761697420, 0x706b6746756e6374, 0x696f6e2862726964, 0x67652c2022726567, - 0x6973747279222928, 0x2929297d3b0a7d0a, 0x0a2f2f2f20536561, 0x7263686573207468, 0x6520726567697374, - 0x727920666f722070, 0x61636b6167657320, 0x7769746820746865, 0x2077656266726f6e, 0x742d746f6f6c206b, - 0x6579776f72642e20, 0x52657475726e7320, 0x7b6e616d652c2076, 0x657273696f6e2c0a, 0x2f2f2f2064657363, - 0x72697074696f6e7d, 0x206f626a65637473, 0x2e0a6578706f7274, 0x206173796e632066, 0x756e6374696f6e20, - 0x7365617263682874, 0x65726d2c206f7074, 0x696f6e7329207b0a, 0x20202020636f6e73, 0x74207b6665746368, - 0x496d706c2c207369, 0x676e616c2c206261, 0x73657d203d206177, 0x6169742073657474, 0x696e6773286f7074, - 0x696f6e73293b0a20, 0x202020636f6e7374, 0x2075726c203d206e, 0x65772055524c2822, 0x2d2f76312f736561, - 0x726368222c206261, 0x7365293b0a202020, 0x2075726c2e736561, 0x726368506172616d, 0x732e736574282274, - 0x657874222c20606b, 0x6579776f7264733a, 0x77656266726f6e74, 0x2d746f6f6c20247b, 0x7465726d7d602e74, - 0x72696d2829293b0a, 0x2020202075726c2e, 0x7365617263685061, 0x72616d732e736574, 0x282273697a65222c, - 0x2022323022293b0a, 0x20202020636f6e73, 0x7420726573756c74, 0x203d206177616974, 0x2066657463684a73, - 0x6f6e2875726c2c20, 0x6665746368496d70, 0x6c2c207369676e61, 0x6c293b0a20202020, 0x72657475726e2028, - 0x726573756c742e6f, 0x626a65637473203f, 0x3f205b5d292e6d61, 0x7028287b7061636b, 0x6167653a20666f75, - 0x6e647d29203d3e20, 0x287b0a2020202020, 0x2020206e616d653a, 0x20666f756e642e6e, 0x616d652c0a202020, - 0x2020202020766572, 0x73696f6e3a20666f, 0x756e642e76657273, 0x696f6e2c0a202020, 0x2020202020646573, - 0x6372697074696f6e, 0x3a20666f756e642e, 0x6465736372697074, 0x696f6e203f3f2022, 0x222c0a202020207d, - 0x29293b0a7d0a0a2f, 0x2f20446f776e6c6f, 0x6164732074686520, 0x74617262616c6c20, 0x6f662061206d616e, - 0x696665737420616e, 0x642072657475726e, 0x7320697473206669, 0x6c65732077697468, 0x2074686520766572, - 0x696669656420696e, 0x746567726974792e, 0x0a6173796e632066, 0x756e6374696f6e20, 0x646f776e6c6f6164, - 0x286d616e69666573, 0x742c207061636b75, 0x6d656e744c6f6361, 0x74696f6e2c206665, 0x746368496d706c2c, - 0x207369676e616c29, 0x207b0a2020202063, 0x6f6e737420746172, 0x62616c6c55726c20, 0x3d206e6577205552, - 0x4c286d616e696665, 0x73742e646973743f, 0x2e74617262616c6c, 0x203f3f2022222c20, 0x7061636b756d656e, - 0x744c6f636174696f, 0x6e293b0a20202020, 0x636f6e7374207461, 0x7262616c6c203d20, 0x6e65772055696e74, - 0x3841727261792861, 0x7761697420286177, 0x6169742066657463, 0x684f6b2874617262, 0x616c6c55726c2c20, - 0x6665746368496d70, 0x6c2c207369676e61, 0x6c29292e61727261, 0x7942756666657228, 0x29293b0a20202020, - 0x636f6e737420696e, 0x7465677269747920, 0x3d20617761697420, 0x766572696679496e, 0x7465677269747928, - 0x74617262616c6c2c, 0x206d616e69666573, 0x742e646973743f2e, 0x696e746567726974, 0x79293b0a20202020, - 0x72657475726e207b, 0x696e746567726974, 0x792c2066696c6573, 0x3a207061636b6167, 0x6546696c65732872, - 0x6561645461722861, 0x776169742067756e, 0x7a69702874617262, 0x616c6c2929297d3b, 0x0a7d0a0a2f2f2053, - 0x656e647320746865, 0x2066696c65732074, 0x6f2077656266726f, 0x6e742e706b672e77, 0x7269746546696c65, - 0x20696e206368756e, 0x6b733b20616e2065, 0x6d7074792066696c, 0x652069732073656e, 0x74206173206f6e65, - 0x20656d7074792063, 0x68756e6b2e0a6173, 0x796e632066756e63, 0x74696f6e2075706c, 0x6f61642866696c65, - 0x732c207b62726964, 0x67652c206e616d65, 0x2c2076657273696f, 0x6e2c207369676e61, 0x6c7d29207b0a2020, - 0x2020636f6e737420, 0x777269746546696c, 0x65203d20706b6746, 0x756e6374696f6e28, 0x6272696467652c20, - 0x2277726974654669, 0x6c6522293b0a2020, 0x2020666f72202863, 0x6f6e7374205b7061, 0x74682c2062797465, - 0x735d206f66206669, 0x6c657329207b0a20, 0x202020202020206c, 0x6574206f66667365, 0x74203d20303b0a20, - 0x2020202020202064, 0x6f207b0a20202020, 0x2020202020202020, 0x7369676e616c3f2e, 0x7468726f77496641, - 0x626f727465642829, 0x3b0a202020202020, 0x202020202020636f, 0x6e7374206368756e, 0x6b203d2062797465, - 0x732e737562617272, 0x6179286f66667365, 0x742c206f66667365, 0x74202b206368756e, 0x6b53697a65293b0a, - 0x2020202020202020, 0x2020202061776169, 0x7420777269746546, 0x696c65286e616d65, 0x2c2076657273696f, - 0x6e2c20706174682c, 0x206f66667365742c, 0x206368756e6b293b, 0x0a20202020202020, 0x20202020206f6666, - 0x736574202b3d2063, 0x68756e6b2e6c656e, 0x6774683b0a202020, 0x20202020207d2077, 0x68696c6520286f66, - 0x66736574203c2062, 0x797465732e6c656e, 0x677468293b0a2020, 0x20207d0a7d0a0a2f, 0x2f2f20446f776e6c, - 0x6f6164732c207665, 0x7269666965732061, 0x6e642073746f7265, 0x7320226e616d655b, 0x4076657273696f6e, - 0x206f722064697374, 0x2d7461675d222028, 0x6c61746573742062, 0x792064656661756c, 0x74292e206070726f, - 0x6772657373287465, 0x787429600a2f2f2f, 0x207265706f727473, 0x2074686520737465, 0x70732e205265736f, - 0x6c76657320746f20, 0x7b6e616d652c2076, 0x657273696f6e2c20, 0x7469746c652c2065, 0x6e7472792c206669, - 0x6c65737d3b207265, 0x6a65637473207769, 0x74686f7574206368, 0x616e67696e672074, 0x68650a2f2f2f2069, - 0x6e7374616c6c6564, 0x2076657273696f6e, 0x207768656e20616e, 0x797468696e672066, 0x61696c73206f7220, - 0x607369676e616c60, 0x2069732061626f72, 0x7465642e0a657870, 0x6f7274206173796e, 0x632066756e637469, - 0x6f6e20696e737461, 0x6c6c28737065632c, 0x207b70726f677265, 0x7373203d20282920, 0x3d3e207b7d2c202e, - 0x2e2e6f7074696f6e, 0x737d203d207b7d29, 0x207b0a2020202063, 0x6f6e7374207b6e61, 0x6d652c2076657273, - 0x696f6e3a20726571, 0x7565737465647d20, 0x3d20706172736553, 0x7065632873706563, 0x293b0a2020202063, - 0x6f6e7374207b6272, 0x696467652c206665, 0x746368496d706c2c, 0x207369676e616c2c, 0x20626173657d203d, - 0x2061776169742073, 0x657474696e677328, 0x6f7074696f6e7329, 0x3b0a20202020636f, 0x6e7374207061636b, - 0x756d656e744c6f63, 0x6174696f6e203d20, 0x7061636b756d656e, 0x7455726c28626173, 0x652c206e616d6529, - 0x3b0a20202020636f, 0x6e7374206d616e69, 0x66657374203d2072, 0x65736f6c76654d61, 0x6e69666573742861, - 0x7761697420666574, 0x63684a736f6e2870, 0x61636b756d656e74, 0x4c6f636174696f6e, 0x2c20666574636849, - 0x6d706c2c20736967, 0x6e616c292c206e61, 0x6d652c2072657175, 0x6573746564293b0a, 0x20202020636f6e73, - 0x74207b7665727369, 0x6f6e7d203d206d61, 0x6e69666573743b0a, 0x2020202070726f67, 0x726573732860446f, - 0x776e6c6f6164696e, 0x6720247b6e616d65, 0x7d40247b76657273, 0x696f6e7de280a660, 0x293b0a2020202063, - 0x6f6e7374207b696e, 0x746567726974792c, 0x2066696c65737d20, 0x3d20617761697420, 0x646f776e6c6f6164, - 0x286d616e69666573, 0x742c207061636b75, 0x6d656e744c6f6361, 0x74696f6e2c206665, 0x746368496d706c2c, - 0x207369676e616c29, 0x3b0a20202020636f, 0x6e7374207b656e74, 0x72792c207469746c, 0x657d203d20746f6f, - 0x6c4f662866696c65, 0x732c206e616d652c, 0x2076657273696f6e, 0x293b0a2020202069, 0x6620282166696c65, - 0x732e68617328656e, 0x74727929290a2020, 0x2020202020207468, 0x726f77206e657720, 0x4572726f72286054, - 0x686520656e747279, 0x207061676520247b, 0x656e7472797d206f, 0x6620247b6e616d65, 0x7d206973206e6f74, - 0x20696e2074686520, 0x7061636b61676560, 0x293b0a0a20202020, 0x70726f6772657373, 0x2860496e7374616c, - 0x6c696e6720247b66, 0x696c65732e73697a, 0x657d2066696c6573, 0xe280a660293b0a20, 0x2020206177616974, - 0x20706b6746756e63, 0x74696f6e28627269, 0x6467652c20226265, 0x67696e2229286e61, 0x6d652c2076657273, - 0x696f6e293b0a2020, 0x2020617761697420, 0x75706c6f61642866, 0x696c65732c207b62, 0x72696467652c206e, - 0x616d652c20766572, 0x73696f6e2c207369, 0x676e616c7d293b0a, 0x202020207369676e, 0x616c3f2e7468726f, - 0x77496641626f7274, 0x656428293b0a2020, 0x2020617761697420, 0x706b6746756e6374, 0x696f6e2862726964, - 0x67652c2022636f6d, 0x6d69742229286e61, 0x6d652c2076657273, 0x696f6e2c20696e74, 0x6567726974792c20, - 0x656e7472792c2074, 0x69746c65293b0a20, 0x2020207265747572, 0x6e207b6e616d652c, 0x2076657273696f6e, - 0x2c207469746c652c, 0x20656e7472792c20, 0x66696c65733a2066, 0x696c65732e73697a, 0x657d3b0a7d0a0a2f, - 0x2f2f205468652069, 0x6e7374616c6c6564, 0x20746f6f6c732c20, 0x66726f6d20746865, 0x207061676573206f, - 0x662077656266726f, 0x6e742e706b672e6c, 0x69737428293a207b, 0x6e616d652c207665, 0x7273696f6e2c2075, - 0x726c2c207469746c, 0x657d206f626a6563, 0x74732e0a6578706f, 0x7274206173796e63, 0x2066756e6374696f, - 0x6e20696e7374616c, 0x6c65642862726964, 0x6765203d20676c6f, 0x62616c546869732e, 0x77656246726f6e74, - 0x29207b0a20202020, 0x636f6e7374206c69, 0x7374203d20706b67, 0x46756e6374696f6e, 0x286272696467652c, - 0x20226c6973742229, 0x3b0a20202020636f, 0x6e737420746f6f6c, 0x73203d205b5d3b0a, 0x20202020666f7220, - 0x283b3b29207b0a20, 0x2020202020202063, 0x6f6e7374206c696e, 0x6573203d20286177, 0x616974206c697374, - 0x28746f6f6c732e6c, 0x656e67746829292e, 0x73706c697428225c, 0x6e22292e66696c74, 0x657228286c696e65, - 0x29203d3e206c696e, 0x6520213d3d202222, 0x293b0a2020202020, 0x202020696620286c, 0x696e65732e6c656e, - 0x677468203d3d3d20, 0x30290a2020202020, 0x2020202020202072, 0x657475726e20746f, 0x6f6c733b0a202020, - 0x2020202020666f72, 0x2028636f6e737420, 0x6c696e65206f6620, 0x6c696e657329207b, 0x0a20202020202020, - 0x2020202020636f6e, 0x7374205b6e616d65, 0x2c2076657273696f, 0x6e2c2075726c2c20, 0x7469746c655d203d, - 0x206c696e652e7370, 0x6c697428225c7422, 0x293b0a2020202020, 0x2020202020202074, 0x6f6f6c732e707573, - 0x68287b6e616d652c, 0x2076657273696f6e, 0x2c2075726c2c2074, 0x69746c657d293b0a, 0x2020202020202020, - 0x7d0a202020207d0a, 0x7d0a0a2f2f2f204f, 0x70656e7320746865, 0x20656e7472792070, 0x616765206f662061, - 0x6e20696e7374616c, 0x6c656420746f6f6c, 0x20696e2061206e65, 0x7720746162206f72, 0x2077696e646f772c, - 0x20616e6420726573, 0x6f6c76657320746f, 0x206974732055524c, 0x2e0a6578706f7274, 0x206173796e632066, - 0x756e6374696f6e20, 0x6f70656e286e616d, 0x652c206272696467, 0x65203d20676c6f62, 0x616c546869732e77, - 0x656246726f6e7429, 0x207b0a2020202063, 0x6f6e737420746f6f, 0x6c203d2028617761, 0x697420696e737461, - 0x6c6c656428627269, 0x64676529292e6669, 0x6e64282863616e64, 0x696461746529203d, 0x3e2063616e646964, - 0x6174652e6e616d65, 0x203d3d3d206e616d, 0x65293b0a20202020, 0x6966202821746f6f, 0x6c290a2020202020, - 0x2020207468726f77, 0x206e657720457272, 0x6f722860247b6e61, 0x6d657d206973206e, 0x6f7420696e737461, - 0x6c6c656460293b0a, 0x2020202072657475, 0x726e207b2e2e2e74, 0x6f6f6c2c206f7065, 0x6e65643a20676c6f, - 0x62616c546869732e, 0x6f70656e28746f6f, 0x6c2e75726c2c2022, 0x5f626c616e6b2229, 0x20213d3d206e756c, - 0x6c7d3b0a7d0a0a66, 0x756e6374696f6e20, 0x726571756972654f, 0x6e65286172677329, 0x207b0a2020202069, - 0x662028617267732e, 0x6c656e6774682021, 0x3d3d2031290a2020, 0x2020202020207468, 0x726f77206e657720, - 0x4572726f72282257, 0x726f6e67206e756d, 0x626572206f662061, 0x7267756d656e7473, 0x2e20547970652027, - 0x77662068656c7027, 0x2e22293b0a202020, 0x2072657475726e20, 0x617267735b305d3b, 0x0a7d0a0a66756e63, - 0x74696f6e20666f72, 0x6d6174466f756e64, 0x28666f756e642920, 0x7b0a202020206966, 0x2028666f756e642e, - 0x6c656e677468203d, 0x3d3d2030290a2020, 0x2020202020207265, 0x7475726e20224e6f, 0x20746f6f6c20666f, - 0x756e642e223b0a20, 0x202020636f6e7374, 0x207769647468203d, 0x204d6174682e6d61, 0x78282e2e2e666f75, - 0x6e642e6d61702828, 0x7b6e616d652c2076, 0x657273696f6e7d29, 0x203d3e206e616d65, 0x2e6c656e67746820, - 0x2b2076657273696f, 0x6e2e6c656e677468, 0x202b203129293b0a, 0x2020202072657475, 0x726e20666f756e64, - 0x2e6d617028287b6e, 0x616d652c20766572, 0x73696f6e2c206465, 0x736372697074696f, 0x6e7d29203d3e2060, - 0x247b6e616d657d40, 0x247b76657273696f, 0x6e7d602e70616445, 0x6e64287769647468, 0x202b203229202b20, - 0x6465736372697074, 0x696f6e292e6a6f69, 0x6e28225c6e22293b, 0x0a7d0a0a2f2f2054, 0x6865207766207375, - 0x62636f6d6d616e64, 0x732072756e6e696e, 0x6720696e20746865, 0x2062726f77736572, 0x3b20277766206c69, - 0x7374272c20277766, 0x2072656d6f766527, 0x20616e6420277766, 0x2068656c70272072, 0x756e20696e20432b, - 0x2b2e0a636f6e7374, 0x20737562636f6d6d, 0x616e6473203d207b, 0x0a20202020736561, 0x7263683a20617379, - 0x6e63202861726773, 0x2c207b6272696467, 0x652c207369676e61, 0x6c7d29203d3e2066, 0x6f726d6174466f75, - 0x6e64286177616974, 0x2073656172636828, 0x617267732e6a6f69, 0x6e28222022292c20, 0x7b6272696467652c, - 0x207369676e616c7d, 0x29292c0a20202020, 0x696e7374616c6c3a, 0x206173796e632028, 0x617267732c207b62, - 0x72696467652c2073, 0x69676e616c2c2077, 0x726974657d29203d, 0x3e207b0a20202020, 0x20202020636f6e73, - 0x7420746f6f6c203d, 0x2061776169742069, 0x6e7374616c6c2872, 0x6571756972654f6e, 0x652861726773292c, - 0x207b627269646765, 0x2c207369676e616c, 0x2c2070726f677265, 0x73733a2028737465, 0x7029203d3e207772, - 0x6974652873746570, 0x202b20225c6e2229, 0x7d293b0a20202020, 0x2020202072657475, 0x726e2060496e7374, - 0x616c6c656420247b, 0x746f6f6c2e6e616d, 0x657d40247b746f6f, 0x6c2e76657273696f, 0x6e7d3a20247b746f, - 0x6f6c2e7469746c65, 0x7d2e205479706520, 0x277766206f70656e, 0x20247b746f6f6c2e, 0x6e616d657d272e60, - 0x3b0a202020207d2c, 0x0a202020206f7065, 0x6e3a206173796e63, 0x2028617267732c20, 0x7b6272696467657d, - 0x29203d3e207b0a20, 0x2020202020202063, 0x6f6e737420746f6f, 0x6c203d2061776169, 0x74206f70656e2872, - 0x6571756972654f6e, 0x652861726773292c, 0x2062726964676529, 0x3b0a202020202020, 0x202072657475726e, - 0x20746f6f6c2e6f70, 0x656e6564203f2060, 0x4f70656e65642024, 0x7b746f6f6c2e7469, 0x746c657d3a20247b, - 0x746f6f6c2e75726c, 0x7d60203a20605468, 0x652062726f777365, 0x7220626c6f636b65, 0x6420746865206e65, - 0x772077696e646f77, 0x2e204f70656e2024, 0x7b746f6f6c2e7572, 0x6c7d603b0a202020, 0x207d2c0a7d3b0a0a, - 0x6173796e63206675, 0x6e6374696f6e2077, 0x66285b636f6d6d61, 0x6e642c202e2e2e61, 0x7267735d2c20636f, - 0x6e7465787429207b, 0x0a20202020726574, 0x75726e204f626a65, 0x63742e6861734f77, 0x6e28737562636f6d, - 0x6d616e64732c2063, 0x6f6d6d616e642920, 0x3f20737562636f6d, 0x6d616e64735b636f, 0x6d6d616e645d2861, - 0x7267732c20636f6e, 0x7465787429203a20, 0x756e646566696e65, 0x643b0a7d0a0a2f2f, 0x2f205465726d696e, - 0x616c2062726f7773, 0x657220636f6d6d61, 0x6e64732028736565, 0x205465726d696e61, 0x6c3a3a657874656e, - 0x73696f6e292e0a65, 0x78706f727420636f, 0x6e737420636f6d6d, 0x616e6473203d207b, 0x77667d3b0a000000 - }; -}; - -} // namespace webfront::fs::generated diff --git a/include/ApplicationOrigin.hpp b/include/webfront/ApplicationOrigin.hpp similarity index 100% rename from include/ApplicationOrigin.hpp rename to include/webfront/ApplicationOrigin.hpp diff --git a/include/ContentPolicy.hpp b/include/webfront/ContentPolicy.hpp similarity index 100% rename from include/ContentPolicy.hpp rename to include/webfront/ContentPolicy.hpp diff --git a/include/DeveloperApp.hpp b/include/webfront/DeveloperApp.hpp similarity index 100% rename from include/DeveloperApp.hpp rename to include/webfront/DeveloperApp.hpp diff --git a/include/JsFunction.hpp b/include/webfront/JsFunction.hpp similarity index 100% rename from include/JsFunction.hpp rename to include/webfront/JsFunction.hpp diff --git a/include/JsFunctionSender.hpp b/include/webfront/JsFunctionSender.hpp similarity index 100% rename from include/JsFunctionSender.hpp rename to include/webfront/JsFunctionSender.hpp diff --git a/include/Task.hpp b/include/webfront/Task.hpp similarity index 100% rename from include/Task.hpp rename to include/webfront/Task.hpp diff --git a/include/UISubscribers.hpp b/include/webfront/UISubscribers.hpp similarity index 100% rename from include/UISubscribers.hpp rename to include/webfront/UISubscribers.hpp diff --git a/include/WebFront.hpp b/include/webfront/WebFront.hpp similarity index 100% rename from include/WebFront.hpp rename to include/webfront/WebFront.hpp diff --git a/include/components/Terminal.hpp b/include/webfront/components/Terminal.hpp similarity index 100% rename from include/components/Terminal.hpp rename to include/webfront/components/Terminal.hpp diff --git a/include/components/ToolManager.hpp b/include/webfront/components/ToolManager.hpp similarity index 100% rename from include/components/ToolManager.hpp rename to include/webfront/components/ToolManager.hpp diff --git a/include/details/C++20Support.hpp b/include/webfront/details/C++20Support.hpp similarity index 100% rename from include/details/C++20Support.hpp rename to include/webfront/details/C++20Support.hpp diff --git a/include/details/C++23Support.hpp b/include/webfront/details/C++23Support.hpp similarity index 100% rename from include/details/C++23Support.hpp rename to include/webfront/details/C++23Support.hpp diff --git a/include/frontend/Action.hpp b/include/webfront/frontend/Action.hpp similarity index 100% rename from include/frontend/Action.hpp rename to include/webfront/frontend/Action.hpp diff --git a/include/frontend/CEF.hpp b/include/webfront/frontend/CEF.hpp similarity index 100% rename from include/frontend/CEF.hpp rename to include/webfront/frontend/CEF.hpp diff --git a/include/frontend/CEFPaths.hpp b/include/webfront/frontend/CEFPaths.hpp similarity index 100% rename from include/frontend/CEFPaths.hpp rename to include/webfront/frontend/CEFPaths.hpp diff --git a/include/frontend/DefaultBrowser.hpp b/include/webfront/frontend/DefaultBrowser.hpp similarity index 100% rename from include/frontend/DefaultBrowser.hpp rename to include/webfront/frontend/DefaultBrowser.hpp diff --git a/include/frontend/Frontend.hpp b/include/webfront/frontend/Frontend.hpp similarity index 100% rename from include/frontend/Frontend.hpp rename to include/webfront/frontend/Frontend.hpp diff --git a/include/frontend/NativeWebView.hpp b/include/webfront/frontend/NativeWebView.hpp similarity index 100% rename from include/frontend/NativeWebView.hpp rename to include/webfront/frontend/NativeWebView.hpp diff --git a/include/frontend/Url.hpp b/include/webfront/frontend/Url.hpp similarity index 100% rename from include/frontend/Url.hpp rename to include/webfront/frontend/Url.hpp diff --git a/include/frontend/WKWebView.hpp b/include/webfront/frontend/WKWebView.hpp similarity index 100% rename from include/frontend/WKWebView.hpp rename to include/webfront/frontend/WKWebView.hpp diff --git a/include/frontend/WebKitGTK.hpp b/include/webfront/frontend/WebKitGTK.hpp similarity index 100% rename from include/frontend/WebKitGTK.hpp rename to include/webfront/frontend/WebKitGTK.hpp diff --git a/include/frontend/WebKitGTKPolicy.hpp b/include/webfront/frontend/WebKitGTKPolicy.hpp similarity index 100% rename from include/frontend/WebKitGTKPolicy.hpp rename to include/webfront/frontend/WebKitGTKPolicy.hpp diff --git a/include/frontend/WebView2.hpp b/include/webfront/frontend/WebView2.hpp similarity index 100% rename from include/frontend/WebView2.hpp rename to include/webfront/frontend/WebView2.hpp diff --git a/include/http/AcceptEncoding.hpp b/include/webfront/http/AcceptEncoding.hpp similarity index 100% rename from include/http/AcceptEncoding.hpp rename to include/webfront/http/AcceptEncoding.hpp diff --git a/include/http/BuffersPolicy.hpp b/include/webfront/http/BuffersPolicy.hpp similarity index 100% rename from include/http/BuffersPolicy.hpp rename to include/webfront/http/BuffersPolicy.hpp diff --git a/include/http/Encodings.hpp b/include/webfront/http/Encodings.hpp similarity index 100% rename from include/http/Encodings.hpp rename to include/webfront/http/Encodings.hpp diff --git a/include/http/Gzip.hpp b/include/webfront/http/Gzip.hpp similarity index 100% rename from include/http/Gzip.hpp rename to include/webfront/http/Gzip.hpp diff --git a/include/http/HTTPServer.hpp b/include/webfront/http/HTTPServer.hpp similarity index 100% rename from include/http/HTTPServer.hpp rename to include/webfront/http/HTTPServer.hpp diff --git a/include/http/MimeType.hpp b/include/webfront/http/MimeType.hpp similarity index 100% rename from include/http/MimeType.hpp rename to include/webfront/http/MimeType.hpp diff --git a/include/http/WebSocket.hpp b/include/webfront/http/WebSocket.hpp similarity index 100% rename from include/http/WebSocket.hpp rename to include/webfront/http/WebSocket.hpp diff --git a/include/networking/BasicNetworking.hpp b/include/webfront/networking/BasicNetworking.hpp similarity index 100% rename from include/networking/BasicNetworking.hpp rename to include/webfront/networking/BasicNetworking.hpp diff --git a/include/networking/NetworkingMock.hpp b/include/webfront/networking/NetworkingMock.hpp similarity index 100% rename from include/networking/NetworkingMock.hpp rename to include/webfront/networking/NetworkingMock.hpp diff --git a/include/networking/SenderHeaders.hpp b/include/webfront/networking/SenderHeaders.hpp similarity index 100% rename from include/networking/SenderHeaders.hpp rename to include/webfront/networking/SenderHeaders.hpp diff --git a/include/networking/TCPNetworkingStdnet.hpp b/include/webfront/networking/TCPNetworkingStdnet.hpp similarity index 100% rename from include/networking/TCPNetworkingStdnet.hpp rename to include/webfront/networking/TCPNetworkingStdnet.hpp diff --git a/include/networking/TCPSockets.hpp b/include/webfront/networking/TCPSockets.hpp similarity index 100% rename from include/networking/TCPSockets.hpp rename to include/webfront/networking/TCPSockets.hpp diff --git a/include/networking/Tasks.hpp b/include/webfront/networking/Tasks.hpp similarity index 100% rename from include/networking/Tasks.hpp rename to include/webfront/networking/Tasks.hpp diff --git a/include/system/BabelData.hpp b/include/webfront/system/BabelData.hpp similarity index 100% rename from include/system/BabelData.hpp rename to include/webfront/system/BabelData.hpp diff --git a/include/system/BabelFS.hpp b/include/webfront/system/BabelFS.hpp similarity index 100% rename from include/system/BabelFS.hpp rename to include/webfront/system/BabelFS.hpp diff --git a/include/system/DefaultFS.hpp b/include/webfront/system/DefaultFS.hpp similarity index 100% rename from include/system/DefaultFS.hpp rename to include/webfront/system/DefaultFS.hpp diff --git a/include/system/DeveloperBootstrapData.hpp b/include/webfront/system/DeveloperBootstrapData.hpp similarity index 100% rename from include/system/DeveloperBootstrapData.hpp rename to include/webfront/system/DeveloperBootstrapData.hpp diff --git a/include/system/DeveloperFS.hpp b/include/webfront/system/DeveloperFS.hpp similarity index 100% rename from include/system/DeveloperFS.hpp rename to include/webfront/system/DeveloperFS.hpp diff --git a/include/system/DeveloperFiles.hpp b/include/webfront/system/DeveloperFiles.hpp similarity index 100% rename from include/system/DeveloperFiles.hpp rename to include/webfront/system/DeveloperFiles.hpp diff --git a/include/system/DeveloperIndexHtmlData.hpp b/include/webfront/system/DeveloperIndexHtmlData.hpp similarity index 100% rename from include/system/DeveloperIndexHtmlData.hpp rename to include/webfront/system/DeveloperIndexHtmlData.hpp diff --git a/include/system/DeveloperPaths.hpp b/include/webfront/system/DeveloperPaths.hpp similarity index 100% rename from include/system/DeveloperPaths.hpp rename to include/webfront/system/DeveloperPaths.hpp diff --git a/include/webfront/system/DeveloperReleaseData.hpp b/include/webfront/system/DeveloperReleaseData.hpp new file mode 100644 index 00000000..eed7156a --- /dev/null +++ b/include/webfront/system/DeveloperReleaseData.hpp @@ -0,0 +1,10 @@ +#pragma once + +// Pinned developer distribution. Regenerate with js/developer/tools/build.mjs --refresh-bootstrap. +#include + +namespace webfront::developer::release { +inline constexpr std::string_view version{"0.4.1"}; +inline constexpr std::string_view environment{"https://ambroise-leclerc.github.io/WebFront/developer/0.4.1/environment.tgz"}; +inline constexpr std::string_view integrity{"sha512-GFvk1FWIVWBWAXLzJUEmaKo1CIMS82FZdhZyd/q8qE3/FA8CcxFN7G/u4gpQJNMJ9R1PKKLV0UXd2uuk08y0AA=="}; +} // namespace webfront::developer::release diff --git a/include/system/DeveloperStore.hpp b/include/webfront/system/DeveloperStore.hpp similarity index 100% rename from include/system/DeveloperStore.hpp rename to include/webfront/system/DeveloperStore.hpp diff --git a/include/system/FallbackIndexHtmlData.hpp b/include/webfront/system/FallbackIndexHtmlData.hpp similarity index 100% rename from include/system/FallbackIndexHtmlData.hpp rename to include/webfront/system/FallbackIndexHtmlData.hpp diff --git a/include/system/FallbackModuleData.hpp b/include/webfront/system/FallbackModuleData.hpp similarity index 100% rename from include/system/FallbackModuleData.hpp rename to include/webfront/system/FallbackModuleData.hpp diff --git a/include/system/FileSystem.hpp b/include/webfront/system/FileSystem.hpp similarity index 99% rename from include/system/FileSystem.hpp rename to include/webfront/system/FileSystem.hpp index e447d01d..a484b212 100644 --- a/include/system/FileSystem.hpp +++ b/include/webfront/system/FileSystem.hpp @@ -4,7 +4,7 @@ #pragma once #include "../details/C++23Support.hpp" -#include "tooling/Logger.hpp" +#include #include #include diff --git a/include/system/IndexFS.hpp b/include/webfront/system/IndexFS.hpp similarity index 100% rename from include/system/IndexFS.hpp rename to include/webfront/system/IndexFS.hpp diff --git a/include/system/JasmineBootData.hpp b/include/webfront/system/JasmineBootData.hpp similarity index 100% rename from include/system/JasmineBootData.hpp rename to include/webfront/system/JasmineBootData.hpp diff --git a/include/system/JasmineCssData.hpp b/include/webfront/system/JasmineCssData.hpp similarity index 100% rename from include/system/JasmineCssData.hpp rename to include/webfront/system/JasmineCssData.hpp diff --git a/include/system/JasmineFS.hpp b/include/webfront/system/JasmineFS.hpp similarity index 100% rename from include/system/JasmineFS.hpp rename to include/webfront/system/JasmineFS.hpp diff --git a/include/system/JasmineFaviconData.hpp b/include/webfront/system/JasmineFaviconData.hpp similarity index 100% rename from include/system/JasmineFaviconData.hpp rename to include/webfront/system/JasmineFaviconData.hpp diff --git a/include/system/JasmineHtmlData.hpp b/include/webfront/system/JasmineHtmlData.hpp similarity index 100% rename from include/system/JasmineHtmlData.hpp rename to include/webfront/system/JasmineHtmlData.hpp diff --git a/include/system/JasmineJsData.hpp b/include/webfront/system/JasmineJsData.hpp similarity index 100% rename from include/system/JasmineJsData.hpp rename to include/webfront/system/JasmineJsData.hpp diff --git a/include/system/NativeFS.hpp b/include/webfront/system/NativeFS.hpp similarity index 100% rename from include/system/NativeFS.hpp rename to include/webfront/system/NativeFS.hpp diff --git a/include/system/PackageFS.hpp b/include/webfront/system/PackageFS.hpp similarity index 100% rename from include/system/PackageFS.hpp rename to include/webfront/system/PackageFS.hpp diff --git a/include/system/ReactFS.hpp b/include/webfront/system/ReactFS.hpp similarity index 100% rename from include/system/ReactFS.hpp rename to include/webfront/system/ReactFS.hpp diff --git a/include/system/ReactRuntimeData.hpp b/include/webfront/system/ReactRuntimeData.hpp similarity index 100% rename from include/system/ReactRuntimeData.hpp rename to include/webfront/system/ReactRuntimeData.hpp diff --git a/include/system/TerminalFS.hpp b/include/webfront/system/TerminalFS.hpp similarity index 100% rename from include/system/TerminalFS.hpp rename to include/webfront/system/TerminalFS.hpp diff --git a/include/system/TerminalIndexHtmlData.hpp b/include/webfront/system/TerminalIndexHtmlData.hpp similarity index 100% rename from include/system/TerminalIndexHtmlData.hpp rename to include/webfront/system/TerminalIndexHtmlData.hpp diff --git a/include/webfront/system/TerminalModuleData.hpp b/include/webfront/system/TerminalModuleData.hpp new file mode 100644 index 00000000..70bd555a --- /dev/null +++ b/include/webfront/system/TerminalModuleData.hpp @@ -0,0 +1,343 @@ +#pragma once + +#include +#include +#include +#include + +namespace webfront::fs::generated { + +struct TerminalModuleData { + static constexpr std::string_view encoding{}; + static constexpr std::size_t dataSize{13037}; + static constexpr std::array data{ + 0x2f2f2f2040627269, 0x6566205765624672, 0x6f6e74207465726d, 0x696e616c20636f6d, 0x706f6e656e743a20, + 0x616e20787465726d, 0x2e6a73207465726d, 0x696e616c2077686f, 0x7365206c696e6520, 0x656469746f722073, + 0x656e647320656163, 0x682076616c696461, 0x7465640a2f2f2f20, 0x6c696e6520746f20, 0x74686520432b2b20, + 0x636f6d6d616e6473, 0x2072656769737465, 0x726564207468726f, 0x7567682077656266, 0x726f6e743a3a5465, + 0x726d696e616c2028, 0x696e636c7564652f, 0x77656266726f6e74, 0x2f636f6d706f6e65, 0x6e74732f5465726d, + 0x696e616c2e687070, 0x292c0a2f2f2f2075, 0x6e6c657373206120, 0x62726f7773657220, 0x636f6d6d616e6420, + 0x6f6620616e206578, 0x74656e73696f6e20, 0x6d6f64756c652028, 0x5465726d696e616c, 0x3a3a657874656e73, + 0x696f6e292068616e, 0x646c657320697420, 0x66697273742e0a0a, 0x696d706f7274207b, 0x5465726d696e616c, + 0x7d2066726f6d2022, 0x2e2f787465726d2e, 0x6d6a73223b0a696d, 0x706f7274207b4669, 0x744164646f6e7d20, + 0x66726f6d20222e2f, 0x6164646f6e2d6669, 0x742e6d6a73223b0a, 0x0a636f6e73742061, 0x6e7369203d207b0a, + 0x202020207265643a, 0x2028746578742920, 0x3d3e20605c783162, 0x5b33316d247b7465, 0x78747d5c7831625b, + 0x306d602c0a202020, 0x20636c656172546f, 0x456e643a20225c78, 0x31625b4b222c0a20, 0x202020636c656172, + 0x53637265656e3a20, 0x225c7831625b324a, 0x5c7831625b334a5c, 0x7831625b48222c0a, 0x202020206c656674, + 0x3a2028636f756e74, 0x29203d3e2028636f, 0x756e74203e203020, 0x3f20605c7831625b, 0x247b636f756e747d, + 0x4460203a20222229, 0x2c0a7d3b0a0a6675, 0x6e6374696f6e2063, 0x6f6d6d6f6e507265, 0x66697828776f7264, + 0x7329207b0a202020, 0x2072657475726e20, 0x776f7264732e7265, 0x6475636528287072, 0x656669782c20776f, + 0x726429203d3e207b, 0x0a20202020202020, 0x20636f6e7374206c, 0x696d6974203d204d, 0x6174682e6d696e28, + 0x7072656669782e6c, 0x656e6774682c2077, 0x6f72642e6c656e67, 0x7468293b0a202020, 0x20202020206c6574, + 0x206c656e67746820, 0x3d20303b0a202020, 0x2020202020776869, 0x6c6520286c656e67, 0x7468203c206c696d, + 0x6974202626207072, 0x656669785b6c656e, 0x6774685d203d3d3d, 0x20776f72645b6c65, 0x6e6774685d290a20, + 0x2020202020202020, 0x2020202b2b6c656e, 0x6774683b0a202020, 0x2020202020726574, 0x75726e2070726566, + 0x69782e736c696365, 0x28302c206c656e67, 0x7468293b0a202020, 0x207d293b0a7d0a0a, 0x2f2f205265616473, + 0x2061206c696e6520, 0x666f7220746f6b65, 0x6e697a6528292c20, 0x6f6e6520776f7264, 0x2070617274206174, + 0x20612074696d652e, 0x0a636c6173732053, 0x63616e6e6572207b, 0x0a20202020636f6e, 0x7374727563746f72, + 0x286c696e6529207b, 0x0a20202020202020, 0x20746869732e6c69, 0x6e65203d206c696e, 0x653b0a2020202020, + 0x202020746869732e, 0x696e646578203d20, 0x303b0a202020207d, 0x0a0a202020206765, 0x7420646f6e652829, + 0x207b0a2020202020, 0x2020207265747572, 0x6e20746869732e69, 0x6e646578203d3d3d, 0x20746869732e6c69, + 0x6e652e6c656e6774, 0x683b0a202020207d, 0x0a0a202020206e65, 0x78742870726f626c, 0x656d29207b0a2020, + 0x2020202020206966, 0x2028746869732e64, 0x6f6e65290a202020, 0x2020202020202020, 0x207468726f77206e, + 0x65772053796e7461, 0x784572726f722870, 0x726f626c656d293b, 0x0a20202020202020, 0x2072657475726e20, + 0x746869732e6c696e, 0x655b746869732e69, 0x6e6465782b2b5d3b, 0x0a202020207d0a0a, 0x202020202f2f2054, + 0x686520636f6e7465, 0x6e74206f66206120, 0x71756f7465642073, 0x7472696e67207768, 0x6f7365206f70656e, + 0x696e672071756f74, 0x6520776173207265, 0x61642e20496e7369, 0x646520646f75626c, 0x652071756f746573, + 0x2061206261636b73, 0x6c6173680a202020, 0x202f2f2065736361, 0x7065732074686520, 0x6e65787420636861, + 0x7261637465723b20, 0x6f6e6520656e6469, 0x6e6720746865206c, 0x696e652073746179, 0x73206c6974657261, + 0x6c2c20616e642074, 0x6865206d69737369, 0x6e6720636c6f7369, 0x6e672071756f7465, 0x0a202020202f2f20, + 0x6973207265706f72, 0x746564206e657874, 0x2e0a202020207175, 0x6f7465642871756f, 0x746529207b0a2020, + 0x2020202020206c65, 0x7420636f6e74656e, 0x74203d2022223b0a, 0x2020202020202020, 0x666f7220286c6574, + 0x2063686172203d20, 0x746869732e6e6578, 0x742822556e746572, 0x6d696e6174656420, 0x71756f746522293b, + 0x206368617220213d, 0x3d2071756f74653b, 0x2063686172203d20, 0x746869732e6e6578, 0x742822556e746572, + 0x6d696e6174656420, 0x71756f7465222929, 0x0a20202020202020, 0x2020202020636f6e, 0x74656e74202b3d20, + 0x71756f7465203d3d, 0x3d20272227202626, 0x2063686172203d3d, 0x3d20225c5c222026, 0x262021746869732e, + 0x646f6e65203f2074, 0x6869732e6e657874, 0x2829203a20636861, 0x723b0a2020202020, 0x2020207265747572, + 0x6e20636f6e74656e, 0x743b0a202020207d, 0x0a0a202020202f2f, 0x2057686174206063, 0x686172602c207265, + 0x6164206f75747369, 0x64652071756f7465, 0x732c206164647320, 0x746f207468652063, 0x757272656e742077, + 0x6f72642e0a202020, 0x2070617274286368, 0x617229207b0a2020, 0x2020202020206966, 0x202863686172203d, + 0x3d3d20225c5c2229, 0x0a20202020202020, 0x2020202020726574, 0x75726e2074686973, 0x2e6e657874282254, + 0x7261696c696e6720, 0x6261636b736c6173, 0x6822293b0a202020, 0x2020202020696620, 0x2863686172203d3d, + 0x3d20222722207c7c, 0x2063686172203d3d, 0x3d20272227290a20, 0x2020202020202020, 0x2020207265747572, + 0x6e20746869732e71, 0x756f746564286368, 0x6172293b0a202020, 0x2020202020726574, 0x75726e2063686172, + 0x3b0a202020207d0a, 0x7d0a0a2f2f2f2053, 0x706c697473206120, 0x6c696e6520696e74, 0x6f20776f72647320, + 0x6c696b6520746572, 0x6d696e616c3a3a74, 0x6f6b656e697a6520, 0x696e20432b2b3a20, 0x7768697465737061, + 0x6365207365706172, 0x6174657320776f72, 0x64732c2073696e67, 0x6c652071756f7465, 0x730a2f2f2f206b65, + 0x6570207468656972, 0x20636f6e74656e74, 0x2076657262617469, 0x6d2c20646f75626c, 0x652071756f746573, + 0x206b656570206974, 0x2062757420686f6e, 0x6f72206261636b73, 0x6c61736820657363, 0x617065732c20616e, + 0x6420616e20756e71, 0x756f7465640a2f2f, 0x2f206261636b736c, 0x6173682065736361, 0x7065732074686520, + 0x6e65787420636861, 0x7261637465722e20, 0x5468726f77732061, 0x2053796e74617845, 0x72726f72206f6e20, + 0x616e20756e746572, 0x6d696e6174656420, 0x71756f7465206f72, 0x206120747261696c, 0x696e670a2f2f2f20, + 0x6261636b736c6173, 0x682e0a6578706f72, 0x742066756e637469, 0x6f6e20746f6b656e, 0x697a65286c696e65, + 0x29207b0a20202020, 0x636f6e737420776f, 0x726473203d205b5d, 0x3b0a20202020636f, 0x6e7374207363616e, + 0x6e6572203d206e65, 0x77205363616e6e65, 0x72286c696e65293b, 0x0a202020206c6574, 0x20776f7264203d20, + 0x6e756c6c3b20202f, 0x2f206e756c6c2062, 0x65747765656e2077, 0x6f7264730a202020, 0x207768696c652028, + 0x217363616e6e6572, 0x2e646f6e6529207b, 0x0a20202020202020, 0x20636f6e73742063, 0x686172203d207363, + 0x616e6e65722e6e65, 0x787428293b0a2020, 0x202020202020636f, 0x6e73742073657061, 0x7261746f72203d20, + 0x63686172203d3d3d, 0x20222022207c7c20, 0x63686172203d3d3d, 0x20225c74223b0a20, 0x2020202020202069, + 0x6620287365706172, 0x61746f7220262620, 0x776f726420213d3d, 0x206e756c6c290a20, 0x2020202020202020, + 0x202020776f726473, 0x2e7075736828776f, 0x7264293b0a202020, 0x2020202020776f72, 0x64203d2073657061, + 0x7261746f72203f20, 0x6e756c6c203a2028, 0x776f7264203f3f20, 0x222229202b207363, 0x616e6e65722e7061, + 0x7274286368617229, 0x3b0a202020207d0a, 0x2020202069662028, 0x776f726420213d3d, 0x206e756c6c290a20, + 0x2020202020202077, 0x6f7264732e707573, 0x6828776f7264293b, 0x0a20202020726574, 0x75726e20776f7264, + 0x733b0a7d0a0a2f2f, 0x2042726f77736572, 0x20636f6d6d616e64, 0x206f757470757420, 0x7573657320225c6e, + 0x22206c696e652065, 0x6e64696e67732c20, 0x636f6e7665727465, 0x64206c696b652043, 0x2b2b206f75747075, + 0x742e0a636f6e7374, 0x20746f5465726d69, 0x6e616c5465787420, 0x3d20287465787429, 0x203d3e2074657874, + 0x2e7265706c616365, 0x282f283f3c215c72, 0x295c6e2f672c2022, 0x5c725c6e22293b0a, 0x0a2f2f2f2052756e, + 0x732061206c696e65, 0x3a20612062726f77, 0x73657220636f6d6d, 0x616e64206f662060, 0x636f6d6d616e6473, + 0x60202861204d6170, 0x2066726f6d20636f, 0x6d6d616e64206e61, 0x6d6520746f206861, 0x6e646c6572292077, + 0x68656e206f6e6520, 0x69730a2f2f2f2072, 0x6567697374657265, 0x6420666f72206974, 0x7320666972737420, + 0x776f726420616e64, 0x20646f6573206e6f, 0x742072657475726e, 0x20756e646566696e, 0x65642c20656c7365, + 0x206072756e496e43, 0x7070286c696e6529, 0x602e2041206c696e, 0x6520746861740a2f, 0x2f2f2063616e6e6f, + 0x742062652073706c, 0x697420676f657320, 0x746f20432b2b2c20, 0x7768696368207265, 0x706f727473207468, + 0x65206572726f722e, 0x2042726f77736572, 0x20636f6d6d616e64, 0x7320676574206073, 0x69676e616c602c20, + 0x7768696368204374, 0x726c2b430a2f2f2f, 0x2061626f72747320, 0x7769746820746865, 0x20726561736f6e20, + 0x4572726f72282249, 0x6e74657272757074, 0x656422293b206120, 0x432b2b20636f6d6d, 0x616e642063616e6e, + 0x6f7420626520696e, 0x7465727275707465, 0x642e0a6578706f72, 0x74206173796e6320, 0x66756e6374696f6e, + 0x2072756e4c696e65, 0x286c696e652c207b, 0x636f6d6d616e6473, 0x2c2072756e496e43, 0x70702c2077726974, + 0x652c206272696467, 0x652c207369676e61, 0x6c203d206e657720, 0x41626f7274436f6e, 0x74726f6c6c657228, + 0x292e7369676e616c, 0x7d29207b0a202020, 0x206c657420776f72, 0x64733b0a20202020, 0x747279207b0a2020, + 0x202020202020776f, 0x726473203d20746f, 0x6b656e697a65286c, 0x696e65293b0a2020, 0x20207d2063617463, + 0x6820286572726f72, 0x29207b0a20202020, 0x2020202072657475, 0x726e2072756e496e, 0x437070286c696e65, + 0x293b0a202020207d, 0x0a20202020636f6e, 0x73742068616e646c, 0x6572203d20776f72, 0x64732e6c656e6774, + 0x68203e2030203f20, 0x636f6d6d616e6473, 0x2e67657428776f72, 0x64735b305d29203a, 0x20756e646566696e, + 0x65643b0a20202020, 0x696620282168616e, 0x646c6572290a2020, 0x2020202020207265, 0x7475726e2072756e, + 0x496e437070286c69, 0x6e65293b0a202020, 0x20636f6e7374206f, 0x7574707574203d20, 0x6177616974206861, + 0x6e646c657228776f, 0x7264732e736c6963, 0x652831292c207b0a, 0x2020202020202020, 0x6c696e652c0a2020, + 0x2020202020206272, 0x696467652c0a2020, 0x2020202020207369, 0x676e616c2c0a2020, 0x2020202020207772, + 0x6974653a20287465, 0x787429203d3e2077, 0x7269746528746f54, 0x65726d696e616c54, 0x6578742853747269, + 0x6e67287465787429, 0x29292c0a20202020, 0x2020202072756e49, 0x6e4370703a202829, 0x203d3e2072756e49, + 0x6e437070286c696e, 0x65292c0a20202020, 0x7d293b0a20202020, 0x72657475726e206f, 0x7574707574203d3d, + 0x3d20756e64656669, 0x6e6564203f207275, 0x6e496e437070286c, 0x696e6529203a2074, 0x6f5465726d696e61, + 0x6c54657874285374, 0x72696e67286f7574, 0x70757429293b0a7d, 0x0a0a2f2f2f20496d, 0x706f727473207468, + 0x6520657874656e73, 0x696f6e206d6f6475, 0x6c6573206c697374, 0x656420627920432b, 0x2b2028225c6e222d, + 0x7365706172617465, 0x642055524c732920, 0x616e6420636f6c6c, 0x6563747320746865, 0x69722062726f7773, + 0x65720a2f2f2f2063, 0x6f6d6d616e64732e, 0x2041206d6f64756c, 0x6520746861742066, 0x61696c7320746f20, + 0x6c6f616420697320, 0x7265706f72746564, 0x20616e6420736b69, 0x707065642e0a6173, 0x796e632066756e63, + 0x74696f6e206c6f61, 0x64457874656e7369, 0x6f6e732875726c73, 0x2c20777269746529, 0x207b0a2020202063, + 0x6f6e737420636f6d, 0x6d616e6473203d20, 0x6e6577204d617028, 0x293b0a2020202066, 0x6f722028636f6e73, + 0x742075726c206f66, 0x2075726c732e7370, 0x6c697428225c6e22, 0x292e66696c746572, 0x2828656e74727929, + 0x203d3e20656e7472, 0x7920213d3d202222, 0x2929207b0a202020, 0x2020202020747279, 0x207b0a2020202020, + 0x2020202020202063, 0x6f6e7374206d6f64, 0x756c65203d206177, 0x61697420696d706f, 0x72742875726c293b, + 0x0a20202020202020, 0x2020202020666f72, 0x2028636f6e737420, 0x5b6e616d652c2068, 0x616e646c65725d20, + 0x6f66204f626a6563, 0x742e656e74726965, 0x73286d6f64756c65, 0x2e636f6d6d616e64, 0x73203f3f207b7d29, + 0x290a202020202020, 0x2020202020202020, 0x2020636f6d6d616e, 0x64732e736574286e, 0x616d652c2068616e, + 0x646c6572293b0a20, 0x202020202020207d, 0x2063617463682028, 0x6572726f7229207b, 0x0a20202020202020, + 0x2020202020777269, 0x746528616e73692e, 0x7265642860546572, 0x6d696e616c206578, 0x74656e73696f6e20, + 0x247b75726c7d2066, 0x61696c656420746f, 0x206c6f61643a2024, 0x7b6572726f723f2e, 0x6d65737361676520, + 0x3f3f206572726f72, 0x7d6029202b20225c, 0x725c6e22293b0a20, 0x202020202020207d, 0x0a202020207d0a20, + 0x2020207265747572, 0x6e20636f6d6d616e, 0x64733b0a7d0a0a2f, 0x2f2045646974696e, 0x67206b6579732c20, + 0x617320787465726d, 0x2e6a73207265706f, 0x727473207468656d, 0x20696e206f6e4461, 0x74612c206d617070, + 0x656420746f204c69, 0x6e65456469746f72, 0x20616374696f6e73, 0x2e0a636f6e737420, 0x6b6579416374696f, + 0x6e73203d206e6577, 0x204d6170285b0a20, 0x2020205b225c7222, 0x2c2028656469746f, 0x7229203d3e206564, + 0x69746f722e737562, 0x6d697428295d2c0a, 0x202020205b225c78, 0x3766222c20286564, 0x69746f7229203d3e, + 0x20656469746f722e, 0x6572617365282d31, 0x295d2c0a20202020, 0x5b225c62222c2028, 0x656469746f722920, + 0x3d3e20656469746f, 0x722e657261736528, 0x2d31295d2c0a2020, 0x20205b225c783162, 0x5b337e222c202865, + 0x6469746f7229203d, 0x3e20656469746f72, 0x2e65726173652830, 0x295d2c0a20202020, 0x5b225c7831625b44, + 0x222c202865646974, 0x6f7229203d3e2065, 0x6469746f722e6d6f, 0x7665546f28656469, 0x746f722e63757273, + 0x6f72202d2031295d, 0x2c0a202020205b22, 0x5c7831625b43222c, 0x2028656469746f72, 0x29203d3e20656469, + 0x746f722e6d6f7665, 0x546f28656469746f, 0x722e637572736f72, 0x202b2031295d2c0a, 0x202020205b225c78, + 0x31625b48222c2028, 0x656469746f722920, 0x3d3e20656469746f, 0x722e6d6f7665546f, 0x2830295d2c0a2020, + 0x20205b225c783162, 0x4f48222c20286564, 0x69746f7229203d3e, 0x20656469746f722e, 0x6d6f7665546f2830, + 0x295d2c0a20202020, 0x5b225c783031222c, 0x2028656469746f72, 0x29203d3e20656469, 0x746f722e6d6f7665, + 0x546f2830295d2c0a, 0x202020205b225c78, 0x31625b46222c2028, 0x656469746f722920, 0x3d3e20656469746f, + 0x722e6d6f7665546f, 0x28656469746f722e, 0x63686172732e6c65, 0x6e677468295d2c0a, 0x202020205b225c78, + 0x31624f46222c2028, 0x656469746f722920, 0x3d3e20656469746f, 0x722e6d6f7665546f, 0x28656469746f722e, + 0x63686172732e6c65, 0x6e677468295d2c0a, 0x202020205b225c78, 0x3035222c20286564, 0x69746f7229203d3e, + 0x20656469746f722e, 0x6d6f7665546f2865, 0x6469746f722e6368, 0x6172732e6c656e67, 0x7468295d2c0a2020, + 0x20205b225c783162, 0x5b41222c20286564, 0x69746f7229203d3e, 0x20656469746f722e, 0x726563616c6c282d, + 0x31295d2c0a202020, 0x205b225c7831625b, 0x42222c2028656469, 0x746f7229203d3e20, 0x656469746f722e72, + 0x6563616c6c283129, 0x5d2c0a202020205b, 0x225c74222c202865, 0x6469746f7229203d, 0x3e20656469746f72, + 0x2e747261636b2865, 0x6469746f722e636f, 0x6d706c6574654c69, 0x6e652829295d2c0a, 0x202020205b225c78, + 0x3033222c20286564, 0x69746f7229203d3e, 0x20656469746f722e, 0x63616e63656c4c69, 0x6e6528295d2c0a20, + 0x2020205b225c7830, 0x63222c2028656469, 0x746f7229203d3e20, 0x656469746f722e72, 0x656472617728616e, + 0x73692e636c656172, 0x53637265656e295d, 0x2c0a202020205b22, 0x5c783135222c2028, 0x656469746f722920, + 0x3d3e20656469746f, 0x722e6b696c6c4265, 0x666f726543757273, 0x6f7228295d2c0a5d, 0x293b0a0a2f2f2f20, + 0x4c696e6520656469, 0x746f722064726976, 0x656e206279207468, 0x65207465726d696e, 0x616c277320696e70, + 0x757420646174612e, 0x2060777269746528, 0x7465787429602064, 0x6973706c61797320, 0x746578743b206072, + 0x756e286c696e6529, 0x6020616e640a2f2f, 0x2f2060636f6d706c, 0x657465286c696e65, 0x2960207265747572, + 0x6e2050726f6d6973, 0x6573206f66207468, 0x6520432b2b206f75, 0x7470757420616e64, 0x206f6620225c6e22, + 0x2d73657061726174, 0x656420636f6d706c, 0x6574696f6e206361, 0x6e64696461746573, 0x2e0a6578706f7274, + 0x20636c617373204c, 0x696e65456469746f, 0x72207b0a20202020, 0x636f6e7374727563, 0x746f72287b777269, + 0x74652c2072756e2c, 0x20636f6d706c6574, 0x652c2070726f6d70, 0x747d29207b0a2020, 0x2020202020207468, + 0x69732e7772697465, 0x203d207772697465, 0x3b0a202020202020, 0x2020746869732e72, 0x756e203d2072756e, + 0x3b0a202020202020, 0x2020746869732e63, 0x6f6d706c65746520, 0x3d20636f6d706c65, 0x74653b0a20202020, + 0x2020202074686973, 0x2e61626f7274203d, 0x206e756c6c3b0a20, 0x2020202020202074, 0x6869732e70726f6d, + 0x7074203d2070726f, 0x6d70743b0a202020, 0x2020202020746869, 0x732e636861727320, 0x3d205b5d3b0a2020, + 0x2020202020207468, 0x69732e637572736f, 0x72203d20303b0a20, 0x2020202020202074, 0x6869732e68697374, + 0x6f7279203d205b5d, 0x3b0a202020202020, 0x2020746869732e68, 0x6973746f7279496e, 0x646578203d20303b, + 0x0a20202020202020, 0x20746869732e6275, 0x7379203d206e756c, 0x6c3b0a202020207d, 0x0a0a202020206765, + 0x74206c696e652829, 0x207b0a2020202020, 0x2020207265747572, 0x6e20746869732e63, 0x686172732e6a6f69, + 0x6e282222293b0a20, 0x2020207d0a0a2020, 0x20202f2f2f205265, 0x736f6c766573206f, 0x6e6365206e6f2063, + 0x6f6d6d616e64206f, 0x7220636f6d706c65, 0x74696f6e20697320, 0x70656e64696e672e, 0x0a20202020617379, + 0x6e63207768656e49, 0x646c652829207b0a, 0x2020202020202020, 0x7768696c65202874, 0x6869732e62757379, + 0x290a202020202020, 0x2020202020206177, 0x6169742074686973, 0x2e627573793b0a20, 0x2020207d0a0a2020, + 0x202073686f775072, 0x6f6d70742829207b, 0x0a20202020202020, 0x20746869732e7772, 0x6974652874686973, + 0x2e70726f6d707429, 0x3b0a202020207d0a, 0x0a2020202068616e, 0x646c652864617461, 0x29207b0a20202020, + 0x2020202069662028, 0x746869732e627573, 0x79290a2020202020, 0x2020202020202072, 0x657475726e207468, + 0x69732e696e746572, 0x7275707428646174, 0x61293b0a20202020, 0x20202020636f6e73, 0x7420616374696f6e, + 0x203d206b65794163, 0x74696f6e732e6765, 0x742864617461293b, 0x0a20202020202020, 0x2069662028616374, + 0x696f6e290a202020, 0x2020202020202020, 0x2072657475726e20, 0x616374696f6e2874, 0x686973293b0a2020, + 0x2020202020206966, 0x202821646174612e, 0x7374617274735769, 0x746828225c783162, 0x2229290a20202020, + 0x2020202020202020, 0x72657475726e2074, 0x6869732e696e7365, 0x7274546578742864, 0x617461293b0a2020, + 0x20207d0a0a202020, 0x202f2f205768696c, 0x65206120636f6d6d, 0x616e642072756e73, 0x2c204374726c2b43, + 0x2061626f72747320, 0x697473207369676e, 0x616c206f6e636520, 0x616e642074686520, 0x6f74686572206b65, + 0x7973206172652069, 0x676e6f7265642e0a, 0x20202020696e7465, 0x7272757074286461, 0x746129207b0a2020, + 0x202020202020636f, 0x6e73742072756e6e, 0x696e67203d207468, 0x69732e61626f7274, 0x3f2e7369676e616c, + 0x2e61626f72746564, 0x203d3d3d2066616c, 0x73653b0a20202020, 0x2020202069662028, 0x6461746120213d3d, + 0x20225c7830332220, 0x7c7c202172756e6e, 0x696e67290a202020, 0x2020202020202020, 0x2072657475726e3b, + 0x0a20202020202020, 0x20746869732e7772, 0x69746528225e435c, 0x725c6e22293b0a20, 0x2020202020202074, + 0x6869732e61626f72, 0x742e61626f727428, 0x6e6577204572726f, 0x722822496e746572, 0x7275707465642229, + 0x293b0a202020207d, 0x0a0a202020202f2f, 0x205479706564206f, 0x7220706173746564, 0x20746578743a2070, + 0x72696e7461626c65, 0x2063686172616374, 0x6572732061726520, 0x696e736572746564, 0x2c20612063617272, + 0x6961676520726574, 0x75726e207375626d, 0x6974732074686520, 0x6c696e650a202020, 0x202f2f20616e6420, + 0x7468652072657374, 0x206f662061206d75, 0x6c74692d6c696e65, 0x2070617374652069, 0x732064726f707065, + 0x642c2073696e6365, 0x20636f6d6d616e64, 0x732072756e206f6e, 0x6520617420612074, 0x696d652e0a202020, + 0x20696e7365727454, 0x6578742864617461, 0x29207b0a20202020, 0x20202020636f6e73, 0x74205b746578742c, + 0x202e2e2e72657374, 0x5d203d2064617461, 0x2e73706c69742822, 0x5c7222293b0a2020, 0x2020202020207468, + 0x69732e696e736572, 0x742841727261792e, 0x66726f6d28746578, 0x74292e66696c7465, 0x7228286368617229, + 0x203d3e2063686172, 0x203e3d2022202220, 0x2626206368617220, 0x213d3d20225c7837, 0x662229293b0a2020, + 0x2020202020206966, 0x2028726573742e6c, 0x656e677468203e20, 0x30290a2020202020, 0x2020202020202072, + 0x657475726e207468, 0x69732e7375626d69, 0x7428293b0a202020, 0x207d0a0a20202020, 0x696e736572742863, + 0x6861727329207b0a, 0x2020202020202020, 0x6966202863686172, 0x732e6c656e677468, 0x203d3d3d2030290a, + 0x2020202020202020, 0x2020202072657475, 0x726e3b0a20202020, 0x2020202074686973, 0x2e63686172732e73, + 0x706c696365287468, 0x69732e637572736f, 0x722c20302c202e2e, 0x2e6368617273293b, 0x0a20202020202020, + 0x20746869732e6375, 0x72736f72202b3d20, 0x63686172732e6c65, 0x6e6774683b0a2020, 0x2020202020207468, + 0x69732e7265647261, 0x7728293b0a202020, 0x207d0a0a20202020, 0x6572617365286f66, 0x6673657429207b0a, + 0x2020202020202020, 0x636f6e737420696e, 0x646578203d207468, 0x69732e637572736f, 0x72202b206f666673, + 0x65743b0a20202020, 0x2020202069662028, 0x696e646578203c20, 0x30207c7c20696e64, 0x6578203e3d207468, + 0x69732e6368617273, 0x2e6c656e67746829, 0x0a20202020202020, 0x2020202020726574, 0x75726e3b0a202020, + 0x2020202020746869, 0x732e63686172732e, 0x73706c6963652869, 0x6e6465782c203129, 0x3b0a202020202020, + 0x2020746869732e63, 0x7572736f72203d20, 0x696e6465783b0a20, 0x2020202020202074, 0x6869732e72656472, + 0x617728293b0a2020, 0x20207d0a0a202020, 0x206b696c6c426566, 0x6f7265437572736f, 0x722829207b0a2020, + 0x2020202020207468, 0x69732e6368617273, 0x2e73706c69636528, 0x302c20746869732e, 0x637572736f72293b, + 0x0a20202020202020, 0x20746869732e6375, 0x72736f72203d2030, 0x3b0a202020202020, 0x2020746869732e72, + 0x656472617728293b, 0x0a202020207d0a0a, 0x202020206d6f7665, 0x546f28706f736974, 0x696f6e29207b0a20, + 0x2020202020202063, 0x6f6e737420637572, 0x736f72203d204d61, 0x74682e6d61782830, 0x2c204d6174682e6d, + 0x696e28746869732e, 0x63686172732e6c65, 0x6e6774682c20706f, 0x736974696f6e2929, 0x3b0a202020202020, + 0x2020696620286375, 0x72736f72203d3d3d, 0x20746869732e6375, 0x72736f72290a2020, 0x2020202020202020, + 0x202072657475726e, 0x3b0a202020202020, 0x2020746869732e63, 0x7572736f72203d20, 0x637572736f723b0a, + 0x2020202020202020, 0x746869732e726564, 0x72617728293b0a20, 0x2020207d0a0a2020, 0x2020726563616c6c, + 0x2864697265637469, 0x6f6e29207b0a2020, 0x202020202020636f, 0x6e737420696e6465, 0x78203d2074686973, + 0x2e686973746f7279, 0x496e646578202b20, 0x646972656374696f, 0x6e3b0a2020202020, 0x2020206966202869, + 0x6e646578203c2030, 0x207c7c20696e6465, 0x78203e2074686973, 0x2e686973746f7279, 0x2e6c656e67746829, + 0x0a20202020202020, 0x2020202020726574, 0x75726e3b0a202020, 0x2020202020746869, 0x732e686973746f72, + 0x79496e646578203d, 0x20696e6465783b0a, 0x2020202020202020, 0x746869732e636861, 0x7273203d20417272, + 0x61792e66726f6d28, 0x696e646578203d3d, 0x3d20746869732e68, 0x6973746f72792e6c, 0x656e677468203f20, + 0x2222203a20746869, 0x732e686973746f72, 0x795b696e6465785d, 0x293b0a2020202020, 0x202020746869732e, + 0x637572736f72203d, 0x20746869732e6368, 0x6172732e6c656e67, 0x74683b0a20202020, 0x2020202074686973, + 0x2e72656472617728, 0x293b0a202020207d, 0x0a0a202020206361, 0x6e63656c4c696e65, 0x2829207b0a202020, + 0x2020202020746869, 0x732e777269746528, 0x225e435c725c6e22, 0x293b0a2020202020, 0x202020746869732e, + 0x6368617273203d20, 0x5b5d3b0a20202020, 0x2020202074686973, 0x2e637572736f7220, 0x3d20303b0a202020, + 0x2020202020746869, 0x732e686973746f72, 0x79496e646578203d, 0x20746869732e6869, 0x73746f72792e6c65, + 0x6e6774683b0a2020, 0x2020202020207468, 0x69732e73686f7750, 0x726f6d707428293b, 0x0a202020207d0a0a, + 0x202020202f2f2052, 0x6577726974657320, 0x7468652070726f6d, 0x707420616e642074, 0x6865206c696e6520, + 0x696e20706c616365, 0x2c207468656e206d, 0x6f76657320746865, 0x20637572736f7220, 0x6261636b20746f20, + 0x69747320706f7369, 0x74696f6e2e0a2020, 0x2020726564726177, 0x2870726566697820, 0x3d20225c72222920, + 0x7b0a202020202020, 0x2020746869732e77, 0x7269746528707265, 0x666978202b207468, 0x69732e70726f6d70, + 0x74202b2074686973, 0x2e6c696e65202b20, 0x616e73692e636c65, 0x6172546f456e6420, 0x2b20616e73692e6c, + 0x6566742874686973, 0x2e63686172732e6c, 0x656e677468202d20, 0x746869732e637572, 0x736f7229293b0a20, + 0x2020207d0a0a2020, 0x2020747261636b28, 0x70726f6d69736529, 0x207b0a2020202020, 0x202020746869732e, + 0x62757379203d2070, 0x726f6d6973652e66, 0x696e616c6c792828, 0x29203d3e207b0a20, 0x2020202020202020, + 0x202020746869732e, 0x62757379203d206e, 0x756c6c3b0a202020, 0x20202020207d293b, 0x0a20202020202020, + 0x2072657475726e20, 0x746869732e627573, 0x793b0a202020207d, 0x0a0a202020207375, 0x626d69742829207b, + 0x0a20202020202020, 0x20636f6e7374206c, 0x696e65203d207468, 0x69732e6c696e653b, 0x0a20202020202020, + 0x20746869732e7772, 0x69746528225c725c, 0x6e22293b0a202020, 0x2020202020746869, 0x732e636861727320, + 0x3d205b5d3b0a2020, 0x2020202020207468, 0x69732e637572736f, 0x72203d20303b0a20, 0x2020202020202069, + 0x6620286c696e652e, 0x7472696d28292021, 0x3d3d202222202626, 0x20746869732e6869, 0x73746f72792e6174, + 0x282d312920213d3d, 0x206c696e65290a20, 0x2020202020202020, 0x202020746869732e, 0x686973746f72792e, + 0x70757368286c696e, 0x65293b0a20202020, 0x2020202074686973, 0x2e686973746f7279, 0x496e646578203d20, + 0x746869732e686973, 0x746f72792e6c656e, 0x6774683b0a202020, 0x2020202020726574, 0x75726e2074686973, + 0x2e747261636b2874, 0x6869732e65786563, 0x757465286c696e65, 0x29293b0a20202020, 0x7d0a0a2020202061, + 0x73796e6320657865, 0x63757465286c696e, 0x6529207b0a202020, 0x2020202020746869, 0x732e61626f727420, + 0x3d206e6577204162, 0x6f7274436f6e7472, 0x6f6c6c657228293b, 0x0a20202020202020, 0x20747279207b0a20, + 0x2020202020202020, 0x202020636f6e7374, 0x206f757470757420, 0x3d20617761697420, 0x746869732e72756e, + 0x286c696e652c2074, 0x6869732e61626f72, 0x742e7369676e616c, 0x293b0a2020202020, 0x202020202020202f, + 0x2f20546865207072, 0x6f6d707420737461, 0x727473206f6e2061, 0x206e6577206c696e, 0x652c20756e6c6573, + 0x7320746865206f75, 0x7470757420616c72, 0x6561647920656e64, 0x73206f6e65206f72, 0x206c656176657320, + 0x7468650a20202020, 0x2020202020202020, 0x2f2f20637572736f, 0x7220617420686f6d, 0x6520287375636820, + 0x6173207468652027, 0x636c656172272063, 0x6f6d6d616e64292e, 0x0a20202020202020, 0x2020202020696620, + 0x286f757470757429, 0x0a20202020202020, 0x2020202020202020, 0x20746869732e7772, 0x697465286f757470, + 0x75742e656e647357, 0x69746828225c6e22, 0x29207c7c206f7574, 0x7075742e656e6473, 0x5769746828225c78, + 0x31625b482229203f, 0x206f757470757420, 0x3a206f7574707574, 0x202b20225c725c6e, 0x22293b0a20202020, + 0x202020207d206361, 0x7463682028657272, 0x6f7229207b0a2020, 0x2020202020202020, 0x2020746869732e77, + 0x7269746528616e73, 0x692e726564286045, 0x72726f723a20247b, 0x6572726f723f2e6d, 0x657373616765203f, + 0x3f206572726f727d, 0x6029202b20225c72, 0x5c6e22293b0a2020, 0x2020202020207d0a, 0x2020202020202020, + 0x746869732e73686f, 0x7750726f6d707428, 0x293b0a202020207d, 0x0a0a202020206173, 0x796e6320636f6d70, + 0x6c6574654c696e65, 0x2829207b0a202020, 0x20202020202f2f20, 0x4f6e6c7920746865, 0x20636f6d6d616e64, + 0x206e616d65206973, 0x20636f6d706c6574, 0x65642c20616e6420, 0x6f6e6c7920776974, 0x6820746865206375, + 0x72736f7220617420, 0x74686520656e6420, 0x6f6620746865206c, 0x696e652e0a202020, 0x2020202020696620, + 0x28746869732e6375, 0x72736f7220213d3d, 0x20746869732e6368, 0x6172732e6c656e67, 0x7468290a20202020, + 0x2020202020202020, 0x72657475726e3b0a, 0x2020202020202020, 0x636f6e7374206c69, 0x6e65203d20746869, + 0x732e6c696e653b0a, 0x2020202020202020, 0x6c65742063616e64, 0x6964617465733b0a, 0x2020202020202020, + 0x747279207b0a2020, 0x2020202020202020, 0x202063616e646964, 0x61746573203d2028, 0x6177616974207468, + 0x69732e636f6d706c, 0x657465286c696e65, 0x29292e73706c6974, 0x28225c6e22292e66, 0x696c746572282877, + 0x6f726429203d3e20, 0x776f726420213d3d, 0x202222293b0a2020, 0x2020202020207d20, 0x6361746368202865, + 0x72726f7229207b0a, 0x2020202020202020, 0x2020202072657475, 0x726e3b0a20202020, 0x202020207d0a2020, + 0x2020202020206966, 0x202863616e646964, 0x617465732e6c656e, 0x677468203d3d3d20, 0x30290a2020202020, + 0x2020202020202072, 0x657475726e3b0a20, 0x2020202020202063, 0x6f6e737420636f6d, 0x706c6574696f6e20, + 0x3d2063616e646964, 0x617465732e6c656e, 0x677468203d3d3d20, 0x31203f2063616e64, 0x6964617465735b30, + 0x5d202b2022202220, 0x3a20636f6d6d6f6e, 0x5072656669782863, 0x616e646964617465, 0x73293b0a20202020, + 0x2020202069662028, 0x636f6d706c657469, 0x6f6e2e6c656e6774, 0x68203e206c696e65, 0x2e6c656e67746829, + 0x0a20202020202020, 0x2020202020726574, 0x75726e2074686973, 0x2e696e7365727428, 0x41727261792e6672, + 0x6f6d28636f6d706c, 0x6574696f6e2e736c, 0x696365286c696e65, 0x2e6c656e67746829, 0x29293b0a20202020, + 0x2020202074686973, 0x2e77726974652822, 0x5c725c6e22202b20, 0x63616e6469646174, 0x65732e6a6f696e28, + 0x2220202229202b20, 0x225c725c6e22293b, 0x0a20202020202020, 0x20746869732e7265, 0x6472617728293b0a, + 0x202020207d0a7d0a, 0x0a2f2f2f204d6f75, 0x6e74732061207465, 0x726d696e616c2069, 0x6e2060656c656d65, + 0x6e7460206f6e6365, 0x2074686520576562, 0x46726f6e74206272, 0x6964676520697320, 0x72656164792e2052, + 0x657475726e732074, 0x686520787465726d, 0x205465726d696e61, 0x6c2c0a2f2f2f2069, 0x7473206c696e6520, + 0x656469746f722061, 0x6e6420612060666c, 0x7573682829602072, 0x65736f6c76696e67, 0x207768656e206576, + 0x6572792077726974, 0x6520686173206265, 0x656e2072656e6465, 0x7265642e0a657870, 0x6f7274206173796e, + 0x632066756e637469, 0x6f6e206d6f756e74, 0x28656c656d656e74, 0x2c207b6272696467, 0x65203d20676c6f62, + 0x616c546869732e77, 0x656246726f6e742c, 0x207465726d696e61, 0x6c4f7074696f6e73, 0x203d207b7d7d203d, + 0x207b7d29207b0a20, 0x202020636f6e7374, 0x207465726d696e61, 0x6c203d206e657720, 0x5465726d696e616c, + 0x287b0a2020202020, 0x202020637572736f, 0x72426c696e6b3a20, 0x747275652c0a2020, 0x202020202020636f, + 0x6e76657274456f6c, 0x3a2066616c73652c, 0x0a20202020202020, 0x20666f6e7446616d, 0x696c793a20277569, + 0x2d6d6f6e6f737061, 0x63652c2022436173, 0x636164696120436f, 0x6465222c2022536f, 0x7572636520436f64, + 0x652050726f222c20, 0x4d656e6c6f2c2043, 0x6f6e736f6c61732c, 0x206d6f6e6f737061, 0x6365272c0a202020, + 0x2020202020746865, 0x6d653a207b626163, 0x6b67726f756e643a, 0x2022233064313131, 0x37222c20666f7265, + 0x67726f756e643a20, 0x2223653665646633, 0x227d2c0a20202020, 0x202020202e2e2e74, 0x65726d696e616c4f, + 0x7074696f6e732c0a, 0x202020207d293b0a, 0x20202020636f6e73, 0x7420666974203d20, 0x6e65772046697441, + 0x64646f6e28293b0a, 0x202020207465726d, 0x696e616c2e6c6f61, 0x644164646f6e2866, 0x6974293b0a202020, + 0x207465726d696e61, 0x6c2e6f70656e2865, 0x6c656d656e74293b, 0x0a20202020666974, 0x2e66697428293b0a, + 0x202020206e657720, 0x526573697a654f62, 0x7365727665722828, 0x29203d3e20666974, 0x2e6669742829292e, + 0x6f62736572766528, 0x656c656d656e7429, 0x3b0a0a202020206c, 0x6574206c61737457, 0x72697465203d2050, + 0x726f6d6973652e72, 0x65736f6c76652829, 0x3b0a20202020636f, 0x6e73742077726974, 0x65203d2028746578, + 0x7429203d3e207b0a, 0x2020202020202020, 0x6c61737457726974, 0x65203d206e657720, 0x50726f6d69736528, + 0x287265736f6c7665, 0x29203d3e20746572, 0x6d696e616c2e7772, 0x6974652874657874, 0x2c207265736f6c76, + 0x6529293b0a202020, 0x207d3b0a20202020, 0x636f6e737420666c, 0x757368203d202829, 0x203d3e206c617374, + 0x57726974653b0a0a, 0x2020202074727920, 0x7b0a202020202020, 0x2020617761697420, 0x6272696467652e72, + 0x656164793b0a2020, 0x20207d2063617463, 0x6820286572726f72, 0x29207b0a20202020, 0x2020202077726974, + 0x6528616e73692e72, 0x65642860436f6e6e, 0x656374696f6e2074, 0x6f20746865206170, 0x706c69636174696f, + 0x6e206661696c6564, 0x3a20247b6572726f, 0x723f2e6d65737361, 0x6765203f3f206572, 0x726f727d6029202b, + 0x20225c725c6e2229, 0x3b0a202020202020, 0x202072657475726e, 0x207b7465726d696e, 0x616c2c2065646974, + 0x6f723a206e756c6c, 0x2c20666c7573687d, 0x3b0a202020207d0a, 0x0a20202020636f6e, 0x73742063616c6c20, + 0x3d20286e616d6529, 0x203d3e2062726964, 0x67652e6370704675, 0x6e6374696f6e2860, 0x77656266726f6e74, + 0x2e7465726d696e61, 0x6c2e247b6e616d65, 0x7d60293b0a202020, 0x206c65742070726f, 0x6d70742c2062616e, + 0x6e65722c20657874, 0x656e73696f6e733b, 0x0a20202020747279, 0x207b0a2020202020, 0x2020205b70726f6d, + 0x70742c2062616e6e, 0x65722c2065787465, 0x6e73696f6e735d20, 0x3d20617761697420, 0x50726f6d6973652e, + 0x616c6c285b63616c, 0x6c282270726f6d70, 0x74222928292c2063, 0x616c6c282262616e, 0x6e6572222928292c, + 0x2063616c6c282265, 0x7874656e73696f6e, 0x73222928295d293b, 0x0a202020207d2063, 0x6174636820286572, + 0x726f7229207b0a20, 0x202020202020202f, 0x2f20466f72206578, 0x616d706c65206120, 0x7061676520736572, + 0x7665642062792061, 0x6e206170706c6963, 0x6174696f6e207769, 0x74686f7574207765, 0x6266726f6e743a3a, + 0x5465726d696e616c, 0x2e0a202020202020, 0x2020777269746528, 0x616e73692e726564, 0x28605465726d696e, + 0x616c20756e617661, 0x696c61626c653a20, 0x247b6572726f723f, 0x2e6d657373616765, 0x203f3f206572726f, + 0x727d6029202b2022, 0x5c725c6e22293b0a, 0x2020202020202020, 0x72657475726e207b, 0x7465726d696e616c, + 0x2c20656469746f72, 0x3a206e756c6c2c20, 0x666c7573687d3b0a, 0x202020207d0a2020, 0x2020636f6e737420, + 0x636f6d6d616e6473, 0x203d206177616974, 0x206c6f6164457874, 0x656e73696f6e7328, 0x657874656e73696f, + 0x6e732c2077726974, 0x65293b0a20202020, 0x636f6e7374207275, 0x6e496e437070203d, 0x2063616c6c282272, + 0x756e22293b0a2020, 0x2020636f6e737420, 0x72756e203d20286c, 0x696e652c20736967, 0x6e616c29203d3e20, + 0x72756e4c696e6528, 0x6c696e652c207b63, 0x6f6d6d616e64732c, 0x2072756e496e4370, 0x702c207772697465, + 0x2c20627269646765, 0x2c207369676e616c, 0x7d293b0a20202020, 0x636f6e7374206564, 0x69746f72203d206e, + 0x6577204c696e6545, 0x6469746f72287b77, 0x726974652c207275, 0x6e2c20636f6d706c, 0x6574653a2063616c, + 0x6c2822636f6d706c, 0x65746522292c2070, 0x726f6d70747d293b, 0x0a20202020696620, 0x2862616e6e657229, + 0x0a20202020202020, 0x2077726974652862, 0x616e6e65722e7265, 0x706c616365416c6c, 0x28225c6e222c2022, + 0x5c725c6e2229202b, 0x20225c725c6e2229, 0x3b0a202020206564, 0x69746f722e73686f, 0x7750726f6d707428, + 0x293b0a2020202074, 0x65726d696e616c2e, 0x6f6e446174612828, 0x6461746129203d3e, 0x20656469746f722e, + 0x68616e646c652864, 0x61746129293b0a20, 0x2020207465726d69, 0x6e616c2e666f6375, 0x7328293b0a202020, + 0x2072657475726e20, 0x7b7465726d696e61, 0x6c2c20656469746f, 0x722c20666c757368, 0x7d3b0a7d0a000000 + }; +}; + +} // namespace webfront::fs::generated diff --git a/include/system/ToolManagerFS.hpp b/include/webfront/system/ToolManagerFS.hpp similarity index 100% rename from include/system/ToolManagerFS.hpp rename to include/webfront/system/ToolManagerFS.hpp diff --git a/include/webfront/system/ToolManagerModuleData.hpp b/include/webfront/system/ToolManagerModuleData.hpp new file mode 100644 index 00000000..a055a52f --- /dev/null +++ b/include/webfront/system/ToolManagerModuleData.hpp @@ -0,0 +1,393 @@ +#pragma once + +#include +#include +#include +#include + +namespace webfront::fs::generated { + +struct ToolManagerModuleData { + static constexpr std::string_view encoding{}; + static constexpr std::size_t dataSize{15006}; + static constexpr std::array data{ + 0x2f2f2f2040627269, 0x65662042726f7773, 0x6572207369646520, 0x6f66207468652077, 0x6620746f6f6c206d, + 0x616e616765722028, 0x23323334292c2061, 0x207465726d696e61, 0x6c20657874656e73, 0x696f6e2061646465, + 0x642062790a2f2f2f, 0x2077656266726f6e, 0x743a3a546f6f6c4d, 0x616e616765722028, 0x696e636c7564652f, + 0x77656266726f6e74, 0x2f636f6d706f6e65, 0x6e74732f546f6f6c, 0x4d616e616765722e, 0x687070292e202777, + 0x6620736561726368, 0x272c202777662069, 0x6e7374616c6c2720, 0x616e640a2f2f2f20, 0x277766206f70656e, + 0x272072756e206865, 0x72652c2062656361, 0x7573652074686520, 0x646f776e6c6f6164, 0x20737065616b7320, + 0x48545450533b2027, 0x7766206c69737427, 0x2c20277766207265, 0x6d6f76652720616e, 0x6420277766206865, + 0x6c70272072756e0a, 0x2f2f2f20696e2043, 0x2b2b2e20416e2069, 0x6e7374616c6c6174, 0x696f6e2066657463, + 0x6865732074686520, 0x7061636b756d656e, 0x7420616e64207468, 0x652074617262616c, 0x6c2066726f6d2074, + 0x6865206e706d2072, 0x656769737472792c, 0x20636865636b7320, 0x7468650a2f2f2f20, 0x74617262616c6c27, + 0x73205348412d3531, 0x3220696e74656772, 0x6974792c20756e70, 0x61636b7320697420, 0x616e642073656e64, + 0x7320697473206669, 0x6c6573207468726f, 0x7567682077656266, 0x726f6e742e706b67, 0x2e626567696e2c0a, + 0x2f2f2f202e777269, 0x746546696c652061, 0x6e64202e636f6d6d, 0x69742e0a0a636f6e, 0x737420626c6f636b, + 0x53697a65203d2035, 0x31323b0a2f2f2f20, 0x46696c6573206372, 0x6f73732074686520, 0x6272696467652069, + 0x6e206368756e6b73, 0x206f662074686973, 0x206d616e79206279, 0x7465733b20746865, 0x2062726f77736572, + 0x2073656e64732061, 0x206c61726765206f, 0x6e6520696e207365, 0x766572616c0a2f2f, 0x2f20576562536f63, + 0x6b6574206672616d, 0x65732c2077686963, 0x6820746865207365, 0x7276657220726561, 0x7373656d626c6573, + 0x2e0a6578706f7274, 0x20636f6e73742063, 0x68756e6b53697a65, 0x203d20323536202a, 0x20313032343b0a2f, + 0x2f2f204c61726765, 0x737420756e706163, 0x6b65642074617262, 0x616c6c2061636365, 0x707465642c206167, + 0x61696e7374206465, 0x636f6d7072657373, 0x696f6e20626f6d62, 0x732e0a6578706f72, 0x7420636f6e737420, + 0x6d6178556e706163, 0x6b65644279746573, 0x203d20323536202a, 0x2031303234202a20, 0x313032343b0a636f, + 0x6e73742075746638, 0x203d206e65772054, 0x6578744465636f64, 0x657228293b0a0a2f, 0x2f2f2053706c6974, + 0x7320226e616d655b, 0x4076657273696f6e, 0x5d222c2077686572, 0x6520746865206e61, 0x6d65206d61792062, + 0x652073636f706564, 0x2028224073636f70, 0x652f6e616d654031, 0x2e302e3022292e20, 0x5468652076657273, + 0x696f6e2069732022, 0x220a2f2f2f207768, 0x656e20616273656e, 0x742e0a6578706f72, 0x742066756e637469, + 0x6f6e207061727365, 0x5370656328737065, 0x6329207b0a202020, 0x20636f6e73742061, 0x74203d2073706563, + 0x2e696e6465784f66, 0x282240222c207370, 0x65632e7374617274, 0x7357697468282240, 0x2229203f2031203a, + 0x2030293b0a202020, 0x2072657475726e20, 0x6174203c2030203f, 0x207b6e616d653a20, 0x737065632c207665, + 0x7273696f6e3a2022, 0x227d203a207b6e61, 0x6d653a2073706563, 0x2e736c6963652830, 0x2c206174292c2076, + 0x657273696f6e3a20, 0x737065632e736c69, 0x6365286174202b20, 0x31297d3b0a7d0a0a, 0x66756e6374696f6e, + 0x2072656769737472, 0x7942617365287265, 0x6769737472792920, 0x7b0a20202020636f, 0x6e73742062617365, + 0x203d206e65772055, 0x524c287265676973, 0x7472792c20676c6f, 0x62616c546869732e, 0x6c6f636174696f6e, + 0x3f2e68726566293b, 0x0a20202020696620, 0x2821626173652e70, 0x6174686e616d652e, 0x656e647357697468, + 0x28222f2229290a20, 0x2020202020202062, 0x6173652e70617468, 0x6e616d65202b3d20, 0x222f223b0a202020, + 0x2072657475726e20, 0x626173653b0a7d0a, 0x0a2f2f2054686520, 0x7265676973747279, 0x20656e636f646573, + 0x2074686520736c61, 0x7368206f66206120, 0x73636f706564206e, 0x616d652e0a636f6e, 0x7374207061636b75, + 0x6d656e7455726c20, 0x3d2028626173652c, 0x206e616d6529203d, 0x3e206e6577205552, 0x4c286e616d652e72, + 0x65706c6163652822, 0x2f222c2022253266, 0x22292c2062617365, 0x293b0a0a6173796e, 0x632066756e637469, + 0x6f6e206665746368, 0x4f6b2875726c2c20, 0x6665746368496d70, 0x6c2c207369676e61, 0x6c29207b0a202020, + 0x20636f6e73742072, 0x6573706f6e736520, 0x3d20617761697420, 0x6665746368496d70, 0x6c2875726c2c207b, + 0x7369676e616c7d29, 0x3b0a202020206966, 0x202821726573706f, 0x6e73652e6f6b290a, 0x2020202020202020, + 0x7468726f77206e65, 0x77204572726f7228, 0x60247b75726c7d3a, 0x204854545020247b, 0x726573706f6e7365, + 0x2e7374617475737d, 0x60293b0a20202020, 0x72657475726e2072, 0x6573706f6e73653b, 0x0a7d0a0a6173796e, + 0x632066756e637469, 0x6f6e206665746368, 0x4a736f6e2875726c, 0x2c20666574636849, 0x6d706c2c20736967, + 0x6e616c29207b0a20, 0x2020207265747572, 0x6e20286177616974, 0x2066657463684f6b, 0x2875726c2c206665, + 0x746368496d706c2c, 0x207369676e616c29, 0x292e6a736f6e2829, 0x3b0a7d0a0a66756e, 0x6374696f6e207265, + 0x736f6c76654d616e, 0x6966657374287061, 0x636b756d656e742c, 0x206e616d652c2072, 0x6571756573746564, + 0x29207b0a20202020, 0x636f6e7374207461, 0x67203d2072657175, 0x6573746564207c7c, 0x20226c6174657374, + 0x223b0a2020202063, 0x6f6e737420766572, 0x73696f6e203d2070, 0x61636b756d656e74, 0x5b22646973742d74, + 0x616773225d3f2e5b, 0x7461675d203f3f20, 0x7265717565737465, 0x643b0a2020202063, 0x6f6e7374206d616e, + 0x6966657374203d20, 0x7061636b756d656e, 0x742e76657273696f, 0x6e733f2e5b766572, 0x73696f6e5d3b0a20, + 0x2020206966202821, 0x6d616e6966657374, 0x290a202020202020, 0x20207468726f7720, 0x6e6577204572726f, + 0x722860247b6e616d, 0x657d20686173206e, 0x6f2076657273696f, 0x6e2027247b746167, 0x7d2760293b0a2020, + 0x202072657475726e, 0x206d616e69666573, 0x743b0a7d0a0a2f2f, 0x2f20436865636b73, 0x2062797465732061, + 0x6761696e73742061, 0x6e2053524920696e, 0x7465677269747920, 0x737472696e672028, 0x227368613531322d, + 0x3c6261736536343e, 0x222c20706f737369, 0x626c792073657665, 0x72616c2068617368, 0x65730a2f2f2f2073, + 0x6570617261746564, 0x2062792073706163, 0x65732920616e6420, 0x72657475726e7320, 0x746865206d617463, + 0x68696e6720227368, 0x613531322de280a6, 0x2220686173682e20, 0x4f6e6c7920534841, 0x2d35313220697320, + 0x6163636570746564, 0x2e0a6578706f7274, 0x206173796e632066, 0x756e6374696f6e20, 0x766572696679496e, + 0x7465677269747928, 0x62797465732c2069, 0x6e74656772697479, 0x29207b0a20202020, 0x636f6e7374206578, + 0x706563746564203d, 0x20537472696e6728, 0x696e746567726974, 0x79203f3f20222229, 0x0a20202020202020, + 0x202e73706c697428, 0x2f5c732b2f290a20, 0x202020202020202e, 0x66696c7465722828, 0x6861736829203d3e, + 0x20686173682e7374, 0x6172747357697468, 0x2822736861353132, 0x2d2229290a202020, 0x20202020202e6d61, + 0x7028286861736829, 0x203d3e2068617368, 0x2e73706c69742822, 0x3f22295b305d293b, 0x0a20202020696620, + 0x2865787065637465, 0x642e6c656e677468, 0x203d3d3d2030290a, 0x2020202020202020, 0x7468726f77206e65, + 0x77204572726f7228, 0x2254686520706163, 0x6b61676520686173, 0x206e6f205348412d, 0x35313220696e7465, + 0x677269747922293b, 0x0a20202020696620, 0x2821676c6f62616c, 0x546869732e637279, 0x70746f3f2e737562, + 0x746c65290a202020, 0x2020202020746872, 0x6f77206e65772045, 0x72726f722822496e, 0x7465677269747920, + 0x636865636b73206e, 0x6565642061207365, 0x6375726520636f6e, 0x7465787420286874, 0x747073206f72206c, + 0x6f63616c686f7374, 0x2922293b0a202020, 0x20636f6e73742064, 0x6967657374203d20, 0x6e65772055696e74, + 0x3841727261792861, 0x7761697420637279, 0x70746f2e73756274, 0x6c652e6469676573, 0x7428225348412d35, + 0x3132222c20627974, 0x657329293b0a2020, 0x2020636f6e737420, 0x61637475616c203d, 0x2022736861353132, + 0x2d22202b2062746f, 0x612841727261792e, 0x66726f6d28646967, 0x6573742c20286279, 0x746529203d3e2053, + 0x7472696e672e6672, 0x6f6d43686172436f, 0x6465286279746529, 0x292e6a6f696e2822, 0x2229293b0a202020, + 0x2069662028216578, 0x7065637465642e69, 0x6e636c7564657328, 0x61637475616c2929, 0x0a20202020202020, + 0x207468726f77206e, 0x6577204572726f72, 0x2860496e74656772, 0x6974792063686563, 0x6b206661696c6564, + 0x3a20657870656374, 0x656420247b657870, 0x65637465645b305d, 0x7d2c20676f742024, 0x7b61637475616c7d, + 0x60293b0a20202020, 0x72657475726e2061, 0x637475616c3b0a7d, 0x0a0a2f2f2f204775, 0x6e7a697073206279, + 0x7465732c20666169, 0x6c696e67206f6e63, 0x65206d6f72652074, 0x68616e20606c696d, 0x6974602062797465, + 0x7320636f6d65206f, 0x75742e0a6578706f, 0x7274206173796e63, 0x2066756e6374696f, 0x6e2067756e7a6970, + 0x2862797465732c20, 0x6c696d6974203d20, 0x6d6178556e706163, 0x6b65644279746573, 0x29207b0a20202020, + 0x636f6e7374207265, 0x61646572203d206e, 0x657720426c6f6228, 0x5b62797465735d29, 0x2e73747265616d28, + 0x292e706970655468, 0x726f756768286e65, 0x77204465636f6d70, 0x72657373696f6e53, 0x747265616d282267, + 0x7a69702229292e67, 0x6574526561646572, 0x28293b0a20202020, 0x636f6e7374206368, 0x756e6b73203d205b, + 0x5d3b0a202020206c, 0x657420746f74616c, 0x203d20303b0a2020, 0x2020666f7220286c, 0x6574207265616420, + 0x3d20617761697420, 0x7265616465722e72, 0x65616428293b2021, 0x726561642e646f6e, 0x653b207265616420, + 0x3d20617761697420, 0x7265616465722e72, 0x656164282929207b, 0x0a20202020202020, 0x20746f74616c202b, + 0x3d20726561642e76, 0x616c75652e6c656e, 0x6774683b0a202020, 0x2020202020696620, 0x28746f74616c203e, + 0x206c696d69742920, 0x7b0a202020202020, 0x2020202020206177, 0x6169742072656164, 0x65722e63616e6365, + 0x6c28293b0a202020, 0x2020202020202020, 0x207468726f77206e, 0x6577204572726f72, 0x2860546865207461, + 0x7262616c6c20756e, 0x7061636b7320746f, 0x206d6f7265207468, 0x616e20247b6c696d, 0x69747d2062797465, + 0x7360293b0a202020, 0x20202020207d0a20, 0x2020202020202063, 0x68756e6b732e7075, 0x736828726561642e, + 0x76616c7565293b0a, 0x202020207d0a2020, 0x202072657475726e, 0x206e65772055696e, 0x7438417272617928, + 0x6177616974206e65, 0x7720426c6f622863, 0x68756e6b73292e61, 0x7272617942756666, 0x65722829293b0a7d, + 0x0a0a2f2f2041204e, 0x554c2d7465726d69, 0x6e61746564206865, 0x6164657220666965, 0x6c642e0a66756e63, + 0x74696f6e20746578, 0x7428626c6f636b2c, 0x206f66667365742c, 0x206c656e67746829, 0x207b0a2020202063, + 0x6f6e737420666965, 0x6c64203d20626c6f, 0x636b2e7375626172, 0x726179286f666673, 0x65742c206f666673, + 0x6574202b206c656e, 0x677468293b0a2020, 0x2020636f6e737420, 0x656e64203d206669, 0x656c642e696e6465, + 0x784f662830293b0a, 0x2020202072657475, 0x726e20757466382e, 0x6465636f64652865, 0x6e64203c2030203f, + 0x206669656c64203a, 0x206669656c642e73, 0x7562617272617928, 0x302c20656e642929, 0x3b0a7d0a0a2f2f20, + 0x416e206f6374616c, 0x206e756d6265722c, 0x206f722061206261, 0x73652d323536206f, 0x6e65207768656e20, + 0x7468652066697273, 0x7420627974652068, 0x6173206974732068, 0x6967682062697420, 0x7365742028474e55, + 0x20616e6420737461, 0x72292e0a66756e63, 0x74696f6e206e756d, 0x62657228626c6f63, 0x6b2c206f66667365, + 0x742c206c656e6774, 0x6829207b0a202020, 0x2069662028626c6f, 0x636b5b6f66667365, 0x745d202620307838, + 0x30290a2020202020, 0x2020207265747572, 0x6e20626c6f636b2e, 0x7375626172726179, 0x286f666673657420, + 0x2b20312c206f6666, 0x736574202b206c65, 0x6e677468292e7265, 0x6475636528287661, 0x6c75652c20627974, + 0x6529203d3e207661, 0x6c7565202a203235, 0x36202b2062797465, 0x2c20626c6f636b5b, 0x6f66667365745d20, + 0x262030783766293b, 0x0a20202020636f6e, 0x7374206469676974, 0x73203d2074657874, 0x28626c6f636b2c20, + 0x6f66667365742c20, 0x6c656e677468292e, 0x7472696d28293b0a, 0x2020202069662028, 0x212f5e5b302d375d, + 0x2a242f2e74657374, 0x2864696769747329, 0x290a202020202020, 0x20207468726f7720, 0x6e6577204572726f, + 0x722822436f727275, 0x7074207461722068, 0x656164657222293b, 0x0a20202020726574, 0x75726e2064696769, + 0x7473203d3d3d2022, 0x22203f2030203a20, 0x7061727365496e74, 0x286469676974732c, 0x2038293b0a7d0a0a, + 0x66756e6374696f6e, 0x2076657269667943, 0x6865636b73756d28, 0x6865616465722920, 0x7b0a202020206c65, + 0x742073756d203d20, 0x303b0a2020202066, 0x6f7220286c657420, 0x696e646578203d20, 0x303b20696e646578, + 0x203c20626c6f636b, 0x53697a653b202b2b, 0x696e646578290a20, 0x2020202020202073, 0x756d202b3d20696e, + 0x646578203e3d2031, 0x343820262620696e, 0x646578203c203135, 0x36203f2030783230, 0x203a206865616465, + 0x725b696e6465785d, 0x3b0a202020206966, 0x20286e756d626572, 0x286865616465722c, 0x203134382c203829, + 0x20213d3d2073756d, 0x290a202020202020, 0x20207468726f7720, 0x6e6577204572726f, 0x722822436f727275, + 0x7074207461722068, 0x6561646572206368, 0x65636b73756d2229, 0x3b0a7d0a0a2f2f20, 0x223c6c656e677468, + 0x3e203c6b65793e3d, 0x3c76616c75653e5c, 0x6e22207265636f72, 0x6473206f66206120, 0x7061782065787465, + 0x6e64656420686561, 0x6465723b206c656e, 0x6774687320636f75, 0x6e74206279746573, 0x2e0a66756e637469, + 0x6f6e207061785265, 0x636f726473286461, 0x746129207b0a2020, 0x2020636f6e737420, 0x7265636f72647320, + 0x3d207b7d3b0a2020, 0x20206c6574206f66, 0x66736574203d2030, 0x3b0a202020207768, 0x696c6520286f6666, + 0x736574203c206461, 0x74612e6c656e6774, 0x6829207b0a202020, 0x2020202020636f6e, 0x7374207370616365, + 0x203d20646174612e, 0x696e6465784f6628, 0x307832302c206f66, 0x66736574293b0a20, 0x2020202020202063, + 0x6f6e7374206c656e, 0x677468203d207370, 0x616365203c203020, 0x3f204e614e203a20, 0x4e756d6265722875, + 0x7466382e6465636f, 0x646528646174612e, 0x7375626172726179, 0x286f66667365742c, 0x2073706163652929, + 0x293b0a2020202020, 0x2020206966202821, 0x286c656e67746820, 0x3e203029207c7c20, 0x6f6666736574202b, + 0x206c656e67746820, 0x3e20646174612e6c, 0x656e677468290a20, 0x2020202020202020, 0x2020207468726f77, + 0x206e657720457272, 0x6f722822436f7272, 0x7570742070617820, 0x6865616465722229, 0x3b0a202020202020, + 0x2020636f6e737420, 0x7265636f7264203d, 0x20757466382e6465, 0x636f646528646174, 0x612e737562617272, + 0x6179287370616365, 0x202b20312c206f66, 0x66736574202b206c, 0x656e677468202d20, 0x3129293b0a202020, + 0x2020202020636f6e, 0x737420657175616c, 0x73203d207265636f, 0x72642e696e646578, 0x4f6628223d22293b, + 0x0a20202020202020, 0x207265636f726473, 0x5b7265636f72642e, 0x736c69636528302c, 0x20657175616c7329, + 0x5d203d207265636f, 0x72642e736c696365, 0x28657175616c7320, 0x2b2031293b0a2020, 0x2020202020206f66, + 0x66736574202b3d20, 0x6c656e6774683b0a, 0x202020207d0a2020, 0x202072657475726e, 0x207265636f726473, + 0x3b0a7d0a0a2f2f20, 0x54686520656e7472, 0x792077686f736520, 0x6865616465722073, 0x7461727473206174, + 0x20606f6666736574, 0x603a206974732068, 0x65616465722c2074, 0x79706520666c6167, 0x2c20646174612061, + 0x6e6420746865206f, 0x6666736574206f66, 0x20746865206e6578, 0x740a2f2f20656e74, 0x72792e0a66756e63, + 0x74696f6e20726561, 0x64456e7472792861, 0x7263686976652c20, 0x6f66667365742920, 0x7b0a20202020636f, + 0x6e73742068656164, 0x6572203d20617263, 0x686976652e737562, 0x6172726179286f66, 0x667365742c206f66, + 0x66736574202b2062, 0x6c6f636b53697a65, 0x293b0a2020202076, 0x6572696679436865, 0x636b73756d286865, + 0x61646572293b0a20, 0x202020636f6e7374, 0x2073697a65203d20, 0x6e756d6265722868, 0x65616465722c2031, + 0x32342c203132293b, 0x0a20202020636f6e, 0x7374207374617274, 0x203d206f66667365, 0x74202b20626c6f63, + 0x6b53697a653b0a20, 0x2020206966202873, 0x74617274202b2073, 0x697a65203e206172, 0x63686976652e6c65, + 0x6e677468290a2020, 0x2020202020207468, 0x726f77206e657720, 0x4572726f72282254, 0x72756e6361746564, + 0x2074617220617263, 0x6869766522293b0a, 0x2020202072657475, 0x726e207b0a202020, 0x2020202020686561, + 0x6465722c0a202020, 0x2020202020747970, 0x653a206865616465, 0x725b3135365d203d, 0x3d3d2030203f2022, + 0x3022203a20537472, 0x696e672e66726f6d, 0x43686172436f6465, 0x286865616465725b, 0x3135365d292c0a20, + 0x2020202020202064, 0x6174613a20617263, 0x686976652e737562, 0x6172726179287374, 0x6172742c20737461, + 0x7274202b2073697a, 0x65292c0a20202020, 0x202020206e657874, 0x3a20737461727420, 0x2b204d6174682e63, + 0x65696c2873697a65, 0x202f20626c6f636b, 0x53697a6529202a20, 0x626c6f636b53697a, 0x652c0a202020207d, + 0x3b0a7d0a0a2f2f20, 0x416e206172636869, 0x766520656e647320, 0x61742074776f207a, 0x65726f20626c6f63, + 0x6b733b206f6e6520, 0x697320656e6f7567, 0x6820746f2073746f, 0x702e0a66756e6374, 0x696f6e206973456e, + 0x6428617263686976, 0x652c206f66667365, 0x7429207b0a202020, 0x2072657475726e20, 0x6f6666736574202b, + 0x20626c6f636b5369, 0x7a65203e20617263, 0x686976652e6c656e, 0x677468207c7c2061, 0x7263686976652e73, + 0x7562617272617928, 0x6f66667365742c20, 0x6f6666736574202b, 0x20626c6f636b5369, 0x7a65292e65766572, + 0x7928286279746529, 0x203d3e2062797465, 0x203d3d3d2030293b, 0x0a7d0a0a2f2f2054, 0x6865206e616d6520, + 0x6669656c64206f66, 0x2061207573746172, 0x206865616465722c, 0x2061667465722069, 0x7473207072656669, + 0x78206669656c642e, 0x0a66756e6374696f, 0x6e20686561646572, 0x5061746828686561, 0x64657229207b0a20, + 0x202020636f6e7374, 0x206e616d65203d20, 0x7465787428686561, 0x6465722c20302c20, 0x313030293b0a2020, + 0x2020636f6e737420, 0x707265666978203d, 0x2074657874286865, 0x616465722c203235, 0x372c203529203d3d, + 0x3d20227573746172, 0x22203f2074657874, 0x286865616465722c, 0x203334352c203135, 0x3529203a2022223b, + 0x0a20202020726574, 0x75726e2070726566, 0x6978203f2060247b, 0x7072656669787d2f, 0x247b6e616d657d60, + 0x203a206e616d653b, 0x0a7d0a0a2f2f2045, 0x6e7472696573206e, 0x616d696e67207468, 0x65206e657874206f, + 0x6e653a2061207061, 0x7820657874656e64, 0x6564206865616465, 0x7220616e64206120, 0x474e55206c6f6e67, + 0x206e616d652e2041, 0x2070617820676c6f, 0x62616c2068656164, 0x6572206e616d6573, 0x0a2f2f206e6f7468, + 0x696e672057656246, 0x726f6e7420757365, 0x732e0a636f6e7374, 0x206e616d65456e74, 0x72696573203d207b, + 0x0a20202020783a20, 0x286e616d65732c20, 0x6461746129203d3e, 0x20287b2e2e2e6e61, 0x6d65732c20706178, + 0x3a20706178526563, 0x6f72647328646174, 0x61292e706174687d, 0x292c0a202020204c, 0x3a20286e616d6573, + 0x2c20646174612920, 0x3d3e20287b2e2e2e, 0x6e616d65732c206c, 0x6f6e673a20746578, 0x7428646174612c20, + 0x302c20646174612e, 0x6c656e677468297d, 0x292c0a2020202067, 0x3a20286e616d6573, 0x29203d3e206e616d, + 0x65732c0a7d3b0a0a, 0x2f2f2f2052656164, 0x7320612074617220, 0x6172636869766520, 0x2875737461722c20, + 0x7769746820706178, 0x20616e6420474e55, 0x206c6f6e67206e61, 0x6d65732920616e64, 0x2072657475726e73, + 0x2069747320726567, 0x756c61722066696c, 0x65732061730a2f2f, 0x2f207b706174682c, 0x2062797465737d2c, + 0x20696e2061726368, 0x697665206f726465, 0x722e204469726563, 0x746f726965732c20, 0x6c696e6b7320616e, + 0x64206f7468657220, 0x656e747269657320, 0x61726520736b6970, 0x7065642e0a657870, 0x6f72742066756e63, + 0x74696f6e20726561, 0x6454617228617263, 0x6869766529207b0a, 0x20202020636f6e73, 0x742066696c657320, + 0x3d205b5d3b0a2020, 0x20206c6574206e61, 0x6d6573203d207b7d, 0x3b0a20202020666f, 0x7220286c6574206f, + 0x6666736574203d20, 0x303b20216973456e, 0x6428617263686976, 0x652c206f66667365, 0x74293b29207b0a20, + 0x2020202020202063, 0x6f6e7374207b6865, 0x616465722c207479, 0x70652c2064617461, 0x2c206e6578747d20, + 0x3d2072656164456e, 0x7472792861726368, 0x6976652c206f6666, 0x736574293b0a2020, 0x2020202020206f66, + 0x66736574203d206e, 0x6578743b0a202020, 0x2020202020696620, 0x284f626a6563742e, 0x6861734f776e286e, + 0x616d65456e747269, 0x65732c2074797065, 0x2929207b0a202020, 0x2020202020202020, 0x206e616d6573203d, + 0x206e616d65456e74, 0x726965735b747970, 0x655d286e616d6573, 0x2c2064617461293b, 0x0a20202020202020, + 0x2020202020636f6e, 0x74696e75653b0a20, 0x202020202020207d, 0x0a20202020202020, 0x2069662028747970, + 0x65203d3d3d202230, 0x22207c7c20747970, 0x65203d3d3d202237, 0x22290a2020202020, 0x2020202020202066, + 0x696c65732e707573, 0x68287b706174683a, 0x206e616d65732e70, 0x6178203f3f206e61, 0x6d65732e6c6f6e67, + 0x203f3f2068656164, 0x6572506174682868, 0x6561646572292c20, 0x62797465733a2064, 0x6174617d293b0a20, + 0x202020202020206e, 0x616d6573203d207b, 0x7d3b0a202020207d, 0x0a20202020726574, 0x75726e2066696c65, + 0x733b0a7d0a0a2f2f, 0x2f20546865206669, 0x6c6573206f662061, 0x6e206e706d207461, 0x7262616c6c206279, + 0x2070617468207265, 0x6c61746976652074, 0x6f20746865207061, 0x636b61676520726f, 0x6f743a2074686520, + 0x6669727374207061, 0x746820636f6d706f, 0x6e656e740a2f2f2f, 0x20286e6f726d616c, 0x6c7920227061636b, + 0x6167652f22292069, 0x732072656d6f7665, 0x642c206173206e70, 0x6d20646f65732e20, 0x41206c6174657220, + 0x656e747279207265, 0x706c616365732061, 0x6e206561726c6965, 0x72206f6e652e0a66, 0x756e6374696f6e20, + 0x7061636b61676546, 0x696c657328656e74, 0x7269657329207b0a, 0x20202020636f6e73, 0x742066696c657320, + 0x3d206e6577204d61, 0x7028293b0a202020, 0x20666f722028636f, 0x6e7374207b706174, 0x682c206279746573, + 0x7d206f6620656e74, 0x7269657329207b0a, 0x2020202020202020, 0x636f6e7374207265, 0x6c6174697665203d, + 0x20706174682e7265, 0x706c616365282f5e, 0x285c2e3f5c2f292b, 0x2f2c202222292e73, 0x706c697428222f22, + 0x292e736c69636528, 0x31292e6a6f696e28, 0x222f22293b0a2020, 0x2020202020206966, 0x202872656c617469, + 0x766520213d3d2022, 0x22290a2020202020, 0x2020202020202066, 0x696c65732e736574, 0x2872656c61746976, + 0x652c206279746573, 0x293b0a202020207d, 0x0a20202020726574, 0x75726e2066696c65, 0x733b0a7d0a0a6675, + 0x6e6374696f6e2070, 0x61636b6167654a73, 0x6f6e2866696c6573, 0x2c206e616d652c20, 0x76657273696f6e29, + 0x207b0a2020202063, 0x6f6e7374206d616e, 0x6966657374203d20, 0x66696c65732e6765, 0x7428227061636b61, + 0x67652e6a736f6e22, 0x293b0a2020202069, 0x662028216d616e69, 0x66657374290a2020, 0x2020202020207468, + 0x726f77206e657720, 0x4572726f72286024, 0x7b6e616d657d4024, 0x7b76657273696f6e, 0x7d20686173206e6f, + 0x207061636b616765, 0x2e6a736f6e60293b, 0x0a20202020636f6e, 0x737420706b67203d, 0x204a534f4e2e7061, + 0x7273652875746638, 0x2e6465636f646528, 0x6d616e6966657374, 0x29293b0a20202020, 0x69662028706b672e, + 0x6e616d6520213d3d, 0x206e616d65207c7c, 0x20706b672e766572, 0x73696f6e20213d3d, 0x2076657273696f6e, + 0x290a202020202020, 0x20207468726f7720, 0x6e6577204572726f, 0x7228605468652061, 0x7263686976652063, + 0x6f6e7461696e7320, 0x247b706b672e6e61, 0x6d657d40247b706b, 0x672e76657273696f, 0x6e7d2c206e6f7420, + 0x247b6e616d657d40, 0x247b76657273696f, 0x6e7d60293b0a2020, 0x202072657475726e, 0x20706b673b0a7d0a, + 0x0a636f6e73742069, 0x73546f6f6c203d20, 0x286669656c642920, 0x3d3e206669656c64, 0x3f2e6b696e64203d, + 0x3d3d2022746f6f6c, 0x2220262620747970, 0x656f66206669656c, 0x642e656e74727920, 0x3d3d3d2022737472, + 0x696e67223b0a0a66, 0x756e6374696f6e20, 0x746f6f6c4f662866, 0x696c65732c206e61, 0x6d652c2076657273, + 0x696f6e29207b0a20, 0x202020636f6e7374, 0x20746f6f6c203d20, 0x7061636b6167654a, 0x736f6e2866696c65, + 0x732c206e616d652c, 0x2076657273696f6e, 0x292e77656266726f, 0x6e743b0a20202020, 0x6966202821697354, + 0x6f6f6c28746f6f6c, 0x29290a2020202020, 0x2020207468726f77, 0x206e657720457272, 0x6f722860247b6e61, + 0x6d657d206973206e, 0x6f74206120576562, 0x46726f6e7420746f, 0x6f6c3a2069747320, 0x7061636b6167652e, + 0x6a736f6e20686173, 0x206e6f2077656266, 0x726f6e7420666965, 0x6c64207769746820, 0x6b696e642022746f, + 0x6f6c2220616e6420, 0x616e20656e747279, 0x60293b0a20202020, 0x72657475726e207b, 0x656e7472793a2074, + 0x6f6f6c2e656e7472, 0x792e7265706c6163, 0x65282f5e285c2e5c, 0x2f292b2f2c202222, 0x292c207469746c65, + 0x3a20747970656f66, 0x20746f6f6c2e7469, 0x746c65203d3d3d20, 0x22737472696e6722, 0x203f20746f6f6c2e, + 0x7469746c65203a20, 0x6e616d657d3b0a7d, 0x0a0a636f6e737420, 0x706b6746756e6374, 0x696f6e203d202862, + 0x72696467652c206e, 0x616d6529203d3e20, 0x6272696467652e63, 0x707046756e637469, 0x6f6e286077656266, + 0x726f6e742e706b67, 0x2e247b6e616d657d, 0x60293b0a0a2f2f2f, 0x204f7074696f6e73, 0x2073686172656420, + 0x6279207365617263, 0x68282920616e6420, 0x696e7374616c6c28, 0x293a0a2f2f2f2020, 0x2062726964676520, + 0x2020207468652057, 0x656246726f6e7420, 0x6272696467652028, 0x676c6f62616c5468, 0x69732e7765624672, + 0x6f6e74290a2f2f2f, 0x2020207265676973, 0x7472792020746865, 0x206e706d20726567, 0x6973747279205552, + 0x4c20286465666175, 0x6c743a2077656266, 0x726f6e742e706b67, 0x2e72656769737472, 0x7928292c20736574, + 0x20696e20546f6f6c, 0x4d616e616765724f, 0x7074696f6e73290a, 0x2f2f2f2020206665, 0x7463682020202020, + 0x7468652066657463, 0x682066756e637469, 0x6f6e0a2f2f2f2020, 0x207369676e616c20, 0x202020616e204162, + 0x6f72745369676e61, 0x6c2073746f707069, 0x6e67207468652064, 0x6f776e6c6f616473, 0x20616e6420746865, + 0x2075706c6f61640a, 0x6173796e63206675, 0x6e6374696f6e2073, 0x657474696e677328, 0x7b62726964676520, + 0x3d20676c6f62616c, 0x546869732e776562, 0x46726f6e742c2072, 0x656769737472792c, 0x2066657463683a20, + 0x6665746368496d70, 0x6c203d20282e2e2e, 0x6172677329203d3e, 0x20676c6f62616c54, 0x6869732e66657463, + 0x68282e2e2e617267, 0x73292c207369676e, 0x616c7d203d207b7d, 0x29207b0a20202020, 0x72657475726e207b, + 0x6272696467652c20, 0x6665746368496d70, 0x6c2c207369676e61, 0x6c2c20626173653a, 0x2072656769737472, + 0x7942617365287265, 0x676973747279203f, 0x3f20286177616974, 0x20706b6746756e63, 0x74696f6e28627269, + 0x6467652c20227265, 0x6769737472792229, 0x282929297d3b0a7d, 0x0a0a2f2f2f205365, 0x6172636865732074, + 0x6865207265676973, 0x74727920666f7220, 0x7061636b61676573, 0x2077697468207468, 0x652077656266726f, + 0x6e742d746f6f6c20, 0x6b6579776f72642e, 0x2052657475726e73, 0x207b6e616d652c20, 0x76657273696f6e2c, + 0x0a2f2f2f20646573, 0x6372697074696f6e, 0x7d206f626a656374, 0x732e0a6578706f72, 0x74206173796e6320, + 0x66756e6374696f6e, 0x2073656172636828, 0x7465726d2c206f70, 0x74696f6e7329207b, 0x0a20202020636f6e, + 0x7374207b66657463, 0x68496d706c2c2073, 0x69676e616c2c2062, 0x6173657d203d2061, 0x7761697420736574, + 0x74696e6773286f70, 0x74696f6e73293b0a, 0x20202020636f6e73, 0x742075726c203d20, 0x6e65772055524c28, + 0x222d2f76312f7365, 0x61726368222c2062, 0x617365293b0a2020, 0x202075726c2e7365, 0x6172636850617261, + 0x6d732e7365742822, 0x74657874222c2060, 0x6b6579776f726473, 0x3a77656266726f6e, 0x742d746f6f6c2024, + 0x7b7465726d7d602e, 0x7472696d2829293b, 0x0a2020202075726c, 0x2e73656172636850, 0x6172616d732e7365, + 0x74282273697a6522, 0x2c2022323022293b, 0x0a20202020636f6e, 0x737420726573756c, 0x74203d2061776169, + 0x742066657463684a, 0x736f6e2875726c2c, 0x206665746368496d, 0x706c2c207369676e, 0x616c293b0a202020, + 0x2072657475726e20, 0x28726573756c742e, 0x6f626a6563747320, 0x3f3f205b5d292e6d, 0x617028287b706163, + 0x6b6167653a20666f, 0x756e647d29203d3e, 0x20287b0a20202020, 0x202020206e616d65, 0x3a20666f756e642e, + 0x6e616d652c0a2020, 0x2020202020207665, 0x7273696f6e3a2066, 0x6f756e642e766572, 0x73696f6e2c0a2020, + 0x2020202020206465, 0x736372697074696f, 0x6e3a20666f756e64, 0x2e64657363726970, 0x74696f6e203f3f20, + 0x22222c0a20202020, 0x7d29293b0a7d0a0a, 0x2f2f20446f776e6c, 0x6f61647320746865, 0x2074617262616c6c, + 0x206f662061206d61, 0x6e69666573742061, 0x6e64207265747572, 0x6e73206974732066, 0x696c657320776974, + 0x6820746865207665, 0x7269666965642069, 0x6e74656772697479, 0x2e0a6173796e6320, 0x66756e6374696f6e, + 0x20646f776e6c6f61, 0x64286d616e696665, 0x73742c207061636b, 0x756d656e744c6f63, 0x6174696f6e2c2066, + 0x65746368496d706c, 0x2c207369676e616c, 0x29207b0a20202020, 0x636f6e7374207461, 0x7262616c6c55726c, + 0x203d206e65772055, 0x524c286d616e6966, 0x6573742e64697374, 0x3f2e74617262616c, 0x6c203f3f2022222c, + 0x207061636b756d65, 0x6e744c6f63617469, 0x6f6e293b0a202020, 0x20636f6e73742074, 0x617262616c6c203d, + 0x206e65772055696e, 0x7438417272617928, 0x6177616974202861, 0x7761697420666574, 0x63684f6b28746172, + 0x62616c6c55726c2c, 0x206665746368496d, 0x706c2c207369676e, 0x616c29292e617272, 0x6179427566666572, + 0x2829293b0a202020, 0x20636f6e73742069, 0x6e74656772697479, 0x203d206177616974, 0x2076657269667949, + 0x6e74656772697479, 0x2874617262616c6c, 0x2c206d616e696665, 0x73742e646973743f, 0x2e696e7465677269, + 0x7479293b0a202020, 0x2072657475726e20, 0x7b696e7465677269, 0x74792c2066696c65, 0x733a207061636b61, + 0x676546696c657328, 0x7265616454617228, 0x6177616974206775, 0x6e7a697028746172, 0x62616c6c2929297d, + 0x3b0a7d0a0a2f2f20, 0x53656e6473207468, 0x652066696c657320, 0x746f207765626672, 0x6f6e742e706b672e, + 0x777269746546696c, 0x6520696e20636875, 0x6e6b733b20616e20, 0x656d707479206669, 0x6c65206973207365, + 0x6e74206173206f6e, 0x6520656d70747920, 0x6368756e6b2e0a61, 0x73796e632066756e, 0x6374696f6e207570, + 0x6c6f61642866696c, 0x65732c207b627269, 0x6467652c206e616d, 0x652c207665727369, 0x6f6e2c207369676e, + 0x616c7d29207b0a20, 0x202020636f6e7374, 0x2077726974654669, 0x6c65203d20706b67, 0x46756e6374696f6e, + 0x286272696467652c, 0x2022777269746546, 0x696c6522293b0a20, 0x202020666f722028, 0x636f6e7374205b70, + 0x6174682c20627974, 0x65735d206f662066, 0x696c657329207b0a, 0x2020202020202020, 0x6c6574206f666673, + 0x6574203d20303b0a, 0x2020202020202020, 0x646f207b0a202020, 0x2020202020202020, 0x207369676e616c3f, + 0x2e7468726f774966, 0x41626f7274656428, 0x293b0a2020202020, 0x2020202020202063, 0x6f6e737420636875, + 0x6e6b203d20627974, 0x65732e7375626172, 0x726179286f666673, 0x65742c206f666673, 0x6574202b20636875, + 0x6e6b53697a65293b, 0x0a20202020202020, 0x2020202020617761, 0x6974207772697465, 0x46696c65286e616d, + 0x652c207665727369, 0x6f6e2c2070617468, 0x2c206f6666736574, 0x2c206368756e6b29, 0x3b0a202020202020, + 0x2020202020206f66, 0x66736574202b3d20, 0x6368756e6b2e6c65, 0x6e6774683b0a2020, 0x2020202020207d20, + 0x7768696c6520286f, 0x6666736574203c20, 0x62797465732e6c65, 0x6e677468293b0a20, 0x2020207d0a7d0a0a, + 0x2f2f2f20446f776e, 0x6c6f6164732c2076, 0x6572696669657320, 0x616e642073746f72, 0x657320226e616d65, + 0x5b4076657273696f, 0x6e206f7220646973, 0x742d7461675d2220, 0x286c617465737420, 0x6279206465666175, + 0x6c74292e20607072, 0x6f67726573732874, 0x65787429600a2f2f, 0x2f207265706f7274, 0x7320746865207374, + 0x6570732e20526573, 0x6f6c76657320746f, 0x207b6e616d652c20, 0x76657273696f6e2c, 0x207469746c652c20, + 0x656e7472792c2066, 0x696c65737d3b2072, 0x656a656374732077, 0x6974686f75742063, 0x68616e67696e6720, + 0x7468650a2f2f2f20, 0x696e7374616c6c65, 0x642076657273696f, 0x6e207768656e2061, 0x6e797468696e6720, + 0x6661696c73206f72, 0x20607369676e616c, 0x602069732061626f, 0x727465642e0a6578, 0x706f727420617379, + 0x6e632066756e6374, 0x696f6e20696e7374, 0x616c6c2873706563, 0x2c207b70726f6772, 0x657373203d202829, + 0x203d3e207b7d2c20, 0x2e2e2e6f7074696f, 0x6e737d203d207b7d, 0x29207b0a20202020, 0x636f6e7374207b6e, + 0x616d652c20766572, 0x73696f6e3a207265, 0x717565737465647d, 0x203d207061727365, 0x5370656328737065, + 0x63293b0a20202020, 0x636f6e7374207b62, 0x72696467652c2066, 0x65746368496d706c, 0x2c207369676e616c, + 0x2c20626173657d20, 0x3d20617761697420, 0x73657474696e6773, 0x286f7074696f6e73, 0x293b0a2020202063, + 0x6f6e737420706163, 0x6b756d656e744c6f, 0x636174696f6e203d, 0x207061636b756d65, 0x6e7455726c286261, + 0x73652c206e616d65, 0x293b0a2020202063, 0x6f6e7374206d616e, 0x6966657374203d20, 0x7265736f6c76654d, + 0x616e696665737428, 0x6177616974206665, 0x7463684a736f6e28, 0x7061636b756d656e, 0x744c6f636174696f, + 0x6e2c206665746368, 0x496d706c2c207369, 0x676e616c292c206e, 0x616d652c20726571, 0x756573746564293b, + 0x0a20202020636f6e, 0x7374207b76657273, 0x696f6e7d203d206d, 0x616e69666573743b, 0x0a2020202070726f, + 0x6772657373286044, 0x6f776e6c6f616469, 0x6e6720247b6e616d, 0x657d40247b766572, 0x73696f6e7de280a6, + 0x60293b0a20202020, 0x636f6e7374207b69, 0x6e74656772697479, 0x2c2066696c65737d, 0x203d206177616974, + 0x20646f776e6c6f61, 0x64286d616e696665, 0x73742c207061636b, 0x756d656e744c6f63, 0x6174696f6e2c2066, + 0x65746368496d706c, 0x2c207369676e616c, 0x293b0a2020202063, 0x6f6e7374207b656e, 0x7472792c20746974, + 0x6c657d203d20746f, 0x6f6c4f662866696c, 0x65732c206e616d65, 0x2c2076657273696f, 0x6e293b0a20202020, + 0x696620282166696c, 0x65732e6861732865, 0x6e74727929290a20, 0x2020202020202074, 0x68726f77206e6577, + 0x204572726f722860, 0x54686520656e7472, 0x7920706167652024, 0x7b656e7472797d20, 0x6f6620247b6e616d, + 0x657d206973206e6f, 0x7420696e20746865, 0x207061636b616765, 0x60293b0a0a202020, 0x2070726f67726573, + 0x732860496e737461, 0x6c6c696e6720247b, 0x66696c65732e7369, 0x7a657d2066696c65, 0x73e280a660293b0a, + 0x2020202061776169, 0x7420706b6746756e, 0x6374696f6e286272, 0x696467652c202262, 0x6567696e2229286e, + 0x616d652c20766572, 0x73696f6e293b0a20, 0x2020206177616974, 0x2075706c6f616428, 0x66696c65732c207b, + 0x6272696467652c20, 0x6e616d652c207665, 0x7273696f6e2c2073, 0x69676e616c7d293b, 0x0a20202020736967, + 0x6e616c3f2e746872, 0x6f77496641626f72, 0x74656428293b0a20, 0x2020206177616974, 0x20706b6746756e63, + 0x74696f6e28627269, 0x6467652c2022636f, 0x6d6d69742229286e, 0x616d652c20766572, 0x73696f6e2c20696e, + 0x746567726974792c, 0x20656e7472792c20, 0x7469746c65293b0a, 0x2020202072657475, 0x726e207b6e616d65, + 0x2c2076657273696f, 0x6e2c207469746c65, 0x2c20656e7472792c, 0x2066696c65733a20, 0x66696c65732e7369, + 0x7a657d3b0a7d0a0a, 0x2f2f2f2054686520, 0x696e7374616c6c65, 0x6420746f6f6c732c, 0x2066726f6d207468, + 0x6520706167657320, 0x6f66207765626672, 0x6f6e742e706b672e, 0x6c69737428293a20, 0x7b6e616d652c2076, + 0x657273696f6e2c20, 0x75726c2c20746974, 0x6c657d206f626a65, 0x6374732e0a657870, 0x6f7274206173796e, + 0x632066756e637469, 0x6f6e20696e737461, 0x6c6c656428627269, 0x646765203d20676c, 0x6f62616c54686973, + 0x2e77656246726f6e, 0x7429207b0a202020, 0x20636f6e7374206c, 0x697374203d20706b, 0x6746756e6374696f, + 0x6e28627269646765, 0x2c20226c69737422, 0x293b0a2020202063, 0x6f6e737420746f6f, 0x6c73203d205b5d3b, + 0x0a20202020666f72, 0x20283b3b29207b0a, 0x2020202020202020, 0x636f6e7374206c69, 0x6e6573203d202861, + 0x77616974206c6973, 0x7428746f6f6c732e, 0x6c656e6774682929, 0x2e73706c69742822, 0x5c6e22292e66696c, + 0x74657228286c696e, 0x6529203d3e206c69, 0x6e6520213d3d2022, 0x22293b0a20202020, 0x2020202069662028, + 0x6c696e65732e6c65, 0x6e677468203d3d3d, 0x2030290a20202020, 0x2020202020202020, 0x72657475726e2074, + 0x6f6f6c733b0a2020, 0x202020202020666f, 0x722028636f6e7374, 0x206c696e65206f66, 0x206c696e65732920, + 0x7b0a202020202020, 0x202020202020636f, 0x6e7374205b6e616d, 0x652c207665727369, 0x6f6e2c2075726c2c, + 0x207469746c655d20, 0x3d206c696e652e73, 0x706c697428225c74, 0x22293b0a20202020, 0x2020202020202020, + 0x746f6f6c732e7075, 0x7368287b6e616d65, 0x2c2076657273696f, 0x6e2c2075726c2c20, 0x7469746c657d293b, + 0x0a20202020202020, 0x207d0a202020207d, 0x0a7d0a0a2f2f2f20, 0x4f70656e73207468, 0x6520656e74727920, + 0x70616765206f6620, 0x616e20696e737461, 0x6c6c656420746f6f, 0x6c20696e2061206e, 0x657720746162206f, + 0x722077696e646f77, 0x2c20616e64207265, 0x736f6c7665732074, 0x6f20697473205552, 0x4c2e0a6578706f72, + 0x74206173796e6320, 0x66756e6374696f6e, 0x206f70656e286e61, 0x6d652c2062726964, 0x6765203d20676c6f, + 0x62616c546869732e, 0x77656246726f6e74, 0x29207b0a20202020, 0x636f6e737420746f, 0x6f6c203d20286177, + 0x61697420696e7374, 0x616c6c6564286272, 0x6964676529292e66, 0x696e64282863616e, 0x6469646174652920, + 0x3d3e2063616e6469, 0x646174652e6e616d, 0x65203d3d3d206e61, 0x6d65293b0a202020, 0x206966202821746f, + 0x6f6c290a20202020, 0x202020207468726f, 0x77206e6577204572, 0x726f722860247b6e, 0x616d657d20697320, + 0x6e6f7420696e7374, 0x616c6c656460293b, 0x0a20202020726574, 0x75726e207b2e2e2e, 0x746f6f6c2c206f70, + 0x656e65643a20676c, 0x6f62616c54686973, 0x2e6f70656e28746f, 0x6f6c2e75726c2c20, 0x225f626c616e6b22, + 0x2920213d3d206e75, 0x6c6c7d3b0a7d0a0a, 0x66756e6374696f6e, 0x2072657175697265, 0x4f6e652861726773, + 0x29207b0a20202020, 0x6966202861726773, 0x2e6c656e67746820, 0x213d3d2031290a20, 0x2020202020202074, + 0x68726f77206e6577, 0x204572726f722822, 0x57726f6e67206e75, 0x6d626572206f6620, 0x617267756d656e74, + 0x732e205479706520, 0x2777662068656c70, 0x272e22293b0a2020, 0x202072657475726e, 0x20617267735b305d, + 0x3b0a7d0a0a66756e, 0x6374696f6e20666f, 0x726d6174466f756e, 0x6428666f756e6429, 0x207b0a2020202069, + 0x662028666f756e64, 0x2e6c656e67746820, 0x3d3d3d2030290a20, 0x2020202020202072, 0x657475726e20224e, + 0x6f20746f6f6c2066, 0x6f756e642e223b0a, 0x20202020636f6e73, 0x7420776964746820, 0x3d204d6174682e6d, + 0x6178282e2e2e666f, 0x756e642e6d617028, 0x287b6e616d652c20, 0x76657273696f6e7d, 0x29203d3e206e616d, + 0x652e6c656e677468, 0x202b207665727369, 0x6f6e2e6c656e6774, 0x68202b203129293b, 0x0a20202020726574, + 0x75726e20666f756e, 0x642e6d617028287b, 0x6e616d652c207665, 0x7273696f6e2c2064, 0x6573637269707469, + 0x6f6e7d29203d3e20, 0x60247b6e616d657d, 0x40247b7665727369, 0x6f6e7d602e706164, 0x456e642877696474, + 0x68202b203229202b, 0x2064657363726970, 0x74696f6e292e6a6f, 0x696e28225c6e2229, 0x3b0a7d0a0a2f2f20, + 0x5468652077662073, 0x7562636f6d6d616e, 0x64732072756e6e69, 0x6e6720696e207468, 0x652062726f777365, + 0x723b20277766206c, 0x697374272c202777, 0x662072656d6f7665, 0x2720616e64202777, 0x662068656c702720, + 0x72756e20696e2043, 0x2b2b2e0a636f6e73, 0x7420737562636f6d, 0x6d616e6473203d20, 0x7b0a202020207365, + 0x617263683a206173, 0x796e632028617267, 0x732c207b62726964, 0x67652c207369676e, 0x616c7d29203d3e20, + 0x666f726d6174466f, 0x756e642861776169, 0x7420736561726368, 0x28617267732e6a6f, 0x696e28222022292c, + 0x207b627269646765, 0x2c207369676e616c, 0x7d29292c0a202020, 0x20696e7374616c6c, 0x3a206173796e6320, + 0x28617267732c207b, 0x6272696467652c20, 0x7369676e616c2c20, 0x77726974657d2920, 0x3d3e207b0a202020, + 0x2020202020636f6e, 0x737420746f6f6c20, 0x3d20617761697420, 0x696e7374616c6c28, 0x726571756972654f, + 0x6e65286172677329, 0x2c207b6272696467, 0x652c207369676e61, 0x6c2c2070726f6772, 0x6573733a20287374, + 0x657029203d3e2077, 0x7269746528737465, 0x70202b20225c6e22, 0x297d293b0a202020, 0x2020202020726574, + 0x75726e2060496e73, 0x74616c6c65642024, 0x7b746f6f6c2e6e61, 0x6d657d40247b746f, 0x6f6c2e7665727369, + 0x6f6e7d3a20247b74, 0x6f6f6c2e7469746c, 0x657d2e2054797065, 0x20277766206f7065, 0x6e20247b746f6f6c, + 0x2e6e616d657d272e, 0x603b0a202020207d, 0x2c0a202020206f70, 0x656e3a206173796e, 0x632028617267732c, + 0x207b627269646765, 0x7d29203d3e207b0a, 0x2020202020202020, 0x636f6e737420746f, 0x6f6c203d20617761, + 0x6974206f70656e28, 0x726571756972654f, 0x6e65286172677329, 0x2c20627269646765, 0x293b0a2020202020, + 0x2020207265747572, 0x6e20746f6f6c2e6f, 0x70656e6564203f20, 0x604f70656e656420, 0x247b746f6f6c2e74, + 0x69746c657d3a2024, 0x7b746f6f6c2e7572, 0x6c7d60203a206054, 0x68652062726f7773, 0x657220626c6f636b, + 0x656420746865206e, 0x65772077696e646f, 0x772e204f70656e20, 0x247b746f6f6c2e75, 0x726c7d603b0a2020, + 0x20207d2c0a7d3b0a, 0x0a6173796e632066, 0x756e6374696f6e20, 0x7766285b636f6d6d, 0x616e642c202e2e2e, + 0x617267735d2c2063, 0x6f6e746578742920, 0x7b0a202020207265, 0x7475726e204f626a, 0x6563742e6861734f, + 0x776e28737562636f, 0x6d6d616e64732c20, 0x636f6d6d616e6429, 0x203f20737562636f, 0x6d6d616e64735b63, + 0x6f6d6d616e645d28, 0x617267732c20636f, 0x6e7465787429203a, 0x20756e646566696e, 0x65643b0a7d0a0a2f, + 0x2f2f205465726d69, 0x6e616c2062726f77, 0x73657220636f6d6d, 0x616e647320287365, 0x65205465726d696e, + 0x616c3a3a65787465, 0x6e73696f6e292e0a, 0x6578706f72742063, 0x6f6e737420636f6d, 0x6d616e6473203d20, + 0x7b77667d3b0a0000 + }; +}; + +} // namespace webfront::fs::generated diff --git a/include/system/ToolStore.hpp b/include/webfront/system/ToolStore.hpp similarity index 100% rename from include/system/ToolStore.hpp rename to include/webfront/system/ToolStore.hpp diff --git a/include/system/WebFrontJsData.hpp b/include/webfront/system/WebFrontJsData.hpp similarity index 100% rename from include/system/WebFrontJsData.hpp rename to include/webfront/system/WebFrontJsData.hpp diff --git a/include/system/WindowsCompat.hpp b/include/webfront/system/WindowsCompat.hpp similarity index 100% rename from include/system/WindowsCompat.hpp rename to include/webfront/system/WindowsCompat.hpp diff --git a/include/system/XtermCssData.hpp b/include/webfront/system/XtermCssData.hpp similarity index 100% rename from include/system/XtermCssData.hpp rename to include/webfront/system/XtermCssData.hpp diff --git a/include/system/XtermFitAddonData.hpp b/include/webfront/system/XtermFitAddonData.hpp similarity index 100% rename from include/system/XtermFitAddonData.hpp rename to include/webfront/system/XtermFitAddonData.hpp diff --git a/include/system/XtermModuleData.hpp b/include/webfront/system/XtermModuleData.hpp similarity index 100% rename from include/system/XtermModuleData.hpp rename to include/webfront/system/XtermModuleData.hpp diff --git a/include/tooling/HexDump.hpp b/include/webfront/tooling/HexDump.hpp similarity index 100% rename from include/tooling/HexDump.hpp rename to include/webfront/tooling/HexDump.hpp diff --git a/include/tooling/Logger.hpp b/include/webfront/tooling/Logger.hpp similarity index 100% rename from include/tooling/Logger.hpp rename to include/webfront/tooling/Logger.hpp diff --git a/include/tooling/LoggerApi.hpp b/include/webfront/tooling/LoggerApi.hpp similarity index 100% rename from include/tooling/LoggerApi.hpp rename to include/webfront/tooling/LoggerApi.hpp diff --git a/include/tooling/MddlogLogger.hpp b/include/webfront/tooling/MddlogLogger.hpp similarity index 100% rename from include/tooling/MddlogLogger.hpp rename to include/webfront/tooling/MddlogLogger.hpp diff --git a/include/tooling/PathUtils.hpp b/include/webfront/tooling/PathUtils.hpp similarity index 98% rename from include/tooling/PathUtils.hpp rename to include/webfront/tooling/PathUtils.hpp index b4e0ffcf..7f910fd2 100644 --- a/include/tooling/PathUtils.hpp +++ b/include/webfront/tooling/PathUtils.hpp @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/utils/Json.hpp b/include/webfront/utils/Json.hpp similarity index 100% rename from include/utils/Json.hpp rename to include/webfront/utils/Json.hpp diff --git a/include/utils/TypeErasedFunction.hpp b/include/webfront/utils/TypeErasedFunction.hpp similarity index 100% rename from include/utils/TypeErasedFunction.hpp rename to include/webfront/utils/TypeErasedFunction.hpp diff --git a/include/weblink/Messages.hpp b/include/webfront/weblink/Messages.hpp similarity index 100% rename from include/weblink/Messages.hpp rename to include/webfront/weblink/Messages.hpp diff --git a/include/weblink/PendingCalls.hpp b/include/webfront/weblink/PendingCalls.hpp similarity index 100% rename from include/weblink/PendingCalls.hpp rename to include/webfront/weblink/PendingCalls.hpp diff --git a/include/weblink/WebLink.hpp b/include/webfront/weblink/WebLink.hpp similarity index 100% rename from include/weblink/WebLink.hpp rename to include/webfront/weblink/WebLink.hpp diff --git a/cmake/EmbedTextAsset.cmake b/js/core/EmbedTextAsset.cmake similarity index 98% rename from cmake/EmbedTextAsset.cmake rename to js/core/EmbedTextAsset.cmake index aafecece..99c6acfc 100644 --- a/cmake/EmbedTextAsset.cmake +++ b/js/core/EmbedTextAsset.cmake @@ -16,7 +16,7 @@ set(encoding "") if(GZIP) find_program(NODE_EXECUTABLE NAMES node nodejs REQUIRED) set(compressed "${CMAKE_CURRENT_BINARY_DIR}/${STRUCT}.gz") - execute_process(COMMAND "${NODE_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/../tools/assets/gzip.mjs" + execute_process(COMMAND "${NODE_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/../developer/vendor/gzip.mjs" "${INPUT}" "${compressed}" RESULT_VARIABLE result) if(NOT result EQUAL 0) message(FATAL_ERROR "gzip generation failed for ${INPUT}") diff --git a/assets/WebFront.js b/js/core/WebFront.js similarity index 100% rename from assets/WebFront.js rename to js/core/WebFront.js diff --git a/cmake/WebFrontAssets.cmake b/js/core/WebFrontAssets.cmake similarity index 71% rename from cmake/WebFrontAssets.cmake rename to js/core/WebFrontAssets.cmake index 53623f0b..37cbf40b 100644 --- a/cmake/WebFrontAssets.cmake +++ b/js/core/WebFrontAssets.cmake @@ -30,52 +30,52 @@ endfunction() function(webfront_add_embedded_assets) find_package(Git QUIET) - set(root "${_WEBFRONT_ASSETS_DIR}/..") + set(root "${_WEBFRONT_ASSETS_DIR}/../..") cmake_path(NORMAL_PATH root) add_custom_target(webfront-embedded-assets COMMENT "Regenerating embedded browser bridge and fallback-page assets") _webfront_add_embedded_text_asset( - "${root}/assets/WebFront.js" "${root}/include/system/WebFrontJsData.hpp" + "${root}/js/core/WebFront.js" "${root}/include/webfront/system/WebFrontJsData.hpp" WebFrontJsData WebFrontJsAssetsFresh) _webfront_add_embedded_text_asset( - "${root}/assets/fallback/index.html" "${root}/include/system/FallbackIndexHtmlData.hpp" + "${root}/js/core/fallback/index.html" "${root}/include/webfront/system/FallbackIndexHtmlData.hpp" FallbackIndexHtmlData FallbackIndexHtmlAssetFresh) _webfront_add_embedded_text_asset( - "${root}/assets/fallback/webfront-fallback.mjs" "${root}/include/system/FallbackModuleData.hpp" + "${root}/js/core/fallback/webfront-fallback.mjs" "${root}/include/webfront/system/FallbackModuleData.hpp" FallbackModuleData FallbackModuleAssetFresh) _webfront_add_embedded_text_asset( - "${root}/assets/developer/index.html" "${root}/include/system/DeveloperIndexHtmlData.hpp" + "${root}/js/core/bootstrap/index.html" "${root}/include/webfront/system/DeveloperIndexHtmlData.hpp" DeveloperIndexHtmlData DeveloperIndexHtmlAssetFresh) _webfront_add_embedded_text_asset( - "${root}/assets/developer/bootstrap.bundle.mjs" "${root}/include/system/DeveloperBootstrapData.hpp" + "${root}/js/core/bootstrap/bootstrap.bundle.mjs" "${root}/include/webfront/system/DeveloperBootstrapData.hpp" DeveloperBootstrapData DeveloperBootstrapAssetFresh) - # Terminal component (include/system/TerminalFS.hpp). xterm.js files are vendored verbatim in + # Terminal component (include/webfront/system/TerminalFS.hpp). xterm.js files are vendored verbatim in # third_party/xterm (see its VERSION file); refresh them with cmake/UpdateXterm.cmake. _webfront_add_embedded_text_asset( - "${root}/assets/components/terminal/index.html" "${root}/include/system/TerminalIndexHtmlData.hpp" + "${root}/js/developer/components/terminal/index.html" "${root}/include/webfront/system/TerminalIndexHtmlData.hpp" TerminalIndexHtmlData TerminalIndexHtmlAssetFresh) _webfront_add_embedded_text_asset( - "${root}/assets/components/terminal/terminal.mjs" "${root}/include/system/TerminalModuleData.hpp" + "${root}/js/developer/components/terminal/terminal.mjs" "${root}/include/webfront/system/TerminalModuleData.hpp" TerminalModuleData TerminalModuleAssetFresh) - # Browser side of the wf tool manager (include/system/ToolManagerFS.hpp). + # Browser side of the wf tool manager (include/webfront/system/ToolManagerFS.hpp). _webfront_add_embedded_text_asset( - "${root}/assets/components/tools/wf.mjs" "${root}/include/system/ToolManagerModuleData.hpp" + "${root}/js/developer/components/tools/wf.mjs" "${root}/include/webfront/system/ToolManagerModuleData.hpp" ToolManagerModuleData ToolManagerModuleAssetFresh) _webfront_add_embedded_text_asset( - "${root}/third_party/xterm/xterm.mjs" "${root}/include/system/XtermModuleData.hpp" + "${root}/third_party/xterm/xterm.mjs" "${root}/include/webfront/system/XtermModuleData.hpp" XtermModuleData XtermModuleAssetFresh ON) _webfront_add_embedded_text_asset( - "${root}/third_party/xterm/xterm.css" "${root}/include/system/XtermCssData.hpp" + "${root}/third_party/xterm/xterm.css" "${root}/include/webfront/system/XtermCssData.hpp" XtermCssData XtermCssAssetFresh ON) _webfront_add_embedded_text_asset( - "${root}/third_party/xterm/addon-fit.mjs" "${root}/include/system/XtermFitAddonData.hpp" + "${root}/third_party/xterm/addon-fit.mjs" "${root}/include/webfront/system/XtermFitAddonData.hpp" XtermFitAddonData XtermFitAddonAssetFresh ON) _webfront_add_embedded_text_asset( - "${root}/third_party/react/runtime.mjs" "${root}/include/system/ReactRuntimeData.hpp" + "${root}/third_party/react/runtime.mjs" "${root}/include/webfront/system/ReactRuntimeData.hpp" ReactRuntimeData ReactRuntimeAssetFresh ON) _webfront_add_embedded_text_asset( - "${root}/third_party/babel/babel.min.js" "${root}/include/system/BabelData.hpp" + "${root}/third_party/babel/babel.min.js" "${root}/include/webfront/system/BabelData.hpp" BabelData BabelAssetFresh ON) foreach(asset IN ITEMS jasmine.js jasmine-html.js jasmine.css boot.js jasmine_favicon.png) if(asset STREQUAL "jasmine.js") @@ -95,15 +95,15 @@ function(webfront_add_embedded_assets) set(compress ON) endif() _webfront_add_embedded_text_asset( - "${root}/third_party/jasmine/${asset}" "${root}/include/system/${struct}.hpp" + "${root}/third_party/jasmine/${asset}" "${root}/include/webfront/system/${struct}.hpp" ${struct} ${struct}AssetFresh ${compress}) endforeach() if(ENABLE_TESTING) find_program(WEBFRONT_NODE_EXECUTABLE NAMES node nodejs REQUIRED) add_test(NAME DeveloperJavaScript COMMAND "${WEBFRONT_NODE_EXECUTABLE}" - --test "${root}/tools/developer/check.mjs" "${root}/tools/developer/distribution-check.mjs") + --test "${root}/js/developer/tools/check.mjs" "${root}/js/developer/tools/distribution-check.mjs") set_tests_properties(DeveloperJavaScript PROPERTIES TIMEOUT 30) add_test(NAME EmbeddedGzipContents COMMAND "${WEBFRONT_NODE_EXECUTABLE}" - "${root}/tools/assets/check.mjs") + "${root}/js/developer/vendor/check.mjs") endif() endfunction() diff --git a/assets/developer/bootstrap.bundle.mjs b/js/core/bootstrap/bootstrap.bundle.mjs similarity index 100% rename from assets/developer/bootstrap.bundle.mjs rename to js/core/bootstrap/bootstrap.bundle.mjs diff --git a/assets/developer/index.html b/js/core/bootstrap/index.html similarity index 100% rename from assets/developer/index.html rename to js/core/bootstrap/index.html diff --git a/assets/fallback/index.html b/js/core/fallback/index.html similarity index 100% rename from assets/fallback/index.html rename to js/core/fallback/index.html diff --git a/assets/fallback/webfront-fallback.mjs b/js/core/fallback/webfront-fallback.mjs similarity index 100% rename from assets/fallback/webfront-fallback.mjs rename to js/core/fallback/webfront-fallback.mjs diff --git a/assets/components/terminal/index.html b/js/developer/components/terminal/index.html similarity index 100% rename from assets/components/terminal/index.html rename to js/developer/components/terminal/index.html diff --git a/assets/components/terminal/terminal.mjs b/js/developer/components/terminal/terminal.mjs similarity index 99% rename from assets/components/terminal/terminal.mjs rename to js/developer/components/terminal/terminal.mjs index 62acbf67..f910ffe2 100644 --- a/assets/components/terminal/terminal.mjs +++ b/js/developer/components/terminal/terminal.mjs @@ -1,5 +1,5 @@ /// @brief WebFront terminal component: an xterm.js terminal whose line editor sends each validated -/// line to the C++ commands registered through webfront::Terminal (include/components/Terminal.hpp), +/// line to the C++ commands registered through webfront::Terminal (include/webfront/components/Terminal.hpp), /// unless a browser command of an extension module (Terminal::extension) handles it first. import {Terminal} from "./xterm.mjs"; diff --git a/assets/components/tools/wf.mjs b/js/developer/components/tools/wf.mjs similarity index 99% rename from assets/components/tools/wf.mjs rename to js/developer/components/tools/wf.mjs index 82ffcc63..c8a477f9 100644 --- a/assets/components/tools/wf.mjs +++ b/js/developer/components/tools/wf.mjs @@ -1,5 +1,5 @@ /// @brief Browser side of the wf tool manager (#234), a terminal extension added by -/// webfront::ToolManager (include/components/ToolManager.hpp). 'wf search', 'wf install' and +/// webfront::ToolManager (include/webfront/components/ToolManager.hpp). 'wf search', 'wf install' and /// 'wf open' run here, because the download speaks HTTPS; 'wf list', 'wf remove' and 'wf help' run /// in C++. An installation fetches the packument and the tarball from the npm registry, checks the /// tarball's SHA-512 integrity, unpacks it and sends its files through webfront.pkg.begin, diff --git a/assets/developer/PACKAGES-LICENSE.txt b/js/developer/environment/PACKAGES-LICENSE.txt similarity index 100% rename from assets/developer/PACKAGES-LICENSE.txt rename to js/developer/environment/PACKAGES-LICENSE.txt diff --git a/assets/developer/archive.mjs b/js/developer/environment/archive.mjs similarity index 100% rename from assets/developer/archive.mjs rename to js/developer/environment/archive.mjs diff --git a/assets/developer/bootstrap-entry.mjs b/js/developer/environment/bootstrap-entry.mjs similarity index 100% rename from assets/developer/bootstrap-entry.mjs rename to js/developer/environment/bootstrap-entry.mjs diff --git a/assets/developer/bootstrap.mjs b/js/developer/environment/bootstrap.mjs similarity index 100% rename from assets/developer/bootstrap.mjs rename to js/developer/environment/bootstrap.mjs diff --git a/assets/developer/bundler.mjs b/js/developer/environment/bundler.mjs similarity index 100% rename from assets/developer/bundler.mjs rename to js/developer/environment/bundler.mjs diff --git a/js/developer/environment/bundles.json b/js/developer/environment/bundles.json new file mode 100644 index 00000000..d20d873d --- /dev/null +++ b/js/developer/environment/bundles.json @@ -0,0 +1,34 @@ +{ + "js/developer/environment/bootstrap.mjs": "534af4b3d07891338c3390e1d5e06c2fb6dd8df11ca6547735565b17f1b9cd70", + "js/developer/environment/bootstrap-entry.mjs": "ff8084f23f5acc721f97eb1ed0a454e7bfee1894de17d54f0100fa11f7ef8b77", + "js/developer/environment/packages.mjs": "faed29500a34c6ce24756d07bd4b47b9168ccec4bd49d12f00096a869637d74d", + "js/developer/environment/starter.mjs": "f8cdef1218ae14f8bbe49eae495d931cc29e33f74444f0e37d61aea416b9d750", + "js/developer/environment/paths.mjs": "6ebb626610756143c58762c87af18980802809d7f0f53d3b588e4b20e8db0161", + "js/developer/environment/runtime.mjs": "640896773c533ecc091a44384f0cac5115de346073c5393994073d7ff9d64c1b", + "js/developer/environment/compiler.mjs": "3f7e187ca9a4c2645ef3823127457cad655919cbea3c7c0f22fb7ae2cc87e0e5", + "js/developer/environment/bundler.mjs": "b0ff79a1b0caa012c25ec7b7f121d7d50af1aa1651231d3dcf2f39470c4ea25c", + "js/developer/environment/entry.mjs": "b2b942443e3c74ae2c008392ba244d9b7e91db70ba1b4ebbe1357c455ebf51bb", + "js/developer/environment/conditions.mjs": "7f0ecba239480831e38985ccffd4c82309949924f4eb9d938e4ad1b09f5f36ed", + "js/developer/environment/io.mjs": "a155719c612e065c30272c0dfdc456df28b5efa90ca26f8cfcb55c9cb46de690", + "js/developer/environment/recipe.mjs": "809f2091c50ebd13d23f92de9876b584658dc687324f73d48ee9f1271319f1ed", + "js/developer/environment/registry.mjs": "f566f07ea066155ab7209d925cee2cf12a664ac51b07bc0ca3e3fd8fde49a9c8", + "js/developer/environment/archive.mjs": "1fb8b9c3c27219858597801104639bba1104c7a7d33973609cd556b5e5f81d2d", + "js/developer/environment/lock.mjs": "60d0ea14d24793cd5e85bbd4bb4bfe90d2c7d76c0d20ffc99f462595a6e57291", + "js/developer/environment/pins.mjs": "ddb2214a2e906cb117dc1bac0b5b056decd4f6c6e3d4713615176c1876db3534", + "js/developer/environment/peers.mjs": "e1d999892138682fc0134ef1f4d4b19b9a9ad8d7fb16e37fc9c6c684bd853896", + "js/developer/environment/resolve.mjs": "8b96b850af215be51f5cb85cc9c69e057afa04dfb8a57e572620c07059c17fa3", + "js/developer/environment/embed.mjs": "c370fd05b1629d630a3d504f65f6411df3a73c0f6deabf484654bddae52857a2", + "js/developer/tools/starters/pi/main.tsx": "d3161b35db204ba54f782f711183e8d96aeff7c92d885c33a6ec168cf461e453", + "js/developer/tools/starters/pi/style.css": "360e2c7ae6d3699b00e18cbf67efbae7a8d8863d88926b31139e102cf38e5abd", + "examples/life/ui/main.tsx": "ed11a82aad1639eb6997af8b0fca4d5c5ed4c36422c22a74ac49ae73078d0a91", + "examples/life/ui/style.css": "9bb55eb0f0a3287e5b7dc78af9d69608b87ff42c4d9c8a653bc83a52fe293c44", + "js/developer/components/tools/wf.mjs": "2a8b463b2da223deb8d54d9fdd6037fdd079afeb24e39337693df03cdbcbd0ec", + "js/developer/tools/distribution.json": "26bb7dba24546565e38071087ab088727ad2b51fbbdb37afe801a574aff53fb6", + "js/developer/tools/build.mjs": "30999e2a9209966deb2cd486c786ce27d464a93882cca5b272b530837d46b3dd", + "js/developer/tools/site.mjs": "1827d3fd7e1e470336aab25ea8686c912c2b674a10f7be496f2f0077fbc45292", + "js/developer/tools/archive.mjs": "bfe9feeb5e4d4e1b7c44c4dec4dcbeab4ae59c2bf16a1d2b32cd6910a2b84e7b", + "js/developer/vendor/package-lock.json": "eb545112b672f9dbf520125df1f44a878d62cc8e611f0e33baee36470ded4dec", + "js/core/bootstrap/bootstrap.bundle.mjs": "792fe7cf564bd12ac47fef419d8c71e2070925764a17706552e7d3f5d6ba2181", + "js/developer/environment/packages.bundle.mjs": "994c13a8b30a40ecea98414caa72a17927dcea81a1f62d47744b4f55d87005be", + "include/webfront/system/DeveloperReleaseData.hpp": "c97a8c3b21df3306c179f7b46d945159b5854f9d2810f135a4ab224c768c75d7" +} diff --git a/assets/developer/compiler.mjs b/js/developer/environment/compiler.mjs similarity index 100% rename from assets/developer/compiler.mjs rename to js/developer/environment/compiler.mjs diff --git a/assets/developer/conditions.mjs b/js/developer/environment/conditions.mjs similarity index 100% rename from assets/developer/conditions.mjs rename to js/developer/environment/conditions.mjs diff --git a/assets/developer/embed.mjs b/js/developer/environment/embed.mjs similarity index 96% rename from assets/developer/embed.mjs rename to js/developer/environment/embed.mjs index 7de4bc70..f9903620 100644 --- a/assets/developer/embed.mjs +++ b/js/developer/environment/embed.mjs @@ -1,4 +1,4 @@ -import {gzipSync} from '../../third_party/fflate/browser.mjs'; +import {gzipSync} from '../../../third_party/fflate/browser.mjs'; export function compress(bytes) { return gzipSync(bytes, {level: 9, mem: 8, mtime: 0}); @@ -43,7 +43,7 @@ export function generateProvider(files, className = 'ApplicationAssets', notices } return `#pragma once -#include +#include /* Dependency notices and build inputs\n${notices.replaceAll('*/', '* /')}\n*/ namespace webfront::fs { diff --git a/assets/developer/entry.mjs b/js/developer/environment/entry.mjs similarity index 100% rename from assets/developer/entry.mjs rename to js/developer/environment/entry.mjs diff --git a/assets/developer/io.mjs b/js/developer/environment/io.mjs similarity index 100% rename from assets/developer/io.mjs rename to js/developer/environment/io.mjs diff --git a/assets/developer/lock.mjs b/js/developer/environment/lock.mjs similarity index 100% rename from assets/developer/lock.mjs rename to js/developer/environment/lock.mjs diff --git a/assets/developer/packages.bundle.mjs b/js/developer/environment/packages.bundle.mjs similarity index 100% rename from assets/developer/packages.bundle.mjs rename to js/developer/environment/packages.bundle.mjs diff --git a/assets/developer/packages.mjs b/js/developer/environment/packages.mjs similarity index 100% rename from assets/developer/packages.mjs rename to js/developer/environment/packages.mjs diff --git a/assets/developer/paths.mjs b/js/developer/environment/paths.mjs similarity index 100% rename from assets/developer/paths.mjs rename to js/developer/environment/paths.mjs diff --git a/assets/developer/peers.mjs b/js/developer/environment/peers.mjs similarity index 100% rename from assets/developer/peers.mjs rename to js/developer/environment/peers.mjs diff --git a/assets/developer/pins.mjs b/js/developer/environment/pins.mjs similarity index 100% rename from assets/developer/pins.mjs rename to js/developer/environment/pins.mjs diff --git a/assets/developer/recipe.mjs b/js/developer/environment/recipe.mjs similarity index 100% rename from assets/developer/recipe.mjs rename to js/developer/environment/recipe.mjs diff --git a/assets/developer/registry.mjs b/js/developer/environment/registry.mjs similarity index 100% rename from assets/developer/registry.mjs rename to js/developer/environment/registry.mjs diff --git a/assets/developer/resolve.mjs b/js/developer/environment/resolve.mjs similarity index 100% rename from assets/developer/resolve.mjs rename to js/developer/environment/resolve.mjs diff --git a/assets/developer/runtime.mjs b/js/developer/environment/runtime.mjs similarity index 98% rename from assets/developer/runtime.mjs rename to js/developer/environment/runtime.mjs index 5b83914c..69228ad8 100644 --- a/assets/developer/runtime.mjs +++ b/js/developer/environment/runtime.mjs @@ -1,5 +1,5 @@ -import {Terminal} from '../../third_party/xterm/xterm.mjs'; -import {FitAddon} from '../../third_party/xterm/addon-fit.mjs'; +import {Terminal} from '../../../third_party/xterm/xterm.mjs'; +import {FitAddon} from '../../../third_party/xterm/addon-fit.mjs'; import {LineEditor, tokenize} from '../components/terminal/terminal.mjs'; import {resolvePackages, validateLock, downloadPackage} from './packages.mjs'; import {readProject, publish} from './io.mjs'; diff --git a/assets/developer/starter.mjs b/js/developer/environment/starter.mjs similarity index 100% rename from assets/developer/starter.mjs rename to js/developer/environment/starter.mjs diff --git a/tools/developer/PUBLISHING.md b/js/developer/tools/PUBLISHING.md similarity index 87% rename from tools/developer/PUBLISHING.md rename to js/developer/tools/PUBLISHING.md index 4e577d60..b6c7cc42 100644 --- a/tools/developer/PUBLISHING.md +++ b/js/developer/tools/PUBLISHING.md @@ -8,15 +8,15 @@ The package names in their manifests are identifiers, not a requirement to own o ## Build and review ```sh -npm ci --prefix tools/assets --ignore-scripts -node tools/developer/build.mjs build-distribution --refresh-bootstrap -node tools/developer/fixtures.mjs build-distribution -node --test tools/developer/check.mjs tools/developer/distribution-check.mjs -node tools/developer/site.mjs build-distribution build-developer-site +npm ci --prefix js/developer/vendor --ignore-scripts +node js/developer/tools/build.mjs build-distribution --refresh-bootstrap +node js/developer/tools/fixtures.mjs build-distribution +node --test js/developer/tools/check.mjs js/developer/tools/distribution-check.mjs +node js/developer/tools/site.mjs build-distribution build-developer-site ``` Review and commit the updated checked-in bootstrap bundles, checksums and -`include/system/DeveloperReleaseData.hpp`. The header pins the exact environment archive and URL. +`include/webfront/system/DeveloperReleaseData.hpp`. The header pins the exact environment archive and URL. The environment pins the starter archive in turn. `provision.json` is informational; applications do not discover a replacement trust hash from that remote file or follow `latest` at startup. @@ -52,7 +52,7 @@ It publishes only on a `developer-v` tag or an explicit workflow dispat Use the dedicated tag `developer-v` matching `distribution.json`; the C++ library's `v*` releases remain separate. ```sh -version=$(node -p "require('./tools/developer/distribution.json').version") +version=$(node -p "require('./js/developer/tools/distribution.json').version") git tag "developer-v$version" git push origin "developer-v$version" ``` diff --git a/tools/developer/RELEASE_NOTES.md b/js/developer/tools/RELEASE_NOTES.md similarity index 100% rename from tools/developer/RELEASE_NOTES.md rename to js/developer/tools/RELEASE_NOTES.md diff --git a/tools/developer/archive-release.mjs b/js/developer/tools/archive-release.mjs similarity index 93% rename from tools/developer/archive-release.mjs rename to js/developer/tools/archive-release.mjs index 3eb7c4a0..7840416c 100644 --- a/tools/developer/archive-release.mjs +++ b/js/developer/tools/archive-release.mjs @@ -31,5 +31,5 @@ if (existing) { } else { console.log(gh('release', 'create', tag, '--repo', repository, '--verify-tag', '--prerelease', '--title', `WebFront developer packages ${metadata.version}`, - '--notes-file', resolve('tools/developer/RELEASE_NOTES.md'), ...files.map(name => resolve(distribution, name)))); + '--notes-file', resolve('js/developer/tools/RELEASE_NOTES.md'), ...files.map(name => resolve(distribution, name)))); } diff --git a/tools/developer/archive.mjs b/js/developer/tools/archive.mjs similarity index 100% rename from tools/developer/archive.mjs rename to js/developer/tools/archive.mjs diff --git a/tools/developer/build.mjs b/js/developer/tools/build.mjs similarity index 56% rename from tools/developer/build.mjs rename to js/developer/tools/build.mjs index cea09d79..c79d884a 100644 --- a/tools/developer/build.mjs +++ b/js/developer/tools/build.mjs @@ -1,15 +1,15 @@ // Maintainer provisioning only. Consumers download the resulting tarball, without Node/npm. -import {build} from '../assets/node_modules/esbuild/lib/main.js'; +import {build} from '../vendor/node_modules/esbuild/lib/main.js'; import {readFile, writeFile, mkdir, copyFile} from 'node:fs/promises'; import {resolve} from 'node:path'; import {fileURLToPath} from 'node:url'; import {createHash} from 'node:crypto'; import {execFileSync} from 'node:child_process'; -import {gzipSync} from '../../third_party/fflate/browser.mjs'; +import {gzipSync} from '../../../third_party/fflate/browser.mjs'; import {tar} from './archive.mjs'; import {baseUrl, versionPath, bootstrapHeader} from './site.mjs'; -const root = fileURLToPath(new URL('../../', import.meta.url)); +const root = fileURLToPath(new URL('../../../', import.meta.url)); const args = process.argv.slice(2); const refresh = args.includes('--refresh-bootstrap'); const output = resolve(args.find(arg => !arg.startsWith('--')) ?? resolve(root, 'build-developer-environment')); @@ -17,23 +17,23 @@ await mkdir(output, {recursive: true}); const options = { absWorkingDir: root, bundle: true, format: 'esm', platform: 'browser', target: 'es2020', minify: true, legalComments: 'inline', - nodePaths: [resolve(root, 'tools/assets/node_modules')], + nodePaths: [resolve(root, 'js/developer/vendor/node_modules')], plugins: [{name: 'terminal-assets', setup(build) { build.onResolve({filter: /^\.\/(xterm|addon-fit)\.mjs$/}, args => ({path: resolve(root, 'third_party/xterm', args.path)})); }}], }; -await build({...options, entryPoints: ['assets/developer/runtime.mjs'], outfile: resolve(output, 'runtime.mjs')}); -await build({...options, entryPoints: ['assets/developer/compiler.mjs'], outfile: resolve(output, 'compiler.mjs')}); -await copyFile(resolve(root, 'tools/assets/node_modules/esbuild-wasm/esbuild.wasm'), resolve(output, 'esbuild.wasm')); +await build({...options, entryPoints: ['js/developer/environment/runtime.mjs'], outfile: resolve(output, 'runtime.mjs')}); +await build({...options, entryPoints: ['js/developer/environment/compiler.mjs'], outfile: resolve(output, 'compiler.mjs')}); +await copyFile(resolve(root, 'js/developer/vendor/node_modules/esbuild-wasm/esbuild.wasm'), resolve(output, 'esbuild.wasm')); await copyFile(resolve(root, 'third_party/xterm/xterm.css'), resolve(output, 'xterm.css')); -const distribution = JSON.parse(await readFile(resolve(root, 'tools/developer/distribution.json'))); +const distribution = JSON.parse(await readFile(resolve(root, 'js/developer/tools/distribution.json'))); const version = distribution.version; const publicBase = baseUrl(distribution.baseUrl); versionPath(version); -const dependencies = JSON.parse(await readFile(resolve(root, 'tools/assets/package.json'))).dependencies; +const dependencies = JSON.parse(await readFile(resolve(root, 'js/developer/vendor/package.json'))).dependencies; const licenses = [ - ['esbuild-wasm', 'tools/assets/node_modules/esbuild-wasm/LICENSE.md'], - ['semver', 'tools/assets/node_modules/semver/LICENSE'], + ['esbuild-wasm', 'js/developer/vendor/node_modules/esbuild-wasm/LICENSE.md'], + ['semver', 'js/developer/vendor/node_modules/semver/LICENSE'], ['xterm', 'third_party/xterm/LICENSE'], ['xterm Fit addon', 'third_party/xterm/addon-fit-LICENSE'], ['fflate', 'third_party/fflate/LICENSE'], @@ -46,7 +46,7 @@ const starters = {}; for (const [name, provider] of [['pi', 'PiUI'], ['life', 'LifeUI']]) { const starterFiles = new Map(); for (const file of ['main.tsx', 'style.css']) - starterFiles.set(`package/${file}`, await readFile(resolve(root, `${name === 'life' ? 'examples/life/ui' : 'tools/developer/starters/pi'}/${file}`))); + starterFiles.set(`package/${file}`, await readFile(resolve(root, `${name === 'life' ? 'examples/life/ui' : 'js/developer/tools/starters/pi'}/${file}`))); const recipe = {format: 1, name, provider, entry: 'main.tsx', dependencies: { react: dependencies.react, 'react-dom': dependencies['react-dom']}}; starterFiles.set('package/webfront.project.json', Buffer.from(JSON.stringify(recipe, null, 2) + '\n')); @@ -72,16 +72,16 @@ await writeFile(resolve(output, 'provision.json'), JSON.stringify({format: 1, ve const header = bootstrapHeader(version, publicBase, integrity); await writeFile(resolve(output, 'DeveloperReleaseData.hpp'), header); if (refresh) { - const bootstrap = resolve(root, 'assets/developer/bootstrap.bundle.mjs'); - await build({...options, entryPoints: ['assets/developer/bootstrap-entry.mjs'], outfile: bootstrap}); - await build({...options, entryPoints: ['assets/developer/packages.mjs'], outfile: resolve(root, 'assets/developer/packages.bundle.mjs')}); - await copyFile(resolve(root, 'tools/assets/node_modules/semver/LICENSE'), resolve(root, 'assets/developer/PACKAGES-LICENSE.txt')); - await writeFile(resolve(root, 'include/system/DeveloperReleaseData.hpp'), header); + const bootstrap = resolve(root, 'js/core/bootstrap/bootstrap.bundle.mjs'); + await build({...options, entryPoints: ['js/developer/environment/bootstrap-entry.mjs'], outfile: bootstrap}); + await build({...options, entryPoints: ['js/developer/environment/packages.mjs'], outfile: resolve(root, 'js/developer/environment/packages.bundle.mjs')}); + await copyFile(resolve(root, 'js/developer/vendor/node_modules/semver/LICENSE'), resolve(root, 'js/developer/environment/PACKAGES-LICENSE.txt')); + await writeFile(resolve(root, 'include/webfront/system/DeveloperReleaseData.hpp'), header); const inputs = {}; - for (const path of ['assets/developer/bootstrap.mjs', 'assets/developer/bootstrap-entry.mjs', 'assets/developer/packages.mjs', 'assets/developer/starter.mjs', 'assets/developer/paths.mjs', 'assets/developer/runtime.mjs', 'assets/developer/compiler.mjs', 'assets/developer/bundler.mjs', 'assets/developer/entry.mjs', 'assets/developer/conditions.mjs', 'assets/developer/io.mjs', 'assets/developer/recipe.mjs', 'assets/developer/registry.mjs', 'assets/developer/archive.mjs', 'assets/developer/lock.mjs', 'assets/developer/pins.mjs', 'assets/developer/peers.mjs', 'assets/developer/resolve.mjs', 'assets/developer/embed.mjs', 'tools/developer/starters/pi/main.tsx', 'tools/developer/starters/pi/style.css', 'examples/life/ui/main.tsx', 'examples/life/ui/style.css', 'assets/components/tools/wf.mjs', 'tools/developer/distribution.json', 'tools/developer/build.mjs', 'tools/developer/site.mjs', 'tools/developer/archive.mjs', 'tools/assets/package-lock.json', 'assets/developer/bootstrap.bundle.mjs', 'assets/developer/packages.bundle.mjs', 'include/system/DeveloperReleaseData.hpp']) + for (const path of ['js/developer/environment/bootstrap.mjs', 'js/developer/environment/bootstrap-entry.mjs', 'js/developer/environment/packages.mjs', 'js/developer/environment/starter.mjs', 'js/developer/environment/paths.mjs', 'js/developer/environment/runtime.mjs', 'js/developer/environment/compiler.mjs', 'js/developer/environment/bundler.mjs', 'js/developer/environment/entry.mjs', 'js/developer/environment/conditions.mjs', 'js/developer/environment/io.mjs', 'js/developer/environment/recipe.mjs', 'js/developer/environment/registry.mjs', 'js/developer/environment/archive.mjs', 'js/developer/environment/lock.mjs', 'js/developer/environment/pins.mjs', 'js/developer/environment/peers.mjs', 'js/developer/environment/resolve.mjs', 'js/developer/environment/embed.mjs', 'js/developer/tools/starters/pi/main.tsx', 'js/developer/tools/starters/pi/style.css', 'examples/life/ui/main.tsx', 'examples/life/ui/style.css', 'js/developer/components/tools/wf.mjs', 'js/developer/tools/distribution.json', 'js/developer/tools/build.mjs', 'js/developer/tools/site.mjs', 'js/developer/tools/archive.mjs', 'js/developer/vendor/package-lock.json', 'js/core/bootstrap/bootstrap.bundle.mjs', 'js/developer/environment/packages.bundle.mjs', 'include/webfront/system/DeveloperReleaseData.hpp']) inputs[path] = createHash('sha256').update(await readFile(resolve(root, path))).digest('hex'); - await writeFile(resolve(root, 'assets/developer/bundles.json'), JSON.stringify(inputs, null, 2) + '\n'); - for (const [source, name] of [['assets/developer/index.html', 'DeveloperIndexHtmlData'], ['assets/developer/bootstrap.bundle.mjs', 'DeveloperBootstrapData']]) - execFileSync('cmake', [`-DINPUT=${resolve(root, source)}`, `-DOUTPUT=${resolve(root, 'include/system', name + '.hpp')}`, `-DSTRUCT=${name}`, '-P', resolve(root, 'cmake/EmbedTextAsset.cmake')]); + await writeFile(resolve(root, 'js/developer/environment/bundles.json'), JSON.stringify(inputs, null, 2) + '\n'); + for (const [source, name] of [['js/core/bootstrap/index.html', 'DeveloperIndexHtmlData'], ['js/core/bootstrap/bootstrap.bundle.mjs', 'DeveloperBootstrapData']]) + execFileSync('cmake', [`-DINPUT=${resolve(root, source)}`, `-DOUTPUT=${resolve(root, 'include/webfront/system', name + '.hpp')}`, `-DSTRUCT=${name}`, '-P', resolve(root, 'js/core/EmbedTextAsset.cmake')]); } console.log(`Environment: ${output}/environment.tgz\nIntegrity: ${integrity}\nStarters: ${Object.keys(starters).join(', ')}`); diff --git a/tools/developer/check.mjs b/js/developer/tools/check.mjs similarity index 95% rename from tools/developer/check.mjs rename to js/developer/tools/check.mjs index e02098e6..c12bd47f 100644 --- a/tools/developer/check.mjs +++ b/js/developer/tools/check.mjs @@ -3,11 +3,11 @@ import assert from 'node:assert/strict'; import {gunzipSync} from 'node:zlib'; import {createHash} from 'node:crypto'; import {readFile} from 'node:fs/promises'; -import {resolvePackages, downloadPackage, validateLock} from '../../assets/developer/packages.bundle.mjs'; -import {packageEntry, normalize, virtualPlugin} from '../../assets/developer/bundler.mjs'; -import {generateProvider, compress} from '../../assets/developer/embed.mjs'; -import {environmentFiles, bootstrap} from '../../assets/developer/bootstrap.mjs'; -import {publish, responseBytes} from '../../assets/developer/io.mjs'; +import {resolvePackages, downloadPackage, validateLock} from '../environment/packages.bundle.mjs'; +import {packageEntry, normalize, virtualPlugin} from '../environment/bundler.mjs'; +import {generateProvider, compress} from '../environment/embed.mjs'; +import {environmentFiles, bootstrap} from '../environment/bootstrap.mjs'; +import {publish, responseBytes} from '../environment/io.mjs'; import {tar} from './archive.mjs'; const encoder = new TextEncoder(); @@ -142,10 +142,10 @@ test('aborted publications never commit and clean their staging transaction', as }); test('checked-in browser bundles match their source and pinned dependency inputs', async () => { - const manifest = JSON.parse(await readFile(new URL('../../assets/developer/bundles.json', import.meta.url))); + const manifest = JSON.parse(await readFile(new URL('../environment/bundles.json', import.meta.url))); for (const [path, hash] of Object.entries(manifest)) { - const actual = createHash('sha256').update(await readFile(new URL('../../' + path, import.meta.url))).digest('hex'); - assert.equal(actual, hash, `${path} changed: run tools/developer/build.mjs --refresh-bootstrap`); + const actual = createHash('sha256').update(await readFile(new URL('../../../' + path, import.meta.url))).digest('hex'); + assert.equal(actual, hash, `${path} changed: run js/developer/tools/build.mjs --refresh-bootstrap`); } }); diff --git a/tools/developer/distribution-check.mjs b/js/developer/tools/distribution-check.mjs similarity index 98% rename from tools/developer/distribution-check.mjs rename to js/developer/tools/distribution-check.mjs index 01c5d98f..35d90b8a 100644 --- a/tools/developer/distribution-check.mjs +++ b/js/developer/tools/distribution-check.mjs @@ -6,8 +6,8 @@ import {join} from 'node:path'; import {createHash} from 'node:crypto'; import {tar} from './archive.mjs'; import {stageSite, bootstrapHeader, versionPath, distributionFiles} from './site.mjs'; -import {compress} from '../../assets/developer/embed.mjs'; -import {createStarter} from '../../assets/developer/starter.mjs'; +import {compress} from '../environment/embed.mjs'; +import {createStarter} from '../environment/starter.mjs'; const encode = value => new TextEncoder().encode(typeof value === 'string' ? value : JSON.stringify(value)); const integrity = bytes => 'sha512-' + createHash('sha512').update(bytes).digest('base64'); diff --git a/tools/developer/distribution.json b/js/developer/tools/distribution.json similarity index 74% rename from tools/developer/distribution.json rename to js/developer/tools/distribution.json index 82b7f6dd..05e7397d 100644 --- a/tools/developer/distribution.json +++ b/js/developer/tools/distribution.json @@ -1,4 +1,4 @@ { - "version": "0.4.0", + "version": "0.4.1", "baseUrl": "https://ambroise-leclerc.github.io/WebFront/" } diff --git a/tools/developer/fixtures.mjs b/js/developer/tools/fixtures.mjs similarity index 75% rename from tools/developer/fixtures.mjs rename to js/developer/tools/fixtures.mjs index ef62ba32..494c9b0e 100644 --- a/tools/developer/fixtures.mjs +++ b/js/developer/tools/fixtures.mjs @@ -4,12 +4,12 @@ import {resolve} from 'node:path'; import {fileURLToPath} from 'node:url'; import {createHash} from 'node:crypto'; import {tar} from './archive.mjs'; -import {compress} from '../../assets/developer/embed.mjs'; -const root = fileURLToPath(new URL('../../', import.meta.url)); +import {compress} from '../environment/embed.mjs'; +const root = fileURLToPath(new URL('../../../', import.meta.url)); const output = resolve(process.argv[2] ?? 'build-developer-environment'); await mkdir(resolve(output, 'registry'), {recursive: true}); for (const name of ['react', 'react-dom', 'scheduler']) { - const directory = resolve(root, 'tools/assets/node_modules', name); + const directory = resolve(root, 'js/developer/vendor/node_modules', name); const manifest = JSON.parse(await readFile(resolve(directory, 'package.json'))); const files = new Map(); async function walk(path = '') { @@ -27,7 +27,7 @@ for (const name of ['react', 'react-dom', 'scheduler']) { await writeFile(resolve(output, 'registry', name), JSON.stringify({'dist-tags': {latest: manifest.version}, versions: {[manifest.version]: {...manifest, dist: {tarball: `./${name}.tgz`, integrity}}}})); } -await copyFile(resolve(root, 'webtest/developer-specs.mjs'), resolve(output, 'run.mjs')); -await copyFile(resolve(root, 'tools/developer/starters/pi/main.tsx'), resolve(output, 'main.tsx')); -await copyFile(resolve(root, 'tools/developer/starters/pi/style.css'), resolve(output, 'style.css')); +await copyFile(resolve(root, 'test/web/developer-specs.mjs'), resolve(output, 'run.mjs')); +await copyFile(resolve(root, 'js/developer/tools/starters/pi/main.tsx'), resolve(output, 'main.tsx')); +await copyFile(resolve(root, 'js/developer/tools/starters/pi/style.css'), resolve(output, 'style.css')); console.log(`Offline developer fixtures: ${output}`); diff --git a/tools/developer/pages.mjs b/js/developer/tools/pages.mjs similarity index 100% rename from tools/developer/pages.mjs rename to js/developer/tools/pages.mjs diff --git a/tools/developer/release-check.mjs b/js/developer/tools/release-check.mjs similarity index 100% rename from tools/developer/release-check.mjs rename to js/developer/tools/release-check.mjs diff --git a/tools/developer/site.mjs b/js/developer/tools/site.mjs similarity index 95% rename from tools/developer/site.mjs rename to js/developer/tools/site.mjs index d0404aa5..5639cb59 100644 --- a/tools/developer/site.mjs +++ b/js/developer/tools/site.mjs @@ -25,7 +25,7 @@ export function bootstrapHeader(version, base, integrity) { const url = new URL(versionPath(version) + 'environment.tgz', baseUrl(base)); return `#pragma once -// Pinned developer distribution. Regenerate with tools/developer/build.mjs --refresh-bootstrap. +// Pinned developer distribution. Regenerate with js/developer/tools/build.mjs --refresh-bootstrap. #include namespace webfront::developer::release { @@ -102,6 +102,6 @@ export async function stageSite(distribution, site) { } if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { const [distribution, site] = process.argv.slice(2); - if (!distribution || !site) throw new Error('Usage: node tools/developer/site.mjs '); + if (!distribution || !site) throw new Error('Usage: node js/developer/tools/site.mjs '); console.log(await stageSite(resolve(distribution), resolve(site))); } diff --git a/tools/developer/starters/pi/main.tsx b/js/developer/tools/starters/pi/main.tsx similarity index 100% rename from tools/developer/starters/pi/main.tsx rename to js/developer/tools/starters/pi/main.tsx diff --git a/tools/developer/starters/pi/style.css b/js/developer/tools/starters/pi/style.css similarity index 100% rename from tools/developer/starters/pi/style.css rename to js/developer/tools/starters/pi/style.css diff --git a/tools/assets/check.mjs b/js/developer/vendor/check.mjs similarity index 90% rename from tools/assets/check.mjs rename to js/developer/vendor/check.mjs index fd4e4818..ecc99892 100644 --- a/tools/assets/check.mjs +++ b/js/developer/vendor/check.mjs @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import { gunzipSync } from 'node:zlib'; -const root = new URL('../../', import.meta.url); +const root = new URL('../../../', import.meta.url); const assets = [ ['XtermModuleData', 'xterm/xterm.mjs'], ['XtermCssData', 'xterm/xterm.css'], @@ -16,7 +16,7 @@ const assets = [ ['JasmineFaviconData', 'jasmine/jasmine_favicon.png'], ]; for (const [name, source] of assets) { - const header = readFileSync(new URL(`include/system/${name}.hpp`, root), 'utf8'); + const header = readFileSync(new URL(`include/webfront/system/${name}.hpp`, root), 'utf8'); const size = Number(header.match(/dataSize\{(\d+)\}/)[1]); const words = [...header.matchAll(/0x([0-9a-f]{16})/g)].map(match => match[1]); const storage = Buffer.from(words.join(''), 'hex'); @@ -35,7 +35,7 @@ for (const [name, source] of assets) { } // React's npm distribution is CommonJS. A plain export-star silently loses named ESM exports. -const runtime = await import('../../third_party/react/runtime.mjs'); +const runtime = await import('../../../third_party/react/runtime.mjs'); assert.equal(runtime.version, '19.3.1'); assert.equal(runtime.default.version, runtime.version); for (const name of ['useState', 'useEffect', 'createRoot', 'hydrateRoot', 'jsx', 'jsxs']) diff --git a/tools/assets/gzip.mjs b/js/developer/vendor/gzip.mjs similarity index 85% rename from tools/assets/gzip.mjs rename to js/developer/vendor/gzip.mjs index 1f5826ec..aa8e1760 100644 --- a/tools/assets/gzip.mjs +++ b/js/developer/vendor/gzip.mjs @@ -1,5 +1,5 @@ // Pure-JavaScript DEFLATE avoids platform-dependent zlib streams. No npm install needed. -import { gzipSync } from '../../third_party/fflate/browser.mjs'; +import { gzipSync } from '../../../third_party/fflate/browser.mjs'; import { readFileSync, writeFileSync } from 'node:fs'; const [input, output] = process.argv.slice(2); const compressed = gzipSync(readFileSync(input), { level: 9, mem: 8, mtime: 0 }); diff --git a/tools/assets/package-lock.json b/js/developer/vendor/package-lock.json similarity index 100% rename from tools/assets/package-lock.json rename to js/developer/vendor/package-lock.json diff --git a/tools/assets/package.json b/js/developer/vendor/package.json similarity index 100% rename from tools/assets/package.json rename to js/developer/vendor/package.json diff --git a/tools/assets/update.mjs b/js/developer/vendor/update.mjs similarity index 87% rename from tools/assets/update.mjs rename to js/developer/vendor/update.mjs index ea05951b..630623da 100644 --- a/tools/assets/update.mjs +++ b/js/developer/vendor/update.mjs @@ -1,4 +1,4 @@ -// Maintenance only: npm ci --prefix tools/assets && node tools/assets/update.mjs +// Maintenance only: npm ci --prefix js/developer/vendor && node js/developer/vendor/update.mjs import { build } from 'esbuild'; import { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; @@ -6,8 +6,8 @@ import path from 'node:path'; import { createRequire } from 'node:module'; const require = createRequire(import.meta.url); -const root = fileURLToPath(new URL('../../', import.meta.url)); -const modules = path.join(root, 'tools/assets/node_modules'); +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const modules = path.join(root, 'js/developer/vendor/node_modules'); // CommonJS export-star cannot become static ESM exports. Read the production API explicitly // so the maintainer's NODE_ENV cannot change the generated module's exports. const reactExports = Object.keys(require(path.join(modules, 'react/cjs/react.production.js'))) @@ -33,17 +33,17 @@ await copy('scheduler', [['LICENSE', 'scheduler-LICENSE']], 'react'); await writeFile(path.join(root, 'third_party/react/VERSION'), `react ${manifest.dependencies.react}\nreact-dom ${manifest.dependencies['react-dom']}\nscheduler ${JSON.parse(await readFile(path.join(modules, 'scheduler/package.json'))).version}\nesbuild ${manifest.dependencies.esbuild}\n`); await build({ - absWorkingDir: path.join(root, 'tools/assets'), + absWorkingDir: path.join(root, 'js/developer/vendor'), stdin: { contents: `export { default, ${reactExports.join(', ')} } from 'react'; export { createRoot, hydrateRoot } from 'react-dom/client'; export { jsx, jsxs } from 'react/jsx-runtime';`, - resolveDir: path.join(root, 'tools/assets'), + resolveDir: path.join(root, 'js/developer/vendor'), sourcefile: 'react-runtime.js', }, outfile: path.join(root, 'third_party/react/runtime.mjs'), bundle: true, format: 'esm', platform: 'browser', target: 'es2020', minify: true, legalComments: 'inline', charset: 'utf8', define: { 'process.env.NODE_ENV': '"production"' }, - banner: { js: `// React and React DOM ${manifest.dependencies.react}; generated by tools/assets/update.mjs.` }, + banner: { js: `// React and React DOM ${manifest.dependencies.react}; generated by js/developer/vendor/update.mjs.` }, }); diff --git a/cmake/CheckCEFTestingState.cmake b/test/cmake/CheckCEFTestingState.cmake similarity index 90% rename from cmake/CheckCEFTestingState.cmake rename to test/cmake/CheckCEFTestingState.cmake index ec10444d..18613745 100644 --- a/cmake/CheckCEFTestingState.cmake +++ b/test/cmake/CheckCEFTestingState.cmake @@ -8,7 +8,7 @@ foreach(state undefined cache-ON cache-OFF cache-empty normal-ON normal-OFF norm set(directory "${CMAKE_CURRENT_BINARY_DIR}/cef-testing-state/${state}") file(REMOVE_RECURSE "${directory}") execute_process( - COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cef-testing" -B "${directory}" + COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cmake/cef-testing" -B "${directory}" -DROOT=${ROOT} -DCPM_MODULE=${CPM_MODULE} -DSTATE=${state} RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) if(NOT result EQUAL 0) @@ -21,7 +21,7 @@ foreach(kind static interface missing) set(directory "${CMAKE_CURRENT_BINARY_DIR}/cef-testing-state/apple-${kind}") file(REMOVE_RECURSE "${directory}") execute_process( - COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cef-testing" -B "${directory}" + COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cmake/cef-testing" -B "${directory}" -DROOT=${ROOT} -DCPM_MODULE=${CPM_MODULE} -DSTATE=undefined -DSIMULATE_APPLE=ON -DWRAPPER_KIND=${kind} RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) diff --git a/cmake/CheckFrontendGenerators.cmake b/test/cmake/CheckFrontendGenerators.cmake similarity index 87% rename from cmake/CheckFrontendGenerators.cmake rename to test/cmake/CheckFrontendGenerators.cmake index 347a3500..686f116f 100644 --- a/cmake/CheckFrontendGenerators.cmake +++ b/test/cmake/CheckFrontendGenerators.cmake @@ -3,13 +3,13 @@ cmake_minimum_required(VERSION 3.31) if(NOT ROOT) message(FATAL_ERROR "ROOT must point at the WebFront checkout") endif() -include("${ROOT}/cmake/FrontendTestHelpers.cmake") +include("${ROOT}/test/cmake/FrontendTestHelpers.cmake") set(directory "${CMAKE_CURRENT_BINARY_DIR}/frontend-tests/extension") foreach(generator Ninja "Ninja Multi-Config" Ninja) file(REMOVE_RECURSE "${directory}") execute_process( COMMAND "${CMAKE_COMMAND}" -E env "CMAKE_GENERATOR=${generator}" - "${CMAKE_COMMAND}" -S "${ROOT}/test/frontends" -B "${directory}" -DROOT=${ROOT} -DCASE=extension + "${CMAKE_COMMAND}" -S "${ROOT}/test/cmake/frontends" -B "${directory}" -DROOT=${ROOT} -DCASE=extension RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) if(NOT result EQUAL 0) message(FATAL_ERROR "Extension fixture with ${generator} failed: ${output}${error}") diff --git a/cmake/CheckFrontendSelection.cmake b/test/cmake/CheckFrontendSelection.cmake similarity index 98% rename from cmake/CheckFrontendSelection.cmake rename to test/cmake/CheckFrontendSelection.cmake index a8c541e8..17a58b53 100644 --- a/cmake/CheckFrontendSelection.cmake +++ b/test/cmake/CheckFrontendSelection.cmake @@ -1,7 +1,7 @@ # Exercises cmake/Frontends.cmake: registered names, defaults, rejection of unknown or unavailable # frontends and the generated C++ type name. Each case runs in its own cmake -P process so that a # FATAL_ERROR can be observed. Run with: -# cmake -DROOT= -P cmake/CheckFrontendSelection.cmake +# cmake -DROOT= -P test/cmake/CheckFrontendSelection.cmake cmake_minimum_required(VERSION 3.31) if(NOT ROOT) @@ -21,7 +21,7 @@ if(CASE) endforeach() list(PREPEND CMAKE_MODULE_PATH "${parent_modules}") endif() - list(APPEND CMAKE_MODULE_PATH "${ROOT}/test/frontends") + list(APPEND CMAKE_MODULE_PATH "${ROOT}/test/cmake/frontends") include("${ROOT}/cmake/Frontends.cmake") # Unquoted empty inputs intentionally unset these variables so option() supplies its default. set(WEBFRONT_EMBED_CEF ${CEF}) @@ -152,7 +152,7 @@ if(CASE) return() endif() -include("${ROOT}/cmake/FrontendTestHelpers.cmake") +include("${ROOT}/test/cmake/FrontendTestHelpers.cmake") set(failures "") function(run_case name expect_success expected_text) @@ -350,7 +350,7 @@ foreach(case webkitgtk-linux cef-linux cef-macos cef-windows cef-disabled missin # changed generator or previous discovery result cannot influence the next invocation. file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/frontend-tests/${case}") execute_process( - COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/frontends" -B "${CMAKE_CURRENT_BINARY_DIR}/frontend-tests/${case}" + COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cmake/frontends" -B "${CMAKE_CURRENT_BINARY_DIR}/frontend-tests/${case}" -DROOT=${ROOT} -DCASE=${case} RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) if(NOT result EQUAL 0) @@ -439,7 +439,7 @@ run_case("WebKitGTK selector" TRUE "TYPE=webfront::frontend::WebKitGTKFrontend") set(CASE_WEBKITGTK OFF) run_case("WebKitGTK tests require support" FALSE "requires WEBFRONT_EMBED_WEBKITGTK=ON") -execute_process(COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/frontends" +execute_process(COMMAND "${CMAKE_COMMAND}" -S "${ROOT}/test/cmake/frontends" -B "${CMAKE_CURRENT_BINARY_DIR}/frontend-tests/webkitgtk-missing-sdk" -DROOT=${ROOT} -DCASE=webkitgtk-missing-sdk RESULT_VARIABLE missing_sdk OUTPUT_VARIABLE sdk_output ERROR_VARIABLE sdk_error) if(missing_sdk EQUAL 0 OR NOT "${sdk_output}${sdk_error}" MATCHES "WEBFRONT_EMBED_WEBKITGTK=ON requires") diff --git a/cmake/CheckNewcomerDocs.cmake b/test/cmake/CheckNewcomerDocs.cmake similarity index 98% rename from cmake/CheckNewcomerDocs.cmake rename to test/cmake/CheckNewcomerDocs.cmake index 36c987d7..9e17a65b 100644 --- a/cmake/CheckNewcomerDocs.cmake +++ b/test/cmake/CheckNewcomerDocs.cmake @@ -26,7 +26,7 @@ _read(ci .github/workflows/BuildAndTest.yml) _read(frontends docs/FRONTENDS.md) _read(developer_guide docs/DEVELOPER_ENVIRONMENT.md) _read(wkwebview_guide docs/WKWEBVIEW.md) -_read(developer_release include/system/DeveloperReleaseData.hpp) +_read(developer_release include/webfront/system/DeveloperReleaseData.hpp) # The local-review instructions must not silently use an unpublished default archive. foreach(text readme wkwebview_guide) _require("${${text}}" "/webfront/developer/preview/provision/environment.tgz \"$integrity\"" "${text} local bootstrap arguments") diff --git a/cmake/CheckReleaseVersion.cmake b/test/cmake/CheckReleaseVersion.cmake similarity index 97% rename from cmake/CheckReleaseVersion.cmake rename to test/cmake/CheckReleaseVersion.cmake index 82ee20b0..f2d0d358 100644 --- a/cmake/CheckReleaseVersion.cmake +++ b/test/cmake/CheckReleaseVersion.cmake @@ -7,7 +7,7 @@ if(NOT ROOT OR NOT DEFINED EXPECTED_VERSION) message(FATAL_ERROR "ROOT and EXPECTED_VERSION are required") endif() -file(STRINGS "${ROOT}/include/WebFront.hpp" declarations +file(STRINGS "${ROOT}/include/webfront/WebFront.hpp" declarations REGEX "^inline constexpr std::string_view version = \"[0-9]+\\.[0-9]+\\.[0-9]+\";") list(LENGTH declarations count) if(NOT count EQUAL 1) diff --git a/cmake/CheckReleaseVersionTests.cmake b/test/cmake/CheckReleaseVersionTests.cmake similarity index 92% rename from cmake/CheckReleaseVersionTests.cmake rename to test/cmake/CheckReleaseVersionTests.cmake index f18e01b4..a5f28ad6 100644 --- a/cmake/CheckReleaseVersionTests.cmake +++ b/test/cmake/CheckReleaseVersionTests.cmake @@ -3,13 +3,13 @@ cmake_minimum_required(VERSION 3.31) if(NOT ROOT OR NOT WORK) message(FATAL_ERROR "ROOT and WORK are required") endif() -file(MAKE_DIRECTORY "${WORK}/archive/include") -file(WRITE "${WORK}/archive/include/WebFront.hpp" +file(MAKE_DIRECTORY "${WORK}/archive/include/webfront") +file(WRITE "${WORK}/archive/include/webfront/WebFront.hpp" "inline constexpr std::string_view version = \"0.1.0\";\n") function(check_case description expected_result expected_message) execute_process(COMMAND "${CMAKE_COMMAND}" "-DROOT=${WORK}/archive" ${ARGN} - -P "${ROOT}/cmake/CheckReleaseVersion.cmake" + -P "${ROOT}/test/cmake/CheckReleaseVersion.cmake" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) if(expected_result STREQUAL "success") if(NOT result EQUAL 0) @@ -49,7 +49,7 @@ execute_process(COMMAND "${GIT_EXECUTABLE}" -c user.name=VersionTest -c user.ema execute_process(COMMAND "${GIT_EXECUTABLE}" tag v0.1.1 WORKING_DIRECTORY "${repo}" COMMAND_ERROR_IS_FATAL ANY) execute_process(COMMAND "${CMAKE_COMMAND}" "-DROOT=${repo}" -DEXPECTED_VERSION=0.1.0 - -P "${ROOT}/cmake/CheckReleaseVersion.cmake" + -P "${ROOT}/test/cmake/CheckReleaseVersion.cmake" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error) if(result EQUAL 0 OR NOT "${output}${error}" MATCHES "Release tag 'v0.1.1' differs") message(FATAL_ERROR "Tag at HEAD mismatch was not detected: ${output}${error}") diff --git a/test/cmake/CheckRepositoryLayout.cmake b/test/cmake/CheckRepositoryLayout.cmake new file mode 100644 index 00000000..979c5f44 --- /dev/null +++ b/test/cmake/CheckRepositoryLayout.cmake @@ -0,0 +1,59 @@ +# The tracked root of the repository is a closed list, so that the README stays visible on the +# GitHub page. third_party/ is a temporary exception removed by #319. +# cmake -DROOT= [-DGIT_EXECUTABLE=] -P test/cmake/CheckRepositoryLayout.cmake +cmake_minimum_required(VERSION 3.31) + +if(NOT ROOT) + message(FATAL_ERROR "ROOT is required") +endif() + +set(expected + .clang-format .clang-tidy .codescene .devcontainer .gitattributes .github .gitignore + AGENTS.md CMakeLists.txt README.md + cmake docs examples include js test third_party) + +set(actual "") +set(from_git OFF) +if(GIT_EXECUTABLE AND EXISTS "${ROOT}/.git") + execute_process(COMMAND "${GIT_EXECUTABLE}" ls-files + WORKING_DIRECTORY "${ROOT}" OUTPUT_VARIABLE tracked RESULT_VARIABLE git_result ERROR_QUIET) + if(git_result EQUAL 0) + set(from_git ON) + string(REPLACE "\n" ";" tracked "${tracked}") + foreach(path IN LISTS tracked) + string(REGEX REPLACE "/.*$" "" top "${path}") + list(APPEND actual "${top}") + endforeach() + endif() +endif() +if(NOT from_git) + # A source archive holds only tracked content. + file(GLOB entries LIST_DIRECTORIES true RELATIVE "${ROOT}" "${ROOT}/*" "${ROOT}/.[!.]*") + set(actual ${entries}) +endif() +list(REMOVE_ITEM actual "") +list(REMOVE_DUPLICATES actual) +list(SORT actual) +list(SORT expected) + +if(NOT actual STREQUAL expected) + set(unexpected ${actual}) + list(REMOVE_ITEM unexpected ${expected}) + set(missing ${expected}) + list(REMOVE_ITEM missing ${actual}) + message(FATAL_ERROR "The repository root drifted from the declared layout.\n" + " unexpected: ${unexpected}\n missing: ${missing}") +endif() + +# include/ exposes a single namespace directory, which holds headers only (no JavaScript, so that +# installers need no filter). +file(GLOB include_entries LIST_DIRECTORIES true RELATIVE "${ROOT}/include" "${ROOT}/include/*") +if(NOT include_entries STREQUAL "webfront") + message(FATAL_ERROR "include/ must contain only webfront/, found: ${include_entries}") +endif() +file(GLOB_RECURSE include_files LIST_DIRECTORIES false RELATIVE "${ROOT}/include/webfront" "${ROOT}/include/webfront/*") +foreach(file IN LISTS include_files) + if(NOT file MATCHES "\\.(hpp|h)$") + message(FATAL_ERROR "include/webfront must hold headers only: ${file}") + endif() +endforeach() diff --git a/cmake/CheckWKWebViewSupport.cmake b/test/cmake/CheckWKWebViewSupport.cmake similarity index 100% rename from cmake/CheckWKWebViewSupport.cmake rename to test/cmake/CheckWKWebViewSupport.cmake diff --git a/cmake/CheckWebView2Architecture.cmake b/test/cmake/CheckWebView2Architecture.cmake similarity index 95% rename from cmake/CheckWebView2Architecture.cmake rename to test/cmake/CheckWebView2Architecture.cmake index 51047317..bcfd5430 100644 --- a/cmake/CheckWebView2Architecture.cmake +++ b/test/cmake/CheckWebView2Architecture.cmake @@ -73,7 +73,7 @@ foreach(probe ARM64EC UNKNOWN) endif() endforeach() -# Call the lifecycle hook from this script's directory, outside webtest/, without building or +# Call the lifecycle hook from this script's directory, outside test/web/, without building or # downloading anything. Production source paths and test working directories must be absolute. function(add_executable target) foreach(source IN LISTS ARGN) @@ -91,8 +91,8 @@ function(set_tests_properties) endif() math(EXPR index "${index} + 1") list(GET ARGN ${index} directory) - if(NOT directory STREQUAL "${ROOT}/webtest") - message(FATAL_ERROR "Lifecycle hook must use '${ROOT}/webtest', got '${directory}'") + if(NOT directory STREQUAL "${ROOT}/test/web") + message(FATAL_ERROR "Lifecycle hook must use '${ROOT}/test/web', got '${directory}'") endif() endfunction() include("${ROOT}/cmake/Frontends.cmake") diff --git a/cmake/CheckWebView2Toolchain.cmake b/test/cmake/CheckWebView2Toolchain.cmake similarity index 100% rename from cmake/CheckWebView2Toolchain.cmake rename to test/cmake/CheckWebView2Toolchain.cmake diff --git a/cmake/FrontendTestHelpers.cmake b/test/cmake/FrontendTestHelpers.cmake similarity index 100% rename from cmake/FrontendTestHelpers.cmake rename to test/cmake/FrontendTestHelpers.cmake diff --git a/cmake/TestHardening.cmake b/test/cmake/TestHardening.cmake similarity index 100% rename from cmake/TestHardening.cmake rename to test/cmake/TestHardening.cmake diff --git a/cmake/WKWebViewTestInfo.plist.in b/test/cmake/WKWebViewTestInfo.plist.in similarity index 100% rename from cmake/WKWebViewTestInfo.plist.in rename to test/cmake/WKWebViewTestInfo.plist.in diff --git a/cmake/WebKitGTKTestEnvironment.cmake b/test/cmake/WebKitGTKTestEnvironment.cmake similarity index 100% rename from cmake/WebKitGTKTestEnvironment.cmake rename to test/cmake/WebKitGTKTestEnvironment.cmake diff --git a/test/cef-testing/CMakeLists.txt b/test/cmake/cef-testing/CMakeLists.txt similarity index 100% rename from test/cef-testing/CMakeLists.txt rename to test/cmake/cef-testing/CMakeLists.txt diff --git a/test/cef-testing/dependency/CMakeLists.txt b/test/cmake/cef-testing/dependency/CMakeLists.txt similarity index 100% rename from test/cef-testing/dependency/CMakeLists.txt rename to test/cmake/cef-testing/dependency/CMakeLists.txt diff --git a/test/consumer/CMakeLists.txt b/test/cmake/consumer/CMakeLists.txt similarity index 100% rename from test/consumer/CMakeLists.txt rename to test/cmake/consumer/CMakeLists.txt diff --git a/test/consumer/CheckOptions.cmake b/test/cmake/consumer/CheckOptions.cmake similarity index 100% rename from test/consumer/CheckOptions.cmake rename to test/cmake/consumer/CheckOptions.cmake diff --git a/test/consumer/main.cpp b/test/cmake/consumer/main.cpp similarity index 96% rename from test/consumer/main.cpp rename to test/cmake/consumer/main.cpp index 588b8f70..ec271820 100644 --- a/test/consumer/main.cpp +++ b/test/cmake/consumer/main.cpp @@ -11,7 +11,7 @@ #endif #endif -#include +#include int main(int argc, char**) { if (argc > 1) { // never taken by the smoke test: it only proves that the library compiles and links diff --git a/test/frontends/CMakeLists.txt b/test/cmake/frontends/CMakeLists.txt similarity index 97% rename from test/frontends/CMakeLists.txt rename to test/cmake/frontends/CMakeLists.txt index f9953781..67b1275c 100644 --- a/test/frontends/CMakeLists.txt +++ b/test/cmake/frontends/CMakeLists.txt @@ -64,7 +64,7 @@ elseif(CASE STREQUAL "webkitgtk-linux") set(name WebFrontWebKitGTKIntegration) set(expected_timeout 90) set(expect_xvfb ON) - include("${ROOT}/cmake/WebKitGTKTestEnvironment.cmake") + include("${ROOT}/test/cmake/WebKitGTKTestEnvironment.cmake") function(webfront_add_webkitgtk_tests) list(LENGTH ARGN shared_count) if(NOT shared_count EQUAL 8 OR NOT "WebFrontWebKitGTKIntegration" IN_LIST ARGN) @@ -125,7 +125,7 @@ if(expect_xvfb) # A deterministic stand-in: this fixture checks generated commands, never runs the browser. set(XVFB_RUN_EXECUTABLE "${CMAKE_COMMAND}" CACHE FILEPATH "Xvfb fixture" FORCE) endif() -webfront_add_browser_tests(browser "${frontend}" "${ROOT}/webtest" lifecycle) +webfront_add_browser_tests(browser "${frontend}" "${ROOT}/test/web" lifecycle) if(CASE STREQUAL "missing-xvfb-hook") if(TEST ${name} OR NOT TEST EngineLifecycle) message(FATAL_ERROR "Missing Xvfb must skip Jasmine while preserving independent engine tests") @@ -141,7 +141,7 @@ endif() set(expected_TIMEOUT "${expected_timeout}") set(expected_LABELS web-integration) set(expected_RESOURCE_LOCK webfront_port_9002) -set(expected_WORKING_DIRECTORY "${ROOT}/webtest") +set(expected_WORKING_DIRECTORY "${ROOT}/test/web") if(NOT EXISTS "${expected_WORKING_DIRECTORY}/JasmineTest.cpp") message(FATAL_ERROR "Expected the actual WebFront browser asset directory") endif() diff --git a/test/frontends/TestSupport.cmake b/test/cmake/frontends/TestSupport.cmake similarity index 100% rename from test/frontends/TestSupport.cmake rename to test/cmake/frontends/TestSupport.cmake diff --git a/fuzz/CMakeLists.txt b/test/fuzz/CMakeLists.txt similarity index 100% rename from fuzz/CMakeLists.txt rename to test/fuzz/CMakeLists.txt diff --git a/fuzz/GzipFuzz.cpp b/test/fuzz/GzipFuzz.cpp similarity index 91% rename from fuzz/GzipFuzz.cpp rename to test/fuzz/GzipFuzz.cpp index 892d50c3..42407087 100644 --- a/fuzz/GzipFuzz.cpp +++ b/test/fuzz/GzipFuzz.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/fuzz/HTTPFuzz.cpp b/test/fuzz/HTTPFuzz.cpp similarity index 95% rename from fuzz/HTTPFuzz.cpp rename to test/fuzz/HTTPFuzz.cpp index 4f95d574..d9bddc34 100644 --- a/fuzz/HTTPFuzz.cpp +++ b/test/fuzz/HTTPFuzz.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/fuzz/MessagesFuzz.cpp b/test/fuzz/MessagesFuzz.cpp similarity index 98% rename from fuzz/MessagesFuzz.cpp rename to test/fuzz/MessagesFuzz.cpp index fb78c37f..694f6281 100644 --- a/fuzz/MessagesFuzz.cpp +++ b/test/fuzz/MessagesFuzz.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/fuzz/README.md b/test/fuzz/README.md similarity index 92% rename from fuzz/README.md rename to test/fuzz/README.md index bd1a9f8d..f2c2f89f 100644 --- a/fuzz/README.md +++ b/test/fuzz/README.md @@ -14,11 +14,11 @@ The binary corpus files use the existing wire formats. Seeds derive from Empty strings, integer overflow and malformed HTTP versions retain hardening regressions. Message seeds use native little endian, as on the CI hosts. -CMake copies these files to `build-fuzz/fuzz/corpus/` at configuration. +CMake copies these files to `build-test/fuzz/fuzz/corpus/` at configuration. Run against that copy, since libFuzzer adds and minimizes inputs in its corpus: ```sh -./build-fuzz/fuzz/fuzz_messages build-fuzz/fuzz/corpus/messages \ +./build-test/fuzz/fuzz/fuzz_messages build-test/fuzz/fuzz/corpus/messages \ -max_total_time=30 -timeout=5 -max_len=65536 -rss_limit_mb=1024 ``` diff --git a/fuzz/WebSocketFuzz.cpp b/test/fuzz/WebSocketFuzz.cpp similarity index 97% rename from fuzz/WebSocketFuzz.cpp rename to test/fuzz/WebSocketFuzz.cpp index 4e8d9ecd..d3e90d1b 100644 --- a/fuzz/WebSocketFuzz.cpp +++ b/test/fuzz/WebSocketFuzz.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/fuzz/corpus/gzip/bad-crc b/test/fuzz/corpus/gzip/bad-crc similarity index 100% rename from fuzz/corpus/gzip/bad-crc rename to test/fuzz/corpus/gzip/bad-crc diff --git a/fuzz/corpus/gzip/distanceCount31 b/test/fuzz/corpus/gzip/distanceCount31 similarity index 100% rename from fuzz/corpus/gzip/distanceCount31 rename to test/fuzz/corpus/gzip/distanceCount31 diff --git a/fuzz/corpus/gzip/distanceCount32 b/test/fuzz/corpus/gzip/distanceCount32 similarity index 100% rename from fuzz/corpus/gzip/distanceCount32 rename to test/fuzz/corpus/gzip/distanceCount32 diff --git a/fuzz/corpus/gzip/dynamic b/test/fuzz/corpus/gzip/dynamic similarity index 100% rename from fuzz/corpus/gzip/dynamic rename to test/fuzz/corpus/gzip/dynamic diff --git a/fuzz/corpus/gzip/empty b/test/fuzz/corpus/gzip/empty similarity index 100% rename from fuzz/corpus/gzip/empty rename to test/fuzz/corpus/gzip/empty diff --git a/fuzz/corpus/gzip/fixed b/test/fuzz/corpus/gzip/fixed similarity index 100% rename from fuzz/corpus/gzip/fixed rename to test/fuzz/corpus/gzip/fixed diff --git a/fuzz/corpus/gzip/invalidDistance b/test/fuzz/corpus/gzip/invalidDistance similarity index 100% rename from fuzz/corpus/gzip/invalidDistance rename to test/fuzz/corpus/gzip/invalidDistance diff --git a/fuzz/corpus/gzip/missingEnd b/test/fuzz/corpus/gzip/missingEnd similarity index 100% rename from fuzz/corpus/gzip/missingEnd rename to test/fuzz/corpus/gzip/missingEnd diff --git a/fuzz/corpus/gzip/optional b/test/fuzz/corpus/gzip/optional similarity index 100% rename from fuzz/corpus/gzip/optional rename to test/fuzz/corpus/gzip/optional diff --git a/fuzz/corpus/gzip/oversubscribed b/test/fuzz/corpus/gzip/oversubscribed similarity index 100% rename from fuzz/corpus/gzip/oversubscribed rename to test/fuzz/corpus/gzip/oversubscribed diff --git a/fuzz/corpus/gzip/repeatOverflow b/test/fuzz/corpus/gzip/repeatOverflow similarity index 100% rename from fuzz/corpus/gzip/repeatOverflow rename to test/fuzz/corpus/gzip/repeatOverflow diff --git a/fuzz/corpus/gzip/repeatWithoutPrevious b/test/fuzz/corpus/gzip/repeatWithoutPrevious similarity index 100% rename from fuzz/corpus/gzip/repeatWithoutPrevious rename to test/fuzz/corpus/gzip/repeatWithoutPrevious diff --git a/fuzz/corpus/gzip/reserved-block b/test/fuzz/corpus/gzip/reserved-block similarity index 100% rename from fuzz/corpus/gzip/reserved-block rename to test/fuzz/corpus/gzip/reserved-block diff --git a/fuzz/corpus/gzip/reservedDistance b/test/fuzz/corpus/gzip/reservedDistance similarity index 100% rename from fuzz/corpus/gzip/reservedDistance rename to test/fuzz/corpus/gzip/reservedDistance diff --git a/fuzz/corpus/gzip/reservedLiteral b/test/fuzz/corpus/gzip/reservedLiteral similarity index 100% rename from fuzz/corpus/gzip/reservedLiteral rename to test/fuzz/corpus/gzip/reservedLiteral diff --git a/fuzz/corpus/gzip/stored b/test/fuzz/corpus/gzip/stored similarity index 100% rename from fuzz/corpus/gzip/stored rename to test/fuzz/corpus/gzip/stored diff --git a/fuzz/corpus/gzip/truncated b/test/fuzz/corpus/gzip/truncated similarity index 100% rename from fuzz/corpus/gzip/truncated rename to test/fuzz/corpus/gzip/truncated diff --git a/fuzz/corpus/http/accept-encoding b/test/fuzz/corpus/http/accept-encoding similarity index 100% rename from fuzz/corpus/http/accept-encoding rename to test/fuzz/corpus/http/accept-encoding diff --git a/fuzz/corpus/http/get b/test/fuzz/corpus/http/get similarity index 100% rename from fuzz/corpus/http/get rename to test/fuzz/corpus/http/get diff --git a/fuzz/corpus/http/unknown-method b/test/fuzz/corpus/http/unknown-method similarity index 100% rename from fuzz/corpus/http/unknown-method rename to test/fuzz/corpus/http/unknown-method diff --git a/fuzz/corpus/http/upgrade b/test/fuzz/corpus/http/upgrade similarity index 100% rename from fuzz/corpus/http/upgrade rename to test/fuzz/corpus/http/upgrade diff --git a/fuzz/corpus/http/version-overflow b/test/fuzz/corpus/http/version-overflow similarity index 100% rename from fuzz/corpus/http/version-overflow rename to test/fuzz/corpus/http/version-overflow diff --git a/fuzz/corpus/http/x-gzip b/test/fuzz/corpus/http/x-gzip similarity index 100% rename from fuzz/corpus/http/x-gzip rename to test/fuzz/corpus/http/x-gzip diff --git a/fuzz/corpus/messages/array-10 b/test/fuzz/corpus/messages/array-10 similarity index 100% rename from fuzz/corpus/messages/array-10 rename to test/fuzz/corpus/messages/array-10 diff --git a/fuzz/corpus/messages/array-11 b/test/fuzz/corpus/messages/array-11 similarity index 100% rename from fuzz/corpus/messages/array-11 rename to test/fuzz/corpus/messages/array-11 diff --git a/fuzz/corpus/messages/array-12 b/test/fuzz/corpus/messages/array-12 similarity index 100% rename from fuzz/corpus/messages/array-12 rename to test/fuzz/corpus/messages/array-12 diff --git a/fuzz/corpus/messages/array-13 b/test/fuzz/corpus/messages/array-13 similarity index 100% rename from fuzz/corpus/messages/array-13 rename to test/fuzz/corpus/messages/array-13 diff --git a/fuzz/corpus/messages/array-14 b/test/fuzz/corpus/messages/array-14 similarity index 100% rename from fuzz/corpus/messages/array-14 rename to test/fuzz/corpus/messages/array-14 diff --git a/fuzz/corpus/messages/array-15 b/test/fuzz/corpus/messages/array-15 similarity index 100% rename from fuzz/corpus/messages/array-15 rename to test/fuzz/corpus/messages/array-15 diff --git a/fuzz/corpus/messages/array-16 b/test/fuzz/corpus/messages/array-16 similarity index 100% rename from fuzz/corpus/messages/array-16 rename to test/fuzz/corpus/messages/array-16 diff --git a/fuzz/corpus/messages/array-17 b/test/fuzz/corpus/messages/array-17 similarity index 100% rename from fuzz/corpus/messages/array-17 rename to test/fuzz/corpus/messages/array-17 diff --git a/fuzz/corpus/messages/array-8 b/test/fuzz/corpus/messages/array-8 similarity index 100% rename from fuzz/corpus/messages/array-8 rename to test/fuzz/corpus/messages/array-8 diff --git a/fuzz/corpus/messages/array-9 b/test/fuzz/corpus/messages/array-9 similarity index 100% rename from fuzz/corpus/messages/array-9 rename to test/fuzz/corpus/messages/array-9 diff --git a/fuzz/corpus/messages/array-u8 b/test/fuzz/corpus/messages/array-u8 similarity index 100% rename from fuzz/corpus/messages/array-u8 rename to test/fuzz/corpus/messages/array-u8 diff --git a/fuzz/corpus/messages/empty-small-string b/test/fuzz/corpus/messages/empty-small-string similarity index 100% rename from fuzz/corpus/messages/empty-small-string rename to test/fuzz/corpus/messages/empty-small-string diff --git a/fuzz/corpus/messages/empty-string b/test/fuzz/corpus/messages/empty-string similarity index 100% rename from fuzz/corpus/messages/empty-string rename to test/fuzz/corpus/messages/empty-string diff --git a/fuzz/corpus/messages/function-return b/test/fuzz/corpus/messages/function-return similarity index 100% rename from fuzz/corpus/messages/function-return rename to test/fuzz/corpus/messages/function-return diff --git a/fuzz/corpus/messages/handshake b/test/fuzz/corpus/messages/handshake similarity index 100% rename from fuzz/corpus/messages/handshake rename to test/fuzz/corpus/messages/handshake diff --git a/fuzz/corpus/messages/integer-overflow b/test/fuzz/corpus/messages/integer-overflow similarity index 100% rename from fuzz/corpus/messages/integer-overflow rename to test/fuzz/corpus/messages/integer-overflow diff --git a/fuzz/corpus/messages/number b/test/fuzz/corpus/messages/number similarity index 100% rename from fuzz/corpus/messages/number rename to test/fuzz/corpus/messages/number diff --git a/fuzz/corpus/messages/print-call b/test/fuzz/corpus/messages/print-call similarity index 100% rename from fuzz/corpus/messages/print-call rename to test/fuzz/corpus/messages/print-call diff --git a/fuzz/corpus/messages/tuple b/test/fuzz/corpus/messages/tuple similarity index 100% rename from fuzz/corpus/messages/tuple rename to test/fuzz/corpus/messages/tuple diff --git a/fuzz/corpus/websocket/empty b/test/fuzz/corpus/websocket/empty similarity index 100% rename from fuzz/corpus/websocket/empty rename to test/fuzz/corpus/websocket/empty diff --git a/fuzz/corpus/websocket/extended b/test/fuzz/corpus/websocket/extended similarity index 100% rename from fuzz/corpus/websocket/extended rename to test/fuzz/corpus/websocket/extended diff --git a/fuzz/corpus/websocket/masked-hello b/test/fuzz/corpus/websocket/masked-hello similarity index 100% rename from fuzz/corpus/websocket/masked-hello rename to test/fuzz/corpus/websocket/masked-hello diff --git a/fuzz/corpus/websocket/oversized b/test/fuzz/corpus/websocket/oversized similarity index 100% rename from fuzz/corpus/websocket/oversized rename to test/fuzz/corpus/websocket/oversized diff --git a/test/AcceptEncodingTests.cpp b/test/unit/AcceptEncodingTests.cpp similarity index 99% rename from test/AcceptEncodingTests.cpp rename to test/unit/AcceptEncodingTests.cpp index b67c528d..927bfffb 100644 --- a/test/AcceptEncodingTests.cpp +++ b/test/unit/AcceptEncodingTests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using webfront::http::Headers; diff --git a/test/ApplicationTaskTests.cpp b/test/unit/ApplicationTaskTests.cpp similarity index 99% rename from test/ApplicationTaskTests.cpp rename to test/unit/ApplicationTaskTests.cpp index bab373c4..bb2366f5 100644 --- a/test/ApplicationTaskTests.cpp +++ b/test/unit/ApplicationTaskTests.cpp @@ -1,6 +1,6 @@ #include "InjectableNetworking.hpp" #include -#include +#include #include #include diff --git a/test/ApplicationUrlTests.cpp b/test/unit/ApplicationUrlTests.cpp similarity index 98% rename from test/ApplicationUrlTests.cpp rename to test/unit/ApplicationUrlTests.cpp index e8bbe09e..6edd44e6 100644 --- a/test/ApplicationUrlTests.cpp +++ b/test/unit/ApplicationUrlTests.cpp @@ -1,5 +1,5 @@ #include -#include +#include SCENARIO("Frontend URLs use the configured listening address") { using webfront::frontend::detail::applicationUrl; diff --git a/test/BabelFSTests.cpp b/test/unit/BabelFSTests.cpp similarity index 92% rename from test/BabelFSTests.cpp rename to test/unit/BabelFSTests.cpp index 74f78b04..94ac1732 100644 --- a/test/BabelFSTests.cpp +++ b/test/unit/BabelFSTests.cpp @@ -1,5 +1,5 @@ #include "EmbeddedAssetChecks.hpp" -#include +#include using namespace webfront; diff --git a/test/CEFMacrosTests.cpp b/test/unit/CEFMacrosTests.cpp similarity index 92% rename from test/CEFMacrosTests.cpp rename to test/unit/CEFMacrosTests.cpp index a613e9eb..5e53f614 100644 --- a/test/CEFMacrosTests.cpp +++ b/test/unit/CEFMacrosTests.cpp @@ -4,7 +4,7 @@ #ifndef WEBFRONT_EMBED_CEF // frontend/CEF.hpp includes the stdnet and stdexec headers before CEF's headers, which define these // macros as include/base/cef_compiler_specific.h does (GCC and Clang with NDEBUG, MSVC). - #include + #include #ifdef _MSC_VER #define NOINLINE __declspec(noinline) @@ -16,7 +16,7 @@ #define NO_UNIQUE_ADDRESS [[no_unique_address]] #endif -#include +#include #include diff --git a/test/CEFPathsTests.cpp b/test/unit/CEFPathsTests.cpp similarity index 96% rename from test/CEFPathsTests.cpp rename to test/unit/CEFPathsTests.cpp index 9ae6815e..43e5464a 100644 --- a/test/CEFPathsTests.cpp +++ b/test/unit/CEFPathsTests.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/test/CMakeLists.txt b/test/unit/CMakeLists.txt similarity index 87% rename from test/CMakeLists.txt rename to test/unit/CMakeLists.txt index 874cbe39..bfa7e7e1 100644 --- a/test/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -35,11 +35,11 @@ catch_discover_tests(tests PROPERTIES TIMEOUT 60) add_test(NAME ReleaseVersionConsistency COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -DEXPECTED_VERSION=${PROJECT_VERSION} - -P ${PROJECT_SOURCE_DIR}/cmake/CheckReleaseVersion.cmake) + -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckReleaseVersion.cmake) add_test(NAME ReleaseVersionRegression COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -DWORK=${CMAKE_CURRENT_BINARY_DIR}/release-version-regression - -P ${PROJECT_SOURCE_DIR}/cmake/CheckReleaseVersionTests.cmake) + -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckReleaseVersionTests.cmake) # Windows bash.exe may be the WSL launcher rather than a native Bash runtime. if(UNIX) @@ -67,10 +67,13 @@ if(WEBFRONT_USE_MDDLOG) endif() # The documented newcomer commands and snippets must keep matching the built examples and CI. +add_test(NAME RepositoryLayout + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} + -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckRepositoryLayout.cmake) add_test(NAME NewcomerDocsMatchExamples - COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/CheckNewcomerDocs.cmake) + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckNewcomerDocs.cmake) add_test(NAME FrontendSelection - COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/CheckFrontendSelection.cmake) + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckFrontendSelection.cmake) # Exercise configuration-dependent CTest discovery and generator switches on single-config CI hosts. # The fixture configures no compiler and builds nothing; Ninja is optional for contributor builds. find_program(WEBFRONT_TEST_NINJA_EXECUTABLE ninja) @@ -78,7 +81,7 @@ if(WEBFRONT_TEST_NINJA_EXECUTABLE) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/frontend-multiconfig") add_test(NAME FrontendSelectionMultiConfig COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} - -P ${PROJECT_SOURCE_DIR}/cmake/CheckFrontendGenerators.cmake) + -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckFrontendGenerators.cmake) set_tests_properties(FrontendSelectionMultiConfig PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/frontend-multiconfig") else() @@ -88,13 +91,13 @@ endif() # equivalent module path here so the offline fixture still exercises the same CPM as this build. add_test(NAME CEFTestingState COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -DCPM_MODULE=${CPM_DOWNLOAD_LOCATION} - -P ${PROJECT_SOURCE_DIR}/cmake/CheckCEFTestingState.cmake) + -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckCEFTestingState.cmake) add_test(NAME WebView2UnsupportedToolchain - COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/CheckWebView2Toolchain.cmake) + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckWebView2Toolchain.cmake) add_test(NAME WebView2LoaderArchitecture - COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/CheckWebView2Architecture.cmake) + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckWebView2Architecture.cmake) add_test(NAME WKWebViewConfiguration - COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/CheckWKWebViewSupport.cmake) + COMMAND ${CMAKE_COMMAND} -DROOT=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/test/cmake/CheckWKWebViewSupport.cmake) # A minimal parent project must be able to add_subdirectory(WebFront) and link WebFront::WebFront # without building WebFront's examples or tests. Dependencies reuse this build's sources, so the @@ -112,7 +115,7 @@ if(DEFINED CMAKE_CXX_SCAN_FOR_MODULES) endif() add_test(NAME AddSubdirectoryConsumer COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test ${CMAKE_CURRENT_SOURCE_DIR}/consumer ${CMAKE_CURRENT_BINARY_DIR}/consumer-build + --build-and-test ${PROJECT_SOURCE_DIR}/test/cmake/consumer ${CMAKE_CURRENT_BINARY_DIR}/consumer-build --build-generator ${CMAKE_GENERATOR} --build-config $ --build-options -DWEBFRONT_SOURCE_DIR=${PROJECT_SOURCE_DIR} ${_consumer_dependency_args} diff --git a/test/ContentPolicyTests.cpp b/test/unit/ContentPolicyTests.cpp similarity index 98% rename from test/ContentPolicyTests.cpp rename to test/unit/ContentPolicyTests.cpp index 2eccc56e..06f0d6d3 100644 --- a/test/ContentPolicyTests.cpp +++ b/test/unit/ContentPolicyTests.cpp @@ -1,10 +1,10 @@ #include "Mocks.hpp" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/test/DefaultFSTests.cpp b/test/unit/DefaultFSTests.cpp similarity index 97% rename from test/DefaultFSTests.cpp rename to test/unit/DefaultFSTests.cpp index 534cdf49..90ae6eed 100644 --- a/test/DefaultFSTests.cpp +++ b/test/unit/DefaultFSTests.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -13,7 +13,7 @@ using namespace webfront; namespace { -// Minimal temp-directory fixture, following the convention used in test/NativeFSTests.cpp. +// Minimal temp-directory fixture, following the convention used in test/unit/NativeFSTests.cpp. class TemporaryRoot { public: TemporaryRoot() { diff --git a/test/DeveloperTests.cpp b/test/unit/DeveloperTests.cpp similarity index 99% rename from test/DeveloperTests.cpp rename to test/unit/DeveloperTests.cpp index 20c0521b..8f280617 100644 --- a/test/DeveloperTests.cpp +++ b/test/unit/DeveloperTests.cpp @@ -1,8 +1,8 @@ -#include "../test/fixtures/Pi.hpp" +#include "../fixtures/Pi.hpp" #include "TemporaryDirectory.hpp" #include -#include -#include +#include +#include #include #include diff --git a/test/EmbeddedAssetChecks.hpp b/test/unit/EmbeddedAssetChecks.hpp similarity index 95% rename from test/EmbeddedAssetChecks.hpp rename to test/unit/EmbeddedAssetChecks.hpp index e5102112..6ac6d838 100644 --- a/test/EmbeddedAssetChecks.hpp +++ b/test/unit/EmbeddedAssetChecks.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/test/EncodingsTests.cpp b/test/unit/EncodingsTests.cpp similarity index 99% rename from test/EncodingsTests.cpp rename to test/unit/EncodingsTests.cpp index f3c0f7d4..72589cc7 100644 --- a/test/EncodingsTests.cpp +++ b/test/unit/EncodingsTests.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/test/FileSystemTests.cpp b/test/unit/FileSystemTests.cpp similarity index 99% rename from test/FileSystemTests.cpp rename to test/unit/FileSystemTests.cpp index 8ba127c5..ce725e3d 100644 --- a/test/FileSystemTests.cpp +++ b/test/unit/FileSystemTests.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "Mocks.hpp" diff --git a/test/FrontendContractTests.cpp b/test/unit/FrontendContractTests.cpp similarity index 99% rename from test/FrontendContractTests.cpp rename to test/unit/FrontendContractTests.cpp index d9a3f378..df37b472 100644 --- a/test/FrontendContractTests.cpp +++ b/test/unit/FrontendContractTests.cpp @@ -1,8 +1,8 @@ #include "Mocks.hpp" #include #include -#include -#include +#include +#include #include #include diff --git a/test/FrontendUrlTests.cpp b/test/unit/FrontendUrlTests.cpp similarity index 98% rename from test/FrontendUrlTests.cpp rename to test/unit/FrontendUrlTests.cpp index 8ff801a9..12f11459 100644 --- a/test/FrontendUrlTests.cpp +++ b/test/unit/FrontendUrlTests.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/test/GzipFixtures.hpp b/test/unit/GzipFixtures.hpp similarity index 100% rename from test/GzipFixtures.hpp rename to test/unit/GzipFixtures.hpp diff --git a/test/GzipTests.cpp b/test/unit/GzipTests.cpp similarity index 99% rename from test/GzipTests.cpp rename to test/unit/GzipTests.cpp index 342010a2..59a97b87 100644 --- a/test/GzipTests.cpp +++ b/test/unit/GzipTests.cpp @@ -1,6 +1,6 @@ #include "GzipFixtures.hpp" #include -#include +#include #include diff --git a/test/HTTPEncodingTests.cpp b/test/unit/HTTPEncodingTests.cpp similarity index 99% rename from test/HTTPEncodingTests.cpp rename to test/unit/HTTPEncodingTests.cpp index dc13971d..668dc7dc 100644 --- a/test/HTTPEncodingTests.cpp +++ b/test/unit/HTTPEncodingTests.cpp @@ -1,7 +1,7 @@ #include "GzipFixtures.hpp" #include -#include -#include +#include +#include #include #include diff --git a/test/HTTPServerTests.cpp b/test/unit/HTTPServerTests.cpp similarity index 99% rename from test/HTTPServerTests.cpp rename to test/unit/HTTPServerTests.cpp index 426f43c3..6917f817 100644 --- a/test/HTTPServerTests.cpp +++ b/test/unit/HTTPServerTests.cpp @@ -1,9 +1,9 @@ #include "InjectableNetworking.hpp" #include "Mocks.hpp" #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/IndexFSTests.cpp b/test/unit/IndexFSTests.cpp similarity index 94% rename from test/IndexFSTests.cpp rename to test/unit/IndexFSTests.cpp index 8dbf8ac4..d1453dbc 100644 --- a/test/IndexFSTests.cpp +++ b/test/unit/IndexFSTests.cpp @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -19,7 +19,7 @@ SCENARIO("IndexFileSystem provides basic files for browser support") { THEN("A correct HTML5 file loading WebFront.js and the fallback module is returned") { REQUIRE(indexFile.has_value()); - // The readable source (assets/fallback/index.html) is embedded raw, like WebFront.js, + // The readable source (js/core/fallback/index.html) is embedded raw, like WebFront.js, // so it is never Brotli-encoded; read it in full rather than assuming it fits a // single fixed-size buffer. REQUIRE_FALSE(indexFile->isEncoded()); diff --git a/test/InjectableNetworking.hpp b/test/unit/InjectableNetworking.hpp similarity index 99% rename from test/InjectableNetworking.hpp rename to test/unit/InjectableNetworking.hpp index 21aeef47..68798e5a 100644 --- a/test/InjectableNetworking.hpp +++ b/test/unit/InjectableNetworking.hpp @@ -2,8 +2,8 @@ #pragma once #include "InlineTaskScope.hpp" #include -#include -#include +#include +#include #include #include diff --git a/test/InlineTaskScope.hpp b/test/unit/InlineTaskScope.hpp similarity index 87% rename from test/InlineTaskScope.hpp rename to test/unit/InlineTaskScope.hpp index b19eca31..2e7153c6 100644 --- a/test/InlineTaskScope.hpp +++ b/test/unit/InlineTaskScope.hpp @@ -1,6 +1,6 @@ /// @brief Scope fixture for tasks whose mock scheduler and cancellation complete inline. #pragma once -#include +#include namespace webfront::testing { class InlineTaskScope : public networking::TaskScope { diff --git a/test/JSFunctionTests.cpp b/test/unit/JSFunctionTests.cpp similarity index 98% rename from test/JSFunctionTests.cpp rename to test/unit/JSFunctionTests.cpp index 9c9e52b7..31af9308 100644 --- a/test/JSFunctionTests.cpp +++ b/test/unit/JSFunctionTests.cpp @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/JasmineFSTests.cpp b/test/unit/JasmineFSTests.cpp similarity index 96% rename from test/JasmineFSTests.cpp rename to test/unit/JasmineFSTests.cpp index a4b1a3a7..bdd3c932 100644 --- a/test/JasmineFSTests.cpp +++ b/test/unit/JasmineFSTests.cpp @@ -1,5 +1,5 @@ #include "EmbeddedAssetChecks.hpp" -#include +#include #include #include diff --git a/test/JsFunctionSenderTests.cpp b/test/unit/JsFunctionSenderTests.cpp similarity index 99% rename from test/JsFunctionSenderTests.cpp rename to test/unit/JsFunctionSenderTests.cpp index ed345587..fff79df8 100644 --- a/test/JsFunctionSenderTests.cpp +++ b/test/unit/JsFunctionSenderTests.cpp @@ -1,7 +1,7 @@ #include "InjectableNetworking.hpp" #include #include -#include +#include #include #include diff --git a/test/LifeTests.cpp b/test/unit/LifeTests.cpp similarity index 97% rename from test/LifeTests.cpp rename to test/unit/LifeTests.cpp index aeb130a4..4fe0cb8e 100644 --- a/test/LifeTests.cpp +++ b/test/unit/LifeTests.cpp @@ -1,4 +1,4 @@ -#include "../examples/life/Life.hpp" +#include "../../examples/life/Life.hpp" #include using webfront::demo::LifeGrid; diff --git a/test/LoggerTests.cpp b/test/unit/LoggerTests.cpp similarity index 98% rename from test/LoggerTests.cpp rename to test/unit/LoggerTests.cpp index 0950ac70..e4a840ec 100644 --- a/test/LoggerTests.cpp +++ b/test/unit/LoggerTests.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/test/MddlogHeaderConsumer.cpp b/test/unit/MddlogHeaderConsumer.cpp similarity index 95% rename from test/MddlogHeaderConsumer.cpp rename to test/unit/MddlogHeaderConsumer.cpp index fe6c7d07..d060bd92 100644 --- a/test/MddlogHeaderConsumer.cpp +++ b/test/unit/MddlogHeaderConsumer.cpp @@ -1,5 +1,5 @@ /** @brief Ordinary consumer: the facade header supplies its complete API without imports. */ -#include "tooling/Logger.hpp" +#include int main() { namespace log = webfront::log; diff --git a/test/MddlogLoggerTests.cpp b/test/unit/MddlogLoggerTests.cpp similarity index 99% rename from test/MddlogLoggerTests.cpp rename to test/unit/MddlogLoggerTests.cpp index 00d2995f..ab07ae91 100644 --- a/test/MddlogLoggerTests.cpp +++ b/test/unit/MddlogLoggerTests.cpp @@ -1,5 +1,5 @@ /** @brief Module-free consumer regressions for WebFront's optional diagnostic facade. */ -#include "tooling/Logger.hpp" +#include #include #include diff --git a/test/MddlogTransportTests.cpp b/test/unit/MddlogTransportTests.cpp similarity index 99% rename from test/MddlogTransportTests.cpp rename to test/unit/MddlogTransportTests.cpp index 9e0ea692..8482b5cf 100644 --- a/test/MddlogTransportTests.cpp +++ b/test/unit/MddlogTransportTests.cpp @@ -1,8 +1,8 @@ /** @brief Bounded browser transport lane: context, saturation, failures, reentrance and WebLink lifecycle. */ #include "InjectableNetworking.hpp" #include -#include -#include +#include +#include #include #include diff --git a/test/MessagesTests.cpp b/test/unit/MessagesTests.cpp similarity index 99% rename from test/MessagesTests.cpp rename to test/unit/MessagesTests.cpp index cd1ee13f..35670732 100644 --- a/test/MessagesTests.cpp +++ b/test/unit/MessagesTests.cpp @@ -1,9 +1,9 @@ #include "InlineTaskScope.hpp" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/test/MimeTypeTests.cpp b/test/unit/MimeTypeTests.cpp similarity index 98% rename from test/MimeTypeTests.cpp rename to test/unit/MimeTypeTests.cpp index 7bb2bae8..64d678b7 100644 --- a/test/MimeTypeTests.cpp +++ b/test/unit/MimeTypeTests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include diff --git a/test/Mocks.hpp b/test/unit/Mocks.hpp similarity index 96% rename from test/Mocks.hpp rename to test/unit/Mocks.hpp index 63907153..5a5394e3 100644 --- a/test/Mocks.hpp +++ b/test/unit/Mocks.hpp @@ -2,7 +2,7 @@ /// @author Ambroise Leclerc /// @brief Mocks -#include +#include #include #include diff --git a/test/ModuleHTTPServerTests.cpp b/test/unit/ModuleHTTPServerTests.cpp similarity index 94% rename from test/ModuleHTTPServerTests.cpp rename to test/unit/ModuleHTTPServerTests.cpp index a0bbe7a7..5e684168 100644 --- a/test/ModuleHTTPServerTests.cpp +++ b/test/unit/ModuleHTTPServerTests.cpp @@ -1,11 +1,11 @@ #include "Mocks.hpp" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -87,7 +87,7 @@ SCENARIO("Embedded browser dependencies support identity-only HTTP clients") { RequestHandler handler{"."}; for (const auto& [path, sourceName] : dependencies) { GIVEN(path) { - const auto sourcePath = std::filesystem::path{__FILE__}.parent_path().parent_path() / "third_party" / sourceName; + const auto sourcePath = std::filesystem::path{__FILE__}.parent_path().parent_path().parent_path() / "third_party" / sourceName; std::ifstream source{sourcePath, std::ios::binary}; REQUIRE(source.is_open()); const std::string expected{std::istreambuf_iterator{source}, std::istreambuf_iterator{}}; diff --git a/test/NativeFSTests.cpp b/test/unit/NativeFSTests.cpp similarity index 99% rename from test/NativeFSTests.cpp rename to test/unit/NativeFSTests.cpp index 8414295d..4c0bee41 100644 --- a/test/NativeFSTests.cpp +++ b/test/unit/NativeFSTests.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/test/ReactFSTests.cpp b/test/unit/ReactFSTests.cpp similarity index 93% rename from test/ReactFSTests.cpp rename to test/unit/ReactFSTests.cpp index 8b740e54..ac007307 100644 --- a/test/ReactFSTests.cpp +++ b/test/unit/ReactFSTests.cpp @@ -1,5 +1,5 @@ #include "EmbeddedAssetChecks.hpp" -#include +#include using namespace webfront; diff --git a/test/SignalDemoTests.cpp b/test/unit/SignalDemoTests.cpp similarity index 97% rename from test/SignalDemoTests.cpp rename to test/unit/SignalDemoTests.cpp index 29efd497..8e748764 100644 --- a/test/SignalDemoTests.cpp +++ b/test/unit/SignalDemoTests.cpp @@ -1,4 +1,4 @@ -#include "../test/fixtures/SignalDemo.hpp" +#include "../fixtures/SignalDemo.hpp" #include #include diff --git a/test/StdnetShutdownTests.cpp b/test/unit/StdnetShutdownTests.cpp similarity index 98% rename from test/StdnetShutdownTests.cpp rename to test/unit/StdnetShutdownTests.cpp index cec3cc83..50464f2d 100644 --- a/test/StdnetShutdownTests.cpp +++ b/test/unit/StdnetShutdownTests.cpp @@ -1,13 +1,13 @@ #include "InjectableNetworking.hpp" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _WIN32 - #include + #include #else #include #endif diff --git a/test/StructuredShutdownTests.cpp b/test/unit/StructuredShutdownTests.cpp similarity index 98% rename from test/StructuredShutdownTests.cpp rename to test/unit/StructuredShutdownTests.cpp index 1e537552..394719ee 100644 --- a/test/StructuredShutdownTests.cpp +++ b/test/unit/StructuredShutdownTests.cpp @@ -1,8 +1,8 @@ #include "InlineTaskScope.hpp" #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/TemporaryDirectory.hpp b/test/unit/TemporaryDirectory.hpp similarity index 100% rename from test/TemporaryDirectory.hpp rename to test/unit/TemporaryDirectory.hpp diff --git a/test/TerminalFSTests.cpp b/test/unit/TerminalFSTests.cpp similarity index 96% rename from test/TerminalFSTests.cpp rename to test/unit/TerminalFSTests.cpp index 9103317f..9051fa34 100644 --- a/test/TerminalFSTests.cpp +++ b/test/unit/TerminalFSTests.cpp @@ -1,8 +1,8 @@ #include "EmbeddedAssetChecks.hpp" #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/TerminalTests.cpp b/test/unit/TerminalTests.cpp similarity index 99% rename from test/TerminalTests.cpp rename to test/unit/TerminalTests.cpp index 23e2260e..98461e8d 100644 --- a/test/TerminalTests.cpp +++ b/test/unit/TerminalTests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/test/ToolManagerTests.cpp b/test/unit/ToolManagerTests.cpp similarity index 98% rename from test/ToolManagerTests.cpp rename to test/unit/ToolManagerTests.cpp index fba5899e..bb5248e9 100644 --- a/test/ToolManagerTests.cpp +++ b/test/unit/ToolManagerTests.cpp @@ -1,10 +1,10 @@ #include "TemporaryDirectory.hpp" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/test/ToolStoreTests.cpp b/test/unit/ToolStoreTests.cpp similarity index 99% rename from test/ToolStoreTests.cpp rename to test/unit/ToolStoreTests.cpp index 4d505143..a4baf262 100644 --- a/test/ToolStoreTests.cpp +++ b/test/unit/ToolStoreTests.cpp @@ -1,8 +1,8 @@ #include "TemporaryDirectory.hpp" #include #include -#include -#include +#include +#include #include #include diff --git a/test/TypeErasedFunctionTests.cpp b/test/unit/TypeErasedFunctionTests.cpp similarity index 97% rename from test/TypeErasedFunctionTests.cpp rename to test/unit/TypeErasedFunctionTests.cpp index a9715187..90b681a9 100644 --- a/test/TypeErasedFunctionTests.cpp +++ b/test/unit/TypeErasedFunctionTests.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/test/UISubscribersTests.cpp b/test/unit/UISubscribersTests.cpp similarity index 99% rename from test/UISubscribersTests.cpp rename to test/unit/UISubscribersTests.cpp index 960598b0..97bef257 100644 --- a/test/UISubscribersTests.cpp +++ b/test/unit/UISubscribersTests.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/test/Version.hpp.in b/test/unit/Version.hpp.in similarity index 100% rename from test/Version.hpp.in rename to test/unit/Version.hpp.in diff --git a/test/WebFrontTests.cpp b/test/unit/WebFrontTests.cpp similarity index 99% rename from test/WebFrontTests.cpp rename to test/unit/WebFrontTests.cpp index adffb8a4..6d9a6562 100644 --- a/test/WebFrontTests.cpp +++ b/test/unit/WebFrontTests.cpp @@ -1,9 +1,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "Mocks.hpp" #include "Version.hpp" diff --git a/test/WebKitGTKPolicyTests.cpp b/test/unit/WebKitGTKPolicyTests.cpp similarity index 99% rename from test/WebKitGTKPolicyTests.cpp rename to test/unit/WebKitGTKPolicyTests.cpp index ba63bfe6..aa4267c7 100644 --- a/test/WebKitGTKPolicyTests.cpp +++ b/test/unit/WebKitGTKPolicyTests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include diff --git a/test/WebLinkTests.cpp b/test/unit/WebLinkTests.cpp similarity index 99% rename from test/WebLinkTests.cpp rename to test/unit/WebLinkTests.cpp index 09b58792..3ad22773 100644 --- a/test/WebLinkTests.cpp +++ b/test/unit/WebLinkTests.cpp @@ -1,8 +1,8 @@ #include "InjectableNetworking.hpp" #include -#include -#include +#include +#include #include #include diff --git a/test/WebSocketTests.cpp b/test/unit/WebSocketTests.cpp similarity index 99% rename from test/WebSocketTests.cpp rename to test/unit/WebSocketTests.cpp index 7986d537..fea4679f 100644 --- a/test/WebSocketTests.cpp +++ b/test/unit/WebSocketTests.cpp @@ -2,8 +2,8 @@ #include "InlineTaskScope.hpp" #include #include -#include -#include +#include +#include #include #include diff --git a/test/WebView2ControllerMock.hpp b/test/unit/WebView2ControllerMock.hpp similarity index 98% rename from test/WebView2ControllerMock.hpp rename to test/unit/WebView2ControllerMock.hpp index a5903bb6..9dc5a6e4 100644 --- a/test/WebView2ControllerMock.hpp +++ b/test/unit/WebView2ControllerMock.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/test/WebView2PolicyMocks.hpp b/test/unit/WebView2PolicyMocks.hpp similarity index 99% rename from test/WebView2PolicyMocks.hpp rename to test/unit/WebView2PolicyMocks.hpp index caa7f59c..96bcc9fd 100644 --- a/test/WebView2PolicyMocks.hpp +++ b/test/unit/WebView2PolicyMocks.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include #include diff --git a/test/WebView2Tests.cpp b/test/unit/WebView2Tests.cpp similarity index 99% rename from test/WebView2Tests.cpp rename to test/unit/WebView2Tests.cpp index 27996c5b..a0c7715a 100644 --- a/test/WebView2Tests.cpp +++ b/test/unit/WebView2Tests.cpp @@ -2,7 +2,7 @@ #include "WebView2PolicyMocks.hpp" #include #include -#include +#include SCENARIO("WebView2 encodes application paths") { using webfront::frontend::detail::webview2::applicationUrl; diff --git a/webtest/CEFContentPolicy.cpp b/test/web/CEFContentPolicy.cpp similarity index 98% rename from webtest/CEFContentPolicy.cpp rename to test/web/CEFContentPolicy.cpp index 4d98154c..bafc5128 100644 --- a/webtest/CEFContentPolicy.cpp +++ b/test/web/CEFContentPolicy.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/webtest/CMakeLists.txt b/test/web/CMakeLists.txt similarity index 97% rename from webtest/CMakeLists.txt rename to test/web/CMakeLists.txt index ce224f3a..b5f03fd1 100644 --- a/webtest/CMakeLists.txt +++ b/test/web/CMakeLists.txt @@ -37,7 +37,7 @@ if(WEBFRONT_DEVELOPER_FIXTURES AND ${WEBFRONT_FRONTEND_${WEBFRONT_WEBTEST_FRONTEND}_OPTION} AND CMAKE_SYSTEM_NAME IN_LIST WEBFRONT_FRONTEND_${WEBFRONT_WEBTEST_FRONTEND}_TEST_PLATFORMS) if(NOT EXISTS "${WEBFRONT_DEVELOPER_FIXTURES}/provision.json") - message(FATAL_ERROR "Prepare WEBFRONT_DEVELOPER_FIXTURES with tools/developer/build.mjs and fixtures.mjs") + message(FATAL_ERROR "Prepare WEBFRONT_DEVELOPER_FIXTURES with js/developer/tools/build.mjs and fixtures.mjs") endif() add_executable(developer_integration DeveloperTest.cpp) target_link_libraries(developer_integration PRIVATE WebFront_test_hardening WebFront WebFront_warnings WebFront_options) @@ -89,7 +89,7 @@ if(WEBFRONT_DEVELOPER_FIXTURES webfront_set_browser_test_properties(LifeEmbeddedIntegration "${CMAKE_CURRENT_SOURCE_DIR}" 60) set_tests_properties(LifeEmbeddedIntegration PROPERTIES FIXTURES_REQUIRED LifeEmbedded) if(WEBFRONT_WEBTEST_FRONTEND STREQUAL "WKWebView") - get_filename_component(_developer_wk_plist "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/WKWebViewTestInfo.plist.in" ABSOLUTE) + get_filename_component(_developer_wk_plist "${PROJECT_SOURCE_DIR}/test/cmake/WKWebViewTestInfo.plist.in" ABSOLUTE) foreach(target developer_integration developer_embedded life_embedded) string(REPLACE "_" "-" identifier "${target}") set_target_properties(${target} PROPERTIES diff --git a/webtest/DeveloperEmbeddedTest.cpp b/test/web/DeveloperEmbeddedTest.cpp similarity index 95% rename from webtest/DeveloperEmbeddedTest.cpp rename to test/web/DeveloperEmbeddedTest.cpp index ada7cfc1..f69d85f2 100644 --- a/webtest/DeveloperEmbeddedTest.cpp +++ b/test/web/DeveloperEmbeddedTest.cpp @@ -1,7 +1,7 @@ -#include +#include #include WEBFRONT_PI_ASSETS_HEADER -#include "../test/fixtures/Pi.hpp" -#include "../test/TemporaryDirectory.hpp" +#include "../fixtures/Pi.hpp" +#include "../unit/TemporaryDirectory.hpp" #include #include diff --git a/webtest/DeveloperTest.cpp b/test/web/DeveloperTest.cpp similarity index 97% rename from webtest/DeveloperTest.cpp rename to test/web/DeveloperTest.cpp index eff9bc87..b9f35887 100644 --- a/webtest/DeveloperTest.cpp +++ b/test/web/DeveloperTest.cpp @@ -1,7 +1,7 @@ -#include "../examples/life/Life.hpp" -#include "../test/fixtures/Pi.hpp" -#include "../test/TemporaryDirectory.hpp" -#include +#include "../../examples/life/Life.hpp" +#include "../fixtures/Pi.hpp" +#include "../unit/TemporaryDirectory.hpp" +#include #include #include diff --git a/webtest/FrontendLifecycle.cpp b/test/web/FrontendLifecycle.cpp similarity index 99% rename from webtest/FrontendLifecycle.cpp rename to test/web/FrontendLifecycle.cpp index 76ec8972..3f189244 100644 --- a/webtest/FrontendLifecycle.cpp +++ b/test/web/FrontendLifecycle.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/webtest/JasmineTest.cpp b/test/web/JasmineTest.cpp similarity index 94% rename from webtest/JasmineTest.cpp rename to test/web/JasmineTest.cpp index 664400b7..836f3bb6 100644 --- a/webtest/JasmineTest.cpp +++ b/test/web/JasmineTest.cpp @@ -1,20 +1,20 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "RejectedWebSocketServer.hpp" -#include "../test/fixtures/SignalDemo.hpp" +#include "../fixtures/SignalDemo.hpp" #include #include @@ -56,7 +56,7 @@ struct TestState { atomic passed{false}; }; -/// Project directory of the tools installed by webtest/js/tools-specs.mjs: a fresh temporary +/// Project directory of the tools installed by test/web/js/tools-specs.mjs: a fresh temporary /// directory, removed by main(), so the test never writes into the source tree. struct TestToolsProject { static filesystem::path get() { @@ -70,8 +70,8 @@ struct TestToolsProject { } }; -/// Search endpoint of the fake npm registry used by webtest/js/tools-specs.mjs; its packuments and -/// tarball are plain files under webtest/registry/ (see make_fixture.py), served by NativeDebugFS. +/// Search endpoint of the fake npm registry used by test/web/js/tools-specs.mjs; its packuments and +/// tarball are plain files under test/web/registry/ (see make_fixture.py), served by NativeDebugFS. /// The server drops the query string before looking up files, so tools-specs.mjs checks the query /// wf.mjs sends. class FakeRegistrySearchFS { @@ -164,7 +164,7 @@ class BrowserIntegrationTest { #ifdef _MSC_VER // With an unavailable embedded frontend, openAndRun() unconditionally throws. MSVC's // inliner detects that and flags the return below as unreachable, uniquely among our compilers, - // turning it into an error under /WX; see the matching suppression in include/WebFront.hpp. + // turning it into an error under /WX; see the matching suppression in include/webfront/WebFront.hpp. #pragma warning(push) #pragma warning(disable : 4702) #endif @@ -402,8 +402,8 @@ class BrowserIntegrationTest { }); } - /// Commands driven by webtest/js/terminal-specs.mjs, and the tool manager driven by - /// webtest/js/tools-specs.mjs against the fake registry under webtest/registry/. + /// Commands driven by test/web/js/terminal-specs.mjs, and the tool manager driven by + /// test/web/js/tools-specs.mjs against the fake registry under test/web/registry/. void registerTerminalCommands() { Terminal terminal{webFront, {.prompt = "test> ", .banner = "webtest terminal"}}; terminal.command("greet", "Greet someone", [](CommandArgs args) { diff --git a/webtest/LifeEmbeddedTest.cpp b/test/web/LifeEmbeddedTest.cpp similarity index 97% rename from webtest/LifeEmbeddedTest.cpp rename to test/web/LifeEmbeddedTest.cpp index 92c6677c..b5a7286c 100644 --- a/webtest/LifeEmbeddedTest.cpp +++ b/test/web/LifeEmbeddedTest.cpp @@ -1,7 +1,7 @@ -#include +#include #include WEBFRONT_LIFE_ASSETS_HEADER -#include "../examples/life/Life.hpp" -#include "../test/TemporaryDirectory.hpp" +#include "../../examples/life/Life.hpp" +#include "../unit/TemporaryDirectory.hpp" #include #include diff --git a/webtest/RejectedWebSocketServer.hpp b/test/web/RejectedWebSocketServer.hpp similarity index 96% rename from webtest/RejectedWebSocketServer.hpp rename to test/web/RejectedWebSocketServer.hpp index b228ddc7..fcb31fec 100644 --- a/webtest/RejectedWebSocketServer.hpp +++ b/test/web/RejectedWebSocketServer.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/webtest/SpecRunner.html b/test/web/SpecRunner.html similarity index 100% rename from webtest/SpecRunner.html rename to test/web/SpecRunner.html diff --git a/webtest/WKWebViewClassImages.cpp b/test/web/WKWebViewClassImages.cpp similarity index 97% rename from webtest/WKWebViewClassImages.cpp rename to test/web/WKWebViewClassImages.cpp index 9b8f93bb..837ecd9c 100644 --- a/webtest/WKWebViewClassImages.cpp +++ b/test/web/WKWebViewClassImages.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/webtest/WKWebViewClassModule.cpp b/test/web/WKWebViewClassModule.cpp similarity index 94% rename from webtest/WKWebViewClassModule.cpp rename to test/web/WKWebViewClassModule.cpp index ac891059..fe999de8 100644 --- a/webtest/WKWebViewClassModule.cpp +++ b/test/web/WKWebViewClassModule.cpp @@ -1,4 +1,4 @@ -#include +#include using namespace webfront::frontend::detail::wkwebview; diff --git a/webtest/WKWebViewHeaderConsumer.cpp b/test/web/WKWebViewHeaderConsumer.cpp similarity index 92% rename from webtest/WKWebViewHeaderConsumer.cpp rename to test/web/WKWebViewHeaderConsumer.cpp index c37a1007..f2e2a8c5 100644 --- a/webtest/WKWebViewHeaderConsumer.cpp +++ b/test/web/WKWebViewHeaderConsumer.cpp @@ -1,4 +1,4 @@ -#include +#include static_assert(requires { webfront::frontend::WKWebViewFrontend::open("127.0.0.1", "9002", "index.html", {}); diff --git a/webtest/WKWebViewLifecycle.cpp b/test/web/WKWebViewLifecycle.cpp similarity index 99% rename from webtest/WKWebViewLifecycle.cpp rename to test/web/WKWebViewLifecycle.cpp index 4420b37c..8d1d4d26 100644 --- a/webtest/WKWebViewLifecycle.cpp +++ b/test/web/WKWebViewLifecycle.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/webtest/WebKitGTKLifecycle.cpp b/test/web/WebKitGTKLifecycle.cpp similarity index 98% rename from webtest/WebKitGTKLifecycle.cpp rename to test/web/WebKitGTKLifecycle.cpp index b34f3feb..ea1081bc 100644 --- a/webtest/WebKitGTKLifecycle.cpp +++ b/test/web/WebKitGTKLifecycle.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/webtest/WebView2HeaderConsumer.cpp b/test/web/WebView2HeaderConsumer.cpp similarity index 85% rename from webtest/WebView2HeaderConsumer.cpp rename to test/web/WebView2HeaderConsumer.cpp index 5af4d66e..d20af187 100644 --- a/webtest/WebView2HeaderConsumer.cpp +++ b/test/web/WebView2HeaderConsumer.cpp @@ -1,5 +1,5 @@ // A second translation unit catches standalone include and ODR regressions. -#include +#include bool webView2ClosesServer() { static_assert(webfront::frontend::WebView2Frontend::action == webfront::frontend::Action::closeServerAfterOpen); diff --git a/webtest/WebView2Lifecycle.cpp b/test/web/WebView2Lifecycle.cpp similarity index 99% rename from webtest/WebView2Lifecycle.cpp rename to test/web/WebView2Lifecycle.cpp index ffa22544..456905d4 100644 --- a/webtest/WebView2Lifecycle.cpp +++ b/test/web/WebView2Lifecycle.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/webtest/content-policy.html b/test/web/content-policy.html similarity index 100% rename from webtest/content-policy.html rename to test/web/content-policy.html diff --git a/webtest/developer-specs.mjs b/test/web/developer-specs.mjs similarity index 100% rename from webtest/developer-specs.mjs rename to test/web/developer-specs.mjs diff --git a/webtest/encoded path #.html b/test/web/encoded path #.html similarity index 100% rename from webtest/encoded path #.html rename to test/web/encoded path #.html diff --git a/webtest/fixtures/react.html b/test/web/fixtures/react.html similarity index 100% rename from webtest/fixtures/react.html rename to test/web/fixtures/react.html diff --git a/webtest/js/content-policy-specs.mjs b/test/web/js/content-policy-specs.mjs similarity index 100% rename from webtest/js/content-policy-specs.mjs rename to test/web/js/content-policy-specs.mjs diff --git a/webtest/js/module-fixture.mjs b/test/web/js/module-fixture.mjs similarity index 100% rename from webtest/js/module-fixture.mjs rename to test/web/js/module-fixture.mjs diff --git a/webtest/js/origin-probe.mjs b/test/web/js/origin-probe.mjs similarity index 100% rename from webtest/js/origin-probe.mjs rename to test/web/js/origin-probe.mjs diff --git a/webtest/js/react-demo-specs.mjs b/test/web/js/react-demo-specs.mjs similarity index 100% rename from webtest/js/react-demo-specs.mjs rename to test/web/js/react-demo-specs.mjs diff --git a/webtest/js/terminal-specs.mjs b/test/web/js/terminal-specs.mjs similarity index 98% rename from webtest/js/terminal-specs.mjs rename to test/web/js/terminal-specs.mjs index 07c70a61..99db7cc4 100644 --- a/webtest/js/terminal-specs.mjs +++ b/test/web/js/terminal-specs.mjs @@ -1,5 +1,5 @@ // Drives the embedded terminal component (served by fs::TerminalFS) against the commands that -// webtest/JasmineTest.cpp registers through webfront::Terminal. Trailing spaces are trimmed when +// test/web/JasmineTest.cpp registers through webfront::Terminal. Trailing spaces are trimmed when // reading the screen, so a prompt line reads 'test>'. import { mount, runLine, tokenize } from '/webfront/components/terminal/terminal.mjs'; diff --git a/webtest/js/tools-specs.mjs b/test/web/js/tools-specs.mjs similarity index 98% rename from webtest/js/tools-specs.mjs rename to test/web/js/tools-specs.mjs index 9f4c0b7b..a81192ff 100644 --- a/webtest/js/tools-specs.mjs +++ b/test/web/js/tools-specs.mjs @@ -1,6 +1,6 @@ // Drives the wf tool manager: the browser module served by fs::ToolManagerFS, loaded by the terminal -// as an extension, against the webfront::ToolManager that webtest/JasmineTest.cpp registers with the -// fake npm registry under webtest/registry/ (no public network). Installed tools go to a temporary +// as an extension, against the webfront::ToolManager that test/web/JasmineTest.cpp registers with the +// fake npm registry under test/web/registry/ (no public network). Installed tools go to a temporary // project directory, served by fs::BasicPackageFS. import { mount } from '/webfront/components/terminal/terminal.mjs'; import { chunkSize, gunzip, installed, parseSpec, readTar, verifyIntegrity } from '/webfront/components/tools/wf.mjs'; diff --git a/webtest/js/webfront-specs.mjs b/test/web/js/webfront-specs.mjs similarity index 100% rename from webtest/js/webfront-specs.mjs rename to test/web/js/webfront-specs.mjs diff --git a/webtest/no-bridge.html b/test/web/no-bridge.html similarity index 100% rename from webtest/no-bridge.html rename to test/web/no-bridge.html diff --git a/webtest/origin-probe.html b/test/web/origin-probe.html similarity index 100% rename from webtest/origin-probe.html rename to test/web/origin-probe.html diff --git a/webtest/policy-controls.html b/test/web/policy-controls.html similarity index 100% rename from webtest/policy-controls.html rename to test/web/policy-controls.html diff --git a/webtest/policy-escaped.html b/test/web/policy-escaped.html similarity index 100% rename from webtest/policy-escaped.html rename to test/web/policy-escaped.html diff --git a/webtest/registry/make_fixture.py b/test/web/registry/make_fixture.py similarity index 95% rename from webtest/registry/make_fixture.py rename to test/web/registry/make_fixture.py index a0365018..7f93df33 100644 --- a/webtest/registry/make_fixture.py +++ b/test/web/registry/make_fixture.py @@ -1,7 +1,7 @@ -"""Regenerates the fake npm registry served to webtest/js/tools-specs.mjs: the tarball of the +"""Regenerates the fake npm registry served to test/web/js/tools-specs.mjs: the tarball of the webfront-test-tool package and the packuments that point at it. Run from any directory: - python3 webtest/registry/make_fixture.py + python3 test/web/registry/make_fixture.py The output is deterministic (no timestamps), so an unchanged script leaves the files unchanged. """ diff --git a/webtest/registry/search.json b/test/web/registry/search.json similarity index 100% rename from webtest/registry/search.json rename to test/web/registry/search.json diff --git a/webtest/registry/tarballs/webfront-test-tool-1.0.0.tgz b/test/web/registry/tarballs/webfront-test-tool-1.0.0.tgz similarity index 100% rename from webtest/registry/tarballs/webfront-test-tool-1.0.0.tgz rename to test/web/registry/tarballs/webfront-test-tool-1.0.0.tgz diff --git a/webtest/registry/webfront-test-corrupt b/test/web/registry/webfront-test-corrupt similarity index 100% rename from webtest/registry/webfront-test-corrupt rename to test/web/registry/webfront-test-corrupt diff --git a/webtest/registry/webfront-test-tool b/test/web/registry/webfront-test-tool similarity index 100% rename from webtest/registry/webfront-test-tool rename to test/web/registry/webfront-test-tool diff --git a/webtest/rejected-ready.html b/test/web/rejected-ready.html similarity index 100% rename from webtest/rejected-ready.html rename to test/web/rejected-ready.html diff --git a/webtest/slow-page.html b/test/web/slow-page.html similarity index 100% rename from webtest/slow-page.html rename to test/web/slow-page.html diff --git a/webtest/slow-resource.js b/test/web/slow-resource.js similarity index 100% rename from webtest/slow-resource.js rename to test/web/slow-resource.js diff --git a/webfront/DOM/HTTPServer.cpp b/webfront/DOM/HTTPServer.cpp deleted file mode 100644 index be070d02..00000000 --- a/webfront/DOM/HTTPServer.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// HTTPServer.cpp : Defines the entry point for the console application. -// -#include "webfront.h" -#include "page.h" -#include - - - -int main(int argc, char* argv[]) -{ - { - WebFront::Site my_site("1600"); - auto index_page = my_site.CreatePage("index.html"); - - - std::cout << "Press Return to quit" << std::endl; std::cin.get(); - } - std::cout << "Press Return to quit" << std::endl; std::cin.get(); - return 0; -} - diff --git a/webfront/DOM/HTTPServer.vcxproj b/webfront/DOM/HTTPServer.vcxproj deleted file mode 100644 index fabaa9c4..00000000 --- a/webfront/DOM/HTTPServer.vcxproj +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {1B2A103E-BE0B-49C7-BF4F-EBFA98D6EB56} - Win32Proj - HTTPServer - - - - Application - true - v110 - Unicode - - - Application - false - v110 - true - Unicode - - - - - - - - - - - - - true - - - false - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - true - - - Console - true - - - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/webfront/DOM/HTTPServer.vcxproj.filters b/webfront/DOM/HTTPServer.vcxproj.filters deleted file mode 100644 index 06d635a2..00000000 --- a/webfront/DOM/HTTPServer.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/webfront/DOM/http_connexion.cpp b/webfront/DOM/http_connexion.cpp deleted file mode 100644 index 2bb59cdb..00000000 --- a/webfront/DOM/http_connexion.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "http_connexion.h" -#include "http_request.h" -#include -#include -#include - -#include -#include - -class HTTPConnexion::Impl : public SocketHelper -{ -public: - Impl(SocketType socket) : socket_(socket) - { - // Test(); - - { // Add connexion to connexions list - std::unique_lock(connexions_mutex); - connexions.push_back(std::unique_ptr(this)); - } - } - - void Disconnect() - { - Shutdown(socket_); - CloseSocket(socket_); - { // Remove this connexion from connexions list - std::unique_lock(connexions_mutex); - connexions.remove_if([this](std::unique_ptr& cnx) { return cnx.get() == this; }); - } - } - - static void CloseAllConnexions() - { - std::unique_lock(connexions_mutex); - while (!connexions.empty()) - { - connexions.front()->Disconnect(); - } - } - - void Serve() - { -// std::cout << "thread:" << std::this_thread::get_id() << " Serve" << std::endl; - - int received_bytes; - - send(socket_, "SERVER OK\r\n", 11, 0); - - HTTPRequest request; - while ((received_bytes = recv(socket_, request.GetBuffer(), request.GetBufferSize(), 0)) > 0) - { - //std::cout << "Recv " << received_bytes << std::endl; - //HexDump(buffer.data(), received_bytes); - request.GetBuffer()[received_bytes] = 0; - - request.ParseData(received_bytes); - if (request.HeaderIsComplete()) - { - switch (request.method()) - { - case HTTPRequest::kGet: - std::cout << "Method GET on url " << request.url() << std::endl; - std::cout << " host : " << request.host() << std::endl; - break; - case HTTPRequest::kHead: - std::cout << "Method HEAD" << std::endl; - break; - } - } - - - } - std::cout << "thread:" << std::this_thread::get_id() << " Serve ended" << std::endl; - - Disconnect(); - } - - void Test() - { - HTTPRequest request; - std::string test_header = "GET /myurl HTTP/1.1\r\nHost:1\r\nUser-Agent:2\r\n 0\r\n\r\n"; - - char* buffer = request.GetBuffer(); - for (auto c : test_header) - *buffer++ = c; - - request.ParseData(test_header.length()); - if (HTTPRequest::kGet == request.method()) std::cout << "GET ok" << std::endl; else std::cout << "GET no" << std::endl; - std::cout << "Url:" << request.url() << std::endl; - std::cout << "Host:" << request.host() << std::endl; - std::cout << "User-Agent:" << request.user_agent() << std::endl; - } - -private: - SocketType socket_; - - static std::list> connexions; //< List all connections - static std::mutex connexions_mutex; - -private: - static void HexDump(void* data, unsigned int bytes) - { - char *parser, *last=reinterpret_cast(data); - parser = last; - last += bytes; - - char output_line[] = " | ................"; - - for (; parser<=last; parser+=16) - { - for (unsigned int charac=0; charac<16; charac++) - { - if (parser+charac < last) - { - char towrite = parser[charac]; - if ((towrite>>4)<10) - output_line[charac*3] = (towrite>>4) + 48; - else - output_line[charac*3] = (towrite>>4) + 55; - if ((towrite%16)<10) - output_line[charac*3+1] = (towrite%16) + 48; - else - output_line[charac*3+1] = (towrite%16) + 55; - if (towrite>31) - { - output_line[51+charac] = towrite; - } - else - { - output_line[51+charac] = '.'; - } - } - else - { - output_line[charac*3] = '.'; - output_line[charac*3+1] = '.'; - output_line[51+charac] = '.'; - } - } - std::cout << std::setw(8) << std::setfill('0') << std::hex << reinterpret_cast(parser); - std::cout << " " << output_line << std::endl; - } - } -}; - - -HTTPConnexion::HTTPConnexion(SocketType socket) : pimpl_(new Impl(socket)) {} -HTTPConnexion::~HTTPConnexion() {} -void HTTPConnexion::Serve() { pimpl_->Serve(); } -void HTTPConnexion::CloseAllConnexions() { Impl::CloseAllConnexions(); } - -std::list> HTTPConnexion::Impl::connexions; -std::mutex HTTPConnexion::Impl::connexions_mutex; - diff --git a/webfront/DOM/http_connexion.h b/webfront/DOM/http_connexion.h deleted file mode 100644 index 4206cdb2..00000000 --- a/webfront/DOM/http_connexion.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __HTTP_CONNEXION_H_ -#define __HTTP_CONNEXION_H_ -#include -#include "socket_helper.h" - - -class HTTPConnexion -{ -public: - HTTPConnexion(SocketType socket); - ~HTTPConnexion(); - void Serve(); //< Connexion main loop - static void CloseAllConnexions(); //< Close all open HTTPConnexions sockets - -private: - class Impl; - std::unique_ptr pimpl_; -}; - -#endif //__HTTP_CONNEXION_H_ \ No newline at end of file diff --git a/webfront/DOM/http_request.cpp b/webfront/DOM/http_request.cpp deleted file mode 100644 index 34447623..00000000 --- a/webfront/DOM/http_request.cpp +++ /dev/null @@ -1,356 +0,0 @@ -#include "http_request.h" -#include -#include -#include -#include - -#define HT 9 -#define SP ' ' -#define CR '\r' -#define LF '\n' -#define AFFECT ':' - -class HTTPRequest::Impl -{ -private: - enum HeaderField; - -public: - Impl() - { - Reinitialize(); - } - - void Reinitialize() - { - set_method(kUndefined); - set_parse_status(kUnparsed); - set_connection_keepalive(true); - buffer_parser_ = buffer_.data(); - buffer_end_ = buffer_parser_; - } - - bool ParseData(size_t bytes) - { - static char* affect_sign=nullptr; - - if (kUnparsed == parse_status()) - { - // Find end of first line (CRLF) - while (LF != *buffer_end_) - { - if (0 == bytes) // if there is no more data to parse before CRLF, that means - return true; // that we get to wait for more data (in the next call to ParseData) - --bytes; - buffer_end_++; - } - - - if (CR == buffer_end_[-1]) - { - // CRLF found : we have a first header line. Let's fine the method - switch (buffer_parser_[0]) - { - case 'G': - if (('E' == buffer_parser_[1]) && ('T' == buffer_parser_[2])) - { - set_method(kGet); - set_parse_status(kMethodParsed); - buffer_parser_+=3;; - }; - break; - case 'H': - if (('E' == buffer_parser_[1]) && ('A' == buffer_parser_[2]) && ('D' == buffer_parser_[3])) - { - set_method(kHead); - set_parse_status(kMethodParsed); - buffer_parser_+=4;; - } - break; - } - - // if no method had been recognized, we return and ask for connection termination - if (kMethodParsed != parse_status()) - return false; - - // Extract URL - while (SP == *buffer_parser_ || HT == *buffer_parser_) - ++buffer_parser_; - while (SP != *buffer_parser_ && HT != *buffer_parser_) - { - url_.append(buffer_parser_, 1); - ++buffer_parser_; - } - - // Extract HTTP version - while (SP == *buffer_parser_ || HT == *buffer_parser_) - ++buffer_parser_; - while (SP != *buffer_parser_ && HT != *buffer_parser_ && buffer_parser_<(buffer_end_-1)) - { - http_version_.append(buffer_parser_, 1); - ++buffer_parser_; - } - - buffer_parser_ = buffer_end_; - set_parse_status(kMethodLineParsed); - } - } - - while (kMethodLineParsed == parse_status()) - { - while (LF != *buffer_end_) - { - if (0 == bytes) return true; - if (nullptr == affect_sign) - { - if (AFFECT == *buffer_end_) affect_sign = buffer_end_; - } - --bytes; - buffer_end_++; - } - if (CR == buffer_end_[-1]) - { - // if the completed line begins with a space character then it is - // the continuation of the precedent affection. - if ((SP == *buffer_parser_) || (HT == *buffer_parser_)) - { - ++buffer_parser_; - while (SP == *buffer_parser_ || HT == *buffer_parser_) // remove leading spaces - ++buffer_parser_; - - AffectFieldValue(last_header_field_, buffer_parser_, buffer_end_-1); - } - else - // If the completed line has a ':', then we can extract the field association - if (nullptr != affect_sign) - { - ExtractAssociation(buffer_parser_, affect_sign, buffer_end_-1); - affect_sign = nullptr; - } - - - if (LF == buffer_end_[-2] && CR == buffer_end_[-3]) - { - // CRLFCRLF found : the header is completely parsed - set_parse_status(kHeaderParsed); - return true; - } - - ++buffer_end_; - buffer_parser_ = buffer_end_; - } - else - { - // CR missing : we abort the connection - return false; - } - } - return true; - } - - void ExtractAssociation(const char* begin, const char* affect_sign, const char* end) - { - std::string name, value; - const char* end_name = affect_sign; - while ((SP == *begin) || (HT == *begin)) ++begin; // Remove leading spaces - while ((SP == *end_name) || (HT == *end_name)) --end_name; // Remove trailing spaces - name.append(begin, end_name); - - const char* begin_value = affect_sign + 1; - while ((SP == *begin_value) || (HT == *begin_value)) ++begin_value; // Remove leading spaces - while ((SP == *end) || (HT == *end)) --end; // Remove trailing spaces - value.append(begin_value, end); - -// for (auto& c : name) if (c>='A'&& c<='Z') c-='A'-'a'; // Convert name to lowercase - - - - - switch (name[0]) - { - case 'A': // Accept, Accept-encoding, Accept-language, Accept-charset, Authorization - if (name.length()>=6) - { - switch (name[1]) - { - case 'c': - if (0 == name.compare(2, 4, "cept")) - { - if (6 ==name.length()) last_header_field_ = kAccept; - else - { - if (0 == name.compare(6, 9, "-encoding")) last_header_field_ = kAccept_encoding; - else - if (0 == name.compare(6, 9, "-language")) last_header_field_ = kAccept_language; - else - if (0 == name.compare(6, 8, "-charset")) last_header_field_ = kAccept_charset; - } - } - break; - - case 'u': - if (0 == name.compare(2, 11, "thorization")) last_header_field_ = kAuthorization; - break; - } - } - break; - - case 'C': // Connection, Cookie - if (0 == name.compare(1, 9, "onnection")) last_header_field_ = kConnection; - else - if (0 == name.compare(1, 5, "ookie")) last_header_field_ = kCookie; - else - if (0 == name.compare(1, 12, "ache-Control")) last_header_field_ = kCache_Control; - break; - - case 'H': // Host - if (0 == name.compare(1, 3, "ost")) last_header_field_ = kHost; - break; - - case 'R': // Referer - if (0 == name.compare(1, 6, "eferer")) last_header_field_ = kReferer; - break; - - case 'U': // Upgrade, User-agent - if (0 == name.compare(1, 6, "pgrade")) last_header_field_ = kUpgrade; - else - if (0 == name.compare(1, 9, "ser-Agent")) last_header_field_ = kUser_Agent; - break; - } - - AffectFieldValue(last_header_field_, begin_value, end); -// std::cout << "ExtractAssociation : " << name << " -> " << value << std::endl; - } - - void AffectFieldValue(HeaderField field, const char* value_begin, const char* value_end) - { - switch (field) - { - case kNone: - break; - case kAccept: - accept_.append(value_begin, value_end); - break; - case kAccept_encoding: - accept_encoding_.append(value_begin, value_end); - break; - case kAccept_language: - accept_language_.append(value_begin, value_end); - break; - case kAccept_charset: - accept_charset_.append(value_begin, value_end); - break; - case kAuthorization: - authorization_.append(value_begin, value_end); - break; - case kConnection: - if ('c' == *value_begin) // close - set_connection_keepalive(false); - break; - case kCookie: - cookie_.append(value_begin, value_end); - break; - case kCache_Control: - cache_control_.append(value_begin, value_end); - break; - case kHost: - host_.append(value_begin, value_end); - break; - case kReferer: - referer_.append(value_begin, value_end); - break; - case kUpgrade: - upgrade_.append(value_begin, value_end); - break; - case kUser_Agent: - user_agent_.append(value_begin, value_end); - break; - } - } - - bool HeaderIsComplete() const { return parse_status() >= kHeaderParsed; } - char* GetBuffer() { return buffer_end_; } - size_t GetBufferSize() const { return buffer_.size(); } - Method method() const { return method_; } - - const std::string& url() const { return url_; } - const std::string& host() const { return host_; } - const std::string& user_agent() const { return user_agent_; } - const std::string& accept() const { return accept_; } - const std::string& accept_encoding() const { return accept_encoding_; } - const std::string& accept_language() const { return accept_language_; } - const std::string& accept_charset() const { return accept_charset_; } - const std::string& authorization() const { return authorization_; } - const std::string& cache_control() const { return cache_control_; } - const std::string& cookie() const { return cookie_; } - const std::string& referer() const { return referer_; } - const std::string& upgrade() const { return upgrade_; } - bool connection_keepalive() const { return connection_keepalive_; } - -private: - enum ParseStatus; - - void set_method(Method method) { method_ = method; } - void set_parse_status(ParseStatus status) { parse_status_ = status; } - void set_connection_keepalive(bool keep) { connection_keepalive_ = keep; } - ParseStatus parse_status() const { return parse_status_; } - - - // Request header data - Method method_; - std::string url_; - std::string http_version_; - std::string host_; - std::string user_agent_; - std::string accept_; - std::string accept_encoding_; - std::string accept_language_; - std::string accept_charset_; - std::string authorization_; - std::string cache_control_; - std::string cookie_; - std::string referer_; - std::string upgrade_; - bool connection_keepalive_; - -private: - enum ParseStatus - { - kUnparsed = 1, kMethodParsed, kMethodLineParsed, kHeaderParsed, kContentParsed - } parse_status_; - - enum HeaderField - { - kNone, kAccept, kAccept_encoding, kAccept_language, kAccept_charset, kAuthorization, - kCache_Control, kConnection, kCookie, kHost, kReferer, kUpgrade, kUser_Agent - }; - - - - static const unsigned int kReceiveBufferSize = 16384; - std::array buffer_; - char* buffer_end_; //< First unfilled character in the buffer - char* buffer_parser_; //< Next character to be parsed - HeaderField last_header_field_; -}; - -HTTPRequest::HTTPRequest() : pimpl_(new Impl()) {} -HTTPRequest::~HTTPRequest() {}; -void HTTPRequest::Reinitialize() { pimpl_->Reinitialize(); } -bool HTTPRequest::ParseData(size_t bytes) { return pimpl_->ParseData(bytes); } -bool HTTPRequest::HeaderIsComplete() const { return pimpl_->HeaderIsComplete(); } -char* HTTPRequest::GetBuffer() { return pimpl_->GetBuffer(); } -size_t HTTPRequest::GetBufferSize() const { return pimpl_->GetBufferSize(); } -HTTPRequest::Method HTTPRequest::method() const { return pimpl_->method(); } -const std::string& HTTPRequest::url() const { return pimpl_->url(); } -const std::string& HTTPRequest::host() const { return pimpl_->host(); } -const std::string& HTTPRequest::user_agent() const { return pimpl_->user_agent(); } -const std::string& HTTPRequest::accept_encoding() const { return pimpl_->accept_encoding(); } -const std::string& HTTPRequest::accept_language() const { return pimpl_->accept_language(); } -const std::string& HTTPRequest::accept_charset() const { return pimpl_->accept_charset(); } -const std::string& HTTPRequest::authorization() const { return pimpl_->authorization(); } -const std::string& HTTPRequest::cache_control() const { return pimpl_->cache_control(); } -const std::string& HTTPRequest::cookie() const { return pimpl_->cookie(); } -const std::string& HTTPRequest::referer() const { return pimpl_->referer(); } -const std::string& HTTPRequest::upgrade() const { return pimpl_->upgrade(); } -bool HTTPRequest::connection_keepalive() const { return pimpl_->connection_keepalive(); } diff --git a/webfront/DOM/http_request.h b/webfront/DOM/http_request.h deleted file mode 100644 index f4d094cf..00000000 --- a/webfront/DOM/http_request.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __HTTP_REQUEST_H_ -#define __HTTP_REQUEST_H_ - -#include -#include - -class HTTPRequest -{ -public: - enum Method - { - kUndefined, kGet, kHead - }; - -public: - HTTPRequest(); - ~HTTPRequest(); - void Reinitialize(); - bool ParseData(size_t bytes); //< Parse newly received data. Return false if there is a non-recoverable parse error. - bool HeaderIsComplete() const; //< Returns true if a complete header has been parsed - char* GetBuffer(); - size_t GetBufferSize() const; - Method method() const; - const std::string& url() const; - const std::string& host() const; - const std::string& user_agent() const; - const std::string& accept_encoding() const; - const std::string& accept_language() const; - const std::string& accept_charset() const; - const std::string& authorization() const; - const std::string& cache_control() const; - const std::string& cookie() const; - const std::string& referer() const; - const std::string& upgrade() const; - bool connection_keepalive() const; - -private: - class Impl; - std::unique_ptr pimpl_; -}; - -#endif \ No newline at end of file diff --git a/webfront/DOM/page.h b/webfront/DOM/page.h deleted file mode 100644 index 516c044b..00000000 --- a/webfront/DOM/page.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __WEBFRONT_PAGE_H_ -#define __WEBFRONT_PAGE_H_ - -#include -#include - -namespace WebFront -{ -class Site; - -class Page -{ -public: - Page(std::string page_name) : page_name_(page_name) - { - } - - /* - Create - */ - const std::vector& Render(); - -public: - std::string page_name_; -}; - -} - -#endif //__WEBFRONT_PAGE_H_ \ No newline at end of file diff --git a/webfront/DOM/socket_helper.h b/webfront/DOM/socket_helper.h deleted file mode 100644 index 5f16be8f..00000000 --- a/webfront/DOM/socket_helper.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __SOCKET_HELPER_H_ -#define __SOCKET_HELPER_H_ - -#ifdef WIN32 -#include -#include -#pragma comment(lib, "Ws2_32.lib") -typedef SOCKET SocketType; -class SocketHelper -{ -public: - static const SocketType kInvalidSocket = INVALID_SOCKET; - - static bool InitializeLib() - { - WSADATA wsa_data; - int init_value = WSAStartup(MAKEWORD(2, 2), &wsa_data); - return init_value == 0; - } - - static void CleanupLib() { WSACleanup(); } - static void CloseSocket(SocketType socket) { closesocket(socket); } - static void Shutdown(SocketType socket) { shutdown(socket, SD_BOTH); } -}; -#else -#include -#include -#include -#include - -typedef int SocketType; -class SocketHelper -{ -public: - static const SocketType kInvalidSocket = -1; - - static bool InitializeLib() { return true; } - static void CleanupLib() {} - static void CloseSocket(SocketType socket) { close(socket); } - static void Shutdown(SocketType socket) { shutdown(socket, SHUT_RDWR); } -}; - -#endif -#endif //__SOCKET_HELPER_H_ \ No newline at end of file diff --git a/webfront/DOM/socket_server.cpp b/webfront/DOM/socket_server.cpp deleted file mode 100644 index a3171e08..00000000 --- a/webfront/DOM/socket_server.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#include "socket_server.h" -#include -#include -#include - -#include "socket_helper.h" -#include "thread_pool.h" -#include "http_request.h" -#include "http_connexion.h" - - -class SocketServer::Impl : public SocketHelper -{ -public: - Impl(int port) : server_status_(kUninitialized), server_info_(nullptr) - { - InitializeSocket(std::to_string(port)); - } - - Impl(std::string protocol) : server_status_(kUninitialized), server_info_(nullptr) - { - InitializeSocket(protocol); - } - - ~Impl() - { - freeaddrinfo(server_info_); - CleanupLib(); - } - - bool Start() - { - if (nullptr == server_info_) - return false; - listening_socket_ = socket(server_info_->ai_family, server_info_->ai_socktype, server_info_->ai_protocol); - if (kInvalidSocket == listening_socket_) - return false; - - if (0 != bind(listening_socket_, server_info_->ai_addr, server_info_->ai_addrlen)) - return false; - - if (0 != listen(listening_socket_, SOMAXCONN)) - return false; - - listening_ = true; - listening_thread_ = std::thread(&Impl::ListenLoop, this); - set_server_status(kStarted); - return true; - } - - void Stop() - { - Shutdown(listening_socket_); - - listening_ = false; - CloseSocket(listening_socket_); - std::cout << "socket closed" << std::endl; - listening_thread_.join(); - std::cout << "thread joined" << std::endl; - set_server_status(kStopped); - } - - ServerStatus server_status() const { return server_status_; } - -private: - void InitializeSocket(std::string protocol) - { - set_server_status(kUninitialized); - listening_ = false; - if (!InitializeLib()) - { - set_server_status(kInitializationFailed); - return; - } - - int status; - addrinfo hints = {}; - - hints.ai_family = AF_UNSPEC; // don't care IPv4 or IPv6 - hints.ai_socktype = SOCK_STREAM; // TCP stream sockets - hints.ai_flags = AI_PASSIVE; // Fill my IP for me - status = getaddrinfo(nullptr, protocol.c_str(), &hints, &server_info_); - - if (0 != status) - { - set_server_status(kInitializationFailed); - return; - } - - set_server_status(kInitialized); - } - - void set_server_status(ServerStatus status) - { - const char* nom[] = { "Uninitialized", "InitializationFailed", "Initialized", "Started", "Stopped" }; - server_status_ = status; - std::cout << "server_status changed to " << nom[status] << std::endl; - } - - void ListenLoop() - { - std::cout << "ListenLoop started" << std::endl; - sockaddr_storage client_addr; - socklen_t client_addr_size; - SocketType client_socket; - - ThreadPool thread_pool; - - client_addr_size = sizeof client_addr; - while (listening_) - { - client_socket = accept(listening_socket_, reinterpret_cast(&client_addr), &client_addr_size); - if (kInvalidSocket == client_socket) - { - std::cout << "Erreur socket" << std::endl; - } - else - { - HTTPConnexion* connexion = new HTTPConnexion(client_socket); - std::function myfunc = std::bind(&HTTPConnexion::Serve, connexion); - thread_pool.EnqueueTask(myfunc); - } - } - HTTPConnexion::CloseAllConnexions(); - std::cout << "ListenLoop end" << std::endl; - } - -private: - addrinfo *server_info_; //< Listening socket address structure - ServerStatus server_status_; - SocketType listening_socket_; - std::thread listening_thread_; - bool listening_; //< Is the listening loop started ? - -}; - - -SocketServer::SocketServer(int port) : pimpl_(new Impl(port)) {} -SocketServer::SocketServer(std::string protocol) : pimpl_(new Impl(protocol)) {} -SocketServer::~SocketServer() {} -bool SocketServer::Start() { return pimpl_->Start(); } -void SocketServer::Stop() { return pimpl_->Stop(); } -SocketServer::ServerStatus SocketServer::server_status() const { return pimpl_->server_status(); } diff --git a/webfront/DOM/socket_server.h b/webfront/DOM/socket_server.h deleted file mode 100644 index 18988b98..00000000 --- a/webfront/DOM/socket_server.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef __SOCKET_SERVER_H_ -#define __SOCKET_SERVER_H_ - -#include -#include - - -class SocketServer -{ -public: - enum ServerStatus - { kUninitialized, - kInitializationFailed, - kInitialized, - kStarted, - kStopped }; - -public: - SocketServer(int port); - SocketServer(std::string protocol); - ~SocketServer(); - - bool Start(); - void Stop(); - ServerStatus server_status() const; - -private: - class Impl; - std::unique_ptr pimpl_; -}; - - - -#endif //__SOCKET_SERVER_H_ \ No newline at end of file diff --git a/webfront/DOM/thread_pool.cpp b/webfront/DOM/thread_pool.cpp deleted file mode 100644 index 2a330c92..00000000 --- a/webfront/DOM/thread_pool.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "thread_pool.h" -#include -#include -#include -#include -#include -#include - -class ThreadPool::Impl -{ -public: - Impl(size_t number_of_threads) : running_(true) - { - for (size_t thread =0; thread < number_of_threads; ++thread) - workers_.push_back(std::thread(&Impl::Worker, this)); - } - - ~Impl() - { - std::cout << "ThreadPool destructor" << std::endl; - running_ = false; - tasks_condition_.notify_all(); - - // Wait for threads termination - for (auto &thread : workers_) - { - thread.join(); - } - } - - template void EnqueueTask(Function function) - { - { - std::unique_lock lock(tasks_mutex_); - tasks_.push_back(std::function(function)); - } - tasks_condition_.notify_one(); - } - -private: - bool running_; - std::vector workers_; //< workers threads - std::deque> tasks_; //< task queue - std::mutex tasks_mutex_; - std::condition_variable tasks_condition_; - -private: - void Worker() - { - std::function task; - while (running_) - { - { - // acquire a lock for the condition variable - std::unique_lock lock(tasks_mutex_); - - // wait for a new task (in a loop in case of spurious wakeup) - while (tasks_.empty() && running_) - tasks_condition_.wait(lock); - - if (running_) - { - task = tasks_.front(); - tasks_.pop_front(); - } - } - if (running_) - { - task(); - } - } - } -}; - -ThreadPool::ThreadPool(size_t number_of_threads) : pimpl_(new Impl(number_of_threads)) {} -ThreadPool::ThreadPool() : pimpl_(new Impl(std::thread::hardware_concurrency())) {} -ThreadPool::~ThreadPool() {} -template void ThreadPool::EnqueueTask(Function function) { pimpl_->EnqueueTask(function); } - -template void ThreadPool::EnqueueTask(std::function); diff --git a/webfront/DOM/thread_pool.h b/webfront/DOM/thread_pool.h deleted file mode 100644 index a9e3a1a1..00000000 --- a/webfront/DOM/thread_pool.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __THREAD_POOL_H_ -#define __THREAD_POOL_H_ -#include - -class ThreadPool -{ -public: - ThreadPool( size_t number_of_threads); - ThreadPool(); //< Create a thread pool with the maximum number of concurrent threads supported by the hardware - ~ThreadPool(); - template void EnqueueTask(Function function); - -private: - class Impl; - std::unique_ptr pimpl_; -}; - - -#endif //__THREAD_POOL_H_ \ No newline at end of file diff --git a/webfront/DOM/webfront.cpp b/webfront/DOM/webfront.cpp deleted file mode 100644 index 3d0a4c45..00000000 --- a/webfront/DOM/webfront.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include - -#include "webfront.h" -#include "socket_server.h" - - -#define HTTP_PROTOCOL "http" -namespace WebFront -{ - -class Site::Impl -{ -public: - template Impl(Protocol protocol) : server_(protocol) - { - server_.Start(); - } - - std::shared_ptr CreatePage(const std::string page_name) - { - std::shared_ptr new_page = std::make_shared(page_name); - pages_.insert(PagesMap::value_type(page_name, new_page)); - return new_page; - } - - std::shared_ptr GetPage(const std::string page_name) const - { - const auto page = pages_.find(page_name); - if (pages_.end() == page) - { - return nullptr; - } - return page->second; - } - - std::shared_ptr RemovePage(const std::string page_name) - { - auto page = pages_.find(page_name); - if (pages_.end() == page) - { - return nullptr; - } - pages_.erase(page); - return page->second; - } - -private: - -private: - SocketServer server_; - typedef std::unordered_map> PagesMap; - PagesMap pages_; -}; - -Site::Site() : pimpl_(new Impl(HTTP_PROTOCOL)) { } -Site::Site(unsigned int port) : pimpl_(new Impl(port)) {} -Site::Site(std::string protocol) : pimpl_(new Impl(protocol)) {} -Site::~Site() {} - -/** Creates a new Page and returns a pointer on it. - * If the page_name already exist, the Page is created but not linked to the site. - * \param[in] page_name name/path of the Page - * \return The created Page - */ -std::shared_ptr Site::CreatePage(const std::string page_name) { return pimpl_->CreatePage(page_name); } - -/** Get a Page from Site. A pointer on the page is returned. - * \param[in] page_name name/path of the Page - * \return The removed Page. nullptr if page_name doesn't exist. - */ -std::shared_ptr Site::GetPage(const std::string page_name) { return pimpl_->GetPage(page_name); } - -/** Removes a Page from Site. A pointer on the removed page is returned. - * \param[in] page_name name/path of the Page - * \return The removed Page. nullptr if page_name doesn't exist. - */ -std::shared_ptr Site::RemovePage(const std::string page_name) { return pimpl_->RemovePage(page_name); } - -} \ No newline at end of file diff --git a/webfront/DOM/webfront.h b/webfront/DOM/webfront.h deleted file mode 100644 index 190eb2a3..00000000 --- a/webfront/DOM/webfront.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __WEBFRONT_SITE_H_ -#define __WEBFRONT_SITE_H_ - -#include -#include - -#include "page.h" - -namespace WebFront -{ -class Site -{ -public: - Site(); - Site(unsigned int port); - Site(std::string protocol); - ~Site(); - - std::shared_ptr CreatePage(const std::string page_name); - std::shared_ptr GetPage(const std::string page_name); - std::shared_ptr RemovePage(const std::string page_name); - -private: - class Impl; - std::unique_ptr pimpl_; -}; -} -#endif //__WEBFRONT_H_ diff --git a/webfront/DOM/xmldoc.cpp b/webfront/DOM/xmldoc.cpp deleted file mode 100644 index fbb74ee3..00000000 --- a/webfront/DOM/xmldoc.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "xmldoc.h" - -namespace WebFront { namespace XMLDoc -{ - - - - - - - -/*void Traverse() -{ - auto node = getFirstChild(); - while (nullptr != node) - { - // std::cout << node.getNodeName() << " = " << std::getNodeValue()); - - if (node->hasChildNodes()) - { - node = node->getFirstChild(); - } - else - { // leaf - // Get to the parent level - while (nullptr == node->getNextSibling() && node.get() != this) - node = node->getParentNode(); - node = node->getNextSibling(); - } - } -} -*/ -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc.h b/webfront/DOM/xmldoc.h deleted file mode 100644 index 59cf8310..00000000 --- a/webfront/DOM/xmldoc.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_H_ -#define __WEBFRONT_XMLDOC_H_ - -#include -#include -#include -#include -#include -#include - -#include "xmldoc_attr.h" -#include "xmldoc_character_data.h" -#include "xmldoc_comment.h" -#include "xmldoc_document.h" -#include "xmldoc_document_fragment.h" -#include "xmldoc_document_type.h" -#include "xmldoc_dom_exception.h" -#include "xmldoc_element.h" -#include "xmldoc_named_node_map.h" -#include "xmldoc_node.h" -#include "xmldoc_node_list.h" - - - -namespace WebFront { namespace XMLDoc { - -class XMLDoc -{ -public: - -}; - -}} -#endif //__WEBFRONT_XMLDOC_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_attr.cpp b/webfront/DOM/xmldoc_attr.cpp deleted file mode 100644 index 113466a3..00000000 --- a/webfront/DOM/xmldoc_attr.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "xmldoc_attr.h" - -namespace WebFront { namespace XMLDoc { - -Attr::Attr() : Node(ATTRIBUTE_NODE) -{ -} - -/** - * Returns the name of this attribute. - * @return The name of this attribute. - */ -const std::string& Attr::getName() const -{ - return getNodeName(); -} - - -/** - * Tells if the attribute value has been specified in the original - * document. - * @return true if the attribute has an assigned value - * in the Document (and the value is the assigned value). - * false if the attribute value came from the default - * value declared in the Document's DTD. - */ -bool Attr::getSpecified() -{ - return specified_; -} - - -const std::string& Attr::getValue() const -{ - return getNodeValue(); -} - - -void Attr::setValue(const std::string& value) -{ - setNodeValue(value); -} - - -std::shared_ptr Attr::getOwnerElement() const -{ - // NOT IMPLEMENTED - return nullptr; -} - - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_attr.h b/webfront/DOM/xmldoc_attr.h deleted file mode 100644 index c982e4dd..00000000 --- a/webfront/DOM/xmldoc_attr.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_ATTR_H_ -#define __WEBFRONT_XMLDOC_ATTR_H_ - -#include "xmldoc_node.h" -#include "xmldoc_element.h" - -namespace WebFront { namespace XMLDoc { -class Attr : public Node -{ -public: - const std::string& getName() const; - bool getSpecified(); - const std::string& getValue() const; - void setValue(const std::string& value) throw(DOMException); - std::shared_ptr getOwnerElement() const; - -private: - std::shared_ptr ownerElement_; // The Element node this attribute is attached to. - bool specified_; // True if the attribute has an assigned value in the Document. - -protected: - Attr(); - friend class Document; -}; - -}} -#endif // __WEBFRONT_XMLDOC_ATTR_H_ diff --git a/webfront/DOM/xmldoc_c_data_section.h b/webfront/DOM/xmldoc_c_data_section.h deleted file mode 100644 index 2c0fe6f5..00000000 --- a/webfront/DOM/xmldoc_c_data_section.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_CDATA_SECTION_H_ -#define __WEBFRONT_XMLDOC_CDATA_SECTION_H_ - -#include "xmldoc_text.h" - -namespace WebFront { namespace XMLDoc { - -class CDATASection : public Text -{ -}; - - -}} -#endif // __WEBFRONT_XMLDOC_CDATA_SECTION_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_character_data.cpp b/webfront/DOM/xmldoc_character_data.cpp deleted file mode 100644 index f7588f7a..00000000 --- a/webfront/DOM/xmldoc_character_data.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "xmldoc_character_data.h" - -namespace WebFront { namespace XMLDoc { - -/** - * Returns the character data of the node. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. - * @exception DOMException - */ -const std::string& CharacterData::getData() const -{ - return getNodeValue(); -} - - -/** - * Set the character data of the node. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. - * @exception DOMException - */ -void CharacterData::setData(const std::string& data) -{ - setNodeValue(data); -} - -/** - * The number of characters in the node. - */ -unsigned int CharacterData::getLength() const -{ - return nodeValue_.length(); -} - -/** - * Extracts a range of data from the node. - * @param[in] offset Offset of substring to extract. - * @param[in] count The number of characters to extract. - * @return The specified substring. - * @exception DOMException - * DOMSTRING_SIZE_ERR: Raised if the specified range of text does - * not fit into a DOMString. - */ -std::string CharacterData::substringData(unsigned int offset, unsigned int count) const -{ - try - { - return nodeValue_.substr(offset, count); - } - catch (std::out_of_range&) - { - throw DOMException(DOMException::DOMSTRING_SIZE_ERR, "offset out of range"); - } -} - -/** - * Appends the string to the end of the character data of the node. - * @param[in] arg The string to append. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -void CharacterData::appendData(const std::string& arg) -{ - if (isReadOnly()) - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - nodeValue_.append(arg); -} - - -/** - * Inserts a string at the specified offset. - * @param[in] offset The offset at which to insert. - * @param[in] arg The string to insert. - * @exception DOMException - * INDEX_SIZE_ERR: Raised if the specified offset is - * greater than the number of characters in data. - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -void CharacterData::insertData(unsigned int offset, const std::string& arg) -{ - if (isReadOnly()) - { - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - } - try - { - nodeValue_.insert(offset, arg); - } - catch (std::out_of_range& ) - { - throw DOMException(DOMException::INDEX_SIZE_ERR, "offset out of range"); - } -} - -/** - * Removes a range of characters from the node. - * @param[in] offset The offset from which to start removing. - * @param[in] count The number of characters to delete. - * @exception DOMException - * INDEX_SIZE_ERR: Raised if the specified offset is - * greater than the number of characters in data. - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -void CharacterData::deleteData(unsigned int offset, unsigned int count) -{ - if (isReadOnly()) - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - try - { - nodeValue_.erase(offset, count); - } - catch (std::out_of_range&) - { - throw DOMException(DOMException::INDEX_SIZE_ERR, "offset out of range"); - } -} - -/** -* Replaces the characters specified by the given string. -* @param[in] offset The offset of the first character to be replaced. -* @param[in] count The number of characters to replace. -* @param[in] arg The other string that will be copied. -* @exception DOMException -* INDEX_SIZE_ERR: Raised if the specified offset is -* greater than the number of characters in data. -* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. -*/void CharacterData::replaceData(unsigned int offset, unsigned int count, const std::string& arg) -{ - if (isReadOnly()) - { - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - } - try - { - nodeValue_.replace(offset, count, arg); - } - catch (std::out_of_range&) - { - throw DOMException(DOMException::INDEX_SIZE_ERR, "offset out of range"); - } -} - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_character_data.h b/webfront/DOM/xmldoc_character_data.h deleted file mode 100644 index 2701d3be..00000000 --- a/webfront/DOM/xmldoc_character_data.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_CHARACTER_DATA_H_ -#define __WEBFRONT_XMLDOC_CHARACTER_DATA_H_ - -#include "xmldoc_node.h" - -namespace WebFront { namespace XMLDoc { - -class CharacterData : public Node -{ -public: - - const std::string& getData() const; - void setData(const std::string& data) throw(DOMException); - unsigned int getLength() const; - std::string substringData(unsigned int offset, unsigned int count) const throw(DOMException); - void appendData(const std::string& arg); - void insertData(unsigned int offset, const std::string& arg) throw(DOMException); - void deleteData(unsigned int offset, unsigned int count) throw(DOMException); - void replaceData(unsigned int offset, unsigned int count, const std::string& arg) throw(DOMException); - -protected: - CharacterData(unsigned short nodeType) : Node(nodeType) {} - -}; - - -}} -#endif // __WEBFRONT_XMLDOC_CHARACTER_DATA_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_comment.h b/webfront/DOM/xmldoc_comment.h deleted file mode 100644 index f66b5792..00000000 --- a/webfront/DOM/xmldoc_comment.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_COMMENT_H_ -#define __WEBFRONT_XMLDOC_COMMENT_H_ - -#include "xmldoc_character_data.h" - -namespace WebFront { namespace XMLDoc -{ - -class Comment : public CharacterData -{ -protected: - Comment() : CharacterData(COMMENT_NODE) {} - friend class Document; - -}; - -}} -#endif // __WEBFRONT_XMLDOC_COMMENT_H_ diff --git a/webfront/DOM/xmldoc_document.cpp b/webfront/DOM/xmldoc_document.cpp deleted file mode 100644 index 4076ba8a..00000000 --- a/webfront/DOM/xmldoc_document.cpp +++ /dev/null @@ -1,122 +0,0 @@ -#include "xmldoc_document.h" -#include "xmldoc_attr.h" -#include "xmldoc_c_data_section.h" -#include "xmldoc_comment.h" -#include "xmldoc_document_fragment.h" -#include "xmldoc_document_type.h" -#include "xmldoc_dom_implementation.h" -#include "xmldoc_element.h" -#include "xmldoc_entity_reference.h" -#include "xmldoc_node_list.h" -#include "xmldoc_processing_instruction.h" -#include "xmldoc_text.h" - -namespace WebFront { namespace XMLDoc { - -std::shared_ptr Document::getDoctype() -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::getImplementation() const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::getDocumentElement() const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createElement(const std::string& tagName) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createDocumentFragment() const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createTextNode(const std::string& data) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createComment(const std::string& data) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createCDATASection(const std::string& data) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createProcessingInstruction( - const std::string& target, const std::string& data) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createAttribute(const std::string& name) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createEntityReference(const std::string& name) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::getElementsByTagName(const std::string& tagname) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::importNode(std::shared_ptr importedNode, bool deep) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createElementNS( - const std::string& namespaceURI, const std::string& qualifiedName) -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::unique_ptr Document::createAttributeNS( - const std::string& namespaceURI, const std::string& qualifiedName) -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::getElementsByTagNameNS( - const std::string& namespaceURI, const std::string& localName) const -{ - // NOT IMPLEMENTED - return nullptr; -} - -std::shared_ptr Document::getElementById(const std::string& elementId) -{ - // NOT IMPLEMENTED - return nullptr; -} - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_document.h b/webfront/DOM/xmldoc_document.h deleted file mode 100644 index ed6451c2..00000000 --- a/webfront/DOM/xmldoc_document.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_DOCUMENT_H_ -#define __WEBFRONT_XMLDOC_DOCUMENT_H_ - -#include "xmldoc_node.h" - -namespace WebFront { namespace XMLDoc { - -class DocumentType; -class DOMImplementation; -class Element; -class DocumentFragment; -class Text; -class Comment; -class CDATASection; -class ProcessingInstruction; -class Attr; -class EntityReference; -class NodeList; - -class Document : public Node -{ -public: - std::shared_ptr getDoctype(); - std::shared_ptr getImplementation() const; - std::shared_ptr getDocumentElement() const; - std::unique_ptr createElement(const std::string& tagName) const throw(DOMException); - std::unique_ptr createDocumentFragment() const; - std::unique_ptr createTextNode(const std::string& data) const; - std::unique_ptr createComment(const std::string& data) const; - std::unique_ptr createCDATASection(const std::string& data) const throw(DOMException); - std::unique_ptr createProcessingInstruction(const std::string& target, - const std::string& data) const throw(DOMException); - std::unique_ptr createAttribute(const std::string& name) const throw(DOMException); - std::unique_ptr createEntityReference(const std::string& name) const throw(DOMException); - std::shared_ptr getElementsByTagName(const std::string& tagname) const; - std::shared_ptr importNode(std::shared_ptr importedNode, bool deep) const throw(DOMException); - - std::unique_ptr createElementNS(const std::string& namespaceURI, - const std::string& qualifiedName) throw(DOMException); - std::unique_ptr createAttributeNS(const std::string& namespaceURI, - const std::string& qualifiedName) throw(DOMException); - std::shared_ptr getElementsByTagNameNS(const std::string& namespaceURI, - const std::string& localName) const; - std::shared_ptr getElementById(const std::string& elementId); - -protected: - Document() : Node(DOCUMENT_NODE) {} - friend class DOMImplementation; - -}; - - -}} -#endif // __WEBFRONT_XMLDOC_DOCUMENT_H_ diff --git a/webfront/DOM/xmldoc_document_fragment.h b/webfront/DOM/xmldoc_document_fragment.h deleted file mode 100644 index 9133aec6..00000000 --- a/webfront/DOM/xmldoc_document_fragment.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_DOCUMENT_FRAGMENT_H_ -#define __WEBFRONT_XMLDOC_DOCUMENT_FRAGMENT_H_ - -#include "xmldoc.h" - -namespace WebFront { namespace XMLDoc -{ - -class DocumentFragment : public Node -{ -protected: - DocumentFragment() : Node(DOCUMENT_FRAGMENT_NODE) {} - friend class Document; -}; - -}} -#endif // __WEBFRONT_XMLDOC_DOCUMENT_FRAGMENT_H_ diff --git a/webfront/DOM/xmldoc_document_type.cpp b/webfront/DOM/xmldoc_document_type.cpp deleted file mode 100644 index 9f2fce62..00000000 --- a/webfront/DOM/xmldoc_document_type.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "xmldoc_document_type.h" - -namespace WebFront { namespace XMLDoc { - - /** - * The name of DTD (immediately following the DOCTYPE keyword. - */ -std::string DocumentType::getName() const -{ - return name_; -} - - -/** - * A NamedNodeMap containing the general entities declared in the DTD. - */ -std::unique_ptr DocumentType::getEntities() const -{ - return nullptr; -} - - -/** - * A NamedNodeMap containing the notations declared in the DTD. - */ -std::unique_ptr DocumentType::getNotations() const -{ - return nullptr; -} - - -/** - * The public identifier of the external subset. - */ -const std::string& DocumentType::getPublicId() const -{ - return public_id_; -} - - -/** - * The system identifier of the external subset. - */ -const std::string& DocumentType::getSystemId() const -{ - return system_id_; -} - - -/** - * The internal subset. - */ -const std::string& DocumentType::getInternalSubset() const -{ - return internal_subset_; -} - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_document_type.h b/webfront/DOM/xmldoc_document_type.h deleted file mode 100644 index 78a600f3..00000000 --- a/webfront/DOM/xmldoc_document_type.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_DOCUMENT_TYPE_H_ -#define __WEBFRONT_XMLDOC_DOCUMENT_TYPE_H_ - -#include "xmldoc_node.h" - -namespace WebFront { namespace XMLDoc { - -class DocumentType : public Node -{ -public: - std::string getName() const; - std::unique_ptr getEntities() const; - std::unique_ptr getNotations() const; - const std::string& getPublicId() const; - const std::string& getSystemId() const; - const std::string& getInternalSubset() const; - - -private: - friend class DOMImplementation; - DocumentType() : Node(DOCUMENT_TYPE_NODE) {} - -private: - std::string name_, public_id_, system_id_, internal_subset_; -}; - - -}} -#endif // __WEBFRONT_XMLDOC_DOCUMENT_TYPE_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_dom_exception.h b/webfront/DOM/xmldoc_dom_exception.h deleted file mode 100644 index a0394d26..00000000 --- a/webfront/DOM/xmldoc_dom_exception.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_DOM_EXCEPTION_H_ -#define __WEBFRONT_XMLDOC_DOM_EXCEPTION_H_ - -#include -#include - -namespace WebFront { namespace XMLDoc { - -class DOMException : public std::runtime_error -{ -public: - DOMException(short code, const std::string& message) : runtime_error(message) { code_ = code; } - short code_; - - // ExceptionCode - static const short INDEX_SIZE_ERR = 1, DOMSTRING_SIZE_ERR = 2, HIERARCHY_REQUEST_ERR = 3, - WRONG_DOCUMENT_ERR = 4, INVALID_CHARACTER_ERR = 5, NO_DATA_ALLOWED_ERR = 6, - NO_MODIFICATION_ALLOWED_ERR = 7, NOT_FOUND_ERR = 8, NOT_SUPPORTED_ERR = 9, - INUSE_ATTRIBUTE_ERR = 10, INVALID_STATE_ERR = 11, SYNTAX_ERR = 12, - INVALID_MODIFICATION_ERR = 13, NAMESPACE_ERR = 14, INVALID_ACCESS_ERR = 15; -}; - - #pragma warning(disable: 4290) // Visual Studio does not implement checked exceptions. -}} -#endif // __WEBFRONT_XMLDOC_DOM_EXCEPTION_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_dom_implementation.cpp b/webfront/DOM/xmldoc_dom_implementation.cpp deleted file mode 100644 index 1d8d655b..00000000 --- a/webfront/DOM/xmldoc_dom_implementation.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include "xmldoc_dom_implementation.h" -#include "xmldoc_document_type.h" -#include "xmldoc_document.h" -#include - - -class WebFront::XMLDoc::DOMImplementation::Impl -{ -public: - bool hasFeature(std::string feature_name, const std::string& version_name) const - { - auto feature = getFeature(feature_name); - if (feature) - { - if (version_name.empty()) - { - return true; - } - else - if (feature->SupportVersion(version_name)) - { - return true; - } - } - return false; - } - -private: - struct Feature - { - std::string name_; - std::list supported_versions_; - bool SupportVersion(const std::string& version) const - { - for (auto supported_version : supported_versions_) - { - if (0 == supported_version.compare(version)) - return true; - } - return false; - } - }; - std::list features_; - -private: - - void addFeature(std::string feature_name, std::string version_name) - { - auto feature = getFeature(feature_name); - if (feature) - { - if (!feature->SupportVersion(version_name)) - { - feature->supported_versions_.push_back(version_name); - } - } - else - { - Feature feat; - feat.name_=feature_name; - feat.supported_versions_.push_back(version_name); - features_.push_back(feat); - } - } - - std::shared_ptr getFeature(std::string feature_name) const - { - std::transform(feature_name.begin(), feature_name.end(), feature_name.begin(), ::tolower); - for (auto feature : features_) - { - if (0 == feature.name_.compare(feature_name)) - { - return std::make_shared(feature); - } - } - return nullptr; - } - - -}; - -namespace WebFront { namespace XMLDoc { - DOMImplementation::DOMImplementation() : impl_(new Impl) {} - DOMImplementation::~DOMImplementation() {} - - /** - * Test if the DOM implementation implements a specific feature. - * @param feature The name of the feature to test (case-insensitive). - * @param version Version number of the feature to test. - * @return true if the feature is implemented in the - * specified version, false otherwise. - */ - bool DOMImplementation::hasFeature(const std::string& feature, const std::string& version) const - { - return impl_->hasFeature(feature, version); - } - - /** - * Creates an empty DocumentType node. - */ - std::unique_ptr DOMImplementation::createDocumentType( - const std::string& qualifiedName, - const std::string& publicId, - const std::string& systemId) const - { - std::unique_ptr doctype(new DocumentType); - doctype->name_=qualifiedName; - doctype->public_id_=publicId; - doctype->system_id_=systemId; - - return doctype; - } - - /** - * Creates an XML Document object of the specified type with - * its document element. HTML-only DOM implementations do not need to - * implement this method. - * @param[in] namespaceURI The namespace URI of the document element to create. - * @param[in] qualifiedName The qualified name of the document element to be - * created. - * @param doctype The type of document to be created or nullptr. - * When doctype is not nullptr, its - * Node.ownerDocument attribute is set to the document - * being created. - * @return A new Document object. - * @exception DOMException - * INVALID_CHARACTER_ERR: Raised if the specified qualified name - * contains an illegal character. - *
NAMESPACE_ERR: Raised if the qualifiedName is - * malformed, if the qualifiedName has a prefix and the - * namespaceURI is null, or if the - * qualifiedName has a prefix that is "xml" and the - * namespaceURI is different from " - * http://www.w3.org/XML/1998/namespace" . - *
WRONG_DOCUMENT_ERR: Raised if doctype has already - * been used with a different document or was created from a different - * implementation. - * @since DOM Level 2 - */ - std::shared_ptr DOMImplementation::createDocument( - const std::string& namespaceURI, - const std::string& qualifiedName, - std::shared_ptr doctype) const - { - std::shared_ptr new_doc(new Document); - new_doc->namespace_uri_ = namespaceURI; - new_doc->nodeName_ = qualifiedName; - - if (nullptr == doctype->getOwnerDocument()) - { - doctype->ownerDocument_ = new_doc; - } - else - { - if (new_doc != doctype->getOwnerDocument()) - { - throw DOMException(DOMException::WRONG_DOCUMENT_ERR, "Doctype has already been used with a different document"); - } - } - - return new_doc; - - } - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_dom_implementation.h b/webfront/DOM/xmldoc_dom_implementation.h deleted file mode 100644 index b85e4d7b..00000000 --- a/webfront/DOM/xmldoc_dom_implementation.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_DOM_IMPLEMENTATION_H_ -#define __WEBFRONT_XMLDOC_DOM_IMPLEMENTATION_H_ - -#include "xmldoc_document.h" -#include "xmldoc_document_type.h" - -namespace WebFront { namespace XMLDoc { - -class DOMImplementation -{ -public: - DOMImplementation(); - ~DOMImplementation(); - bool hasFeature(const std::string& feature, const std::string& version) const; - std::unique_ptr createDocumentType( - const std::string& qualifiedName, - const std::string& publicId, - const std::string& systemId) const throw(DOMException); - std::shared_ptr createDocument( - const std::string& namespaceURI, - const std::string& qualifiedName, - const std::shared_ptr doctype) const throw(DOMException); - -private: - class Impl; - std::unique_ptr impl_; -}; - -}} -#endif // __WEBFRONT_XMLDOC_DOM_IMPLEMENTATION_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_element.cpp b/webfront/DOM/xmldoc_element.cpp deleted file mode 100644 index 418ec477..00000000 --- a/webfront/DOM/xmldoc_element.cpp +++ /dev/null @@ -1,164 +0,0 @@ -#include "xmldoc_element.h" -#include "xmldoc_attr.h" -#include "xmldoc_document.h" -#include "xmldoc_node_list.h" - -namespace WebFront { namespace XMLDoc { - - -/** - * The name of the element. - */ -const std::string& Element::getTagName() const -{ - return getNodeName(); -} - - -/** - * Retrieves an attribute value by name. - * @param[in] name The name of the attribute to retrieve. - * @return The attribute value. -*/ -std::string Element::getAttribute(const std::string& name) const -{ - auto attribute = getAttributeNode(name); - if (attribute) - { - return attribute->getNodeValue(); - } - return std::string(); -} - - -/** - * Adds a new attribute. - * @param[in] name The name of the attribute to create or alter. - * @param[in] value Value to set in string form. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -void Element::setAttribute(const std::string& name, const std::string& value) -{ - if (isReadOnly()) throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - auto attribute = getAttributeNode(name); - if (nullptr == attribute) - { - auto new_attribute = getOwnerDocument()->createAttribute(name); - new_attribute->setValue(value); - appendChild(new_attribute); - } - else - { - attribute->setNodeValue(value); - } -} - -/** - * Removes an attribute by name. - * @param[in] name The name of the attribute to remove. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -void Element::removeAttribute(const std::string& name) -{ - if (isReadOnly()) throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - auto attribute = getAttributeNode(name); - if (nullptr != attribute) - { - removeAttributeNode(attribute); - } -} - - -/** - * Retrieves an attribute node by name. - * @param[in] name The name of the attribute to retrieve. - * @return The Attr node with the specified name ( - * nodeName) or nullptr. - */ -std::shared_ptr Element::getAttributeNode(const std::string& name) const -{ - for (auto node : childNodes_) - { - if (ATTRIBUTE_NODE == node->getNodeType()) - { - auto attr = std::static_pointer_cast(node); - if (0 == name.compare(attr->getNodeName())) - { - return attr; - } - } - } - return nullptr; -} - - -/** - * Removes the given attribute node. - * @param old_attr The Attr node to remove. - * @return The Attr node that was removed. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - *
NOT_FOUND_ERR: Raised if oldAttr is not an attribute - * of the element. - */ -std::shared_ptr Element::removeAttributeNode(std::shared_ptr old_attr) -{ - removeChild(old_attr); - return old_attr; -} - - -/** - * Returns a NodeList of all descendant Elements with a given tag name. - * @param[in] tag_name The name of the tag to match on. The special value "*" - * matches all tags. - * @return A list of matching Element nodes. - */ -std::unique_ptr Element::getElementsByTagName(const std::string& tag_name) const -{ - std::list> tagged_list; - auto node = getFirstChild(); - while (nullptr != node) - { - if (ELEMENT_NODE == node->getNodeType()) - { - if (0 == tag_name.compare(std::static_pointer_cast(node)->getTagName()) - || tag_name == "*") - { - tagged_list.push_back(node); - } - } - if (node->hasChildNodes()) - { - node = node->getFirstChild(); - } - else - { - while (nullptr == node->getNextSibling() && node.get() != this) - { - node = node->getParentNode(); - } - node = node->getNextSibling(); - } - } - return std::unique_ptr(new NodeList(tagged_list)); -} - - -/** -* Returns true if named attribute exists. -* @param[in] name The name of the attribute to look for. -* @return true if an attribute with the given name is -* specified on this element or has a default value, false -* otherwise. -*/ -bool Element::hasAttribute(const std::string& name) const -{ - return (getAttributeNode(name) != nullptr); -} - - - -}}; \ No newline at end of file diff --git a/webfront/DOM/xmldoc_element.h b/webfront/DOM/xmldoc_element.h deleted file mode 100644 index cd80f3ab..00000000 --- a/webfront/DOM/xmldoc_element.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_ELEMENT_H_ -#define __WEBFRONT_XMLDOC_ELEMENT_H_ - -#include "xmldoc_node.h" - -namespace WebFront { namespace XMLDoc { - -class Attr; -class Element : public Node -{ -public: - const std::string& getTagName() const; - - std::string getAttribute(const std::string& name) const; - void setAttribute(const std::string& name, const std::string& value) throw(DOMException); - void removeAttribute(const std::string& name) throw(DOMException); - std::shared_ptr getAttributeNode(const std::string& name) const; - std::shared_ptr setAttributeNode(std::shared_ptr new_attr); - std::shared_ptr removeAttributeNode(std::shared_ptr old_attr) throw(DOMException); - std::unique_ptr getElementsByTagName(const std::string& tag_name) const; - bool hasAttribute(const std::string& name) const; - -protected: - Element(); - friend class Document; -}; - - -}} -#endif // __WEBFRONT_XMLDOC_ELEMENT_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_entity_reference.h b/webfront/DOM/xmldoc_entity_reference.h deleted file mode 100644 index 83c43165..00000000 --- a/webfront/DOM/xmldoc_entity_reference.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_ENTITY_REFERENCE_H_ -#define __WEBFRONT_XMLDOC_ENTITY_REFERENCE_H_ - -#include "xmldoc_text.h" - -namespace WebFront { namespace XMLDoc { - -class EntityReference : public Node -{ -protected: - EntityReference() : Node(ENTITY_REFERENCE_NODE) {} - friend class Document; -}; - - -}} -#endif // __WEBFRONT_XMLDOC_ENTITY_REFERENCE_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_named_node_map.cpp b/webfront/DOM/xmldoc_named_node_map.cpp deleted file mode 100644 index 6964bebe..00000000 --- a/webfront/DOM/xmldoc_named_node_map.cpp +++ /dev/null @@ -1,141 +0,0 @@ -#include "xmldoc_named_node_map.h" -#include "xmldoc_node.h" -#include "xmldoc_attr.h" - -namespace WebFront { namespace XMLDoc -{ - NamedNodeMap::NamedNodeMap() : read_only_(false) - { - } - - - /** - * Retrieves a node specified by name. - * @param[in] name The nodeName of the node to retrieve. - * @return A Node with the specified nodeName of nullptr/ - */ - std::shared_ptr NamedNodeMap::getNamedItem(const std::string& name) const - { - try - { - return nodes_.at(name); - } - catch (std::out_of_range&) - { - return nullptr; - } - } - - - /** - * Adds a node using its nodeName attribute. If a node with - * that name is already present in this map, it is replaced by the new - * one. - * @param[in] node The node to store in the map. - * @return If the new Node replaces an existing node, the replaced node - * is returned, otherwise nullptr is returned. - * @exception DOMException - * WRONG_DOCUMENT_ERR: Raised if node was created from a - * different document than the one that created this map. - *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. - *
INUSE_ATTRIBUTE_ERR: Raised if node is an - * Attr that is already an attribute of another - * Element object. The DOM user must explicitly clone - * Attr nodes to re-use them in other elements. - */ - std::shared_ptr NamedNodeMap::setNamedItem(std::shared_ptr node) - { - if (node->getOwnerDocument() != owner_document_) - { - throw DOMException(DOMException::WRONG_DOCUMENT_ERR, - "node was created from a different document than the one that created this NamedNodeMap."); - } - - if (read_only_) - { - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "NamedNodeMap is readonly."); - } - - if (Node::ATTRIBUTE_NODE == node->getNodeType()) - { - if (nullptr != std::static_pointer_cast(node)->getOwnerElement()) - { - throw DOMException(DOMException::INUSE_ATTRIBUTE_ERR, "node is already an attribute of another Element."); - } - } - - auto old_node_iter = nodes_.find(node->getNodeName()); - std::shared_ptr old_node; - if (nodes_.end() == old_node_iter) - { - old_node = nullptr; - } - else - { - old_node = old_node_iter->second; - } - - nodes_[node->getNodeName()] = node; - return old_node; - } - - - /** - * Removes a node specified by name. - * @param[in] name The nodeName of the node to remove. - * @return The node removed from this map if a node with such a name - * exists. - * @exception DOMException - * NOT_FOUND_ERR: Raised if there is no node named name in - * this map. - *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. - */ - std::shared_ptr NamedNodeMap::removeNamedItem(const std::string& name) - { - if (read_only_) - { - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "NamedNodeMap is readonly."); - } - auto old_node_iter = nodes_.find(name); - if (nodes_.end() == old_node_iter) - { - throw DOMException(DOMException::NOT_FOUND_ERR, "No node with this name found."); - } - return old_node_iter->second; - - } - - - /** - * Returns the indexth item in the map. If index - * is greater than or equal to the number of nodes in this map, this - * returns nullptr. - * @param[in] index Index into this map. - * @return The node at the indexth position in the map, or - * nullptr if that is not a valid index. - */ - std::shared_ptr NamedNodeMap::item(unsigned int index) const - { - for (auto node : nodes_) - { - if (0 == index) - { - return node.second; - } - else - { - index--; - } - } - return nullptr; - } - - /** - * The number of nodes in this map. - * @return The number of nodes in this map. - */ - unsigned int NamedNodeMap::getLength() const - { - return nodes_.size(); - } -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_named_node_map.h b/webfront/DOM/xmldoc_named_node_map.h deleted file mode 100644 index 155ce1f5..00000000 --- a/webfront/DOM/xmldoc_named_node_map.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_NAMED_NODE_MAP_H_ -#define __WEBFRONT_XMLDOC_NAMED_NODE_MAP_H_ - -#include "xmldoc_dom_exception.h" -#include -#include - -namespace WebFront { namespace XMLDoc -{ -class Node; -class NamedNodeMap -{ -public: - - std::shared_ptr getNamedItem(const std::string& name) const; - std::shared_ptr setNamedItem(std::shared_ptr node) throw(DOMException); - std::shared_ptr removeNamedItem(const std::string& name) throw(DOMException); - std::shared_ptr item(unsigned int index) const; - unsigned int getLength() const; - -private: - NamedNodeMap(); - friend class Document; - - std::shared_ptr owner_document_; - std::unordered_map> nodes_; - bool read_only_; -}; - -}} -#endif // __WEBFRONT_XMLDOC_NAMED_NODE_MAP_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_node.cpp b/webfront/DOM/xmldoc_node.cpp deleted file mode 100644 index 2e05605a..00000000 --- a/webfront/DOM/xmldoc_node.cpp +++ /dev/null @@ -1,195 +0,0 @@ -#include "xmldoc_node.h" -#include "xmldoc_node_list.h" - -namespace WebFront { namespace XMLDoc { - -Node::Node(short type) : nodeType_(type), flags_(0) -{ -} - - -const std::string& Node::getNodeName() const -{ - return nodeName_; -} - - -const std::string& Node::getNodeValue() const -{ - return nodeValue_; -} - - -void Node::setNodeValue(std::string nodeValue) -{ - if (isReadOnly()) - { - throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - } - nodeValue_ = nodeValue; -} - - -short Node::getNodeType() const -{ - return nodeType_; -} - - -std::shared_ptr Node::getParentNode() const -{ - return parentNode_; -} - - -std::shared_ptr Node::getFirstChild() const -{ - return firstChild_; -} - - -std::shared_ptr Node::getLastChild() const -{ - return lastChild_; -} - - -std::shared_ptr Node::getPreviousSibling() const -{ - return previousSibling_; -} - - -std::shared_ptr Node::getNextSibling() const -{ - return nextSibling_; -} - - -std::unique_ptr Node::getAttributes() const -{ - // NOT IMPLEMENTED - return nullptr; -} - - -std::shared_ptr Node::getOwnerDocument() const -{ - // NOT IMPLEMENTED - return nullptr; -} - - -std::shared_ptr Node::insertBefore( std::shared_ptr new_child, - std::shared_ptr ref_child) -{ - // NOT IMPLEMENTED - return nullptr; -} - - -std::shared_ptr Node::replaceChild( std::shared_ptr new_child, - std::shared_ptr old_child) -{ - // NOT IMPLEMENTED - return nullptr; -} - - -/** - * Removes the given child node. - * @param[in] old_child The node to remove. - * @return The node that was removed. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - *
NOT_FOUND_ERR: Raised if oldAttr is not an attribute - * of the element. - */ -std::shared_ptr Node::removeChild(std::shared_ptr old_child) -{ - if (isReadOnly()) throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, "node is read only"); - for (auto node : childNodes_) - { - if (node == old_child) - { - removeChild(old_child); - return node; - } - } - throw DOMException(DOMException::NOT_FOUND_ERR, "not an attribute of the element"); -} - - -std::shared_ptr Node::appendChild(std::shared_ptr new_child) -{ - // NOT IMPLEMENTED - return nullptr; -} - - -bool Node::hasChildNodes() const -{ - return nodes_count_ > 0; -} - - -std::unique_ptr Node::cloneNode(bool deep) const -{ - // NOT IMPLEMENTED - return nullptr; -} - - -void Node::normalize() -{ - // NOT IMPLEMENTED -} - - -bool Node::isSupported(const std::string& feature, const std::string& version) const -{ - // NOT IMPLEMENTED - return false; -} - - -const std::string& Node::getNamespaceURI() const -{ - // NOT IMPLEMENTED - return namespace_uri_; -} - - -const std::string& Node::getPrefix() const -{ - return prefix_; -} - - -void Node::setPrefix(const std::string& prefix) -{ - prefix_ = prefix; -} - - -const std::string& Node::getLocalName() const -{ - // NOT IMPLEMENTED - return nodeName_; -} - - -bool Node::hasAttributes() const -{ - // NOT IMPLEMENTED - return false; -} - - -std::unique_ptr Node::getChildNodes() const -{ - return std::unique_ptr(new NodeList(childNodes_)); -} - - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_node.h b/webfront/DOM/xmldoc_node.h deleted file mode 100644 index 3e8ffacf..00000000 --- a/webfront/DOM/xmldoc_node.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_NODE_H_ -#define __WEBFRONT_XMLDOC_NODE_H_ - -#include -#include -#include -#include "xmldoc_dom_exception.h" -#include "xmldoc_named_node_map.h" - -namespace WebFront { namespace XMLDoc { - -class Document; -class NodeList; -class Node -{ -public: - static const short ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, CDATA_SECTION_NODE = 4, - ENTITY_REFERENCE_NODE = 5, ENTITY_NODE = 6, PROCESSING_INSTRUCTION_NODE = 7, - COMMENT_NODE = 8, DOCUMENT_NODE = 9, DOCUMENT_TYPE_NODE = 10, - DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12; -public: - const std::string& getNodeName() const; - const std::string& getNodeValue() const; - void setNodeValue(std::string nodeValue) throw(DOMException); - short getNodeType() const; - - std::shared_ptr getParentNode() const; - std::unique_ptr getChildNodes() const; - std::shared_ptr getFirstChild() const; - std::shared_ptr getLastChild() const; - std::shared_ptr getPreviousSibling() const; - std::shared_ptr getNextSibling() const; - std::unique_ptr getAttributes() const; - std::shared_ptr getOwnerDocument() const; - std::shared_ptr insertBefore( std::shared_ptr new_child, - std::shared_ptr ref_child) throw(DOMException); - std::shared_ptr replaceChild( std::shared_ptr new_child, - std::shared_ptr old_child) throw(DOMException); - std::shared_ptr removeChild(std::shared_ptr old_child) throw(DOMException); - std::shared_ptr appendChild(std::shared_ptr new_child) throw(DOMException); - bool hasChildNodes() const; - std::unique_ptr cloneNode(bool deep) const; - void normalize(); - bool isSupported(const std::string& feature, const std::string& version) const; - const std::string& getNamespaceURI() const; - const std::string& getPrefix() const; - void setPrefix(const std::string& prefix); - const std::string& getLocalName() const; - bool hasAttributes() const; - - - // std::unique_ptr helpers - template std::shared_ptr appendChild(std::unique_ptr& newChild) throw(DOMException) - { return appendChild(std::shared_ptr(newChild.get())); } - template std::shared_ptr insertBefore(std::unique_ptr& newChild, - std::shared_ptr refChild) throw(DOMException) - { return insertBefore(std::shared_ptr(newChild.get()), refChild); } - template std::shared_ptr replaceChild(std::unique_ptr& newChild, - std::shared_ptr oldChild) throw(DOMException) - { return replaceChild(std::shared_ptr(newChild.get()), oldChild); } - - - -protected: - std::vector> childNodes_; - std::string nodeValue_; - -private: - std::unordered_map attributes_indexes_; - std::string nodeName_; - std::string namespace_uri_; - - std::shared_ptr parentNode_; - std::shared_ptr nextSibling_, previousSibling_; - std::shared_ptr firstChild_, lastChild_; - std::shared_ptr ownerDocument_; - - unsigned int nodes_count_; - short nodeType_; - std::string prefix_; - -private: - enum NodeFlags { kReadOnly = 0x1<<1 }; - unsigned short flags_; - -protected: - friend class DOMImplementation; - Node(short type); - - bool isReadOnly() const { return (flags_ & kReadOnly) !=0; }; - void setReadOnly(bool read_only) { flags_ = (read_only ? flags_ | kReadOnly : flags_ & ~kReadOnly); } - -}; - -}} -#endif // __WEBFRONT_XMLDOC_NODE_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_node_list.h b/webfront/DOM/xmldoc_node_list.h deleted file mode 100644 index 3a472802..00000000 --- a/webfront/DOM/xmldoc_node_list.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_NODE_LIST_H_ -#define __WEBFRONT_XMLDOC_NODE_LIST_H_ - -#include "xmldoc.h" -#include -namespace WebFront { namespace XMLDoc -{ -class Node; -class NodeList -{ -public: - template NodeList(const NodesContainer& container) - { nodes_.resize(container.size()); std::copy(container.cbegin(), container.cend(), nodes_.begin()); } - - size_t length() const { return nodes_.size(); } - std::shared_ptr item(size_t index) const { if (index operator[](size_t index) const { return item(index); } -private: - std::vector> nodes_; -}; - -}} -#endif // __WEBFRONT_XMLDOC_NODE_LIST_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_processing_instruction.h b/webfront/DOM/xmldoc_processing_instruction.h deleted file mode 100644 index ab68152a..00000000 --- a/webfront/DOM/xmldoc_processing_instruction.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_PROCESSING_INSTRUCTION_H_ -#define __WEBFRONT_XMLDOC_PROCESSING_INSTRUCTION_H_ - -#include "xmldoc_node.h" - -namespace WebFront { namespace XMLDoc { - -class ProcessingInstruction : public Node -{ -public: - const std::string& getTarget() const; - const std::string& getData() const; - void setData(const std::string& data) throw(DOMException); - -protected: - ProcessingInstruction() : Node(PROCESSING_INSTRUCTION_NODE) {} - friend class Document; -}; - - -}} -#endif // __WEBFRONT_XMLDOC_PROCESSING_INSTRUCTION_H_ \ No newline at end of file diff --git a/webfront/DOM/xmldoc_text.cpp b/webfront/DOM/xmldoc_text.cpp deleted file mode 100644 index f6a546f0..00000000 --- a/webfront/DOM/xmldoc_text.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "xmldoc_text.h" - -namespace WebFront { namespace XMLDoc { - - -/** - * Splits this node into two nodes at the specified offset. - * @param[in] offset The offset at which to split. - * @return The new node. - * @exception DOMException - * INDEX_SIZE_ERR: Raised if the specified offset is out of range. - *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - */ -std::shared_ptr Text::splitText(unsigned int offset) -{ - /*NOT IMPLEMENTED*/ -/* -* keeping both in the tree as siblings. After being split, this node -* will contain all the content up to the offset point. A -* new node of the same type, which contains all the content at and -* after the offset point, is returned. If the original -* node had a parent node, the new node is inserted as the next sibling -* of the original node. When the offset is equal to the -* length of this node, the new node has no data. -*/ - return nullptr; -} - -}} \ No newline at end of file diff --git a/webfront/DOM/xmldoc_text.h b/webfront/DOM/xmldoc_text.h deleted file mode 100644 index 949939b5..00000000 --- a/webfront/DOM/xmldoc_text.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __WEBFRONT_XMLDOC_TEXT_H_ -#define __WEBFRONT_XMLDOC_TEXT_H_ - -#include "xmldoc_character_data.h" - -namespace WebFront { namespace XMLDoc { - - -class Text : public CharacterData -{ -public: - std::shared_ptr splitText(unsigned int offset) throw(DOMException); - -protected: - Text() : CharacterData(TEXT_NODE) {} - friend class Document; -}; - - -}} -#endif // __WEBFRONT_XMLDOC_TEXT_H_ \ No newline at end of file diff --git a/webfront/net/Socket.hpp b/webfront/net/Socket.hpp deleted file mode 100644 index 0821ad48..00000000 --- a/webfront/net/Socket.hpp +++ /dev/null @@ -1,184 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// socket base classes for MSVC, Linux and Cygwin. -/// -#pragma once -#include "SocketLibOS.hpp" - -#include -#include -#include -#include - -namespace webfront { -namespace net { - -class SocketLib; -class IPv4; - -class SocketException : public std::runtime_error { -public: - explicit SocketException(const std::string& what) : std::runtime_error(what) {} -}; - -class TimeoutException : public std::runtime_error { -public: - explicit TimeoutException(const std::string& what) : std::runtime_error(what) {} -}; - - -template -class Socket : public SockLib, public IPv { -public: - Socket() noexcept : sock(SockLib::invalidSocket) {} - - ~Socket() { - if (sock != SockLib::invalidSocket) { - close(); - } - } - - /// Shutdown and close a socket - void close() { - auto toClose = sock; - sock = SockLib::invalidSocket; - if (toClose != SockLib::invalidSocket) { - ::shutdown(toClose, static_cast(SockLib::Shutdown::ReadWrite)); - SockLib::closeSocket(toClose); - } - } - - void bind() { - if (::bind(sock, reinterpret_cast(&this->sockAddr), sizeof(this->sockAddr)) < 0) - throw SocketException("Error on binding"); - } - - void listen() { - if (::listen(sock, SOMAXCONN) < 0) - throw SocketException("Error on listen"); - } - - Socket accept() { - Socket client; - decltype(IPv::sockAddr) addr; - socklen_t addrSize = sizeof(IPv::sockAddr); - client.sock = ::accept(sock, reinterpret_cast(&addr), &addrSize); - if (client.sock < 0) - throw SocketException("ERROR on accept"); - - return client; - } - - /// Ping the target address - /// @return <0> number of replies, 0 if host is unreachable - /// @return <1> round trip time - std::tuple ping() const noexcept { return SockLib::ping(IPv::getIP()); } - - static constexpr auto nbReplies = 0; - static constexpr auto roundtripTime = 0; - -protected: - typename SockLib::SocketType sock; - - enum class Option { ReuseAddr = SO_REUSEADDR, RcvTimeout = SO_RCVTIMEO, RcvBufferSize = SO_RCVBUF, TTL = IP_TTL }; - enum class Level : uint16_t { Socket = SOL_SOCKET, IP = IPPROTO_IP }; - - /// Set socket option (i.e. setsockopt) - /// @param option option to be modified - /// @param value value which will be affected to option - /// @param level - template - void setOption(Option option, ValueType value, Level level = Level::Socket) const { - auto errorCode = setsockopt(sock, static_cast(level), static_cast(option), - reinterpret_cast(&value), static_cast(sizeof(ValueType))); - if (errorCode == SockLib::socketError) - throw SocketException(std::string("In Socket::setOption : ") + SockLib::getErrorText()); - } - - /// Get socket option (i.e. getsockopt) - /// @param option option from which the value will be get - /// @tparam ValueType type of option's value - template - ValueType getOption(Option option, Level level = Level::Socket) const { - ValueType value; - auto valueSize = static_cast(sizeof(ValueType)); - auto errorCode = ::getsockopt(sock, static_cast(level), static_cast(option), reinterpret_cast(&value), - reinterpret_cast(&valueSize)); - if (errorCode == SockLib::socketError) - throw SocketException(std::string("In Socket::getOption : ") + SockLib::getErrorText()); - - return value; - } -}; - -class IPv4 { -public: - IPv4() noexcept : sockAddr{aiFamily, 0, INADDR_ANY, {}} {} - - std::string getAddress() const noexcept { - char ip[INET_ADDRSTRLEN]; - auto addr = sockAddr.sin_addr; - inet_ntop(aiFamily, &addr, ip, INET_ADDRSTRLEN); - return ip; - } - - auto getIP() const noexcept { return sockAddr.sin_addr.s_addr; } - - void setPort(const sockaddr* addr) noexcept { sockAddr.sin_port = reinterpret_cast(addr)->sin_port; } - void setPort(uint16_t port) noexcept { sockAddr.sin_port = port; } - -protected: - sockaddr_in sockAddr; - static constexpr auto aiFamily = AF_INET; - static constexpr int protoIcmp = IPPROTO_ICMP; -}; - -class IPv6 { -public: - IPv6() noexcept : sockAddr{aiFamily, 0, 0, in6addr_any, 0} {} - - std::string getAddress() const noexcept { - char ip[INET6_ADDRSTRLEN]; - auto addr = sockAddr.sin6_addr; - inet_ntop(aiFamily, &addr, ip, INET6_ADDRSTRLEN); - return ip; - } - - auto getIP() const noexcept { return sockAddr; } - - void setPort(const sockaddr* addr) noexcept { sockAddr.sin6_port = reinterpret_cast(addr)->sin6_port; } - void setPort(uint16_t port) noexcept { sockAddr.sin6_port = port; } - -protected: - sockaddr_in6 sockAddr; - static constexpr auto aiFamily = AF_INET6; - static constexpr int protoIcmp = IPPROTO_ICMPV6; -}; - -class SocketLib : public SocketLibOS { -public: - static void closeSocket(SocketType socket) { - if (!SocketLibOS::closeSocket(socket)) { - throw SocketException("In SocketLib::closeSocket : " + getErrorText()); - } - } - - static void shutdown(SocketType socket, Shutdown direction = Shutdown::ReadWrite) { - if (::shutdown(socket, static_cast(direction)) == socketError) { - throw SocketException("In SocketLib::shutdown : " + getErrorText()); - } - } -}; - -class ScopeExitGuard { - std::function f; -public: - template ScopeExitGuard(Callable&& f) : f(std::forward(f)) {} - ~ScopeExitGuard() { try { f(); } catch(...) {} } -}; - - - -} // namespace net -} // namespace webfront diff --git a/webfront/net/SocketLibOS.hpp b/webfront/net/SocketLibOS.hpp deleted file mode 100644 index d89ec86c..00000000 --- a/webfront/net/SocketLibOS.hpp +++ /dev/null @@ -1,163 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// OS abstration layers for socket libraries. -/// -#pragma once -#include -#include -#include -#include - - -#ifdef WIN32 -#include -#include -#include -#include -#pragma comment(lib, "Ws2_32.lib") -#pragma comment(lib, "iphlpapi.lib") - -namespace webfront { -namespace net { - -class SocketLibOS { -public: - static bool initializeLib() noexcept { - WSADATA wsa_data; - int init_value = WSAStartup(MAKEWORD(2, 2), &wsa_data); - return init_value == 0; - } - - static void cleanupLib() noexcept { WSACleanup(); } - -protected: - using SocketType = SOCKET; - using SockLen = int; - static const SocketType invalidSocket = INVALID_SOCKET; - static const int socketError = SOCKET_ERROR; - enum class Shutdown { Read = SD_SEND, Write = SD_RECEIVE, ReadWrite = SD_BOTH }; - enum class Error { Timeout = WSAETIMEDOUT, WouldBlock = WSAEWOULDBLOCK }; - - static bool closeSocket(SocketType socket) noexcept { return closesocket(socket) != socketError; } - - static auto getLastError() { return WSAGetLastError(); } - static std::string getErrorText(bool prependErrorId = true) { return getErrorText(getLastError(), prependErrorId); } - static std::string getErrorText(int error, bool prependErrorId = true) { - LPVOID lpMsgBuf; - auto bufLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - nullptr, error, 0, reinterpret_cast(&lpMsgBuf), 0, nullptr); - if (bufLen) { - auto lpMsgStr = reinterpret_cast(lpMsgBuf); - std::string result(lpMsgStr, lpMsgStr + bufLen); - LocalFree(lpMsgBuf); - if (prependErrorId) { - result.insert(0, std::to_string(error) + ":"); - } - return result; - } - return std::string(); - } - - static std::tuple ping(uint32_t address) noexcept { - auto icmpFile = IcmpCreateFile(); - - if (icmpFile == INVALID_HANDLE_VALUE) return std::make_tuple(uint8_t(0), std::chrono::milliseconds{0}); - - std::array sendBuffer{"Data Buffer"}; - std::array replyBuffer; - auto replies = - static_cast(IcmpSendEcho(icmpFile, address, sendBuffer.data(), static_cast(sendBuffer.size()), nullptr, - replyBuffer.data(), static_cast(replyBuffer.size()), 1000)); - IcmpCloseHandle(icmpFile); - return std::make_tuple( - replies, std::chrono::microseconds(reinterpret_cast(replyBuffer.data())->RoundTripTime * 1000)); - } - - static constexpr auto toTimeout(const std::chrono::microseconds value) noexcept { - return static_cast(value.count() / 1000); - } -}; -#else -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace webfront { -namespace net { - -class SocketLibOS { -protected: - static auto getLastError() { return errno; } - -public: - static bool initializeLib() noexcept { return true; } - static void cleanupLib() noexcept {} - - static std::string getErrorText(bool prependErrorId = true) { return getErrorText(getLastError(), prependErrorId); } - static std::string getErrorText(int error, bool prependErrorId = true) { - auto errorText = strerror(error); - std::string result(errorText ? errorText : ""); - if (prependErrorId) { - result.insert(0, std::to_string(error) + ":"); - } - return result; - } - - static std::tuple ping(uint32_t address) noexcept { - using namespace std; - using namespace string_literals; - - char addrStrBuffer[INET_ADDRSTRLEN]; - string addressText = inet_ntop(AF_INET, &address, addrStrBuffer, INET_ADDRSTRLEN); - auto command = ::popen(("/bin/ping -c 1 "s + addressText).c_str(), "r"); - if (command == nullptr) return make_tuple(0, std::chrono::microseconds{0}); - - auto nbReplies = 0; - auto tripTime = .0; - regex replyRegex(".*time=\\s*([0-9]+(\\.[0-9]+)?)\\s*ms.*\n*$"); - cmatch timeResult; - array reply; - - while (::fgets(reply.data(), reply.size() - 1, command) != nullptr) { - if (regex_match(reply.data(), timeResult, replyRegex)) { - nbReplies++; - tripTime += stod(timeResult.str(1)); - } - } - if (nbReplies == 0) return make_tuple(0, std::chrono::microseconds{0}); - - return make_tuple(nbReplies, std::chrono::microseconds{uint32_t(1000. * tripTime / nbReplies)}); - } - - static constexpr auto toTimeout(std::chrono::microseconds uSec) noexcept { - timeval timeoutTimeValue{static_cast(uSec.count() / 1000000u), - static_cast(uSec.count() % 1000000u)}; - - return timeoutTimeValue; - } - -protected: - using SocketType = int; - using SockLen = socklen_t; - static const SocketType invalidSocket = -1; - static const int socketError = -1; - - enum class Shutdown { Read = SHUT_RD, Write = SHUT_WR, ReadWrite = SHUT_RDWR }; - enum class Error { Timeout = EAGAIN, WouldBlock = EWOULDBLOCK }; - - static bool closeSocket(SocketType socket) { return ::close(socket) != socketError; } -}; - -#endif - -} // namespace net -} // namespace webfront diff --git a/webfront/net/TCPServer.hpp b/webfront/net/TCPServer.hpp deleted file mode 100644 index 05ae7d5b..00000000 --- a/webfront/net/TCPServer.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "Socket.hpp" - -#include -#include -#include - -namespace webfront { -namespace net { - -class TCPClient { -public: - std::function)> onReceive; -}; - -template -class TCPServer : private Socket { - using Sock = Socket; - -public: - TCPServer(uint16_t port) { - Sock::sock = socket(IPv::aiFamily, SOCK_STREAM, 0); - if (Sock::sock < 0) throw SocketException("Error opening socket"); - - IPv::setPort(port); - Sock::bind(); - Sock::listen(); - - std::cout << "waiting clients on port " << port << '\n'; - Sock::accept(); - std::cout << "end\n"; - } - - void start() { - } - -public: - std::function)> onNewClient; -}; - - -} // namespace net -} // namespace webfront \ No newline at end of file diff --git a/webfront/net/UDPSocket.hpp b/webfront/net/UDPSocket.hpp deleted file mode 100644 index 92b06b28..00000000 --- a/webfront/net/UDPSocket.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// UDP/IP(v4/v6) socket class for MSVC, Linux and Cygwin. -#pragma once -#include "Socket.hpp" - -#include - -namespace webfront { -namespace net { - -template -class UDPSocket : public Socket { - using Sock = Socket; - -public: - static constexpr size_t maxMessageSize = maxDatagramSize; - -public: - /// Initializes an UDP socket and associates it with the given address - /// @param address host name of dotted-decimal IPv4 address or IPv6 hex address - /// @param service service name or port number (i.e. "80" or "http") - void initialize(const std::string& address, const std::string& service) { - addrinfo* addrInfo; - addrinfo hints = {}; - - hints.ai_family = IPv::aiFamily; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; - - auto status = getaddrinfo(address.c_str(), service.c_str(), &hints, &addrInfo); - if (status != 0) throw SocketException(std::string("In UDPSocket::initialize getaddrinfo : ") + gai_strerror(status)); - - ScopeExitGuard releaseAddrinfo([addrInfo]() { freeaddrinfo(addrInfo); }); - - Sock::sock = socket(addrInfo->ai_family, addrInfo->ai_socktype, addrInfo->ai_protocol); - if (Sock::sock == SockLib::invalidSocket) - throw SocketException(std::string("In UDPSocket::initialize socket : ") + SockLib::getErrorText()); - - Sock::setOption(Sock::Option::ReuseAddr, int(1)); - - IPv::setPort(addrInfo->ai_addr); - IPv::sockAddr.sin_addr.s_addr = INADDR_ANY; - - if (::bind(Sock::sock, reinterpret_cast(&this->sockAddr), sizeof(IPv::sockAddr)) == - SockLib::socketError) { - auto errorText = SockLib::getErrorText(); - SocketLib::closeSocket(Sock::sock); - throw SocketException(std::string("In UDPSocket::initialize bind : ") + errorText); - } - - IPv::sockAddr = *(reinterpret_cast(addrInfo->ai_addr)); - - if (::connect(Sock::sock, reinterpret_cast(&this->sockAddr), sizeof(IPv::sockAddr)) == SockLib::socketError) - throw SocketException(std::string("In UDPSocket::initialize connect : ") + SockLib::getErrorText()); - } - - template - void setReceiveTimeout(std::chrono::duration timeout) const { - auto uSec = std::chrono::duration_cast(timeout); - Sock::setOption(Sock::Option::RcvTimeout, SockLib::toTimeout(uSec)); - } - - void enlargeReceiveBufferSize(size_t size) const { - auto actualBufferSize = static_cast(Sock::template getOption(Sock::Option::RcvBufferSize)); - if (actualBufferSize < size) Sock::setOption(Sock::Option::RcvBufferSize, static_cast(size)); - } - - /// Send data - /// @tparam Buffer a type which exposes data() and size() members - /// @param buffer data to be sent - template - void send(Buffer buffer) const { - auto data = reinterpret_cast(buffer.data()); - auto remainingDataToSend = static_cast(buffer.size()); - while (remainingDataToSend > 0) { - auto sent = ::send(Sock::sock, data, static_cast(std::min(maxDatagramSize, remainingDataToSend)), 0); - if (sent == SockLib::socketError) - throw SocketException(std::string("In UDPSocket::send : ") + SockLib::getErrorText()); - remainingDataToSend -= sent; - data += sent; - } - } - - /// Receive a datagram - /// @param buffer pointer on the buffer which will receive the data - /// @return number of received bytes - size_t receive(std::span buffer) const { - auto received = ::recv(Sock::sock, reinterpret_cast(buffer.data()), static_cast(buffer.size()), 0); - - if (received == SockLib::socketError) { - auto error = Sock::getLastError(); - auto errorNo = static_cast(error); - if ((errorNo == SockLib::Error::Timeout) || (errorNo == SockLib::Error::WouldBlock)) - throw TimeoutException("Timeout on UDPSocket::receive"); - - throw SocketException(std::string("In UDPSocket::receive : ") + SockLib::getErrorText(error)); - } - - return received; - } -}; - -} // namespace net -} // namespace webfront - diff --git a/webfront/system/Socket.hpp b/webfront/system/Socket.hpp deleted file mode 100644 index 2fd1e8db..00000000 --- a/webfront/system/Socket.hpp +++ /dev/null @@ -1,149 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// socket base classes for MSVC, Linux and Cygwin. -/// -#pragma once -#include - -#include -#include -#include -#include - -namespace webfront { -namespace net { - -class SocketLib; -class IPv4; -class SocketException; - -template -class Socket : public SockLib, public IPv { -public: - Socket() noexcept : sock(SockLib::invalidSocket) {} - - ~Socket() { - if (sock != SockLib::invalidSocket) { - close(); - } - } - - /// Shutdown and close a socket - void close() { - auto toClose = sock; - sock = SockLib::invalidSocket; - if (toClose != SockLib::invalidSocket) { - ::shutdown(toClose, static_cast(SockLib::Shutdown::ReadWrite)); - SockLib::closeSocket(toClose); - } - } - - /// Ping the target address - /// @return <0> number of replies, 0 if host is unreachable - /// @return <1> round trip time - std::tuple ping() const noexcept { return SockLib::ping(IPv::getIP()); } - - static constexpr auto nbReplies = 0; - static constexpr auto roundtripTime = 0; - -protected: - typename SockLib::SocketType sock; - - enum class Option { ReuseAddr = SO_REUSEADDR, RcvTimeout = SO_RCVTIMEO, RcvBufferSize = SO_RCVBUF, TTL = IP_TTL }; - enum class Level : uint16_t { Socket = SOL_SOCKET, IP = IPPROTO_IP }; - - /// Set socket option (i.e. setsockopt) - /// @param option option to be modified - /// @param value value which will be affected to option - /// @param level - template - void setOption(Option option, ValueType value, Level level = Level::Socket) const { - auto errorCode = setsockopt(sock, static_cast(level), static_cast(option), - reinterpret_cast(&value), static_cast(sizeof(ValueType))); - if (errorCode == SockLib::socketError) - throw SocketException(std::string("In Socket::setOption : ") + SockLib::getErrorText()); - } - - /// Get socket option (i.e. getsockopt) - /// @param option option from which the value will be get - /// @tparam ValueType type of option's value - template - ValueType getOption(Option option, Level level = Level::Socket) const { - ValueType value; - auto valueSize = static_cast(sizeof(ValueType)); - auto errorCode = ::getsockopt(sock, static_cast(level), static_cast(option), reinterpret_cast(&value), - reinterpret_cast(&valueSize)); - if (errorCode == SockLib::socketError) - throw SocketException(std::string("In Socket::getOption : ") + SockLib::getErrorText()); - - return value; - } -}; - -class IPv4 { -public: - IPv4() noexcept : sockAddr{aiFamily, 0, INADDR_ANY, {}} {} - - std::string getAddress() const noexcept { - char ip[INET_ADDRSTRLEN]; - auto addr = sockAddr.sin_addr; - inet_ntop(aiFamily, &addr, ip, INET_ADDRSTRLEN); - return ip; - } - - auto getIP() const noexcept { return sockAddr.sin_addr.s_addr; } - - void setPort(const sockaddr* addr) noexcept { sockAddr.sin_port = reinterpret_cast(addr)->sin_port; } - -protected: - sockaddr_in sockAddr; - static constexpr auto aiFamily = AF_INET; - static constexpr int protoIcmp = IPPROTO_ICMP; -}; - -class IPv6 { -public: - IPv6() noexcept : sockAddr{aiFamily, 0, 0, in6addr_any, 0} {} - - std::string getAddress() const noexcept { - char ip[INET6_ADDRSTRLEN]; - auto addr = sockAddr.sin6_addr; - inet_ntop(aiFamily, &addr, ip, INET6_ADDRSTRLEN); - return ip; - } - - auto getIP() const noexcept { return sockAddr; } - - void setPort(const sockaddr* addr) noexcept { sockAddr.sin6_port = reinterpret_cast(addr)->sin6_port; } - -protected: - sockaddr_in6 sockAddr; - static constexpr auto aiFamily = AF_INET6; - static constexpr int protoIcmp = IPPROTO_ICMPV6; -}; - -class SocketLib : public SocketLibOS { -public: - static void closeSocket(SocketType socket) { - if (!SocketLibOS::closeSocket(socket)) { - throw SocketException("In SocketLib::closeSocket : " + getErrorText()); - } - } - - static void shutdown(SocketType socket, Shutdown direction = Shutdown::ReadWrite) { - if (::shutdown(socket, static_cast(direction)) == socketError) { - throw SocketException("In SocketLib::shutdown : " + getErrorText()); - } - } -}; - -class SocketException : public std::runtime_error { -public: - explicit SocketException(const std::string& what) : std::runtime_error(what) {} -}; - - - -} // namespace net -} // namespace webfront diff --git a/webfront/system/SocketLibOS.hpp b/webfront/system/SocketLibOS.hpp deleted file mode 100644 index 9db87434..00000000 --- a/webfront/system/SocketLibOS.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// OS abstration layers for socket libraries. -/// -#pragma once -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#include -#include -#pragma comment(lib, "Ws2_32.lib") -#pragma comment(lib, "iphlpapi.lib") - -namespace webfront { -namespace net { - -class SocketLibOS { -public: - static bool initializeLib() noexcept { - WSADATA wsa_data; - int init_value = WSAStartup(MAKEWORD(2, 2), &wsa_data); - return init_value == 0; - } - - static void cleanupLib() noexcept { WSACleanup(); } - -protected: - using SocketType = SOCKET; - using SockLen = int; - static const SocketType invalidSocket = INVALID_SOCKET; - static const int socketError = SOCKET_ERROR; - enum class Shutdown { Read = SD_SEND, Write = SD_RECEIVE, ReadWrite = SD_BOTH }; - enum class Error { Timeout = WSAETIMEDOUT, WouldBlock = WSAEWOULDBLOCK }; - - static bool closeSocket(SocketType socket) noexcept { return closesocket(socket) != socketError; } - - static auto getLastError() { return WSAGetLastError(); } - static std::string getErrorText(bool prependErrorId = true) { return getErrorText(getLastError(), prependErrorId); } - static std::string getErrorText(int error, bool prependErrorId = true) { - LPVOID lpMsgBuf; - auto bufLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - nullptr, error, 0, reinterpret_cast(&lpMsgBuf), 0, nullptr); - if (bufLen) { - auto lpMsgStr = reinterpret_cast(lpMsgBuf); - std::string result(lpMsgStr, lpMsgStr + bufLen); - LocalFree(lpMsgBuf); - if (prependErrorId) { - result.insert(0, std::to_string(error) + ":"); - } - return result; - } - return std::string(); - } - - static std::tuple ping(uint32_t address) noexcept { - auto icmpFile = IcmpCreateFile(); - - if (icmpFile == INVALID_HANDLE_VALUE) return std::make_tuple(uint8_t(0), std::chrono::milliseconds{0}); - - std::array sendBuffer{"Data Buffer"}; - std::array replyBuffer; - auto replies = - static_cast(IcmpSendEcho(icmpFile, address, sendBuffer.data(), static_cast(sendBuffer.size()), nullptr, - replyBuffer.data(), static_cast(replyBuffer.size()), 1000)); - IcmpCloseHandle(icmpFile); - return std::make_tuple( - replies, std::chrono::microseconds(reinterpret_cast(replyBuffer.data())->RoundTripTime * 1000)); - } - - static constexpr auto toTimeout(const std::chrono::microseconds value) noexcept { - return static_cast(value.count() / 1000); - } -}; -#else -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -class SocketLibOS { -protected: - static auto getLastError() { return errno; } - -public: - static bool initializeLib() noexcept { return true; } - static void cleanupLib() noexcept {} - - static std::string getErrorText(bool prependErrorId = true) { return getErrorText(getLastError(), prependErrorId); } - static std::string getErrorText(int error, bool prependErrorId = true) { - auto errorText = strerror(error); - std::string result(errorText ? errorText : ""); - if (prependErrorId) { - result.insert(0, std::to_string(error) + ":"); - } - return result; - } - - static std::tuple ping(uint32_t address) noexcept { - using namespace std; - using namespace string_literals; - - char addrStrBuffer[INET_ADDRSTRLEN]; - string addressText = inet_ntop(AF_INET, &address, addrStrBuffer, INET_ADDRSTRLEN); - auto command = ::popen(("/bin/ping -c 1 "s + addressText).c_str(), "r"); - if (command == nullptr) return make_tuple(0, std::chrono::microseconds{0}); - - auto nbReplies = 0; - auto tripTime = .0; - regex replyRegex(".*time=\\s*([0-9]+(\\.[0-9]+)?)\\s*ms.*\n*$"); - cmatch timeResult; - array reply; - - while (::fgets(reply.data(), reply.size() - 1, command) != nullptr) { - if (regex_match(reply.data(), timeResult, replyRegex)) { - nbReplies++; - tripTime += stod(timeResult.str(1)); - } - } - if (nbReplies == 0) return make_tuple(0, std::chrono::microseconds{0}); - - return make_tuple(nbReplies, std::chrono::microseconds{uint32_t(1000. * tripTime / nbReplies)}); - } - - static constexpr auto toTimeout(std::chrono::microseconds uSec) noexcept { - timeval timeoutTimeValue{static_cast(uSec.count() / 1000000u), - static_cast(uSec.count() % 1000000u)}; - - return timeoutTimeValue; - } - -protected: - using SocketType = int; - using SockLen = socklen_t; - static const SocketType invalidSocket = -1; - static const int socketError = -1; - - enum class Shutdown { Read = SHUT_RD, Write = SHUT_WR, ReadWrite = SHUT_RDWR }; - enum class Error { Timeout = EAGAIN, WouldBlock = EWOULDBLOCK }; - - static bool closeSocket(SocketType socket) { return ::close(socket) != socketError; } -}; - -#endif - -} // namespace net -} // namespace webfront diff --git a/webfront/system/UDPSocket.hpp b/webfront/system/UDPSocket.hpp deleted file mode 100644 index 12445303..00000000 --- a/webfront/system/UDPSocket.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/// @date 13/08/2015 -/// @author Ambroise Leclerc -/// -/// UDP/IP(v4/v6) socket class for MSVC, Linux and Cygwin. -#pragma once -#include -#include - -namespace webfront { -namespace net { - -template -class UDPSocket : public Socket { - using Sock = Socket; - -public: - static constexpr size_t maxMessageSize = maxDatagramSize; - -public: - /// Initializes an UDP socket and associates it with the given address - /// @param address host name of dotted-decimal IPv4 address or IPv6 hex address - /// @param service service name or port number (i.e. "80" or "http") - void initialize(const std::string& address, const std::string& service) { - addrinfo* addrInfo; - addrinfo hints = {}; - - hints.ai_family = IPv::aiFamily; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; - - auto status = getaddrinfo(address.c_str(), service.c_str(), &hints, &addrInfo); - if (status != 0) throw SocketException(std::string("In UDPSocket::initialize getaddrinfo : ") + gai_strerror(status)); - - ScopeExitGuard releaseAddrinfo([addrInfo]() { freeaddrinfo(addrInfo); }); - - Sock::sock = socket(addrInfo->ai_family, addrInfo->ai_socktype, addrInfo->ai_protocol); - if (Sock::sock == SockLib::invalidSocket) - throw SocketException(std::string("In UDPSocket::initialize socket : ") + SockLib::getErrorText()); - - Sock::setOption(Sock::Option::ReuseAddr, int(1)); - - IPv::setPort(addrInfo->ai_addr); - IPv::sockAddr.sin_addr.s_addr = INADDR_ANY; - - if (::bind(Sock::sock, reinterpret_cast(&this->sockAddr), sizeof(IPv::sockAddr)) == - SockLib::socketError) { - auto errorText = SockLib::getErrorText(); - SocketLib::closeSocket(Sock::sock); - throw SocketException(std::string("In UDPSocket::initialize bind : ") + errorText); - } - - IPv::sockAddr = *(reinterpret_cast(addrInfo->ai_addr)); - - if (::connect(Sock::sock, reinterpret_cast(&this->sockAddr), sizeof(IPv::sockAddr)) == SockLib::socketError) - throw SocketException(std::string("In UDPSocket::initialize connect : ") + SockLib::getErrorText()); - } - - template - void setReceiveTimeout(std::chrono::duration timeout) const { - auto uSec = std::chrono::duration_cast(timeout); - Sock::setOption(Sock::Option::RcvTimeout, SockLib::toTimeout(uSec)); - } - - void enlargeReceiveBufferSize(size_t size) const { - auto actualBufferSize = static_cast(Sock::template getOption(Sock::Option::RcvBufferSize)); - if (actualBufferSize < size) Sock::setOption(Sock::Option::RcvBufferSize, static_cast(size)); - } - - /// Send data - /// @tparam Buffer a type which exposes data() and size() members - /// @param buffer data to be sent - template - void send(Buffer buffer) const { - auto data = reinterpret_cast(buffer.data()); - auto remainingDataToSend = static_cast(buffer.size()); - while (remainingDataToSend > 0) { - auto sent = ::send(Sock::sock, data, static_cast(std::min(maxDatagramSize, remainingDataToSend)), 0); - if (sent == SockLib::socketError) - throw SocketException(std::string("In UDPSocket::send : ") + SockLib::getErrorText()); - remainingDataToSend -= sent; - data += sent; - } - } - - /// Receive a datagram - /// @param buffer pointer on the buffer which will receive the data - /// @return number of received bytes - size_t receive(std::span buffer) const { - auto received = ::recv(Sock::sock, reinterpret_cast(buffer.data()), static_cast(buffer.size()), 0); - - if (received == SockLib::socketError) { - auto error = Sock::getLastError(); - auto errorNo = static_cast(error); - if ((errorNo == SockLib::Error::Timeout) || (errorNo == SockLib::Error::WouldBlock)) - throw TimeoutException("Timeout on UDPSocket::receive"); - - throw SocketException(std::string("In UDPSocket::receive : ") + SockLib::getErrorText(error)); - } - - return received; - } -}; - -} // namespace net -} // namespace webfront - diff --git a/webfront/utils/Delegate.hpp b/webfront/utils/Delegate.hpp deleted file mode 100644 index a6b3d80c..00000000 --- a/webfront/utils/Delegate.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/// @data 31/07/2017 19:32:53 -/// @author Ambroise Leclerc -/// @brief Webfront main UI -// -// Copyright (c) 2017, Ambroise Leclerc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * 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. -// * Neither the name of the copyright holders nor the names of -// 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 OWNER 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. - -#include -#include - -template -class Delegate { -public: - void call(DelegateArgs... args) { - for (auto& callee : delegates) - callee(args...); - } - - Delegate& operator+=(std::function func) { - delegates.push_back(func); - return *this; - } - - Delegate& operator=(std::function func) { - delegates.clear(); - delegates.push_back(func); - return *this; - } - - bool isDefined() const { return !delegates.empty(); } - -private: - std::list> delegates; -}; \ No newline at end of file diff --git a/webfront/utils/StringHash.hpp b/webfront/utils/StringHash.hpp deleted file mode 100644 index 20c97e35..00000000 --- a/webfront/utils/StringHash.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/// @data 31/07/2017 19:32:53 -/// @author Ambroise Leclerc -/// @brief StringHash provides constexpr string hash function in order to generate -/// compile-time integer hashes for string : -/// switch (StringHash::calc(command.c_str())) { -/// case "click"_hash : onClick.call(); break; -/// case "mouseup"_hash : onMouseUp.call(); break; -/// } - -// -// Copyright (c) 2017, Ambroise Leclerc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * 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. -// * Neither the name of the copyright holders nor the names of -// 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 OWNER 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. - -#include - -class StringHash { -public: - using type = uint32_t; - - static type calc(const char* zStr, type seed = 0) { - while (*zStr) { - seed = seed * 101 + *zStr++; - } - return seed; - } - - template - static type calc(Iter first, Iter last, type seed = 0) { - while (first != last) { - seed = seed * 101 + *first++; - } - return seed; - } - - - -private: - static constexpr type compileTime(const char* zStr, type seed = 0) { - return *zStr ? (compileTime(zStr + 1, (seed * 101ull) + *zStr)) : seed; - } - - friend constexpr type operator""_hash(char const* zStr, size_t); -}; - -constexpr StringHash::type operator""_hash(char const* zStr, size_t) { - return StringHash::compileTime(zStr); -} From 180200218c79bd6abf1197cf6d0a738c6b172736 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 10:36:39 +0200 Subject: [PATCH 2/7] Point the WKWebView test bundle at its relocated Info.plist template [#320] --- cmake/WKWebViewSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/WKWebViewSupport.cmake b/cmake/WKWebViewSupport.cmake index 4918e4a6..02a96287 100644 --- a/cmake/WKWebViewSupport.cmake +++ b/cmake/WKWebViewSupport.cmake @@ -43,6 +43,6 @@ function(webfront_add_wkwebview_tests) set_target_properties(${target} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_GUI_IDENTIFIER "org.webfront.tests.${identifier}" - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/WKWebViewTestInfo.plist.in") + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/cmake/WKWebViewTestInfo.plist.in") endforeach() endfunction() From 2da9a00c91a477a795df08d33d8769fa7124c60c Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 10:47:10 +0200 Subject: [PATCH 3/7] Normalize the relocated WKWebView Info.plist template path [#320] --- cmake/WKWebViewSupport.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/WKWebViewSupport.cmake b/cmake/WKWebViewSupport.cmake index 02a96287..fc7dfa6b 100644 --- a/cmake/WKWebViewSupport.cmake +++ b/cmake/WKWebViewSupport.cmake @@ -38,11 +38,13 @@ function(webfront_add_wkwebview_tests) webfront_set_browser_test_properties("WKWebViewClassImages-${order}" "${webtest_source_dir}" 90) endforeach() # Stable agent bundles avoid one anonymous executable tile per test process in the Dock. + # The path is normalized: a second spelling of the template would be a duplicate Ninja output. + get_filename_component(_wk_plist "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/cmake/WKWebViewTestInfo.plist.in" ABSOLUTE) foreach(target webtest frontend_lifecycle wkwebview_lifecycle wkwebview_class_images) string(REPLACE "_" "-" identifier "${target}") set_target_properties(${target} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_GUI_IDENTIFIER "org.webfront.tests.${identifier}" - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../test/cmake/WKWebViewTestInfo.plist.in") + MACOSX_BUNDLE_INFO_PLIST "${_wk_plist}") endforeach() endfunction() From 937aa8477273322b5d38fcef36fd69320fa0f1d2 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 11:26:13 +0200 Subject: [PATCH 4/7] Make the repository layout check work on source archives; fix publishing paths [#320] --- js/developer/tools/PUBLISHING.md | 4 ++-- test/cmake/CheckRepositoryLayout.cmake | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/js/developer/tools/PUBLISHING.md b/js/developer/tools/PUBLISHING.md index b6c7cc42..a45a3f68 100644 --- a/js/developer/tools/PUBLISHING.md +++ b/js/developer/tools/PUBLISHING.md @@ -68,8 +68,8 @@ Check the canonical Pages URL, its `Access-Control-Allow-Origin` response and th Then run the optional live smoke test (the ordinary CTest suite remains entirely offline): ```sh -./build-native/webtest/developer_integration \ - "$PWD/build-distribution" "$PWD/build-native/webtest/public-generated" --public +./build-native/test/web/developer_integration \ + "$PWD/build-distribution" "$PWD/build-native/test/web/public-generated" --public ``` This mode downloads the pinned environment and both starters from Pages, fetches exact React/React DOM diff --git a/test/cmake/CheckRepositoryLayout.cmake b/test/cmake/CheckRepositoryLayout.cmake index 979c5f44..612349aa 100644 --- a/test/cmake/CheckRepositoryLayout.cmake +++ b/test/cmake/CheckRepositoryLayout.cmake @@ -27,11 +27,16 @@ if(GIT_EXECUTABLE AND EXISTS "${ROOT}/.git") endif() endif() if(NOT from_git) - # A source archive holds only tracked content. + # A source archive holds tracked content only, minus its export-ignore entries; a local + # checkout without Git metadata may also hold build trees, which are not tracked content. file(GLOB entries LIST_DIRECTORIES true RELATIVE "${ROOT}" "${ROOT}/*" "${ROOT}/.[!.]*") + list(FILTER entries EXCLUDE REGEX "^build") set(actual ${entries}) endif() -list(REMOVE_ITEM actual "") +# .gitattributes and .gitignore are export-ignored, so archives legitimately lack them. +set(archive_optional .gitattributes .gitignore) +list(REMOVE_ITEM actual "" ${archive_optional}) +list(REMOVE_ITEM expected ${archive_optional}) list(REMOVE_DUPLICATES actual) list(SORT actual) list(SORT expected) From f00ddb5062bf231533792c293a0be3522c0a5231 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 11:32:03 +0200 Subject: [PATCH 5/7] Detect Git automatically in the repository layout check and skip .git [#320] --- test/cmake/CheckRepositoryLayout.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/cmake/CheckRepositoryLayout.cmake b/test/cmake/CheckRepositoryLayout.cmake index 612349aa..0ff3c946 100644 --- a/test/cmake/CheckRepositoryLayout.cmake +++ b/test/cmake/CheckRepositoryLayout.cmake @@ -14,6 +14,9 @@ set(expected set(actual "") set(from_git OFF) +if(NOT GIT_EXECUTABLE) + find_program(GIT_EXECUTABLE git) +endif() if(GIT_EXECUTABLE AND EXISTS "${ROOT}/.git") execute_process(COMMAND "${GIT_EXECUTABLE}" ls-files WORKING_DIRECTORY "${ROOT}" OUTPUT_VARIABLE tracked RESULT_VARIABLE git_result ERROR_QUIET) @@ -30,7 +33,7 @@ if(NOT from_git) # A source archive holds tracked content only, minus its export-ignore entries; a local # checkout without Git metadata may also hold build trees, which are not tracked content. file(GLOB entries LIST_DIRECTORIES true RELATIVE "${ROOT}" "${ROOT}/*" "${ROOT}/.[!.]*") - list(FILTER entries EXCLUDE REGEX "^build") + list(FILTER entries EXCLUDE REGEX "^(build|\\.git$)") set(actual ${entries}) endif() # .gitattributes and .gitignore are export-ignored, so archives legitimately lack them. From 690fe68adb895a02aa83b572cbcaf1e0f03c7829 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 11:36:13 +0200 Subject: [PATCH 6/7] Remove the CodeScene configuration [#320] --- .codescene/code-health-rules.json | 60 -------------------------- test/cmake/CheckRepositoryLayout.cmake | 2 +- 2 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 .codescene/code-health-rules.json diff --git a/.codescene/code-health-rules.json b/.codescene/code-health-rules.json deleted file mode 100644 index a4f7355c..00000000 --- a/.codescene/code-health-rules.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "usage": "CodeScene code health rules for this repository. third_party/ holds pinned upstream distributions (see docs/EMBEDDED_ASSETS.md) that are copied verbatim or reproducibly bundled and never edited here, so function and module size heuristics are disabled for them.", - "rule_sets": [ - { - "matching_content_path": "third_party/**", - "matching_content_path_doc": "Vendored third-party code, refreshed only with cmake/UpdateXterm.cmake or js/developer/vendor/update.mjs.", - "rules": [ - { "name": "Complex Method", "weight": 0.0 }, - { "name": "Bumpy Road Ahead", "weight": 0.0 }, - { "name": "Complex Conditional", "weight": 0.0 }, - { "name": "Excess Number of Function Arguments", "weight": 0.0 }, - { "name": "Deep, Nested Complexity", "weight": 0.0 }, - { "name": "Large Method", "weight": 0.0 }, - { "name": "Brain Method", "weight": 0.0 }, - { "name": "Overall Code Complexity", "weight": 0.0 }, - { "name": "Lines of Code in a Single File", "weight": 0.0 }, - { "name": "Number of Functions in a Single Module", "weight": 0.0 }, - { "name": "Code Duplication", "weight": 0.0 }, - { "name": "Primitive Obsession", "weight": 0.0 }, - { "name": "String Heavy Function Arguments", "weight": 0.0 }, - { "name": "Low Cohesion", "weight": 0.0 } - ] - }, - { - "matching_content_path": "include/webfront/components/Terminal.hpp", - "matching_content_path_doc": "A text command-line interface: its API and helpers take command names, help texts and command lines, which are strings by nature. Wrapping them in structs only to lower the ratio would make the public API (terminal.command(name, help, handler)) harder to read.", - "rules": [ - { "name": "String Heavy Function Arguments", "weight": 0.0 } - ] - }, - { - "matching_content_path": "js/*/**/*.bundle.mjs", - "matching_content_path_doc": "Minified esbuild output of the sources next to it, checked in so that the bootstrap and package resolver need no Node.js at consumption time. It is regenerated by js/developer/tools/build.mjs --refresh-bootstrap and verified against js/developer/environment/bundles.json, never edited by hand; the readable sources are analysed instead.", - "rules": [ - { "name": "Complex Method", "weight": 0.0 }, - { "name": "Bumpy Road Ahead", "weight": 0.0 }, - { "name": "Complex Conditional", "weight": 0.0 }, - { "name": "Excess Number of Function Arguments", "weight": 0.0 }, - { "name": "Deep, Nested Complexity", "weight": 0.0 }, - { "name": "Large Method", "weight": 0.0 }, - { "name": "Brain Method", "weight": 0.0 }, - { "name": "Overall Code Complexity", "weight": 0.0 }, - { "name": "Lines of Code in a Single File", "weight": 0.0 }, - { "name": "Number of Functions in a Single Module", "weight": 0.0 }, - { "name": "Code Duplication", "weight": 0.0 }, - { "name": "Primitive Obsession", "weight": 0.0 }, - { "name": "String Heavy Function Arguments", "weight": 0.0 }, - { "name": "Low Cohesion", "weight": 0.0 } - ] - }, - { - "matching_content_path": "include/webfront/system/DeveloperStore.hpp", - "matching_content_path_doc": "The store implements the webfront.developer.* bridge callbacks, whose identifiers, project paths, offsets and flags arrive as primitives from the browser. Wrapping them in types only to lower the ratio would obscure the bridge contract.", - "rules": [ - { "name": "String Heavy Function Arguments", "weight": 0.0 }, - { "name": "Primitive Obsession", "weight": 0.0 } - ] - } - ] -} diff --git a/test/cmake/CheckRepositoryLayout.cmake b/test/cmake/CheckRepositoryLayout.cmake index 0ff3c946..66c3c2fa 100644 --- a/test/cmake/CheckRepositoryLayout.cmake +++ b/test/cmake/CheckRepositoryLayout.cmake @@ -8,7 +8,7 @@ if(NOT ROOT) endif() set(expected - .clang-format .clang-tidy .codescene .devcontainer .gitattributes .github .gitignore + .clang-format .clang-tidy .devcontainer .gitattributes .github .gitignore AGENTS.md CMakeLists.txt README.md cmake docs examples include js test third_party) From dced52b1d23353e5f393c4583f89ed4043428cee Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Thu, 22 Oct 2026 11:40:30 +0200 Subject: [PATCH 7/7] Remove the Codecov upload and configuration [#320] --- .github/codecov.yml | 12 ------------ .github/workflows/BuildAndTest.yml | 7 ------- AGENTS.md | 4 ++-- README.md | 2 +- docs/CHANGELOG.md | 1 + docs/PROJECT_STATUS.md | 2 +- 6 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index a27a2211..00000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,12 +0,0 @@ -coverage: - status: - project: - default: - target: auto - threshold: 0.2% - patch: - default: - target: 95% -ignore: - - "test/web/**" - - "examples/**" diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index 9c4cc495..311879ae 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -151,13 +151,6 @@ jobs: lcov --ignore-errors inconsistent,inconsistent --gcov-tool gcov-16 --capture --directory . --output-file coverage.info lcov --ignore-errors inconsistent,inconsistent --remove coverage.info '/usr/*' '*/examples/*' --output-file coverage.info lcov --list coverage.info - - name: Upload coverage - if: runner.os == 'Linux' - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7 - with: - files: build/coverage.info - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - name: Retain test timings and diagnostics if: always() uses: actions/upload-artifact@v4 diff --git a/AGENTS.md b/AGENTS.md index a7ca1025..8bd25e82 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati - `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment, terminal/`wf` components, build and vendoring tools. Production C++ remains header-only in `include/webfront/`. - `js/developer/tools/starters/pi/`, `test/fixtures/`, `test/web/fixtures/`: retained package and regression fixtures, not public example applications. - `test/unit/`: Catch2 unit tests; `test/web/`: Jasmine real-browser integration test; `test/fuzz/`, `test/fixtures/`; `test/cmake/`: CMake test scripts and sub-projects. The `RepositoryLayout` CTest case pins the tracked root. -- `cmake/`: build modules (frontends, CEF, CPM, compiler options); `.github/`: workflows, `.github/CONTRIBUTING.md`, `.github/codecov.yml`. +- `cmake/`: build modules (frontends, CEF, CPM, compiler options); `.github/`: workflows, `.github/CONTRIBUTING.md`. - `.devcontainer/`: devcontainer and its Dockerfile; `docs/`: documentation, `docs/CHANGELOG.md`, `docs/Doxyfile.in`. - `third_party/xterm/`: vendored xterm.js distribution embedded by the terminal component; refresh it only with `cmake/UpdateXterm.cmake`. - `docs/PROJECT_STATUS.md`: evidence-based status snapshot and known limitations. @@ -30,7 +30,7 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati - `docs/UI_COMPONENTS.md`: UI component architecture, the terminal component and the planned `wf` tool manager. - `docs/ISSUE_AUDIT.md`: recommendations for the current GitHub backlog. -The historical `webfront/` prototype and the former top-level `test/web/` are gone: use `test/unit/` for current C++ tests and `test/web/` for browser tests. Do not revive legacy code without a specific issue and regression coverage. +The historical `webfront/` prototype and the former top-level `webtest/` are gone: use `test/unit/` for current C++ tests and `test/web/` for browser tests. Do not revive legacy code without a specific issue and regression coverage. ## Build and test commands diff --git a/README.md b/README.md index 49c01b21..352aaa8f 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ Tests and the `webfront-embedded-assets` regeneration target require Node.js, in CTest runs up to four tasks at a time; browser ports remain locked and embedded builds run serially. See [test timings and parallelism](docs/TEST_PERFORMANCE.md) for measurements and constraints. -CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also uploads GCC coverage on each PR. Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly and on demand. Manual dispatch with `repeat_desktop_tests=true` also repeats each desktop CTest case three times for stability checks. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. +CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also collects and prints GCC line coverage (no external upload). Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly and on demand. Manual dispatch with `repeat_desktop_tests=true` also repeats each desktop CTest case three times for stability checks. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. ## Contracts and limitations diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1a8ddb91..6a2260af 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -13,6 +13,7 @@ until #319). `assets/` and `tools/` become `js/core` and `js/developer`; `webtest/` becomes `test/web`, `fuzz/` becomes `test/fuzz`, unit tests move to `test/unit`; `CHANGELOG.md`, `Doxyfile.in` move to `docs/`, `CONTRIBUTING.md` and `codecov.yml` to `.github/`, `Dockerfile` to `.devcontainer/`. Moves keep Git history. +- Remove the CodeScene configuration and the Codecov upload (`.github/codecov.yml`, `CODECOV_TOKEN`); the Linux job still prints an lcov summary. - Developer distribution 0.4.1 (pending `developer-v0.4.1` publication): generated providers include ``. Published 0.4.0 remains immutable. diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 3d85d146..70a753f9 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -50,7 +50,7 @@ published 0.1.0 to 0.4.0 remain immutable. APIs and packaging remain experimenta - The README starts with Hello World and a linked Life thumbnail, then walks through the native bootstrap, dependency installation, preview and offline embedding. No library feature is added. - Per-change CI combines unit tests and native browser coverage into three desktop jobs, with - npm, CPM and compiler caches. The Linux job uploads GCC coverage on every PR. Sanitizers, fuzzing, + npm, CPM and compiler caches. The Linux job prints GCC line coverage on every PR (no external upload). Sanitizers, fuzzing, both CEF compiler variants and optional mddlog qualification run weekly or manually. Superseded runs are cancelled. - Developer distribution 0.4.0 is published for the revised Life text (`developer-v0.4.0`). - The dated entries below record earlier implementations and their original target names.