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.
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.
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.
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().
Replaces manual disposal of InstancesForm with a 'using' statement to ensure proper resource management and exception safety when recording to the metadata database.
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.
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.
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.
Added <RegisterForComInterop>True</RegisterForComInterop> to all build configurations in WelsonJS.Cryptography.vbproj to support COM interop registration for both Debug and Release builds.