File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class BundleCommand extends Command
31
31
use PrunesVendorDirectory;
32
32
use SetsAppName;
33
33
34
- protected $ signature = 'native:bundle {--fetch} {--without-cleanup} ' ;
34
+ protected $ signature = 'native:bundle {--fetch} {--clear} {-- without-cleanup} ' ;
35
35
36
36
protected $ description = 'Bundle your application for distribution. ' ;
37
37
@@ -43,6 +43,17 @@ class BundleCommand extends Command
43
43
44
44
public function handle (): int
45
45
{
46
+ // Remove the bundle
47
+ if ($ this ->option ('clear ' )) {
48
+ if (file_exists (base_path ('build/__nativephp_app_bundle ' ))) {
49
+ unlink (base_path ('build/__nativephp_app_bundle ' ));
50
+ }
51
+
52
+ $ this ->info ('Bundle removed. Building in this state would be unsecure. ' );
53
+
54
+ return static ::SUCCESS ;
55
+ }
56
+
46
57
// Check for ZEPHPYR_KEY
47
58
if (! $ this ->checkForZephpyrKey ()) {
48
59
return static ::FAILURE ;
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Support \Facades \Http ;
6
6
7
+ use function Laravel \Prompts \intro ;
8
+
7
9
trait HandleApiRequests
8
10
{
9
11
private function baseUrl (): string
@@ -13,7 +15,7 @@ private function baseUrl(): string
13
15
14
16
private function checkAuthenticated ()
15
17
{
16
- $ this -> line ('Checking authentication… ' );
18
+ intro ('Checking authentication… ' );
17
19
18
20
return Http::acceptJson ()
19
21
->withToken (config ('nativephp-internal.zephpyr.token ' ))
You can’t perform that action at this time.
0 commit comments