First app upload is formatted without newlines
Description
The first time an app is uploaded the AppSnapshot may not be present in time causing the app to be formatted from JSON without newlines (see https://gitlab.com/appsemble/appsemble/-/blob/1365-export-app-new-features/packages/server/models/App.ts#L280). When app is created for the first time it does also include a snapshot though so the issue must be an out of sync issue (see packages/server/controllers/apps.ts).
Steps to reproduce
- Publish the empty app using the CLI or create a new in the studio
- Visit http://localhost:9999/en/apps/1/edit#editor
Expected behaviour
The empty app to have newlines between pages and the other group of top level key/value pairs.
Actual behaviour
The empty app does not consistently have newlines between pages and the other group of top level key/value pairs.
Stack trace