admin-home.ts 925 B

12345678910111213141516171819202122232425262728293031
  1. type SystemInfo = {
  2. growiVersion?: string;
  3. nodeVersion?: string;
  4. npmVersion?: string;
  5. pnpmVersion?: string;
  6. };
  7. /**
  8. * Generates prefilled host information as markdown for bug reports
  9. * @param systemInfo System version information
  10. * @returns Markdown formatted string with system information
  11. */
  12. export const generatePrefilledHostInformationMarkdown = (
  13. systemInfo: SystemInfo,
  14. ): string => {
  15. const { growiVersion, nodeVersion, npmVersion, pnpmVersion } = systemInfo;
  16. return `| item | version |
  17. | --- | --- |
  18. |OS ||
  19. |GROWI |${growiVersion ?? ''}|
  20. |node.js |${nodeVersion ?? ''}|
  21. |npm |${npmVersion ?? ''}|
  22. |pnpm |${pnpmVersion ?? ''}|
  23. |Using Docker|yes/no|
  24. |Using [growi-docker-compose][growi-docker-compose]|yes/no|
  25. [growi-docker-compose]: https://github.com/growilabs/growi-docker-compose
  26. *(Accessing https://{GROWI_HOST}/admin helps you to fill in above versions)*`;
  27. };