git-truck 0.7.6 → 0.7.7-2

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/build/index.js CHANGED
@@ -4202,13 +4202,20 @@ async function diffAndUpdate_mut(data, currCommit, parentHash, repo) {
4202
4202
  const currHash = currCommit.hash;
4203
4203
  log.debug(`comparing [${currHash}] -> [${parentHash}]`);
4204
4204
  const fileChanges = await gitDiffNumStatAnalyzed(repo, parentHash, currHash, renamedFiles);
4205
+ log.debug(`num filechanges ${fileChanges.length}`);
4205
4206
  for (const fileChange of fileChanges) {
4206
4207
  const { pos, neg, file } = fileChange;
4207
4208
  const blob = await lookupFileInTree(data.tree, file);
4208
- if (file === "dev/null")
4209
+ log.debug(`Changes: ${JSON.stringify(fileChange)}`);
4210
+ log.debug(`Blob: ${blob == null ? void 0 : blob.hash}`);
4211
+ if (file === "dev/null") {
4212
+ log.debug(`Continuing from ${file}`);
4209
4213
  continue;
4214
+ }
4210
4215
  if (blob) {
4211
4216
  updateBlob_mut(blob, data, author, currCommit, pos, neg);
4217
+ } else {
4218
+ log.debug(`Blob not found: ${file}`);
4212
4219
  }
4213
4220
  }
4214
4221
  }
@@ -4217,6 +4224,7 @@ function isBinaryFile(blob) {
4217
4224
  }
