* feat(server): extend key creation API to allow specifying a port
* Use `validateNumberParam` in `setPortForNewAccessKey`.
* Only check if the port is valid if it was specified.
* Undo the removal of use of `Promise.all(...)`.
* Fix tests.
* Only run validation if parameters are provided.
* Correct types for API validation methods where `undefined` is a possible return type.
* feat(server): add optional `id` parameter to `createNewAccessKey` method
* Use `PUT` instead of `POST`.
* Make changes based on review.
* Update access key creation path to only allow ID on `PUT` calls.
* Expand test scenarios for key generation to `createAccessKey`.
* Add a `toHavePropertiesOf` custom Jasmine matcher.
* Add explicit test case for `ConflictError`.
* Revert "Add a `toHavePropertiesOf` custom Jasmine matcher."
This reverts commit 134e0df441.
* mostly done, still need to test link #2
* Update outline-server-settings.ts to add margin-top and margin-bottom to documentation-link
* remove api documentation, and use iron-icon
* use iron icon icon
* add shouldShowDocumentationLink
* Update src/server_manager/web_app/ui_components/app-root.ts
Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
* make hasTranslation better
* update message id and indentation
---------
Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
* Revert "chore(sentry_webhook): update Salesforce values (#1419)"
This reverts commit 836778324e.
* Keep the dev changes as they don't have a production impact.
* Update tests.
* fix(server_manager): replace turned down omahaproxy.appspot.com
* Update engine.
* Fix type.
* Yes we get it. A string is not an int.
* Put the comment back. It's quite useful.
This is unnecessarily restricting the server, which limits the number of connections we can support. It also can't raise the ulimit, since the host impose a cap on the container.
Service providers can still set the ulimit on their host if they want to.
It seems we're getting a bunch of events coming in with the email set to the literal sequence of characters `[undefined]` - until we find the source of these events, this should stop them from flooding salesforce.
* feat(build): allow version name injection into the outline manager
* add default version name
* ah?
* this?
* this works on other platforms?
* lmao
* try this
* oops i meant this
* put back
* ah
In this PR, I integrated Outline Manager with the latest Sentry library and re-enabled the user feedback form. Sentry was not working because of two reasons:
1. Electron enabled sandbox to its `preload.js` script, therefore calling `Sentry.init` in `preload` is not enough (and not necessary), we must call `Sentry.init` in every renderer process as well
2. `SENTRY_DSN` is not injected into electron, we read it from `process.env.SENTRY_DSN`, but this is a runtime environment variable (which will be `undefined`)
So basically my fix is straightforward:
1. Calling `Sentry.init` in `web_app/app.ts`, which is the entrypoint of renderer process
2. Use `webpack` to inject `SENTRY_DSN_` variable into `electron_app/index.ts` during build
In order to be consistent (and to minify the result js file), I also introduced webpack to build the `preload.ts` script as well.
Finally I upgraded electron to the latest version that does not have [API restrictions](https://www.electronjs.org/docs/latest/breaking-changes#default-changed-renderers-without-nodeintegration-true-are-sandboxed-by-default) to `preload` script (we are using `crypto` package which will be forbidden). A refactoring is required in order to upgrade to any newer versions of electron.