Refactor the remaining logic from gulp. Part of the browser build script
refactor effort.
Webpack is now responsible for performing most of the operations previously
done by gulp. This includes: - Setting browser specific class - Building the
manifest file The `package.json` is modified to include browser specific
commands for `build`, `build:prod`, `build:watch` and `dist`.
# Manifests
Manifests now uses the `copy-webpack-plugin` `transform` feature. The logic is
located in `apps/browser/webpack/manifest.js`. It reads a template, which
supports some basic operations primarily overriding with browser specific
fields using `__browser__`. The `manifest.json` for both regular and mv3
builds are identical to our existing manifests except:
- `applications` renamed to `browser_specific_settings`.
- `permissions` sorted alphabetically.
# Safari build
Safari requires additional packaging commands. This is implemented as a
powershell script due to the cross-platform nature, and since we generally
require powershell in our distribution pipelines. An alternative would be to
write it in bash, but bash is less powerful and would require some additional
commands like `jq`. Another alternative is to write it using js, but that would
require additional dependencies.
* feat: update sdk service abstraction with documentation and new `userClient$` function
* feat: add uninitialized user client with cache
* feat: initialize user crypto
* feat: initialize org keys
* fix: org crypto not initializing properly
* feat: avoid creating clients unnecessarily
* chore: remove dev print/subscription
* fix: clean up cache
* chore: update sdk version
* feat: implement clean-up logic (#11504)
* chore: bump sdk version to fix build issues
* chore: bump sdk version to fix build issues
* fix: missing constructor parameters
* refactor: simplify free() and delete() calls
* refactor: use a named function for client creation
* fix: client never freeing after refactor
* fix: broken impl and race condition in tests
* feat: add sdk override to desktop build
* feat: add SDK version to browser about dialog
* feat: add sdk override to browser build
* fix: `npm ci` overriding the override
* fix: artifacts not properly downloaded
* fix: switch to new repository
* feat: add debug version function to web
* feat: add sdk-version to CLI
* feat: add version to desktop
* feat: add override to cli
* feat: add override to web
* fix: cli version acting as default command
* fix: consistent workflow input name
* feat: add error handling
* feat: upgrade sdk-internal
* fix: forgot to update package lock
* fix: broken CI build
move sdk version to a regular command
* chore: revert version changes
* refactor: move error handling code
* chore: bump SDK to 0.2.0.main-1
* fix: clean up references to inputs.sdk_commit
* refactor: rename `init` to `applyVersionToWindow`
Refactor the remaining logic from gulp. Part of the browser build script
refactor effort.
Webpack is now responsible for performing most of the operations previously
done by gulp. This includes: - Setting browser specific class - Building the
manifest file The `package.json` is modified to include browser specific
commands for `build`, `build:prod`, `build:watch` and `dist`.
# Manifests
Manifests now uses the `copy-webpack-plugin` `transform` feature. The logic is
located in `apps/browser/webpack/manifest.js`. It reads a template, which
supports some basic operations primarily overriding with browser specific
fields using `__browser__`. The `manifest.json` for both regular and mv3
builds are identical to our existing manifests except:
- `applications` renamed to `browser_specific_settings`.
- `permissions` sorted alphabetically.
# Safari build
Safari requires additional packaging commands. This is implemented as a
powershell script due to the cross-platform nature, and since we generally
require powershell in our distribution pipelines. An alternative would be to
write it in bash, but bash is less powerful and would require some additional
commands like `jq`. Another alternative is to write it using js, but that would
require additional dependencies.
* Revert workflow changes in "[PM-9022] scaffold the extension and build pipeline (#9948)"
This reverts commit 62112b99a9.
* fix: comment out autofill entitlement
* feat: add macos xcode project
* feat: add extension to mas build
* feat: use `after-sign` to avoid issues
Electron builder modifies the .plist in the extension which causes issues with the signing process. Copying and re-signing manually avoids this because it bypasses the electron builder for the extension
* feat: always clean build and add better error handling
* chore: add some logging to after-sign
* feat: automatically cleanup xcode build to avoid duplicate extensions
* docs: add information about managing extensions
* feat: add missing safari extension logging
* lint: allow macos filenames
* chore: add macos to platform ownership
* lint: add some additional allowed files
* feat: don't build autofill extension for MAS
* chore: ignore capital letters linting for all macos files
* chore: replace gulpfile with regular node script
* chore: add lint rules to script
* lint: fix remaining lint issues in script
* chore: tweak lint rule
* feat: remove desktop target
* fix: use new provisioning profile for dev extension
* Update to unblock CI builds
* chore: remove extension from masdev pack
This way we don't include the extension in any build and can avoid the signing issues it brings
* chore: add autofill as codeowner
* chore: remove xcuserdata
* chore: ignore xcuserdata
---------
Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
Co-authored-by: Michał Chęciński <mchecinski@bitwarden.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Part of the browser build script refactor effort. bitwarden.atlassian.net/browse/PM-6683
The beta logic adds a fair bit of complexity and is currently unused. Let’s remove it and we can look into re-add it after migrating to our new build system.
* Do not test napi crate on windows
possibly related to https://github.com/napi-rs/napi-rs/issues/1405. We are seeing buffer overflows in ci due to repeated Node-API GetProcAddress failures.
We don't have any tests in the napi crate, so there's no harm in removing those tests right now. If we have tests there in the future, we'll need to actually fix this. However, the napi crate is just a wiring crate, so maybe we won't ever have any unit tests there.
* include crate in name
* Remove crate axis
* Revert "Remove unnecessary plist keys in desktop_proxy (#10933)"
This reverts commit 4dbb036df1.
* Revert "Fix TestFlight errors caused by desktop_proxy (#10928)"
This reverts commit 40cb4b5353.
* Revert "[PM-5506] Enable electron fuses (#10073)"
This reverts commit 78c5e9c706.
* Revert "[PM-7846] Implement a rust based native messaging proxy and IPC system (#9894)"
This reverts commit 55874b72bf.
* [PM-7846] Implement a rust based native messaging proxy and IPC system
* Only build desktop_proxy
* Bundle the desktop_proxy file
* Make sys deps optional for the proxy
* Restore accidentally deleted after-sign
* Update native cache to contain dist folder
* Add some test logging
* Native module cache seems very aggressive
* Fix invalid directory
* Fix debug print
* Remove cache force
* Remove cache debug code
* Only log to file in debug builds
* Place the binary in the correct place for mac and make sure it's signed
* Fix platform paths
* Test unsigned appx
* Revert "Test unsigned appx"
This reverts commit e47535440a.
* Fix comment
* Remove logs
* Use debug builds in native code, and test private path on MacOS
* Add connected message
* Update IPC API comments
* Update linux to also use XDG_ dir
* Update main.rs comment
* Improve docs and split some tasks spawned into separate functions
* Update send docs and return number of elements sent
* Mark `listen` as async to ensure it runs in a tokio context, handle errors better
* Add log on client channel closed
* Move binary to MacOS folder, and sign it manually so it gets the correct entitlements
* Fix some review comments
* Run prettier
* Added missing zbus_polkit dep
* Extract magic number and increase it to match spec
* Comment fix
* Use Napi object, combine nativeBinding export, always log to file
* Missed one comment
* Remove unnecessary generics
* Correct comment
* Select only codesigning identities
* Filter certificates
* Also add local dev cert
* Remove log
* Fix package ID
* debug_assert won't run the pop() in release mode
* Better error messages
* Fix review comments
* Remove unnecessary comment
* Update napi generated TS file
* Temporary fix for DDG
* [PM-10667] Implement manifest v3 on Firefox and Safari
* [PM-10667] Fixing issues with CORS present in sandboxed iframe on Firefox
* [PM-10667] Updating gulp build process to ensure dist files are created correctly
* [PM-10667] Adding build processes to the Github workflow
* [PM-10667] Removing faulty Safari mv3 build workflow
* [PM-10667] Fixing jest tests
* [PM-10667] Reworking logic within inline menu
* Update apps/browser/webpack.config.js
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
---------
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>