git-truck 0.0.0-d5bd50a → 0.0.0-d933e54
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.
- package/README.md +26 -80
- package/build/client/assets/RevisionSelect-B_guhgxl.js +1 -0
- package/build/client/assets/_index-D9KwXVC-.js +1 -0
- package/build/client/assets/_repo._-CWq3-dh0.js +32 -0
- package/build/client/assets/_repository-l0sNRNKZ.js +1 -0
- package/build/client/assets/authordist-l0sNRNKZ.js +1 -0
- package/build/client/assets/buttons.esm-BkxjhP-6.js +5 -0
- package/build/client/assets/clearCache--4RF0gw5.js +1 -0
- package/build/client/assets/commitcount-l0sNRNKZ.js +1 -0
- package/build/client/assets/commits-l0sNRNKZ.js +1 -0
- package/build/client/assets/entry.client-D4PMZUGU.js +34 -0
- package/build/client/assets/index-DxqpfKO2.js +43 -0
- package/build/client/assets/index-ND1AquXG.js +17 -0
- package/build/client/assets/index-wXVnAQWr.js +1 -0
- package/build/client/assets/manifest-f37044c7.js +1 -0
- package/build/client/assets/progress-l0sNRNKZ.js +1 -0
- package/build/client/assets/root-Cv5eA9gP.js +1 -0
- package/build/client/assets/root-Dhw-WUOB.css +1 -0
- package/build/client/assets/util-ConTOzFi.js +1 -0
- package/build/client/favicon.ico +0 -0
- package/build/server/assets/app-CmtwYc5W.js +849 -0
- package/build/server/assets/server-build-C8iQkJNv.js +6827 -0
- package/build/server/index.js +19 -0
- package/cli.js +35680 -1184
- package/package.json +105 -95
- package/build/index.js +0 -1438
- package/build/metafile.js.json +0 -1
- package/build/metafile.server.json +0 -1
- package/build/version.txt +0 -1
- package/public/build/_assets/animations-TUO2PXWS.css +0 -1
- package/public/build/_assets/react-datepicker-SHOMGW4P.css +0 -1
- package/public/build/_assets/tailwind-4VIMNRDC.css +0 -1
- package/public/build/_assets/truck-JLDVJULS.png +0 -0
- package/public/build/_assets/vars-COQCVZEU.css +0 -1
- package/public/build/_shared/buttons.esm-D3QISUDE.js +0 -10
- package/public/build/_shared/chunk-4OBQSJE7.js +0 -1
- package/public/build/_shared/chunk-6NT2R34W.js +0 -1
- package/public/build/_shared/chunk-G5WX4PPA.js +0 -1
- package/public/build/_shared/chunk-ND5WRITB.js +0 -293
- package/public/build/entry.client-RZUWA4GZ.js +0 -1
- package/public/build/manifest-D6893512.js +0 -1
- package/public/build/root-DCOYHQLB.js +0 -1
- package/public/build/routes/$repo.$-RHCEHRDG.js +0 -75
- package/public/build/routes/_index-EHUBOK6N.js +0 -1
- package/public/build/routes/authordist-A7NSX5GE.js +0 -1
- package/public/build/routes/commitcount-KSNJOFTJ.js +0 -1
- package/public/build/routes/commits-6RXT3QOX.js +0 -1
- package/public/build/routes/progress-LUCNXSNL.js +0 -1
- /package/{public/build/_assets/truck-7F5JWBYT.gif → build/client/assets/truck-BgAoc4Gr.gif} +0 -0
package/README.md
CHANGED
|
@@ -1,98 +1,44 @@
|
|
|
1
1
|
# Git Truck 🚛 · [](https://github.com/git-truck/git-truck/blob/main/LICENSE) [](https://www.npmjs.com/git-truck)
|
|
2
2
|
|
|
3
|
-
Git
|
|
3
|
+
Git Truck is a tool that provides you with a truckload of visualizations of your git repository.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|-|-|
|
|
7
|
-
| Where the files in your codebase that only have a single contributor are (i.e., truck-factor = 1) | <img width="1912" alt="image" src="https://github.com/git-truck/git-truck/assets/1959615/1cc20716-0927-4aba-8d7d-115626bc445f"> |
|
|
8
|
-
| How the various developers contribute to your codebase | <img width="1913" alt="image" src="https://github.com/git-truck/git-truck/assets/1959615/780852f3-28de-44d2-ab79-e4ef420c3736"> |
|
|
9
|
-
| Which parts of the system that are most often changed | <img width="1912" alt="image" src="https://github.com/git-truck/git-truck/assets/1959615/8ca5f0b9-798f-40cd-b64e-de2fee00a5c3"> |
|
|
5
|
+
With Git Truck you can:
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
🏝️ Works offline
|
|
16
|
-
|
|
17
|
-
🤷 Git provider agnostic - works with any git repository
|
|
7
|
+
- See who worked on different parts of the project
|
|
8
|
+
- Get an overview of the file structure
|
|
9
|
+
- See where there is the most activity in your project
|
|
10
|
+
- See how your project has looked at different points in time
|
|
18
11
|
|
|
19
|
-
|
|
12
|
+
| | |
|
|
13
|
+
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
14
|
+
| <img src="./teaser-images/readme1.png" alt="Where has the most work been done recently?"> | <img src="./teaser-images/readme2.png" alt="Who worked on different subsystems in the past?"> |
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
> [!IMPORTANT]
|
|
24
|
-
> To use Git Truck, you will need to have the following programs installed:
|
|
25
|
-
> - [Node.js](https://nodejs.org/en/) 18.0.0 or newer and npm 10.0 or newer
|
|
26
|
-
> - [git](https://git-scm.com/downloads) 2.29 or newer
|
|
27
|
-
>
|
|
28
|
-
> Check your installed versions using `node --version`, `npm --version` and `git --version`.
|
|
29
|
-
|
|
30
|
-
> [!TIP]
|
|
31
|
-
> The latests versions of Node and git can be installed from the links above.
|
|
32
|
-
|
|
33
|
-
> [!Note]
|
|
34
|
-
> `npm` is automatically installed along with `node`.
|
|
16
|
+
You can read more about the features in the [feature overview](https://git-truck.github.io/git-truck/GitTruckTeaser), [in papers about Git Truck](https://github.com/git-truck/papers/blob/master/README.md), or just try it and start exploring your projects!
|
|
35
17
|
|
|
36
18
|
## [Get started](#get-started)
|
|
37
19
|
|
|
38
|
-
1.
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx -y git-truck
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
2. The application will now open in your default browser.
|
|
20
|
+
1. In your terminal, navigate to a git repository or a folder containing several repositories
|
|
45
21
|
|
|
46
|
-
|
|
22
|
+
2. Run the command `npm install -g git-truck@latest` to install or update Git Truck.
|
|
47
23
|
|
|
48
|
-
|
|
24
|
+
3. Now you can run Git Truck using the command `git truck`
|
|
49
25
|
|
|
50
|
-
|
|
26
|
+
4. The application will now open in your default browser. Happy trucking!
|
|
51
27
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
npx git-truck [args]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### [Arguments](#arguments)
|
|
63
|
-
|
|
64
|
-
| arg | description | default value |
|
|
65
|
-
| :------------------: | :-------------------------------------------------------------------: | :----------------: |
|
|
66
|
-
| `--path` | path to a folder or a git repository | current directory |
|
|
67
|
-
| `--log` | output log level. See [here](./src/analyzer/log.server.ts) for values | - |
|
|
68
|
-
| `--port` | port to use for the program | 3000 |
|
|
69
|
-
| `--invalidate-cache` | bypass analyzer cache manually | - |
|
|
70
|
-
| `--headless` | run the program without opening the browser | - |
|
|
71
|
-
|
|
72
|
-
> [!CAUTION]
|
|
73
|
-
> Using `--invalidate-cache` will cause the analyzer to run every time the client talks to the server. This can be very slow if working with large repositories.
|
|
74
|
-
|
|
75
|
-
### [Configuration](#configuration)
|
|
28
|
+
> [!NOTE]
|
|
29
|
+
> To use Git Truck, you will need to have the following programs installed:
|
|
30
|
+
>
|
|
31
|
+
> - [Node.js](https://nodejs.org/en/) 22.0.0 or newer and npm 10.0 or newer
|
|
32
|
+
> - [git](https://git-scm.com/downloads) 2.29 or newer
|
|
33
|
+
>
|
|
34
|
+
> Check your installed versions using `node --version`, `npm --version` and `git --version`.
|
|
76
35
|
|
|
77
|
-
|
|
78
|
-
Additionally you can define which git-aliases should be considered as the same person using `unionedAuthors`. If provided, the first name in the array is used as the name of the person.
|
|
79
|
-
You can also define files to ignore.
|
|
36
|
+
## [What makes Git Truck different?](#what-makes-git-truck-different)
|
|
80
37
|
|
|
81
|
-
|
|
38
|
+
🔒 Private by design
|
|
82
39
|
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
"log": "debug",
|
|
86
|
-
"branch": "main",
|
|
87
|
-
"unionedAuthors": [
|
|
88
|
-
["Bob", "Bobby Bob"],
|
|
89
|
-
["Alice", "aliiii", "alice alice"]
|
|
90
|
-
],
|
|
91
|
-
"hiddenFiles": ["package-lock.json", "*.bin", "*.svg"],
|
|
92
|
-
"invalidateCache": true
|
|
93
|
-
}
|
|
94
|
-
```
|
|
40
|
+
🏝️ Works offline
|
|
95
41
|
|
|
96
|
-
|
|
42
|
+
🤷 Git provider agnostic - works with any git repository
|
|
97
43
|
|
|
98
|
-
|
|
44
|
+
😊 No tracking, no ads, no cloud, no servers, no subscription
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-ND1AquXG.js";import{m as u}from"./util-ConTOzFi.js";import{I as j}from"./clearCache--4RF0gw5.js";function b({headGroups:r,disabled:s,className:l="",analyzedBranches:c,...o}){const a=Object.entries(r);return t.jsxs("div",{className:"grid w-full grid-cols-[auto_1fr] place-items-center gap-2",children:[t.jsx(j,{path:u,size:.75}),t.jsx("select",{className:`input bg-inherit text-inherit ${l}`,...o,children:a.map(([i,n])=>Object.entries(n).length>0?t.jsx("optgroup",{label:i,children:Object.entries(n).map(([e])=>{const p=c.find(m=>m.branch===e);return t.jsx("option",{value:e,disabled:s,title:p?"Analyzed":"Not analyzed",children:e},e)})},i):null)})]})}export{b as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as p,C as w,a as j,L as Q,b as E,g as N,c as I,d as k,e as b,f as B}from"./util-ConTOzFi.js";import{j as s}from"./index-ND1AquXG.js";import{u as F,a as D,b as v,F as y,L as x,c as g,A as T}from"./index-DxqpfKO2.js";import{R as O}from"./RevisionSelect-B_guhgxl.js";import{I as m}from"./clearCache--4RF0gw5.js";const U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAHuElEQVR4Xu2dsW8cVRCHL30sBEoqQKK1EI3/gasc6oBEQ41k5ILO3VV2eugiRRE9Tf6Ao3FL4QbRWCJCMjVVJEqj5CwB0nt3nt/N7s7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EShUWr/gQQwJ8pOyYigACJwqJVfwII4M+UHRMRQIBEYdGqPwEE8GfKjokIIECisGjVnwAC+DNlx0QEECBRWLTqTwAB/JmyYyICCJAoLFr1J4AA/kzZMREBBEgUFq36E0AAf6bsmIgAAiQKi1b9CSCAP1N2TEQAARKFRav+BBDAnyk7JiKAAInColV/Agjgz5QdExFAgERh0ao/AQTwZ8qOiQggQKKwaNWfAAL4M2XHRAQQIFFYtOpPAAH8mbJjIgIIkCgsWvUngAD+TNkxEQEESBQWrfoTQAB/puyYiAACJAqLVv0JIIA/U3ZMRAABEoVFq/4EEMCfKTsmIoAAicKiVX8CCODPlB0TEUCARGHRqj8BBPBnyo6JCPwDAEEjDFGnv/IAAAAASUVORK5CYIIA",L=p(function(){var A,a;const{repositories:t,baseDir:i,analyzedReposPromise:o,repositoryPromises:r}=F(),h=r,c=D(),{pathname:n}=v();return s.jsxs("main",{className:"m-auto flex min-h-screen w-full max-w-2xl flex-col gap-2 p-2",children:[s.jsxs("div",{className:"card",children:[s.jsxs("h1",{className:"flex items-center text-4xl",children:[s.jsx("img",{src:U,alt:"Git Truck",className:"mr-2 inline-block h-12"}),"Git Truck"]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("p",{children:["Found ",t.length," folder",t.length===1?"":"s"]}),s.jsx(w,{redirectPath:n}),s.jsxs("div",{className:"hidden w-full gap-2",children:[s.jsxs(y,{method:"get",className:"flex grow gap-1",children:[!((A=c.data)!=null&&A.ok)&&((a=c.data)!=null&&a.message)?s.jsx("p",{className:"text-red-500",children:c.data.message}):null,s.jsx("input",{className:"input",name:"path",defaultValue:i,required:!0,onKeyUp:l=>{var d;l.key==="Enter"&&(l.preventDefault(),(d=l.currentTarget.form)==null||d.submit())}},i),s.jsx("button",{className:"btn btn--primary",children:"Browse"})]}),s.jsx(x,{className:"btn btn--primary",to:`/?${new URLSearchParams({path:i}).toString()}`,prefetch:"intent",children:s.jsx(m,{path:j,size:1,className:"inline-block"})})]})]})]}),t.length>0?s.jsxs(P,{children:[s.jsx("div",{className:"opacity-80",children:"Folder"}),s.jsx("div",{className:"opacity-80",children:"Status"}),s.jsx("div",{className:"col-span-2 opacity-80",children:"Actions"}),t.map((l,d)=>s.jsx(g.Suspense,{fallback:s.jsx(C,{repo:{...l,parentDirPath:i,status:"Loading"},analyzedRepos:[]}),children:s.jsx(T,{resolve:Promise.all([h[`_${l.path}`],o]),children:([u,f])=>u!==null?s.jsx(C,{repo:u,analyzedRepos:f},u.path):null})},t[d].path))]}):s.jsx("div",{className:"card w-full place-items-center",children:s.jsx(Q,{loadingText:"This looks empty... Try another folder",hideInitially:!1})})]})});function P({children:e}){return e.length===0?s.jsx(s.Fragment,{children:s.jsxs("p",{children:["Try running ",s.jsx(E,{inline:!0,children:"git-truck"})," in another folder or provide another path as argument."]})}):s.jsx("div",{className:"card row-start-auto grid w-full grid-flow-row grid-cols-[1fr_1fr_1fr_auto] flex-wrap items-center gap-2",children:e})}function C({repo:e,analyzedRepos:t}){const i=e.status==="Success",o=e.status==="Error",[r,h]=g.useState(i?e.currentHead:null),c=r?N(e.name,r):null,n=e.status==="Error"&&e.errorMessage==="Not a git repository",A=t.find(a=>a.repo===e.name&&a.branch===r);return g.useEffect(()=>{console.log(e)},[e]),s.jsxs(g.Fragment,{children:[s.jsxs("h2",{className:"card__title flex justify-start gap-2",title:e.path,children:[o?n?s.jsx(m,{path:k,size:1,className:"inline-block shrink-0",title:"Folder"}):s.jsx(m,{path:b,size:1,className:"inline-block shrink-0",title:"Error"}):s.jsx(m,{path:I,size:1,className:"inline-block shrink-0",title:"Git repository"}),s.jsx("span",{className:"truncate text-left",children:e.name})]}),s.jsxs("div",{className:"flex place-items-center gap-1",children:[n?s.jsx("div",{}):s.jsx("div",{className:B("aspect-square h-2 rounded-full",{"bg-linear-to-bl from-green-500 to-green-600":e.status==="Success"&&A,"bg-linear-to-bl from-red-500 to-red-600":e.status==="Error","animate-pulse bg-linear-to-bl from-yellow-500 to-yellow-600":e.status==="Loading","bg-linear-to-bl from-gray-500 to-gray-400":e.status==="Success"&&!A})}),n?s.jsx("div",{className:"grow"}):s.jsx("span",{"data-testid":`status-${e.name}`,className:B("w-full min-w-max rounded-full bg-transparent px-2 py-1.5 text-xs leading-none font-bold tracking-widest text-inherit uppercase transition-colors duration-200 select-none"),children:e.status==="Success"?A?"Analyzed":"Not analyzed":e.status})]}),s.jsx("div",{className:"flex place-items-center gap-1",children:i?s.jsx(O,{className:"input--hover-border","data-testid":`revision-select-${e.name}`,value:r??"",onChange:a=>h(a.target.value),headGroups:e.refs,analyzedBranches:t.filter(a=>a.repo===e.name)}):o&&!n?s.jsx("div",{className:"w-0 grow truncate",title:e.errorMessage,children:e.errorMessage??"Unknown error"}):s.jsx("div",{className:"grow"})}),n?s.jsx(x,{className:"btn btn--primary",to:`/?${new URLSearchParams({path:e.path}).toString()}`,prefetch:"none",children:"Browse"}):s.jsx(x,{className:"btn btn--primary btn--outlined transition-colors",title:`View ${e.name}`,"aria-disabled":e.status==="Error"||e.status==="Loading",to:c??"",prefetch:"none",children:"View"}),s.jsx("hr",{className:"col-span-full opacity-50 last:hidden"})]},e.path)}export{L as default};
|