* Add TechdocsMetadata type in backend plugin endpoint
* Introduce TechDocsMetadata type in frontend
* Add changeset
* Remove old thennable metadata resp
* Address PR feedback
- Remove explicit type annotation on TechDocsMetadata
- Reintroduce res.send instead of throwing an error
- Change logger info to logger error
* Add TechDocsMetadata type in frontend plugin
* Commit yarn.lock
* Introduce JSON5 and remove parsing in local pub
Signed-off-by: Matei David <matei.david.35@gmail.com>
I initially thought the GCS Nodejs client would make use of it, since it asked for it in the contructor. However, we may not need them at all. Buckets are gloablly unique anyway.
GOOGLE_APPLICATION_CREDENTIALS is the environment variable used by the client. Compute Engine, Google Kubernetes Engine, App Engine, Cloud Run, and Cloud Functions automatically provide a default service account and set this env variable.
https://cloud.google.com/docs/authentication/production
Spinners cause unnecessary UX distraction.
Case 1 (when docs are built and are to be served): Spinners appear for a split second before the name of site shows up. This unnecessarily distracts eyes because spinners increase the size of the Header. A dot (.) would do fine. Definitely more can be done.
Case 2 (when docs are being generated): There is already a linear progress bar (which is recommended in Storybook). Spinners are not good. 🤷
1. Don't use mkdocs in name of APIs or variables. It is an implementation detail and liable to change in future.
2. techDocsApi.getMetadata('mkdocs') and techDocsAPI.getMetadata('entity') should be two separate functions just because their responses differ in structure. They should also be type checked.
3. Use either 'techdocs' or 'TechDocs' consistently. 'techDocs' seems like an unnecessary third way to write TechDocs, which can be avoided.
4. Remove unused /plugins/techdocs-backend/src/service/metadata.ts file
* TechDocs: Logger already prints the name of plugin
* TechDocs: Display a custom error message if provided
* TechDocs: throw custom error message if index.md is not present
* Language improvements. Thanks @freben
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>