-
Notifications
You must be signed in to change notification settings - Fork 119
/
vapor
executable file
·212 lines (180 loc) · 6.36 KB
/
vapor
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#!/usr/bin/env php
<?php
use Dotenv\Dotenv;
use Dotenv\Environment\Adapter\EnvConstAdapter as V3EnvConstAdapter;
use Dotenv\Environment\Adapter\ServerConstAdapter as V3ServerConstAdapter;
use Dotenv\Environment\DotenvFactory;
use Dotenv\Repository\Adapter\EnvConstAdapter as V4orV5EnvConstAdapter;
use Dotenv\Repository\Adapter\ServerConstAdapter as V4orV5ServerConstAdapter;
use Dotenv\Repository\RepositoryBuilder;
use Illuminate\Container\Container;
use Laravel\VaporCli\Application;
use Laravel\VaporCli\Commands;
/**
* Require the autoloader.
*/
if (file_exists(__DIR__.'/../../autoload.php')) {
require __DIR__.'/../../autoload.php';
} else {
require __DIR__.'/vendor/autoload.php';
}
/**
* Load the environment variables.
*/
(function () {
if (class_exists(RepositoryBuilder::class)) {
$adapters = [
V4orV5EnvConstAdapter::class,
V4orV5ServerConstAdapter::class,
];
if (method_exists(RepositoryBuilder::class, 'addReader')) { // V5
$repository = RepositoryBuilder::createWithNoAdapters();
foreach ($adapters as $adapter) {
$repository = $repository
->addReader($adapter)
->addWriter($adapter);
}
} else { // V4
$adapters = array_map(function ($adapterClass) {
return new $adapterClass();
}, $adapters);
$repository = RepositoryBuilder::create()
->withReaders($adapters)
->withWriters($adapters);
}
Dotenv::create(
$repository->immutable()->make(),
__DIR__
)->safeLoad();
} else { // V3
Dotenv::create(__DIR__, null, new DotenvFactory([
new V3EnvConstAdapter, new V3ServerConstAdapter,
]))->safeLoad();
}
})();
/**
* Create the container instance.
*/
Container::setInstance($container = new Container);
/**
* Start the console application.
*/
$app = new Application('Laravel Vapor', '1.65.1');
// Authentication...
$app->add(new Commands\LoginCommand);
// Teams...
$app->add(new Commands\TeamListCommand);
$app->add(new Commands\TeamCommand);
$app->add(new Commands\TeamCurrentCommand);
$app->add(new Commands\TeamSwitchCommand);
$app->add(new Commands\MemberListCommand);
$app->add(new Commands\MemberAddCommand);
$app->add(new Commands\MemberRemoveCommand);
$app->add(new Commands\FireCommand);
// Providers...
$app->add(new Commands\ProviderListCommand);
$app->add(new Commands\ProviderCommand);
$app->add(new Commands\ProviderUpdateCommand);
$app->add(new Commands\ProviderDeleteCommand);
// Zones...
$app->add(new Commands\ZoneListCommand);
$app->add(new Commands\ZoneCommand);
$app->add(new Commands\ZoneDeleteCommand);
// Records...
$app->add(new Commands\RecordListCommand);
$app->add(new Commands\RecordCommand);
$app->add(new Commands\RecordDeleteCommand);
// Certificates...
$app->add(new Commands\CertListCommand);
$app->add(new Commands\CertCommand);
$app->add(new Commands\CertValidateCommand);
$app->add(new Commands\CertDeleteCommand);
// Networks...
$app->add(new Commands\NetworkListCommand);
$app->add(new Commands\NetworkCommand);
$app->add(new Commands\NetworkShowCommand);
$app->add(new Commands\NetworkNatCommand);
$app->add(new Commands\NetworkDeleteNatCommand);
$app->add(new Commands\NetworkDeleteCommand);
// Databases...
$app->add(new Commands\DatabaseListCommand);
$app->add(new Commands\DatabaseCommand);
$app->add(new Commands\DatabaseShowCommand);
$app->add(new Commands\DatabaseScaleCommand);
$app->add(new Commands\DatabasePasswordCommand);
$app->add(new Commands\DatabaseProxyCommand);
$app->add(new Commands\DatabaseDeleteProxyCommand);
$app->add(new Commands\DatabaseRestoreCommand);
$app->add(new Commands\DatabaseMetricsCommand);
$app->add(new Commands\DatabaseUpgradeCommand);
$app->add(new Commands\DatabaseUsersCommand);
$app->add(new Commands\DatabaseUserCommand);
$app->add(new Commands\DatabaseDropUserCommand);
$app->add(new Commands\DatabaseShellCommand);
$app->add(new Commands\DatabaseTunnelCommand);
$app->add(new Commands\DatabaseDeleteCommand);
// Caches...
$app->add(new Commands\CacheListCommand);
$app->add(new Commands\CacheCommand);
$app->add(new Commands\CacheShowCommand);
$app->add(new Commands\CacheScaleCommand);
$app->add(new Commands\CacheMetricsCommand);
$app->add(new Commands\CacheTunnelCommand);
$app->add(new Commands\CacheDeleteCommand);
// Jumpboxes...
$app->add(new Commands\JumpListCommand);
$app->add(new Commands\JumpCommand);
$app->add(new Commands\JumpDeleteCommand);
// Balancers...
$app->add(new Commands\BalancerListCommand);
$app->add(new Commands\BalancerCommand);
$app->add(new Commands\BalancerDeleteCommand);
// Projects...
$app->add(new Commands\InitCommand);
$app->add(new Commands\UiCommand);
$app->add(new Commands\ProjectDeleteCommand);
$app->add(new Commands\ProjectDescribeCommand);
$app->add(new Commands\ProjectListCommand);
// Environments...
$app->add(new Commands\EnvListCommand);
$app->add(new Commands\EnvCommand);
$app->add(new Commands\EnvDescribeCommand);
$app->add(new Commands\EnvPassportCommand);
$app->add(new Commands\EnvPullCommand);
$app->add(new Commands\EnvPushCommand);
$app->add(new Commands\EnvCloneCommand);
$app->add(new Commands\EnvDeleteCommand);
$app->add(new Commands\OpenCommand);
// Vanity Domains...
$app->add(new Commands\VanityDomainDeleteCommand);
// Secrets
$app->add(new Commands\SecretListCommand);
$app->add(new Commands\SecretCommand);
$app->add(new Commands\SecretPassportCommand);
$app->add(new Commands\SecretDeleteCommand);
// Deployments...
$app->add(new Commands\DeployListCommand);
$app->add(new Commands\BuildCommand);
$app->add(new Commands\DeployCommand);
$app->add(new Commands\RedeployCommand);
$app->add(new Commands\HookLogCommand);
$app->add(new Commands\HookOutputCommand);
// Rollbacks / Maintenance Mode...
$app->add(new Commands\RollbackCommand);
$app->add(new Commands\DownCommand);
$app->add(new Commands\UpCommand);
// Commands / Invocations...
$app->add(new Commands\CommandCommand);
$app->add(new Commands\CommandLogCommand);
$app->add(new Commands\CommandAgainCommand);
$app->add(new Commands\TinkerCommand);
// Logs...
$app->add(new Commands\TailCommand);
// Metrics...
$app->add(new Commands\MetricsCommand);
// Docker...
$app->add(new Commands\LocalCommand);
$app->add(new Commands\TestCommand);
// Assets...
$app->add(new Commands\InvalidateAssetCacheCommand);
$app->run();