Skip to content

Commit 27bf4a4

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/checkout-6
2 parents 2dab3e9 + a028946 commit 27bf4a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2315
-745
lines changed

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
uses: actions/checkout@v6
2424
with:
2525
ref: ${{ github.head_ref || github.sha }}
26+
fetch-depth: 0
2627

2728
- name: Check PHP code style issues
2829
if: github.event_name == 'push'

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3131

3232
- name: Cache Composer dependencies
33-
uses: actions/cache@v4
33+
uses: actions/cache@v5
3434
with:
3535
path: ${{ steps.composer-cache.outputs.dir }}
3636
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}

config/nativephp-internal.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
'storage/hot',
9090

9191
// Only needed for local testing
92+
'vendor/nativephp/desktop/.git',
9293
'vendor/nativephp/desktop/resources',
9394
'vendor/nativephp/desktop/vendor',
9495
'vendor/nativephp/php-bin',

config/nativephp.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
/**
103103
* The updater provider to use.
104104
* Supported: "github", "s3", "spaces"
105+
* Note: The "s3" provider is compatible with S3-compatible services like Cloudflare R2.
105106
*/
106107
'default' => env('NATIVEPHP_UPDATER_PROVIDER', 'spaces'),
107108

@@ -113,6 +114,7 @@
113114
'token' => env('GITHUB_TOKEN'),
114115
'vPrefixedTagName' => env('GITHUB_V_PREFIXED_TAG_NAME', true),
115116
'private' => env('GITHUB_PRIVATE', false),
117+
'autoupdate_token' => env('GITHUB_AUTOUPDATE_TOKEN'), // Read-only token used by the updater for private repos
116118
'channel' => env('GITHUB_CHANNEL', 'latest'),
117119
'releaseType' => env('GITHUB_RELEASE_TYPE', 'draft'),
118120
],
@@ -125,6 +127,13 @@
125127
'bucket' => env('AWS_BUCKET'),
126128
'endpoint' => env('AWS_ENDPOINT'),
127129
'path' => env('NATIVEPHP_UPDATER_PATH', null),
130+
/**
131+
* Optional public URL for serving updates (e.g., CDN or custom domain).
132+
* When set, updates will be downloaded from this URL instead of the S3 endpoint.
133+
* Useful for S3 with CloudFront or Cloudflare R2 with public access
134+
* Example: 'https://updates.yourdomain.com'
135+
*/
136+
'public_url' => env('AWS_PUBLIC_URL'),
128137
],
129138

130139
'spaces' => [

package-lock.json

Lines changed: 277 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/electron/electron-builder.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const deepLinkProtocol = process.env.NATIVEPHP_DEEPLINK_SCHEME;
1313
const updaterEnabled = process.env.NATIVEPHP_UPDATER_ENABLED === 'true';
1414

1515
// Azure signing configuration
16-
const azurePublisherName = process.env.NATIVEPHP_AZURE_PUBLISHER_NAME;
1716
const azureEndpoint = process.env.NATIVEPHP_AZURE_ENDPOINT;
1817
const azureCertificateProfileName = process.env.NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME;
1918
const azureCodeSigningAccountName = process.env.NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME;
@@ -83,9 +82,8 @@ export default {
8382
afterSign: 'build/notarize.js',
8483
win: {
8584
executableName: fileName,
86-
...(azurePublisherName && azureEndpoint && azureCertificateProfileName && azureCodeSigningAccountName ? {
85+
...(azureEndpoint && azureCertificateProfileName && azureCodeSigningAccountName ? {
8786
azureSignOptions: {
88-
publisherName: azurePublisherName,
8987
endpoint: azureEndpoint,
9088
certificateProfileName: azureCertificateProfileName,
9189
codeSigningAccountName: azureCodeSigningAccountName

resources/electron/electron-plugin/dist/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ class NativePHP {
9595
details.requestHeaders['X-NativePHP-Secret'] = state.randomSecret;
9696
callback({ requestHeaders: details.requestHeaders });
9797
});
98+
if (process.env.NATIVEPHP_NO_FOCUS) {
99+
state.noFocusOnRestart = true;
100+
}
98101
yield notifyLaravel("booted");
99102
});
100103
}
@@ -158,8 +161,16 @@ class NativePHP {
158161
}
159162
}
160163
startAutoUpdater(config) {
161-
var _a;
164+
var _a, _b, _c, _d, _e;
162165
if (((_a = config === null || config === void 0 ? void 0 : config.updater) === null || _a === void 0 ? void 0 : _a.enabled) === true) {
166+
const defaultProvider = (_b = config === null || config === void 0 ? void 0 : config.updater) === null || _b === void 0 ? void 0 : _b.default;
167+
const publicUrl = (_e = (_d = (_c = config === null || config === void 0 ? void 0 : config.updater) === null || _c === void 0 ? void 0 : _c.providers) === null || _d === void 0 ? void 0 : _d[defaultProvider]) === null || _e === void 0 ? void 0 : _e.public_url;
168+
if (publicUrl) {
169+
autoUpdater.setFeedURL({
170+
provider: 'generic',
171+
url: publicUrl
172+
});
173+
}
163174
autoUpdater.checkForUpdatesAndNotify();
164175
}
165176
}

resources/electron/electron-plugin/dist/libs/positioner/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ class Positioner {
7474
x: Math.floor(screenSize.x + (screenSize.width / 2 - windowSize[0] / 2)),
7575
y: Math.floor((screenSize.height + screenSize.y) / 2 - windowSize[1] / 2),
7676
},
77+
upperCenter: {
78+
x: Math.floor(screenSize.x + (screenSize.width / 2 - windowSize[0] / 2)),
79+
y: Math.floor(screenSize.y + (screenSize.height - windowSize[1]) / 3),
80+
},
7781
};
7882
if (position.substr(0, 4) === "tray") {
7983
if (positions[position].x + windowSize[0] >

0 commit comments

Comments
 (0)