Commit Graph

2551 Commits

Author SHA1 Message Date
a77c83736c Add editor and community buttons with icons to MainForm
Replaced the community link label with a button featuring an icon, and added a new button to start the editor with its own icon. Updated resource files and designer code to support these changes, and adjusted related event handlers and UI text for clarity.
2025-10-10 12:07:16 +09:00
ebe7b605cb Add Vary: Origin header and use Response.Close
Sets the 'Vary' header to 'Origin' for CORS responses to improve cache behavior. Replaces OutputStream.Close with Response.Close for proper response handling.
2025-10-09 22:04:27 +09:00
b32801c1c9 clean up the code
clean up the code
2025-10-09 21:14:41 +09:00
33d8fadc8f
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceServer.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-04 19:39:58 +09:00
cd3e18a4c1 Merge branch 'dev' of https://github.com/gnh1201/welsonjs into dev 2025-10-04 18:11:15 +09:00
49263bb0ac Refactor CORS allowed origins initialization
Replaces GetAllowedOrigins with TryParseAllowedOrigins to initialize allowed origins once during static construction. Adds logging for invalid ResourceServerPrefix values and stores allowed origins in a static field for improved efficiency.
2025-10-04 18:09:03 +09:00
6e499bcedf
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceServer.cs
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-10-03 17:49:10 +09:00
8ab70208d0
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceServer.cs
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
2025-10-03 17:48:25 +09:00
a745b6d0a7
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceServer.cs
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
2025-10-03 17:47:01 +09:00
b9e39dd9c7 Add CORS support to ResourceServer
Implemented CORS handling in ResourceServer, including preflight (OPTIONS) request handling and configurable allowed origins via the new ResourceServerAllowOrigins app setting. Updated resources and configuration files to support the new setting.
2025-10-03 17:35:34 +09:00
8cfff666e4
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceTools/IpQuery.cs
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-10-02 14:44:22 +09:00
5fb255e1e3 Refactor IP query to support multiple providers
Replaces the single CriminalIP API integration with a new IP query system supporting both CriminalIP and AbuseIPDB providers. Updates configuration keys, resource files, and the editor UI to handle multiple API endpoints and keys. Refactors backend logic to aggregate and return results from both providers in a unified XML format, and updates the frontend to parse and display these results. Adds improved error handling and logging for IP query and WHOIS operations.
2025-10-02 14:39:50 +09:00
a3e00d1762 Add Chromium app mode and update executable config keys
Introduces a new 'ChromiumAppMode' configuration option to launch Chromium in app mode when enabled. Renames 'ChromiumFileName' to 'ChromiumExecutablePath' in both code and configuration for clarity and consistency.
2025-10-01 13:23:27 +09:00
a35e101f23 Refactor log file naming and improve Format method
Changed log file naming to use <Namespace>.<random-6>.<PID>.log instead of including 'pid' in the filename. Moved file stream creation inside the Trace listener check. Reformatted and clarified the Format method for better readability and error handling.
2025-09-28 20:14:00 +09:00
ce84aab861 Improve TraceLogger with file-based logging and fallback
TraceLogger now writes logs to a file in %APPDATA%\WelsonJS\Logs with a randomized suffix and process ID. If the log directory cannot be created, it falls back to the current directory. The logger also improves formatting and random suffix generation for log file names.
2025-09-28 19:59:45 +09:00
676f791fab Add ImageColorPicker tool and async resource serving
Introduces the ImageColorPicker resource tool for extracting color information from images via a POST API. Refactors ResourceServer and all resource tools to use async ServeResource methods, improving scalability and consistency. Updates JsSerializer with an engine-backed document store for efficient repeated JSON extraction.
2025-09-28 03:03:19 +09:00
b1b36744cf
Merge branch 'master' into dev 2025-09-28 01:31:11 +09:00
9547d245b7
Update WelsonJS.Toolkit/WelsonJS.Launcher/JsSerializer.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-28 01:06:40 +09:00
91f19bc148
Update WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-28 01:02:35 +09:00
2db47bca9a Add optional Authenticode signature validation for native DLLs
Enhanced NativeBootstrap to support optional Authenticode signature validation and custom certificate validators when loading native libraries. Added 'NativeRequireSigned' configuration to app.config and resources, allowing signature enforcement to be toggled. Updated Program.cs to use the new option during initialization.
2025-09-28 00:48:58 +09:00
87020d35ac Refactor logger interface and add JsNative interop layer
Updated ICompatibleLogger to accept params object[] for flexible logging. Refactored TraceLogger to support the new interface and improved formatting. Added JsNative.cs to encapsulate ChakraCore P/Invoke interop, and updated JsCore to use JsNative for all native calls. Modified all resource tools to accept and use ICompatibleLogger for consistent logging. Updated project file to include new and updated sources.
2025-09-28 00:07:41 +09:00
83a037dfa2 Download setup and ChakraCore in AppVeyor build
Added PowerShell steps to download the unsigned setup executable and ChakraCore.dll into the artifacts directory during the AppVeyor after_build phase.
2025-09-27 22:52:13 +09:00
3fe04d1113 Fix submodule gitlink for ChakraCore 2025-09-27 13:01:18 +09:00
4af01706de Add .gitmodules for ChakraCore submodule
Introduces a .gitmodules file to track the ChakraCore submodule under WelsonJS.Toolkit/ChakraCore, referencing the official ChakraCore repository.
2025-09-26 17:13:39 +09:00
130a6fd767 Add ChakraCore integration and native bootstrap logic
Introduces JsCore for ChakraCore P/Invoke, JsSerializer for JSON utilities via JS, and NativeBootstrap for robust native DLL loading. Updates Program.cs to initialize native dependencies at startup and registers new source files in the project file.
2025-09-26 17:04:14 +09:00
376fd8f852
Merge pull request #327 from gnh1201/dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Rename CitiQuery to IpQuery and update API references
2025-09-25 15:39:15 +09:00
849470555a
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceTools/IpQuery.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-25 15:37:16 +09:00
90d623be95 Rename CitiQuery to IpQuery and update API references
Renamed the CitiQuery tool and related files to IpQuery for clarity. Updated all references from CitiApiKey and CitiApiPrefix to CriminalIpApiKey and CriminalIpApiPrefix in code, resources, and UI. Adjusted the editor UI and backend to use the new naming and API configuration.
2025-09-25 15:26:24 +09:00
2f399d0557
Merge pull request #323 from gnh1201/dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Refactor logging and resource server initialization
2025-08-26 13:07:20 +09:00
e9d475ba4c Improve resource server initialization and mutex handling
Adds a null check for the resource server after initialization and logs an error if it fails. Changes duplicate launcher instance log from error to info, and wraps mutex release in a try-catch to prevent exceptions if not owned.
2025-08-26 13:02:32 +09:00
f3db44d8e3 Fix mutex variable naming in Program.cs
Renamed the out variable from '_createdNew' to 'createdNew' for clarity and updated its usage in the mutex check. This improves code readability and consistency.
2025-08-26 12:55:39 +09:00
ecbe55cf80 Rename mutex out parameter for clarity
Changed the out parameter name from 'mutexNotExists' to '_createdNew' in the Mutex constructor for improved readability and clarity in the Main method.
2025-08-26 12:55:07 +09:00
d3ecbd7ebe Fix mutex logic for single instance check
Renamed variable to clarify mutex existence and corrected the condition to properly detect if the launcher is already running.
2025-08-26 12:53:48 +09:00
57d0454051 Refactor logging and resource server initialization
Introduces ICompatibleLogger for improved logging, replaces Trace.TraceError and Trace.TraceInformation calls with logger methods, and standardizes ResourceServer instance naming to _resourceServer. Passes logger instances to MainForm and ResourceServer for consistent logging. Also refactors mutex handling and initialization logic for clarity.
2025-08-26 12:49:37 +09:00
3865f3216f
Merge pull request #322 from gnh1201/dev
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 abnormal case check to clusteredCellsDensity
2025-08-26 10:07:51 +09:00
78ab8d839f Add abnormal case check to clusteredCellsDensity
Returns false if more than one third of the grid is selected, treating it as an abnormal case. Also updates VERSIONINFO to 1.0.4.
2025-08-25 01:39:42 +09:00
cc08f7b362
Merge pull request #321 from gnh1201/dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
TOTP (Time-based OTP) with 32 characters key
2025-08-22 23:28:01 +09:00
d443f6270c Update OTP endpoint and version info in totp.js
Changed the OTP API endpoint from '/tfa/otp' to '/otp' and updated VERSIONINFO to 1.0.1. Improved example comments to clarify key formats and OTP code usage.
2025-08-22 17:59:32 +09:00
dfc18cfd7d Refactor TFA tool to TwoFactorAuth and update TOTP client
Renamed ResourceTools/Tfa.cs to ResourceTools/TwoFactorAuth.cs and updated all references accordingly. Enhanced TwoFactorAuth with improved key handling, error responses, and form parsing. Updated totp.js to use the new local HTTP API endpoints for key generation and OTP calculation, removing legacy JSON-RPC code.
2025-08-22 17:21:31 +09:00
d3a122029d
Merge pull request #320 from gnh1201/dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Some bug fixes, and enhance ExtraMath module
2025-08-20 17:33:53 +09:00
8ff12c9883
Update lib/extramath.js
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
2025-08-20 17:29:44 +09:00
1dd02f7a75
Update lib/extramath.js
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-08-20 17:25:51 +09:00
83b022bf6f Refactor grid functions and update exports in extramath.js
Improved clusteredCellsDensity to validate cell indices and refactored coordinate calculation to be 1-based. Replaced tileStartPos with estimateTileStartPosition for more flexible tile positioning, updated exports accordingly, and bumped VERSIONINFO to 1.0.3.
2025-08-20 17:10:58 +09:00
ab869556c4 Add tileStartPos function and update version
Introduced tileStartPos to calculate tile coordinates based on index, size, and columns. Updated VERSIONINFO to 1.0.1 and exported the new function.
2025-08-18 07:20:01 +09:00
717b141cb7 Add clusteredCellsDensity function to extramath.js
Introduces clusteredCellsDensity to evaluate density of selected cells within a grid. Updates module version to 1.0.0 and exports the new function for external use.
2025-08-18 04:16:52 +09:00
83fb136957 Remove redundant error handling in ChromeObject
Eliminated duplicate error response handling logic in ChromeObject and updated the version info to 0.5.3. Error messages are now handled solely by the catch block for cleaner code.
2025-08-18 03:26:27 +09:00
8da63c08ca Add setup file download to AppVeyor build
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
A PowerShell command was added to download the unsigned setup executable from Azure Blob Storage during the after_build step, saving it to the artifacts directory.
2025-08-18 01:47:36 +09:00
df393ed251
Merge pull request #318 from gnh1201/dev
Improve logging and async handling in ResourceServer
2025-08-17 23:33:35 +09:00
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