Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into next #297

Open
wants to merge 314 commits into
base: next
Choose a base branch
from
Open

Merge main into next #297

wants to merge 314 commits into from

Conversation

vivid-planet-bot
Copy link

This is an automated pull request to merge changes from main into next.

johnnyomair and others added 29 commits September 17, 2024 07:21
The API always uses the static authed user, also during rendering of the
site. When the site tries to render a page it calls pageTreeNodeByPath
of the API alongside with the current scope. If a "wrong" scope (e.g. a
language which does not exist) is sent, the API locally returns an
access forbidden because the current authed user does not have access to
this scope.

With this PR the API locally uses the system user for these types of
requests thus return a valid response allowing the site to call
notFound().
Incorporated the changes made in
vivid-planet/comet#2531, removing the irrelevant
sections.
Use config instead of directly accessing env vars for additional type
safety and validation.

Feedback from
#324 (comment)
…340)

---------

Co-authored-by: Markus Fichtner <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
Addresses the following warning: `The following actions use a deprecated
Node.js version and will be forced to run on node20:
actions/checkout@v3, actions/setup-node@v3.`
favicon was not displayed when the project was deployed [internal: POBA-548]
---------

Co-authored-by: Thomas Dax <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
Add a "/" before favicon (tested in project)

Co-authored-by: Niko Sams <[email protected]>
Admin: Fix favicon not working in deployed environments
Currently the application cannot serve a correct 404. When calling an
URL with a wrong language identifier (e.g. /foo instead /en) the page is
being rendered and thus the layouts as well. However, the layout returns
a 500 because the messages can't be loaded.

With this change the 404 is returned in english if the language can't be
resolved.
## Description

I've noticed that we're currently doing this inconsistently while
debugging a bug in
[getCrudSearchFieldsFromMetadata](https://github.com/vivid-planet/comet/blob/main/packages/api/cms-api/src/generator/utils/search-fields-from-metadata.ts#L6)
together with @andrearutrecht. Since we're checking for `type` there,
and not `columnType`, we should prefer `type` over `columnType` (We
still need to fix the bug though).

## Further information

I've also looked at the MikroORM docs to find a best practice and found
that they're using `type` in the
[tutorial](https://mikro-orm.io/docs/guide/first-entity#first-entity),
so I believe using `type` is preferred when it's possible.
Perform minor dependency updates using `npm update`.
Previously, styled-components required this dependency to be installed.
For styled-components@6 this is no longer required, so we can remove the
dependency as well.
Upgrade commander, glob, and rimraf to the latest versions.
Update server to replace environment variables in-memory

- Replace environment variables directly in-memory
- Serve modified index.html for root and fallback routes

---------

Co-authored-by: Niko Sams <[email protected]>
Doing so improves the error message when an invalid environment is
passed, for instance, if the environment variable isn't set correctly.
- Domain is retrieved via params (allows removing SiteConfigsProvider)
- Adds directory and layout for having IntlProvider in block-preview

Supersedes #354
- path of `index.html` is invalid (path is relative to
`admin/server/server.js`)
- `res.send` signature is invalid (it tries to send the content as HTTP
status code)

Introduced by #367
Next will try to render a "normal" page when a non-existing asset (e.g.
/assets/foo) is requested. This lead to misleading 500 errors as
"assets" would be used as parameter for `/app/[domain]`, causing our
site config setup to fail. To fix this, we add an additional page
`/app/assets/[[...path]]` which always returns 404.

---------

Co-authored-by: Johannes Obermair <[email protected]>
Will be handled by the fallback route (with replaced environment
variables)
johnnyomair and others added 30 commits December 2, 2024 10:44
Feedback from first project: The logo should be touchable and link to the home page.
Nearly every homepage has this behavior so i think we can also add it to the starter.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
MikroORM will interpret the provided type as column type if no mapped type alias is known:
> The type option here allows several input forms. We are using the text type name here, which is mapped to the TextType - a mapped type representation used internally by the ORM. If you provide a string value there, and it won't match any known type alias, it will be considered as the column type.
> – [MikroORM docs](https://mikro-orm.io/docs/guide/first-entity#scalar-properties)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The install and lint commands of the microservices were run in parallel using `&` in combination with `wait`. However, doing so caused the step to not fail if one of the commands failed. We therefore remove the parallelization and use the good old `&&`.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Johannes Obermair <[email protected]>
We incorrectly removed `@comet/cli` from the API in #560. The package is used for the site configs type.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.