Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class CouldNotTakeBrowsershot extends Exception
{
public static function chromeOutputEmpty(string $screenShotPath, string $output, array $command = []): static
{
$command = json_encode($command);
$message = <<<CONSOLE
For some reason Chrome did not write a file at `{$screenShotPath}`.
Command
=======
{$command}
Output
======
{$output}
CONSOLE;
return new static($message);
}
public static function outputFileDidNotHaveAnExtension(string $path): static
{
return new static("The given path `{$path}` did not contain an extension. Please append an extension.");
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class ElementNotFound extends Exception
{
public static function make(string $selector): static
{
return new static("The given selector `{$selector} did not match any elements");
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class FileDoesNotExistException extends Exception
{
public static function make(string $file): static
{
return new static("The file `{$file}` does not exist");
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class FileUrlNotAllowed extends Exception
{
public static function make(): static
{
return new static('An URL is not allow to start with file:// or file:/');
}
public static function urlCannotBeParsed(string $url): static
{
return new static("The given URL `{$url}` is not a valid URL");
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class HtmlIsNotAllowedToContainFile extends Exception
{
public static function make(): static
{
return new static('The specified HTML contains `file://` or `file:/`. This is not allowed.');
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace Spatie\Browsershot\Exceptions;
use Exception;
class UnsuccessfulResponse extends Exception
{
public static function make(string $url, string|int $code): static
{
return new static("The given url `{$url}` responds with code {$code}");
}
}