* Devex: Default vite config to support using local build of crypto wasm
* use realpathSync and make it work with linked and not-linked
We need to use sync because an async defineConfig fails for the embedded exports.
* also allow just linking matrix-sdk-crypto-wasm (without js-sdk linking)
---------
Co-authored-by: Timo <toger5@hotmail.de>
Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
Co-authored-by: Robin <robin@robin.town>
* Support for analytics configuration via URL parameters in widget mode
Adds:
- posthogApiHost
- posthogApiKey
- rageshakeSubmitUrl
- sentryDsn
- sentryEnvironment
Deprecate analyticsId and use posthogUserId instead
* Partial test coverage
* Simplify tests
* More tests
* Lint
* Split embedded only parameters into own section for clarity
* Update docs/url-params.md
* Update docs/url-params.md
* Update vite.config.js
* Embedded package build of Element Call
Part of https://github.com/element-hq/element-call/issues/2994
This creates a new "embedded" build (vs "full" build) at the vite level. It will be used by a later PR that actually provides platform specific packages.
Embedded build:
- Uses relative URLs
- Uses relative config.json path and other resource loading
- Has a config.json built in
- Doesn't include the public folder (e.g. favicon)
Out of scope:
- this doesn't attempt to exclude SPA functionality, so technically the build could be used in SPA
- the above means that the crypto-wasm binary is included in the build
* CI artifact name based on type of build
* Update src/config/Config.ts
The core vite build shouldn't be responsible for implementing optimisations that are specific to a particular distribution mechanism. e.g. static compressed files for nginx.
This way the core build is "clean".
Instead, the packager/distributor of the build should be responsible for it. e.g. the nginx docker distribution should do any optimisations that it chooses.
by fixing the cause rather than the symptom: this upgrades the code to use the new, recommended JSX transform mode of React 17+, which no longer requires you to import React manually just to write JSX.
* Pretend to upload source maps to sentry
* Build release not in docker so we can upload source maps sensibly
and also upload the release as a plain tarball while we're at it
* fix yaml
* Try specifying version this way
* test rebuild
* pass secrets through
* Too many sentries
* It's almost 2023 and we're still having BSD vs GNU tar issues
* Maybe get sensible tag name & release identifier
* Wrong plugin, and also try the 'release' option which might the right thing
* Try a different github action
see if github likes that any better
* add contents write permission
and switch to the asset upload plugin that had the helpful doc
* actually put release name in tarball path
* copy docker config to right path
* Prettify vite config
* Only activate sentry plugin if we have secrets
* Use env var for tag name
* Also spelling env correctly would likely help
* Fix variable syntax
* Put env var in correct place
One day maybe I will not find yaml syntax confusing
* We don't need to check out the js-sdk separately anymore
* Remove the vite proxying: there's no need since Matrix HSes allow
cross origin requests. This will let us move the default homeserver
config to the config file (in a separate PR...)
* Remove the product name variable which just set it to the default anyway