From 212f11b7b9590c6cb4a0ed16ef11f27310a3677d Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Tue, 4 Mar 2025 14:12:45 +0100 Subject: [PATCH 1/3] feat: zephpyr configs --- config/nativephp-internal.php | 9 +++++++++ config/nativephp.php | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/config/nativephp-internal.php b/config/nativephp-internal.php index 4210df92..a9d97c79 100644 --- a/config/nativephp-internal.php +++ b/config/nativephp-internal.php @@ -29,4 +29,13 @@ * The URL to the NativePHP API. */ 'api_url' => env('NATIVEPHP_API_URL', 'http://localhost:4000/api/'), + + /** + * Configuration for the Zephpyr API. + */ + 'zephpyr' => [ + 'host' => env('ZEPHPYR_HOST', 'https://zephpyr.com'), + 'token' => env('ZEPHPYR_TOKEN'), + 'key' => env('ZEPHPYR_KEY'), + ], ]; diff --git a/config/nativephp.php b/config/nativephp.php index 6e4edcf1..49eacd84 100644 --- a/config/nativephp.php +++ b/config/nativephp.php @@ -48,6 +48,7 @@ 'GITHUB_*', 'DO_SPACES_*', '*_SECRET', + 'ZEPHPYR_*', 'NATIVEPHP_UPDATER_PATH', 'NATIVEPHP_APPLE_ID', 'NATIVEPHP_APPLE_ID_PASS', @@ -60,6 +61,8 @@ * You may use glob / wildcard patterns here. */ 'cleanup_exclude_files' => [ + 'build', + 'temp', 'content', 'node_modules', '*/tests', @@ -136,4 +139,9 @@ 'postbuild' => [ // 'rm -rf public/build', ], + + /** + * Custom PHP binary path. + */ + 'binary_path' => env('NATIVEPHP_BINARY_PATH', null), ]; From 334b5dedfeb901763906a1ff128c432bb51f546e Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Tue, 4 Mar 2025 14:14:12 +0100 Subject: [PATCH 2/3] fix: don't create database inside a phar --- src/NativeServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NativeServiceProvider.php b/src/NativeServiceProvider.php index b5b32252..1c134031 100644 --- a/src/NativeServiceProvider.php +++ b/src/NativeServiceProvider.php @@ -25,6 +25,7 @@ use Native\Laravel\Logging\LogWatcher; use Native\Laravel\PowerMonitor as PowerMonitorImplementation; use Native\Laravel\Windows\WindowManager as WindowManagerImplementation; +use Phar; use Spatie\LaravelPackageTools\Package; use Spatie\LaravelPackageTools\PackageServiceProvider; @@ -148,7 +149,8 @@ public function rewriteDatabase() { $databasePath = config('nativephp-internal.database_path'); - if (config('app.debug')) { + // Automatically create the database in development mode but not if we are running in a Phar + if (config('app.debug') && ! Phar::running()) { $databasePath = database_path('nativephp.sqlite'); if (! file_exists($databasePath)) { From 6103ed50222679e48e8672625c59e6bf63b9530c Mon Sep 17 00:00:00 2001 From: SRWieZ <1408020+SRWieZ@users.noreply.github.com> Date: Tue, 4 Mar 2025 13:14:59 +0000 Subject: [PATCH 3/3] Fix styling --- src/NativeServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NativeServiceProvider.php b/src/NativeServiceProvider.php index 1c134031..526c8cf5 100644 --- a/src/NativeServiceProvider.php +++ b/src/NativeServiceProvider.php @@ -150,7 +150,7 @@ public function rewriteDatabase() $databasePath = config('nativephp-internal.database_path'); // Automatically create the database in development mode but not if we are running in a Phar - if (config('app.debug') && ! Phar::running()) { + if (config('app.debug') && ! Phar::running()) { $databasePath = database_path('nativephp.sqlite'); if (! file_exists($databasePath)) {