@git-snitch/renderer 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/build.d.ts +7 -0
  2. package/dist/build.d.ts.map +1 -0
  3. package/dist/build.js +53 -0
  4. package/dist/charts.d.ts +106 -0
  5. package/dist/charts.d.ts.map +1 -0
  6. package/dist/charts.js +212 -0
  7. package/dist/custom-templates.d.ts +3 -0
  8. package/dist/custom-templates.d.ts.map +1 -0
  9. package/dist/custom-templates.js +1 -0
  10. package/dist/data.d.ts +24 -0
  11. package/dist/data.d.ts.map +1 -0
  12. package/dist/data.js +30 -0
  13. package/dist/empty-state.d.ts +13 -0
  14. package/dist/empty-state.d.ts.map +1 -0
  15. package/dist/empty-state.js +9 -0
  16. package/dist/export.d.ts +15 -0
  17. package/dist/export.d.ts.map +1 -0
  18. package/dist/export.js +53 -0
  19. package/dist/index.d.ts +15 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +9 -0
  22. package/dist/inline-plugin.d.ts +13 -0
  23. package/dist/inline-plugin.d.ts.map +1 -0
  24. package/dist/inline-plugin.js +81 -0
  25. package/dist/layout.d.ts +43 -0
  26. package/dist/layout.d.ts.map +1 -0
  27. package/dist/layout.js +25 -0
  28. package/dist/remote-urls.d.ts +6 -0
  29. package/dist/remote-urls.d.ts.map +1 -0
  30. package/dist/remote-urls.js +82 -0
  31. package/dist/serialization.d.ts +5 -0
  32. package/dist/serialization.d.ts.map +1 -0
  33. package/dist/serialization.js +46 -0
  34. package/dist/tables.d.ts +50 -0
  35. package/dist/tables.d.ts.map +1 -0
  36. package/dist/tables.js +228 -0
  37. package/dist/template/report-template.html +135 -0
  38. package/dist/template.d.ts +21 -0
  39. package/dist/template.d.ts.map +1 -0
  40. package/dist/template.js +1 -0
  41. package/dist/theme-toggle.d.ts +2 -0
  42. package/dist/theme-toggle.d.ts.map +1 -0
  43. package/dist/theme-toggle.js +9 -0
  44. package/dist/theme.d.ts +16 -0
  45. package/dist/theme.d.ts.map +1 -0
  46. package/dist/theme.js +70 -0
  47. package/package.json +57 -0
  48. package/report-template.html +15 -0
  49. package/src/app.tsx +351 -0
  50. package/src/build.ts +68 -0
  51. package/src/charts-route.tsx +158 -0
  52. package/src/charts.tsx +482 -0
  53. package/src/custom-template-module.d.ts +5 -0
  54. package/src/custom-templates.ts +3 -0
  55. package/src/data.ts +52 -0
  56. package/src/empty-state.tsx +31 -0
  57. package/src/export.ts +77 -0
  58. package/src/index.ts +52 -0
  59. package/src/inline-plugin.ts +123 -0
  60. package/src/layout.tsx +152 -0
  61. package/src/main.tsx +17 -0
  62. package/src/overview.tsx +253 -0
  63. package/src/quality-hotspots-routes.tsx +340 -0
  64. package/src/remote-urls.ts +97 -0
  65. package/src/repo-routes.tsx +285 -0
  66. package/src/scan-routes.tsx +393 -0
  67. package/src/serialization.ts +58 -0
  68. package/src/styles.css +2 -0
  69. package/src/tables.tsx +467 -0
  70. package/src/template.ts +30 -0
  71. package/src/theme-toggle.tsx +24 -0
  72. package/src/theme.tsx +108 -0
  73. package/src/vite-env.d.ts +1 -0
  74. package/vite.config.ts +41 -0
package/vite.config.ts ADDED
@@ -0,0 +1,41 @@
1
+ import tailwindcss from "@tailwindcss/vite";
2
+ import viteReact from "@vitejs/plugin-react";
3
+ import { fileURLToPath } from "node:url";
4
+ import { defineConfig } from "vite";
5
+
6
+ import { createInlineHtmlPlugin } from "./src/inline-plugin";
7
+
8
+ const packageDirectory = fileURLToPath(new URL(".", import.meta.url));
9
+ const defaultTemplateModule = fileURLToPath(new URL("./src/custom-templates.ts", import.meta.url));
10
+ const packageNodeModules = fileURLToPath(new URL("./node_modules/", import.meta.url));
11
+ const customTemplateModule = process.env.GIT_SNITCH_TEMPLATE_MODULE;
12
+
13
+ export default defineConfig({
14
+ base: "./",
15
+ build: {
16
+ assetsInlineLimit: 0,
17
+ cssCodeSplit: false,
18
+ emptyOutDir: true,
19
+ modulePreload: false,
20
+ outDir: "dist/template",
21
+ rollupOptions: {
22
+ input: fileURLToPath(new URL("./report-template.html", import.meta.url)),
23
+ output: {
24
+ entryFileNames: "assets/[name].js",
25
+ assetFileNames: "assets/[name][extname]",
26
+ },
27
+ },
28
+ },
29
+ plugins: [tailwindcss(), viteReact(), createInlineHtmlPlugin()],
30
+ resolve: {
31
+ alias: {
32
+ "@git-snitch/renderer": fileURLToPath(new URL("./src", import.meta.url)),
33
+ react: `${packageNodeModules}react`,
34
+ "react/jsx-dev-runtime": `${packageNodeModules}react/jsx-dev-runtime.js`,
35
+ "react/jsx-runtime": `${packageNodeModules}react/jsx-runtime.js`,
36
+ "virtual:git-snitch-custom-templates": customTemplateModule ?? defaultTemplateModule,
37
+ },
38
+ tsconfigPaths: true,
39
+ },
40
+ root: packageDirectory,
41
+ });