Commit Graph

241 Commits

Author SHA1 Message Date
Namhyeon, Go
6839b8edd1 Fix namespace bug when use the assembly loader
Fix namespace bug when use the assembly loader
2025-12-08 01:53:49 +09:00
Namhyeon, Go
28776d7cad Update Catswords.Phantomizer.dll.gz 2025-12-08 01:34:49 +09:00
Namhyeon, Go
f30e43c2e3 Introduce new package Catswords.Phantomizer
Introduce new package `Catswords.Phantomizer`

**Catswords.Phantomizer** is an HTTP-based dynamic-link library (DLL) loader designed for .NET applications.
It allows your application to fetch and load assemblies directly from your CDN (Azure Blob, S3, Cloudflare R2, etc.) at runtime, with optional GZip compression support.
2025-12-08 00:49:10 +09:00
Namhyeon, Go
e8dbf69491 Clearify an exceptions
Clearify an exceptions
2025-12-07 02:42:26 +09:00
Namhyeon, Go
b3416f9a5f Dual HttpClient setup matches intent; make Legacy behavior explicitly “no decompression”
Dual HttpClient setup matches intent; make Legacy behavior explicitly “no decompression”
2025-12-07 02:26:45 +09:00
Namhyeon, Go
e90808e517 Null-check logger before use
Null-check logger before use
2025-12-07 02:22:44 +09:00
Namhyeon, Go
5747713f99 ntroduce separate HttpClient instances for raw and compressed HTTP transfer modes
Added two HttpClient instances to distinguish between legacy (no
Accept-Encoding) and modern compressed HTTP transfer behaviors.

- LegacyHttp:
  Sends no Accept-Encoding header.
  Used when requesting .dll.gz files, ensuring that the server delivers
  the file exactly as-is without applying HTTP-level compression.

- Http:
  Enables AutomaticDecompression and advertises Accept-Encoding
  (gzip, deflate).
  When the server supports HTTP content compression, even a regular .dll
  file can be transmitted in compressed form and transparently
  decompressed by the client.

This separation prevents ambiguities between:
  - File-level compression (.dll.gz)
  - Transport-level compression (Content-Encoding: gzip/deflate)

and ensures predictable behavior when downloading assemblies depending on
server capabilities.
2025-12-07 00:23:51 +09:00
Namhyeon, Go
5b86a88111 Use a temporary file for download, An exception clearify
To prevent partial or corrupt files on download failure, write the decompressed
stream to a temporary file first, and then atomically move it to the final
destination upon success.

In TryDownloadGzipToFile, modify the catch block to log the exception details
before returning false, instead of silently swallowing the error.
2025-12-06 00:23:58 +09:00
Namhyeon, Go
4e3c2bc52c Add support *.dll.gz file in Assembly Loader
Add support for *.dll.gz files in Assembly Loader to make downloads faster.
2025-12-06 00:01:50 +09:00
7abf705c6e Improve the loader policy
Improve the loader policy
2025-12-04 18:19:30 +09:00
cb41c92eab Improve the loader policy
Improve the loader policy
2025-12-04 18:06:47 +09:00
d2be6b116d Improve the loader policy
Improve the loader policy
2025-12-04 16:21:47 +09:00
eae040530e Code signing is required
Code signing is required
2025-12-04 16:12:47 +09:00
6d3fb3db0e Update AssemblyLoader.cs
comment an unused variables
2025-12-04 16:08:25 +09:00
07e47338cb Added the assembly loader with Azure Blob Storage
Added the assembly loader with Azure Blob Storage
2025-12-04 14:54:21 +09:00
e84a69d929 Add null-check for Assembly Version property.
The code properly checks if _telemetryClient is null before tracking the event and uses the assembly version dynamically. However, the Version property of AssemblyName can be null, which would cause a NullReferenceException when calling .ToString().
2025-12-03 16:59:41 +09:00
1d4b7af5b3 Fix the logger for telemetry
Fix the logger for telemetry
2025-12-03 16:54:19 +09:00
3188317bf6 Fix the TelemetryClient
Fix the TelemetryClient
2025-12-03 16:45:31 +09:00
2db2e7b91a Create TelemetryIdentity.cs and more fixes
Create TelemetryIdentity.cs and more fixes
2025-12-03 16:34:41 +09:00
78bcae182e Update telemetryEnabled configuration key
Update telemetryEnabled configuration key
2025-12-03 14:57:59 +09:00
c4e6acc8cd Add a telemetry to WelsonJS Launcher
Add a telemetry to WelsonJS Launcher, To improve debugging experience.
2025-12-03 14:48:30 +09:00
2e92255a3c Use 'using' statement for InstancesForm disposal
Replaces manual disposal of InstancesForm with a 'using' statement to ensure proper resource management and exception safety when recording to the metadata database.
2025-11-20 17:31:50 +09:00
1a75388a69 Fix relative path calculation in file copy loop
Normalizes source directory path before calculating relative file paths to ensure correct substring indexing and prevent off-by-one errors when copying files.
2025-11-20 17:21:47 +09:00
b3b00771c5 Refactor zip file run logic in MainForm
Removed the _filePath field and refactored zip file handling to pass file paths directly as parameters. Simplified the RunAppPackageFile workflow and eliminated redundant methods for improved clarity and maintainability.
2025-11-20 17:14:49 +09:00
afe7d6213a Refactor deploy time recording and improve instance setup
Moved RecordFirstDeployTime from MainForm to Program for better separation of concerns. Updated instance directory creation and asset copying logic in Program.cs to support JS entrypoints, including library copying and first deploy time recording. Added a sleep call to helloworld.js for demonstration purposes.
2025-11-20 17:09:43 +09:00
daea458f64
Update WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
2025-11-16 18:58:48 +09:00
c392b6a08a
Update WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.cs
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
2025-11-15 20:39:11 +09:00
a03ea7f3b3
Update WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-11-15 18:23:02 +09:00
c677c6907a Add CLI support for running script and zip files
Launcher now accepts a --file argument to run .js or .zip files directly from the command line. MainForm and Program.cs were refactored to support this, including new registry entries in setup.iss for file associations with WelsonJS Script extensions.
2025-11-15 18:08:47 +09:00
Namhyeon, Go
ba7b3e3685 Revert "Merge pull request #340 from gnh1201/codex/create-winforms-for-websocket-management"
This reverts commit d71adb8001, reversing
changes made to 83b8e453f0.
2025-11-02 18:17:59 +09:00
Namhyeon, Go
cfcfaf3e1f Add WinForms interface for WebSocket management 2025-11-02 18:09:59 +09:00
90806493ed Refactor code editor launch logic
Extracted the code editor launch logic into a new LaunchEditor() method to reduce duplication. Both the button and menu item now use this method, and error handling for resource server startup is centralized.
2025-10-10 12:18:47 +09:00
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
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