-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
65 lines (57 loc) · 1.72 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
use X\Devutils\Commands;
use X\Devutils\Lib\Toolkit;
$options = [
'maintenance' => true,
'install' => [
'createEnv' => false,
'composerPrefix' => '',
],
'plugins' => [
'packages' => [
//
]
],
'availableCommands' => [
/** Kirby Commands **/
Commands\KirbyCommands\UpCommand::class,
Commands\KirbyCommands\DownCommand::class,
Commands\KirbyCommands\RootsCommand::class,
Commands\KirbyCommands\UsersCommand::class,
Commands\KirbyCommands\RoutesCommand::class,
Commands\KirbyCommands\OptionsCommand::class,
Commands\KirbyCommands\InstallCommand::class,
/** Plugin Commands **/
Commands\PluginCommands\ListCommand::class,
Commands\PluginCommands\RemoveCommand::class,
Commands\PluginCommands\InstallCommand::class,
/** Future commands **/
// Commands\Database\LoadSnapshotCommand::class,
// Commands\Database\ListSnapshotsCommand::class,
// Commands\Database\CreateSnapshotCommand::class,
// Commands\Database\DeleteSnapshotCommand::class,
// Commands\Database\CleanSnapshotsCommand::class,
// Commands\Backup\ManualBackupCommand::class, // AWS or SFTP
// Commands\Backup\RotateBackupCommand::class, // AWS or SFTP
// Commands\Scheduler\RunCommand::class,
// Commands\Scheduler\ListCommand::class,
// Commands\Scheduler\AddCronCommand::class,
// Commands\Scheduler\TestCronCommand::class,
],
'disabledCommands' => [
//
],
];
if(Toolkit::useRay()) {
ray()->enable();
}
Kirby::plugin('genxbe/kx-devutils', [
'options' => $options,
'snippets' => [
'x/maintenance' => __DIR__ . '/snippets/maintenance.php',
],
'hooks' => [
'route:after' => fn() => X\Devutils\Lib\Toolkit::checkForMaintenance(),
'system.loadPlugins:after' => fn() => Toolkit::renderCommands(),
],
]);