Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
medilies committed Aug 14, 2024
1 parent 4cf7e7c commit 196663a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/laravel/Commands/SetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SetupCommand extends Command
public function handle(): void
{
// TODO: non Laravel command
Xssless::usingLaravelConfig()->setup() ?
Xssless::setup() ?
$this->info('Setup done.') :
$this->info('The current driver has no setup.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/laravel/Commands/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class StartCommand extends Command
public function handle(): void
{
// TODO: non Laravel command
$service = Xssless::usingLaravelConfig()->start();
$service = Xssless::start();

if (is_null($service)) {
$this->info('The current driver is not a service to start.');
Expand Down
9 changes: 4 additions & 5 deletions src/laravel/config/xssless.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<?php

use Medilies\Xssless\Dompurify\DompurifyCliConfig;
use Medilies\Xssless\Dompurify\DompurifyServiceConfig;

return [
'default' => 'dompurify-cli',

'drivers' => [
'dompurify-cli' => new DompurifyCliConfig(
'dompurify-cli' => new \Medilies\Xssless\Dompurify\DompurifyCliConfig(
node: env('NODE_PATH', 'node'), // @phpstan-ignore argument.type
npm: env('NPM_PATH', 'npm'), // @phpstan-ignore argument.type
binary: null,
tempFolder: null,
),

'dompurify-service' => new DompurifyServiceConfig(
'dompurify-service' => new \Medilies\Xssless\Dompurify\DompurifyServiceConfig(
node: env('NODE_PATH', 'node'), // @phpstan-ignore argument.type
npm: env('NPM_PATH', 'npm'), // @phpstan-ignore argument.type
host: '127.0.0.1',
Expand All @@ -23,3 +20,5 @@
),
],
];

// TODO: check classes exist
File renamed without changes.

0 comments on commit 196663a

Please sign in to comment.