Skip to content

Commit 29d738d

Browse files
committed
♻️ fixed test for reload api option
Signed-off-by: bnomei <[email protected]>
1 parent 92c1654 commit 29d738d

File tree

8 files changed

+173
-168
lines changed

8 files changed

+173
-168
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-janitor",
33
"type": "kirby-plugin",
4-
"version": "4.4.0",
4+
"version": "4.4.1",
55
"license": "MIT",
66
"homepage": "https://github.com/bnomei/kirby3-janitor",
77
"description": "Kirby Plugin for running commands like cleaning the cache from within the Panel, PHP code or a cronjob",

composer.lock

+154-154
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/fields/Janitor.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default {
165165
return;
166166
}
167167
168-
this.postRequest("plugin-janitor", { command: this.command });
168+
await this.postRequest("plugin-janitor", { command: this.command });
169169
},
170170
171171
async postRequest(path, data) {

tests/site/commands/reload.php

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<?php
32

43
use Bnomei\Janitor;
@@ -10,8 +9,6 @@
109
'command' => static function (CLI $cli): void {
1110
$cli->error('No reload in CLI.');
1211

13-
ray('reload', $cli->args());
14-
1512
janitor()->data($cli->arg('command'), [
1613
'status' => 200,
1714
'reload' => true, // will trigger JS location.reload in panel

tests/site/config/config.php

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
],
1111
],
1212

13+
// DO NOT USE BASIC AUTH IN PRODUCTION
14+
// I only use this in my dev env to test the janitor commands
15+
'api' => [
16+
'basicAuth' => true,
17+
'allowInsecure' => true,
18+
],
19+
1320
'bnomei.janitor.secret' => 'e9fe51f94eadabf54',
1421

1522
// janitor v2 job callback

vendor/composer/installed.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'bnomei/kirby3-janitor',
4-
'pretty_version' => '4.4.0',
5-
'version' => '4.4.0.0',
4+
'pretty_version' => '4.4.1',
5+
'version' => '4.4.1.0',
66
'reference' => null,
77
'type' => 'kirby-plugin',
88
'install_path' => __DIR__ . '/../../',
@@ -11,8 +11,8 @@
1111
),
1212
'versions' => array(
1313
'bnomei/kirby3-janitor' => array(
14-
'pretty_version' => '4.4.0',
15-
'version' => '4.4.0.0',
14+
'pretty_version' => '4.4.1',
15+
'version' => '4.4.1.0',
1616
'reference' => null,
1717
'type' => 'kirby-plugin',
1818
'install_path' => __DIR__ . '/../../',
@@ -38,9 +38,9 @@
3838
'dev_requirement' => false,
3939
),
4040
'symfony/finder' => array(
41-
'pretty_version' => 'v7.1.3',
42-
'version' => '7.1.3.0',
43-
'reference' => '717c6329886f32dc65e27461f80f2a465412fdca',
41+
'pretty_version' => 'v7.1.4',
42+
'version' => '7.1.4.0',
43+
'reference' => 'd95bbf319f7d052082fb7af147e0f835a695e823',
4444
'type' => 'library',
4545
'install_path' => __DIR__ . '/../symfony/finder',
4646
'aliases' => array(),

vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ public function current(): SplFileInfo
6363
$subPathname .= $this->directorySeparator;
6464
}
6565
$subPathname .= $this->getFilename();
66+
$basePath = $this->rootPath;
6667

67-
if ('/' !== $basePath = $this->rootPath) {
68+
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) {
6869
$basePath .= $this->directorySeparator;
6970
}
7071

0 commit comments

Comments
 (0)