diff --git a/.gitattributes b/.gitattributes index ba7039faa..5171b5a40 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,8 @@ *.sh -crlf *.nix -crlf .husky/pre-commit -crlf -package-lock.json -diff -flake.lock -diff -assets/schemas.json -diff -assets/openapi.json -diff \ No newline at end of file +package-lock.json -diff linguist-generated +flake.lock -diff linguist-generated +assets/schemas.json -diff linguist-generated +assets/openapi.json -diff linguist-generated +.idea/ linguist-generated \ No newline at end of file diff --git a/default.nix b/default.nix index d4970009c..7650b9c2d 100644 --- a/default.nix +++ b/default.nix @@ -72,7 +72,7 @@ let npm prune --omit dev --no-save --offline rm -v dist/src.tsbuildinfo rm -rv scripts - time ${./nix/trimNodeModules.sh} + # time ${./nix/trimNodeModules.sh} # Copy outputs echo "Installing package into $out" diff --git a/extra/admin-api/Spacebar.Cdn/Services/PixelArtDetectionService.cs b/extra/admin-api/Spacebar.Cdn/Services/PixelArtDetectionService.cs index 204b578e3..4aefe2eaa 100644 --- a/extra/admin-api/Spacebar.Cdn/Services/PixelArtDetectionService.cs +++ b/extra/admin-api/Spacebar.Cdn/Services/PixelArtDetectionService.cs @@ -3,7 +3,7 @@ using ImageMagick; namespace Spacebar.AdminApi.TestClient.Services.Services; public class PixelArtDetectionService { - public bool IsPixelArt(IMagickImage img) where T : struct, IConvertible { + public bool IsPixelArt(IMagickImage img) where T : unmanaged { // Simple heuristic: if the image has a limited color palette and sharp edges, consider it pixel art var colorCount = img.Histogram().Count; var edgeThreshold = 20; // Arbitrary threshold for edge detection @@ -19,7 +19,7 @@ public class PixelArtDetectionService { return isPixelArt; } - public bool IsCartoonArt(IMagickImage img) where T : struct, IConvertible { + public bool IsCartoonArt(IMagickImage img) where T : unmanaged { // Simple heuristic: if the image has a limited color palette and smooth edges, consider it cartoon art var colorCount = img.Histogram().Count; var edgeThreshold = 5; // Lower threshold for smoother edges @@ -33,7 +33,7 @@ public class PixelArtDetectionService { return isCartoonArt; } - public IMagickImage RenderEdges(IMagickImage img, double radius = 1) where T : struct, IConvertible { + public IMagickImage RenderEdges(IMagickImage img, double radius = 1) where T : unmanaged { var edgeImg = img.Clone(); // edgeImg.Edge(radius); edgeImg.WaveletDenoise(new Percentage(50)); diff --git a/flake.lock b/flake.lock index 915280bfb..3b6300951 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/nix/testVm/vm.nix b/nix/testVm/vm.nix index 50eb4d259..1b12a8cea 100644 --- a/nix/testVm/vm.nix +++ b/nix/testVm/vm.nix @@ -45,7 +45,6 @@ boot = { initrd = { - systemd.enable = true; systemd.emergencyAccess = true; }; kernelParams = [ @@ -77,4 +76,4 @@ switch.enable = false; etc.overlay.enable = true; }; -} +} \ No newline at end of file diff --git a/nix/trimNodeModules.sh b/nix/trimNodeModules.sh index ab4785c0d..2798e7a12 100755 --- a/nix/trimNodeModules.sh +++ b/nix/trimNodeModules.sh @@ -5,7 +5,7 @@ echo "Removing CLI scripts..." for f in ./node_modules/.bin/*; do rm -f "$(realpath $f)" $f done -find ./node_modules -type d -name '.bin' | while read -r dir; do +find ./node_modules -type d -name '.bin' -type l ! -lname '*/index.cjs' ! -lname 'index.cjs' | while read -r dir; do echo "Removing CLI scripts from $dir..." for f in "$dir"/*; do rm -f "$(realpath $f)" $f diff --git a/package-lock.json b/package-lock.json index 6f59fc56d..473bde9d9 100644 Binary files a/package-lock.json and b/package-lock.json differ