Codeigniter 4 php spark publish command failed to publish files

After Upgrading to the latest Codeigniter 4 version, when I am trying to run the command

php spark publish

Then I am getting an error failed to publish to and more specifically for the reason:

fails the following restriction for "/path/to/my/project/public/": #.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)

Details of the error:

CodeIgniter v4.6.1 Command Line Tool - Server Time: 2025-07-09 03:30:54 UTC+00:00

"AppPublishersGroceryCrudPublisher" failed to publish to "/path/to/my/project/public/".
/path/to/my/project/vendor/grocery-crud/enterprise/public/vendor/grocery-crud/static/media/index.f6d03137e8c9dd0de04c.cjs
"/path/to/my/project/vendor/grocery-crud/enterprise/public/vendor/grocery-crud/static/media/index.f6d03137e8c9dd0de04c.cjs" fails the following restriction for "/path/to/my/project/public/": #.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i

What is the best way to fix the above? Consider that removing the .cjs files is an option but then I am also getting same errors for .DS_Store files. Is there any option in Codeigniter 4 to just skip copying those files instead of throwing an error?