1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

1151 Commits

Author SHA1 Message Date
renovate[bot]
815d2fbf28
chore(deps): update dependency eslint to v8.25.0 (#2174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-11 18:57:35 +00:00
Fredrik Oseberg
2a3ab795ae 4.17.0-beta.0 2022-10-11 09:37:11 +02:00
renovate[bot]
bb8b70e3f0
chore(deps): update dependency @swc/core to v1.3.6 (#2161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 19:44:16 +00:00
renovate[bot]
5535a1769d
chore(deps): update dependency @babel/core to v7.19.3 (#2160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 08:13:08 +00:00
renovate[bot]
9477babb3f
chore(deps): update dependency typescript to v4.8.4 (#2154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-07 17:54:29 +00:00
renovate[bot]
996f7ebd80
chore(deps): update dependency fast-check to v3.1.4 (#2149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-07 08:29:36 +00:00
renovate[bot]
b0a3229f0e
chore(deps): update dependency @types/nodemailer to v6.4.6 (#2143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 20:59:44 +00:00
renovate[bot]
48ba2135c2
chore(deps): update dependency @types/express to v4.17.14 (#2142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 06:39:54 +00:00
renovate[bot]
b7b8e14e4e
chore(deps): update dependency @swc/jest to v0.2.23 (#2141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 03:58:52 +00:00
sjaanus
9473ffd4f2 4.16.0 2022-10-03 13:26:08 +03:00
Gard Rimestad
17d1d2288c
fix: make unit test target work (#2082)
This makes `yarn test:unit` work
2022-09-26 12:30:10 +02:00
sjaanus
1426d5be33
Added login endpoint rate limit (#2074)
* Added login rate limit

* Make more pretty

* Make more pretty

* Fix

* Remove double after all
2022-09-26 10:58:58 +03:00
Thomas Heartman
97c2b3c089
openapi: improve validation testing (#2058)
## What

This PR adds an extra layer of OpenAPI validation testing to what we already have. It also fixes any issues that make the new tests fail.

## Why

While the current OpenAPI validation takes care of _some_ things, there's also things it misses, as shown by #2055. By adding the OpenAPI Enforcer package, we should hopefully be able to catch more of these errors in the future. The enforcer _does_ flag the issue in #2055 as an error.

## How

By adding the OpenAPI Enforcer package and making whatever changes it picks up on.

By adding location headers to all our 201 endpoints. I also had to change some signatures on `create` store methods so that they actually return something (a lot of them just returned `void`).

## Discussion points

### Code changes

Some of the code changes may not be necessary or we may want to change more code to align with what changes have been done. It may be worth standardizing on a pattern for `*store.create` methods, so that they always return an identifier or the stored object, for instance.

### On relative URIs

The 201 location headers use relative URIs to point to the created resources. This seemed to be the easiest way to me, as we don't need to worry about figuring out what the absolute URL of the instance is (though we could probably just concat it to the request URI?). The algorithm for determining relative URIs is described in [RFC 3986 section 5](https://www.rfc-editor.org/rfc/rfc3986#section-5).

There's also some places where I'm not sure we _can_ provide accurate location url. I think they're supposed to point _directly at_ whatever the resource is, but for some resources (such as api tokens), you can only get it as part of a collection. From [RFC 9110 on the location field](https://httpwg.org/specs/rfc9110.html#field.location) (emphasis mine):

> the Location header field in a [201 (Created)](https://httpwg.org/specs/rfc9110.html#status.201) response is supposed to provide a URI that is **specific** to the created resource.

A link to a collection is not specific. I'm not sure what best to do about this.

### Inline comments

I've added a number of inline PR comments that I'd love to get some feedback on too. Have a look and let me know what you think!

### Unfinished business

I've added some juicy comments to some of the files here. They contain non-blocking issues that I'm tracking (via github issues). We should resolve them in the future, but right now they can stay as they are. 

## Commits

* Feat: add openapi-enforcer + tests; fix _some_ issues

* Test: allow non-standard string formats

* validation: fix _some_ 201 created location header endpoints

* #1391: fix remaining 201 location headers missing

* Refactor: use the ajv options object instead of add* methods

* #1391: flag validation errors and warnings as test failures

* #1391: modify patch schema to specify either object or array

We don't provide many patch endpoints, so we _could_ create separate
patch operation objects for each one. I think that makes sense to do
as part of the larger cleanup. For now, I think it's worth to simply
turn it into one of these. While it's not entirely accurate, it's
better than what we had before.

* Refactor: make tests easier to read

* #1391: use enum for valid token types

This was previously only a description. This may seem like a breaking
change because OpenAPI would previously accept any string. However,
Joi also performs validation on this, so invalid values wouldn't work
previously either.

* #1391: Comment out default parameter values for now

This isn't the _right_ way, but it's the pragmatic solution. It's not
a big deal and this works as a stopgap solution.

* #1391:  add todo note for api token schema fixes

* #1391: update snapshot

* Revert "#1391: modify patch schema to specify either object or array"

This reverts commit 0dd5d0faa1.

Turns out we need to allow much more than just objects and arrays.
I'll leave this as is for now.

* Chore(#1391): update comment explaining api token schema TODO

* #1391: modify some test code and add comment

* #1391: update tests and spec to allow 'any' type in schema

* Chore: remove comment

* #1391: add tests for context field stores

* #1391: add location header for public signup links

* #1391: fix query parameter description.

There was indeed a bug in the package, and this has been addressed
now, so we can go back to describing the params properly.
2022-09-23 15:02:09 +02:00
Fredrik Strand Oseberg
54633500fd
Feat/use collaborate data (#2067)
* feat: initial architecture

* feat: add generic types

* fix: refactor

* feat: style notification

* feat: remove useFeatureImmutable

* fix: remove casting

* fix: ensure data is present

* fix: revive useFeatureImmutable

* Update frontend/src/component/common/StaleDataNotification/StaleDataNotification.tsx

Co-authored-by: Nuno Góis <github@nunogois.com>

* Update frontend/src/component/common/StaleDataNotification/StaleDataNotification.tsx

Co-authored-by: Nuno Góis <github@nunogois.com>

* Update frontend/src/component/common/StaleDataNotification/StaleDataNotification.tsx

Co-authored-by: Nuno Góis <github@nunogois.com>

* Update frontend/src/component/common/StaleDataNotification/StaleDataNotification.tsx

Co-authored-by: Nuno Góis <github@nunogois.com>

* Update frontend/src/component/common/StaleDataNotification/StaleDataNotification.tsx

Co-authored-by: Nuno Góis <github@nunogois.com>

* fix: pr comments

* fix: change order

Co-authored-by: Nuno Góis <github@nunogois.com>
2022-09-16 15:23:08 +02:00
Christopher Kolstad
d2edf8e52a
4.15.1 2022-09-07 15:01:23 +02:00
Christopher Kolstad
7f7a2a3ce5
4.15.0 2022-09-07 14:53:06 +02:00
Christopher Kolstad
bb4c1abb83
4.15.0-beta.10 2022-09-07 13:50:33 +02:00
Christopher Kolstad
8648649047
task: use swc instead of ts-jest (#2042) 2022-09-06 13:22:41 +02:00
sjaanus
a7a4a743bc
Fix tests (#2040) 2022-09-01 22:22:15 +03:00
renovate[bot]
0db2c08382
chore(deps): update typescript-eslint monorepo to v5.36.1 (#2034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-01 11:28:50 +00:00
renovate[bot]
6e33942193
chore(deps): update dependency eslint to v8.23.0 (#2006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-31 19:27:55 +00:00
sjaanus
c4da10b15f
Docker cross-compilation with buildx (#2003)
* Build docker test

* Change platform to build on amd64

* Put back buildplatform

* Run frontend as separate docker task

* Increase timeout

* Update docs
2022-08-30 12:39:28 +00:00
renovate[bot]
c62ca2020a
chore(deps): update dependency fast-check to v3.1.2 (#1996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-30 08:44:39 +02:00
sjaanus
2d492c1b66 4.15.0-beta.9 2022-08-29 12:36:18 +00:00
Gastón Fournier
4a3ec44a1f
4.15.0-beta.8 2022-08-29 12:03:09 +00:00
Gastón Fournier
47532dee7f
chore: upgrade @unleash/express-openapi (#1976) 2022-08-29 12:23:06 +02:00
olav
0510990503
refactor: remove old frontend dep (#1986) 2022-08-29 09:35:42 +02:00
olav
0af71c9a7d 4.15.0-beta.6 2022-08-26 15:31:10 +02:00
sjaanus
04db9b6d46 4.15.0-beta.5 2022-08-26 09:52:02 +00:00
sjaanus
709c142a87 Merge main 2022-08-26 09:09:18 +00:00
Ivar Conradi Østhus
2a2ed37541
4.15.0-beta.4 2022-08-26 10:43:47 +02:00
Ivar Conradi Østhus
42ee35a2b8
fix: upgrade unleash-frontend to v4.14.8 2022-08-26 10:21:37 +02:00
sjaanus
a1ce89bedc
Merge frontend with backend (#1962)
* fix: use the frontend dir from the backend

* Build is now working

* Fix workflows

* Fix workflows

* Fix build PRs

* Test coverage workflow

* Test coverage

* Test coverage run

* Fix jest report

* refactor: add missing frontend build

* refactor: ignore frontend dir for coverage

* refactor: run frontend build in PRs

* refactor: run backend tests in PRs

* Revert "refactor: run backend tests in PRs"

This reverts commit 22cabddfd1.

* refactor: remove unused frontend build file

* refactor: test workflows in PR

* refactor: use a prepare script for the frontend

* refactor: simplify yarn build scripts

* refactor: fix check-release script

* Revert "refactor: test workflows in PR"

This reverts commit 496ae19404.

* refactor: remove unused gitignore lines

* refactor: remove renovate config from the frontend repo

* refactor: remove frontend repo license

* refactor: remove frontend repo changelog

* refactor: update frontend repo readme

* refactor: add frontend node_modules to dockerignore

* refactor: update the docker yarn.lock snapshot

Co-authored-by: olav <mail@olav.io>
2022-08-26 07:25:31 +00:00
renovate[bot]
b3949dc9f5
chore(deps): update dependency typescript to v4.8.2 (#1967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-26 03:45:26 +00:00
renovate[bot]
b2663878f9
chore(deps): update typescript-eslint monorepo to v5.35.1 (#1963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-25 21:12:36 +00:00
renovate[bot]
20d1d25934
chore(deps): update typescript-eslint monorepo to v5.34.0 (#1955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-23 05:19:10 +00:00
renovate[bot]
976226d27e
chore(deps): update dependency @babel/core to v7.18.13 (#1954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-23 01:56:01 +00:00
renovate[bot]
72d83ba45b
chore(deps): pin dependency @types/cors to 2.8.12 (#1943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-20 07:30:25 +02:00
Gastón Fournier
1625d6193a
fix: https://github.com/Unleash/unleash/security/dependabot/18 (#1933) 2022-08-20 07:29:46 +02:00
olav
30f1ef01eb 4.15.0-beta.2 2022-08-19 13:10:54 +02:00
olav
b5fead41f6 4.15.0-beta.1 2022-08-19 10:55:47 +02:00
olav
e927012f9f
chore: update unleash-frontend (#1944) 2022-08-19 10:26:54 +02:00
olav
0d293929f5
feat: add CORS support to the proxy endpoints (#1936)
* feat: add CORS support to the proxy endpoints

* refactor: remove unused development mode CORS support
2022-08-19 08:09:44 +02:00
olav
e8d542af0f
feat: embed proxy endpoints (#1926)
* refactor: remove unused API definition routes

* feat: add support for proxy keys

* feat: support listening for any event

* feat: embed proxy endpoints

* refactor: add an experimental flag for the embedded proxy
2022-08-16 15:33:33 +02:00
renovate[bot]
3ed72e382a
chore(deps): update typescript-eslint monorepo to v5.33.1 (#1923)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-15 21:20:13 +00:00
renovate[bot]
aebecf5f3a
chore(deps): update dependency eslint to v8.22.0 (#1920)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-14 04:39:45 +00:00
renovate[bot]
a7d575061e
chore(deps): update dependency @types/semver to v7.3.12 (#1914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-12 00:55:04 +00:00
renovate[bot]
0c8ebd4dcc
chore(deps): update dependency @types/semver to v7.3.11 (#1909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-10 21:54:23 +00:00
olav
c7174e0a2e
chore: update unleash-frontend (#1903) 2022-08-09 16:40:08 +02:00
renovate[bot]
eb2de89b3c
chore(deps): update typescript-eslint monorepo to v5.33.0 (#1786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-09 15:17:29 +02:00