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
3131 use PrunesVendorDirectory;
3232 use SetsAppName;
3333
34- protected $ signature = 'native:bundle {--fetch} {--without-cleanup} ' ;
34+ protected $ signature = 'native:bundle {--fetch} {--clear} {-- without-cleanup} ' ;
3535
3636 protected $ description = 'Bundle your application for distribution. ' ;
3737
@@ -43,6 +43,17 @@ class BundleCommand extends Command
4343
4444 public function handle (): int
4545 {
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+
4657 // Check for ZEPHPYR_KEY
4758 if (! $ this ->checkForZephpyrKey ()) {
4859 return static ::FAILURE ;
Original file line number Diff line number Diff line change 44
55use Illuminate \Support \Facades \Http ;
66
7+ use function Laravel \Prompts \intro ;
8+
79trait HandleApiRequests
810{
911 private function baseUrl (): string
@@ -13,7 +15,7 @@ private function baseUrl(): string
1315
1416 private function checkAuthenticated ()
1517 {
16- $ this -> line ('Checking authentication… ' );
18+ intro ('Checking authentication… ' );
1719
1820 return Http::acceptJson ()
1921 ->withToken (config ('nativephp-internal.zephpyr.token ' ))
You can’t perform that action at this time.
0 commit comments