Commit Graph

393 Commits

Author SHA1 Message Date
a022383d63 Improve error handling for FetchBlobConfig
Replaces fire-and-forget async call to FetchBlobConfig with a safe pattern that logs errors if the task fails. This ensures exceptions are not silently ignored and improves reliability.
2025-08-17 22:34:31 +09:00
d0c031fe32 Fix async context handling in blob config loading
Added ConfigureAwait(false) to async HTTP call and moved Compile() invocation to immediately after deserialization. This improves async context handling and ensures blob config is compiled before assignment.
2025-08-17 21:22:17 +09:00
6896c272ef
Update WelsonJS.Toolkit/WelsonJS.Launcher/TraceLogger.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-17 20:58:08 +09:00
f44f56ea2c Refactor HTTP client usage in ResourceServer
Replaced local HttpClient instantiation with the class-level _httpClient for sending requests. This improves resource management and consistency in HTTP operations.
2025-08-17 20:43:33 +09:00
cc08c46886 Improve logging and async handling in ResourceServer
ResourceServer now defaults to using TraceLogger if no logger is provided and properly awaits FetchBlobConfig. FetchBlobConfig is refactored to return a Task and handle missing configuration more gracefully. TraceLogger now writes logs to a file named after its namespace and sets up a TextWriterTraceListener for persistent logging.
2025-08-17 20:12:38 +09:00
8ecdf99d78 Add ICompatibleLogger interface and integrate logging
Introduced ICompatibleLogger interface and TraceLogger implementation to enable flexible logging. ResourceServer now uses ICompatibleLogger for error reporting instead of Trace, improving testability and future extensibility. Updated project file to include new logger classes.
2025-08-16 21:23:16 +09:00
2068cdfeb3 Refactor WebSocket communication logic
Replaces manual WebSocket send/receive code with a single call to _wsManager.SendAndReceiveAsync for improved clarity and maintainability. Updates comments for better readability and removes redundant exception handling for OperationCanceledException.
2025-08-14 04:43:13 +09:00
6893eadd04 Improve WebSocket receive buffer handling
Refactored TrySendAndReceiveAsync to use a fixed-size buffer for I/O and dynamically accumulate received data chunks until EndOfMessage. This prevents truncation of large messages and ensures the entire payload is received before decoding.
2025-08-14 04:21:02 +09:00
e1d90cde18 Improve WebSocket receive to handle multi-frame messages
The receive logic now accumulates all frames until EndOfMessage, ensuring complete messages are read even if fragmented. This change improves reliability when handling large or fragmented WebSocket messages.
2025-08-14 04:01:02 +09:00
ae7f79aeb8 Update WebSocketManager.cs 2025-08-05 05:01:54 +09:00
57fae72f42 Refactor WebSocketManager for improved clarity and reliability
Renamed internal classes and fields for clarity, added comments, and refactored SendAndReceiveAsync to use a helper method and a retry mechanism. Improved resource cleanup and error handling for stale sockets. These changes enhance code readability and robustness in WebSocket connection management.
2025-08-05 04:33:18 +09:00
b33069fc9e Update WebSocketManager.cs 2025-08-05 04:26:30 +09:00
f9c265b08a Use MD5 hash for WebSocket connection keys
Replaces the plain concatenation of host, port, and path with an MD5 hash to generate unique keys for WebSocket connections. This improves key uniqueness and prevents potential issues with special characters in the key string.
2025-07-31 17:28:26 +09:00
92a35606ed Improve XML escaping, WebSocket buffer, and editor style
Replaced HTML encoding with SecurityElement.Escape for XML escaping in ChromiumDevTools. Made WebSocketManager's receive buffer size configurable with a default of 65536 bytes. Updated editor.html to use 'color: inherit' for banner link hover to maintain contrast.
2025-07-31 17:23:11 +09:00
837ab036a8 Enhance banner link style and text in editor.html
Added custom CSS for the banner link to improve appearance and hover effect. Updated the banner link text to include a heart emoji for better visual appeal.
2025-07-31 17:13:45 +09:00
14da9f90da Update editor.html 2025-07-31 17:08:29 +09:00
ed0a7eed3f Update banner link text in editor.html
Changed the banner text from 'WelsonJS Editor powered by Metro UI, Monaco Editor, and JSONEditor.' to 'Contribute this project' with a link to the project's GitHub repository.
2025-07-31 17:05:44 +09:00
7b49817182 Add WebSocket support for Chromium DevTools endpoints
Implemented WebSocket communication in ChromiumDevTools to support 'page/' endpoints, allowing bidirectional messaging with Chromium DevTools Protocol. Added timeout configuration, improved error handling, and refactored WebSocketManager for connection pooling and reconnection. Updated resources and configuration files to support new timeout settings. Also fixed editor.html to handle direct JSON responses for citi-query.
2025-07-31 16:59:03 +09:00
2b30e864f0 Update WelsonJS.Cryptography.Test.vbproj 2025-07-27 22:45:56 +09:00
e579a341a4 Add WebSocketManager.cs and more
Add WebSocketManager.cs and more
2025-07-27 22:25:48 +09:00
9a328bff0b
Merge pull request #300 from gnh1201/cryptography
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Blocked by required conditions
Add resource server autostart and Chromium config options
2025-07-27 16:17:10 +09:00
c3d68e1d2f Fix typo
Fix typo
2025-07-27 16:12:55 +09:00
2b4814ecb5 Add resource server autostart and Chromium config options
Introduces ResourceServerAutoStart and ChromiumFileName/ChromiumDevToolsPrefix settings to app.config and resources. Refactors resource server startup logic to support autostart and configurable browser launch. Cleans up related code in MainForm and Program for improved flexibility and maintainability.
2025-07-27 15:57:05 +09:00
5ee4a1f7b6
Merge pull request #298 from gnh1201/cryptography
Update file headers to reflect .vb extensions
2025-07-27 00:34:44 +09:00
3583415ee2 Update file headers to reflect .vb extensions
Changed file header comments in cryptography-related modules from '.cs' to '.vb' to accurately reflect the file types. This improves clarity and consistency in source file documentation.
2025-07-27 00:31:49 +09:00
453fc231d0
Merge pull request #296 from gnh1201/cryptography
Add `WelsonJS.Cryptography` package (SEED, ARIA, HIGHT algoritm)
2025-07-26 23:21:48 +09:00
5c1ffff822 Add license headers to cryptography classes
Added SPDX license and copyright headers to AriaCore and HightAlgorithm classes for compliance and documentation. Minor formatting adjustments in AriaAlgorithm and AriaEcbTransform to improve consistency.
2025-07-26 23:19:48 +09:00
0b73fe8b60 Offical test vector ALL PASSED: SEED, ARIA, HIGHT
Offical test vector ALL PASSED: SEED, ARIA, HIGHT algorithm
2025-07-26 23:12:31 +09:00
9d234e82dc Fix ARIA algorithm has failed #295 (TEST PASSED)
Fix ARIA algorithm has failed #295 (TEST PASSED)
2025-07-26 23:06:36 +09:00
76ebdbb7a8 try fix #295 (TEST FAILED)
try fix #295 (TEST FAILED)
2025-07-26 18:09:11 +09:00
3498f27619 Implement HIGHT algorithm with official test vector (TEST PASSED) #293
Implement HIGHT algorithm with official test vector (TEST PASSED) #293
2025-07-25 00:06:40 +09:00
2a8c4d196c Add HIGHT block cipher implementation #293
Implemented the HIGHT block cipher with ECB mode support, including HightAlgorithm, HightCore, and HightEcbTransform classes. Updated the test program to include HIGHT encryption/decryption tests and added support for PaddingMode.None in ARIA and SEED ECB transforms.
2025-07-20 19:49:52 +09:00
ec03bf415d Add ARIA cryptography algorithm
Add ARIA cryptography algorithm
2025-07-19 19:07:05 +09:00
2688765f84 Update the contacts 2025-07-16 13:57:04 +09:00
848a4359fa Fix SEED cryptography algorithm
Fix SEED cryptography algorithm
2025-07-09 11:20:54 +09:00
cb649c88ed Update SEED algorithm 2025-07-05 13:24:10 +09:00
63f009fb73 Add SEED algorithm test project for WelsonJS.Cryptography
Introduced a new test project 'WelsonJS.Cryptography.Test' with a Program.vb that tests SEED encryption and decryption. Updated the solution file to include both the cryptography library and its test project, and configured build settings for all platforms.
2025-07-04 23:53:03 +09:00
9afb64a997 Add package WelsonJS.Cryptography
Add package `WelsonJS.Cryptography`
2025-07-04 23:43:09 +09:00
21f2187d17 Delete WelsonJS - Backup.Esent.csproj 2025-06-26 10:50:34 +09:00
cc31e9383e Update README.md (WelsonJS.Esent) 2025-06-26 10:49:40 +09:00
dcf966b2c5 Fix the null check for schema should occur before accessing schema.PrimaryKey 2025-06-26 10:26:59 +09:00
82df8c5605 Update EsentDatabase specs 2025-06-26 10:22:07 +09:00
91ce125c7f Update MainForm.cs 2025-06-25 15:38:26 +09:00
aacc2414f2 ESENT completed #277 2025-06-25 00:19:56 +09:00
9d2fb432f7 Add the package ManagedEsent, and WelsonJS.Esent
Add the package ManagedEsent (microsoft/ManagedEsent@d358c07), and WelsonJS.Esent
2025-06-24 17:55:34 +09:00
62d219f443 ESENT: Add method CreateIndex
The index creation process has been separated into a dedicated method to improve readability and stability.
2025-06-24 11:30:27 +09:00
3e4b6a73b5 Fix the index creation failure 2025-06-23 18:15:37 +09:00
ece369f8f0 Revert "Update MetadataStore.cs"
This reverts commit ba3e21feca.
2025-06-23 18:04:39 +09:00
ba3e21feca Update MetadataStore.cs 2025-06-23 17:40:02 +09:00
0cb0f9303d ESENT: fix the index creation failure #277 2025-06-23 17:36:03 +09:00