4218
4225
  function updateBlob_mut(blob, data, author, currCommit, pos, neg) {
4219
4226
  var _a, _b;
4227
+ log.debug(`Trying to update ${blob.name}`);
4220
4228
  const noCommits = 1 + (blob.noCommits ?? 0);
4221
4229
  const isBinary = isBinaryFile(blob);
4222
4230
  const hydratedBlob = __spreadProps(__spreadValues({}, blob), {
@@ -5350,7 +5358,7 @@ async function latestVersion(packageName, options) {
5350
5358
 
5351
5359
  // package.json
5352
5360
  var name = "git-truck";
5353
- var version = "0.7.6";
5361
+ var version = "0.7.7-1";
5354
5362
  var private2 = false;
5355
5363
  var description = "Visualizing a Git repository";
5356
5364
  var license = "MIT";
@@ -5516,7 +5524,7 @@ async function findBranchHead(repo, branch) {
5516
5524
  }
5517
5525
  async function analyzeCommitLight(repo, hash) {
5518
5526
  const rawContent = await deflateGitObject(repo, hash);
5519
- const commitRegex = /tree (?<tree>.*)\n(?:parent (?<parent>.*)\n)?(?:parent (?<parent2>.*)\n)?author (?<authorName>.*) <(?<authorEmail>.*)> (?<authorTimeStamp>\d*) (?<authorTimeZone>.*)\ncommitter (?<committerName>.*) <(?<committerEmail>.*)> (?<committerTimeStamp>\d*) (?<committerTimeZone>.*)\n(?:gpgsig (?:.|\n)*-----END PGP SIGNATURE-----)?\s*(?<message>.*)\s*(?<description>(?:.|\s)*)/gm;
5527
+ const commitRegex = /tree (?<tree>.*)\s*(?:parent (?<parent>.*)\s*)?(?:parent (?<parent2>.*)\s*)?author (?<authorName>.*?) <(?<authorEmail>.*?)> (?<authorTimeStamp>\d*?) (?<authorTimeZone>.*?)\s*committer (?<committerName>.*?) <(?<committerEmail>.*?)> (?<committerTimeStamp>\d*?) (?<committerTimeZone>.*)\s*(?:gpgsig (?:.|\s)*?-----END PGP SIGNATURE-----)?\s*(?<message>.*)\s*(?<description>(?:.|\s)*)/gm;
5520
5528
  const match = commitRegex.exec(rawContent);
5521
5529
  const groups = (match == null ? void 0 : match.groups) ?? {};
5522
5530
  const tree = groups["tree"];
@@ -5743,7 +5751,7 @@ function GlobalInfo() {
5743
5751
  paths.push([data.repo, data.repo]);
5744
5752
  }
5745
5753
  return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(BoxTitle, null, data.repo), /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("strong", null, "Branch: "), data.branch, /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement("strong", null, "Analyzed: "), dateTimeFormatShort(data.lastRunEpoch), /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement("strong", null, "As of commit: "), /* @__PURE__ */ React.createElement(InlineCode, {
5746
- title: data.commit.message
5754
+ title: data.commit.message ?? "No commit message"
5747
5755
  }, data.commit.hash.slice(0, 7))), /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement(import_remix3.Form, {
5748
5756
  method: "post",
5749
5757
  action: "/repo"
@@ -6462,7 +6470,7 @@ function Index() {
6462
6470
 
6463
6471
  // server-assets-manifest:@remix-run/dev/assets-manifest
6464
6472
  init_react();
6465
- var assets_manifest_default = { "version": "f64d0b94", "entry": { "module": "/build/entry.client-KSYGPJNH.js", "imports": ["/build/_shared/chunk-TG3VUAQG.js", "/build/_shared/chunk-SQUDAINV.js", "/build/_shared/chunk-BC37YV7Z.js"] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "module": "/build/root-GDC4BREW.js", "imports": void 0, "hasAction": false, "hasLoader": false, "hasCatchBoundary": false, "hasErrorBoundary": false }, "routes/index": { "id": "routes/index", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "module": "/build/routes/index-Z6NZE4DS.js", "imports": void 0, "hasAction": false, "hasLoader": false, "hasCatchBoundary": false, "hasErrorBoundary": false }, "routes/repo": { "id": "routes/repo", "parentId": "root", "path": "repo", "index": void 0, "caseSensitive": void 0, "module": "/build/routes/repo-5WGDOE26.js", "imports": void 0, "hasAction": true, "hasLoader": true, "hasCatchBoundary": false, "hasErrorBoundary": false } }, "url": "/build/manifest-F64D0B94.js" };
6473
+ var assets_manifest_default = { "version": "81db978c", "entry": { "module": "/build/entry.client-KSYGPJNH.js", "imports": ["/build/_shared/chunk-TG3VUAQG.js", "/build/_shared/chunk-SQUDAINV.js", "/build/_shared/chunk-BC37YV7Z.js"] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "module": "/build/root-GDC4BREW.js", "imports": void 0, "hasAction": false, "hasLoader": false, "hasCatchBoundary": false, "hasErrorBoundary": false }, "routes/index": { "id": "routes/index", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "module": "/build/routes/index-Z6NZE4DS.js", "imports": void 0, "hasAction": false, "hasLoader": false, "hasCatchBoundary": false, "hasErrorBoundary": false }, "routes/repo": { "id": "routes/repo", "parentId": "root", "path": "repo", "index": void 0, "caseSensitive": void 0, "module": "/build/routes/repo-H5UEBRNX.js", "imports": void 0, "hasAction": true, "hasLoader": true, "hasCatchBoundary": false, "hasErrorBoundary": false } }, "url": "/build/manifest-81DB978C.js" };
6466
6474
 
6467
6475
  // server-entry-module:@remix-run/dev/server-build
6468
6476
  var entry = { module: entry_server_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-truck",
3
- "version": "0.7.6",
3
+ "version": "0.7.7-2",
4
4
  "private": false,
5
5
  "description": "Visualizing a Git repository",
6
6
  "license": "MIT",
@@ -59,8 +59,8 @@ export async function analyzeCommitLight(
59
59
  ): Promise<GitCommitObjectLight> {
60
60
  const rawContent = await deflateGitObject(repo, hash)
61
61
  const commitRegex =
62
- /tree (?<tree>.*)\n(?:parent (?<parent>.*)\n)?(?:parent (?<parent2>.*)\n)?author (?<authorName>.*) <(?<authorEmail>.*)> (?<authorTimeStamp>\d*) (?<authorTimeZone>.*)\ncommitter (?<committerName>.*) <(?<committerEmail>.*)> (?<committerTimeStamp>\d*) (?<committerTimeZone>.*)\n(?:gpgsig (?:.|\n)*-----END PGP SIGNATURE-----)?\s*(?<message>.*)\s*(?<description>(?:.|\s)*)/gm
63
-
62
+ /tree (?<tree>.*)\s*(?:parent (?<parent>.*)\s*)?(?:parent (?<parent2>.*)\s*)?author (?<authorName>.*?) <(?<authorEmail>.*?)> (?<authorTimeStamp>\d*?) (?<authorTimeZone>.*?)\s*committer (?<committerName>.*?) <(?<committerEmail>.*?)> (?<committerTimeStamp>\d*?) (?<committerTimeZone>.*)\s*(?:gpgsig (?:.|\s)*?-----END PGP SIGNATURE-----)?\s*(?<message>.*)\s*(?<description>(?:.|\s)*)/gm
63
+
64
64
  const match = commitRegex.exec(rawContent)
65
65
  const groups = match?.groups ?? {}
66
66
 
@@ -127,15 +127,22 @@ async function diffAndUpdate_mut(
127
127
  currHash,
128
128
  renamedFiles
129
129
  )
130
+ log.debug(`num filechanges ${fileChanges.length}`)
130
131
 
131
132
  for (const fileChange of fileChanges) {
132
133
  const { pos, neg, file } = fileChange
133
134
 
134
135
  const blob = await lookupFileInTree(data.tree, file)
135
-
136
- if (file === "dev/null") continue
136
+ log.debug(`Changes: ${JSON.stringify(fileChange)}`)
137
+ log.debug(`Blob: ${blob?.hash}`)
138
+ if (file === "dev/null") {
139
+ log.debug(`Continuing from ${file}`)
140
+ continue
141
+ }
137
142
  if (blob) {
138
143
  updateBlob_mut(blob, data, author, currCommit, pos, neg)
144
+ } else {
145
+ log.debug(`Blob not found: ${file}`)
139
146
  }
140
147
  }
141
148
  }
@@ -152,6 +159,7 @@ function updateBlob_mut(
152
159
  pos: number,
153
160
  neg: number
154
161
  ) {
162
+ log.debug(`Trying to update ${blob.name}`)
155
163
  const noCommits = 1 + ((blob as HydratedGitBlobObject).noCommits ?? 0)
156
164
 
157
165
  const isBinary = isBinaryFile(blob)
@@ -37,7 +37,7 @@ export function GlobalInfo() {
37
37
  <Spacer/>
38
38
  <strong>Analyzed: </strong>{dateTimeFormatShort(data.lastRunEpoch)}
39
39
  <Spacer />
40
- <strong>As of commit: </strong><InlineCode title={data.commit.message}>{data.commit.hash.slice(0, 7)}</InlineCode>
40
+ <strong>As of commit: </strong><InlineCode title={data.commit.message ?? "No commit message"}>{data.commit.hash.slice(0, 7)}</InlineCode>
41
41
  </div>
42
42
  <Spacer/>
43
43
  <Form method="post" action="/repo">