nx-electron
nx-electron copied to clipboard
The parameter "useAppIdAsId" have no effect.
Describe the bug
The parameter "useAppIdAsId" doesn't have any effect in the url of the squirrel updater.
It is still using the "name" of the entire nx solution (package.json), not the app's (from its project.json) or the id (from maker.options.json).
To Reproduce Steps to reproduce the behavior:
- Name you solution 'my-nx-solution' in the main package.json file
- Configure your electron app to use windows.squirrel
- Set the following configuration in the maker.options.json file:
{
"$schema": "../../../../../node_modules/nx-electron/src/validation/maker.schema.json",
"productName": "my-app",
"appId": "com.company.myapp",
"win": {
"icon": "apps/my-app/src/assets/favicon.ico",
"target": "squirrel"
},
"squirrelWindows": {
"useAppIdAsId": false,
}
}
- Build, Make and install the app after enabling the auto update service.
- Observe the requested url:
https://my-domain/updates/win32/0.0.0/RELEASES?id=my-nx-solution&localVersion=0.0.0&arch=amd64
-
Note the id is the name of the nx solution, not the app's.
-
Enable the option "useAppIdAsId"
{
"$schema": "../../../../../node_modules/nx-electron/src/validation/maker.schema.json",
"productName": "my-app",
"appId": "com.company.myapp",
"win": {
"icon": "apps/my-app/src/assets/favicon.ico",
"target": "squirrel"
},
"squirrelWindows": {
"useAppIdAsId": true, <------
}
}
-
Build, Make and install the app.
-
Observe the requested url:
https://my-domain/updates/win32/0.0.0/RELEASES?id=my-nx-solution&localVersion=0.0.0&arch=amd64
There is no changes.
Expected behavior
When useAppIdAsId is false, we should have the app name from its project.json file:
https://my-domain/updates/win32/0.0.0/RELEASES?id=my-app&localVersion=0.0.0&arch=amd64
When useAppIdAsId is true, we should have the app id from the maker.options.json file:
https://my-domain/updates/win32/0.0.0/RELEASES?id=com.company.myapp&localVersion=0.0.0&arch=amd64
Desktop (please complete the following information):
- OS: Windows
- Nx Electron Version 29.1