mobbdev 1.2.6 → 1.2.8

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.
@@ -846,13 +846,12 @@ var init_client_generates = __esm({
846
846
  }
847
847
  `;
848
848
  AnalyzeCommitForExtensionAiBlameDocument = `
849
- mutation AnalyzeCommitForExtensionAIBlame($repositoryURL: String!, $commitSha: String!, $organizationId: String!, $commitTimestamp: Timestamp, $parentCommits: [ParentCommitInput!]) {
849
+ mutation AnalyzeCommitForExtensionAIBlame($repositoryURL: String!, $commitSha: String!, $organizationId: String!, $commitTimestamp: Timestamp) {
850
850
  analyzeCommitForAIBlame(
851
851
  repositoryURL: $repositoryURL
852
852
  commitSha: $commitSha
853
853
  organizationId: $organizationId
854
854
  commitTimestamp: $commitTimestamp
855
- parentCommits: $parentCommits
856
855
  ) {
857
856
  __typename
858
857
  ... on ProcessAIBlameFinalResult {
@@ -3748,34 +3747,6 @@ ${rootContent}`;
3748
3747
  throw new Error(errorMessage);
3749
3748
  }
3750
3749
  }
3751
- /**
3752
- * Gets timestamps for parent commits in a single git call.
3753
- * @param parentShas Array of parent commit SHAs
3754
- * @returns Array of parent commits with timestamps, or undefined if unavailable
3755
- */
3756
- async getParentCommitTimestamps(parentShas) {
3757
- if (parentShas.length === 0) {
3758
- return void 0;
3759
- }
3760
- try {
3761
- const output = await this.git.raw([
3762
- "log",
3763
- "--format=%H %cI",
3764
- "--no-walk",
3765
- ...parentShas
3766
- ]);
3767
- const parentCommits = output.trim().split("\n").filter(Boolean).map((line) => {
3768
- const [sha, ts] = line.split(" ");
3769
- return { sha: sha ?? "", timestamp: new Date(ts ?? "") };
3770
- }).filter((p) => p.sha !== "");
3771
- return parentCommits.length > 0 ? parentCommits : void 0;
3772
- } catch {
3773
- this.log("[GitService] Could not get parent commit timestamps", "debug", {
3774
- parentShas
3775
- });
3776
- return void 0;
3777
- }
3778
- }
3779
3750
  /**
3780
3751
  * Gets local commit data including diff, timestamp, and parent commits.
3781
3752
  * Used by Tracy extension to send commit data directly without requiring SCM token.
@@ -3820,18 +3791,14 @@ ${rootContent}`;
3820
3791
  }
3821
3792
  const timestampStr = metadataLines[0];
3822
3793
  const timestamp = new Date(timestampStr);
3823
- const parentShas = (metadataLines[1] ?? "").trim().split(/\s+/).filter(Boolean);
3824
- const parentCommits = await this.getParentCommitTimestamps(parentShas);
3825
3794
  this.log("[GitService] Local commit data retrieved", "debug", {
3826
3795
  commitSha,
3827
3796
  diffSizeBytes,
3828
- timestamp: timestamp.toISOString(),
3829
- parentCommitCount: parentCommits?.length ?? 0
3797
+ timestamp: timestamp.toISOString()
3830
3798
  });
3831
3799
  return {
3832
3800
  diff,
3833
- timestamp,
3834
- parentCommits
3801
+ timestamp
3835
3802
  };
3836
3803
  } catch (error) {
3837
3804
  const errorMessage = `Failed to get local commit data: ${error.message}`;
@@ -6146,6 +6113,9 @@ var GetReferenceResultZ = z14.object({
6146
6113
  type: z14.nativeEnum(ReferenceType)
6147
6114
  });
6148
6115
 
6116
+ // src/features/analysis/scm/utils/diffUtils.ts
6117
+ import parseDiff from "parse-diff";
6118
+
6149
6119
  // src/features/analysis/scm/ado/constants.ts
6150
6120
  init_types2();
6151
6121
  var DEFUALT_ADO_ORIGIN = scmCloudUrl.Ado;
@@ -6247,17 +6217,12 @@ init_env();
6247
6217
 
6248
6218
  // src/features/analysis/scm/github/GithubSCMLib.ts
6249
6219
  init_env();
6250
- import pLimit2 from "p-limit";
6220
+ import pLimit from "p-limit";
6251
6221
  import { z as z22 } from "zod";
6252
6222
  init_client_generates();
6253
6223
 
6254
6224
  // src/features/analysis/scm/github/github.ts
6255
6225
  import { RequestError } from "@octokit/request-error";
6256
- import pLimit from "p-limit";
6257
-
6258
- // src/utils/contextLogger.ts
6259
- import debugModule from "debug";
6260
- var debug4 = debugModule("mobb:shared");
6261
6226
 
6262
6227
  // src/features/analysis/scm/github/utils/encrypt_secret.ts
6263
6228
  import sodium from "libsodium-wrappers";
@@ -6276,11 +6241,18 @@ import {
6276
6241
  Gitlab
6277
6242
  } from "@gitbeaker/rest";
6278
6243
  import Debug4 from "debug";
6244
+ import pLimit2 from "p-limit";
6279
6245
  import {
6280
6246
  Agent,
6281
6247
  fetch as undiciFetch,
6282
6248
  ProxyAgent as ProxyAgent2
6283
6249
  } from "undici";
6250
+
6251
+ // src/utils/contextLogger.ts
6252
+ import debugModule from "debug";
6253
+ var debug4 = debugModule("mobb:shared");
6254
+
6255
+ // src/features/analysis/scm/gitlab/gitlab.ts
6284
6256
  init_env();
6285
6257
 
6286
6258
  // src/features/analysis/scm/gitlab/types.ts
@@ -6294,6 +6266,9 @@ var GitlabAuthResultZ = z23.object({
6294
6266
  // src/features/analysis/scm/gitlab/gitlab.ts
6295
6267
  var debug5 = Debug4("scm:gitlab");
6296
6268
 
6269
+ // src/features/analysis/scm/gitlab/GitlabSCMLib.ts
6270
+ init_client_generates();
6271
+
6297
6272
  // src/features/analysis/scm/scmFactory.ts
6298
6273
  import { z as z24 } from "zod";
6299
6274
 
@@ -7493,7 +7468,7 @@ async function getRepositoryUrl() {
7493
7468
  }
7494
7469
  const remoteUrl = await gitService.getRemoteUrl();
7495
7470
  const parsed = parseScmURL(remoteUrl);
7496
- return parsed?.scmType === "GitHub" /* GitHub */ ? remoteUrl : null;
7471
+ return parsed?.scmType === "GitHub" /* GitHub */ || parsed?.scmType === "GitLab" /* GitLab */ ? remoteUrl : null;
7497
7472
  } catch {
7498
7473
  return null;
7499
7474
  }