mobbdev 1.2.4 → 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.
- package/dist/args/commands/upload_ai_blame.mjs +20 -43
- package/dist/index.mjs +912 -901
- package/package.json +3 -3
- package/src/post_install/binary.mjs +1 -1
|
@@ -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
|
|
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 {
|
|
@@ -1410,6 +1409,7 @@ var init_issue = __esm({
|
|
|
1410
1409
|
MAX_SOURCE_CODE_FILE_SIZE_IN_BYTES = 1e5;
|
|
1411
1410
|
VulnerabilityReportIssueSharedStateZ = z4.object({
|
|
1412
1411
|
id: z4.string().uuid(),
|
|
1412
|
+
createdAt: z4.string(),
|
|
1413
1413
|
isArchived: z4.boolean(),
|
|
1414
1414
|
ticketIntegrationId: z4.string().uuid().nullable(),
|
|
1415
1415
|
ticketIntegrations: z4.array(
|
|
@@ -1804,6 +1804,7 @@ var init_types = __esm({
|
|
|
1804
1804
|
});
|
|
1805
1805
|
IssueSharedStateZ2 = z7.object({
|
|
1806
1806
|
id: z7.string().uuid(),
|
|
1807
|
+
createdAt: z7.string(),
|
|
1807
1808
|
isArchived: z7.boolean(),
|
|
1808
1809
|
ticketIntegrationId: z7.string().uuid().nullable(),
|
|
1809
1810
|
ticketIntegrations: z7.array(
|
|
@@ -3746,34 +3747,6 @@ ${rootContent}`;
|
|
|
3746
3747
|
throw new Error(errorMessage);
|
|
3747
3748
|
}
|
|
3748
3749
|
}
|
|
3749
|
-
/**
|
|
3750
|
-
* Gets timestamps for parent commits in a single git call.
|
|
3751
|
-
* @param parentShas Array of parent commit SHAs
|
|
3752
|
-
* @returns Array of parent commits with timestamps, or undefined if unavailable
|
|
3753
|
-
*/
|
|
3754
|
-
async getParentCommitTimestamps(parentShas) {
|
|
3755
|
-
if (parentShas.length === 0) {
|
|
3756
|
-
return void 0;
|
|
3757
|
-
}
|
|
3758
|
-
try {
|
|
3759
|
-
const output = await this.git.raw([
|
|
3760
|
-
"log",
|
|
3761
|
-
"--format=%H %cI",
|
|
3762
|
-
"--no-walk",
|
|
3763
|
-
...parentShas
|
|
3764
|
-
]);
|
|
3765
|
-
const parentCommits = output.trim().split("\n").filter(Boolean).map((line) => {
|
|
3766
|
-
const [sha, ts] = line.split(" ");
|
|
3767
|
-
return { sha: sha ?? "", timestamp: new Date(ts ?? "") };
|
|
3768
|
-
}).filter((p) => p.sha !== "");
|
|
3769
|
-
return parentCommits.length > 0 ? parentCommits : void 0;
|
|
3770
|
-
} catch {
|
|
3771
|
-
this.log("[GitService] Could not get parent commit timestamps", "debug", {
|
|
3772
|
-
parentShas
|
|
3773
|
-
});
|
|
3774
|
-
return void 0;
|
|
3775
|
-
}
|
|
3776
|
-
}
|
|
3777
3750
|
/**
|
|
3778
3751
|
* Gets local commit data including diff, timestamp, and parent commits.
|
|
3779
3752
|
* Used by Tracy extension to send commit data directly without requiring SCM token.
|
|
@@ -3818,18 +3791,14 @@ ${rootContent}`;
|
|
|
3818
3791
|
}
|
|
3819
3792
|
const timestampStr = metadataLines[0];
|
|
3820
3793
|
const timestamp = new Date(timestampStr);
|
|
3821
|
-
const parentShas = (metadataLines[1] ?? "").trim().split(/\s+/).filter(Boolean);
|
|
3822
|
-
const parentCommits = await this.getParentCommitTimestamps(parentShas);
|
|
3823
3794
|
this.log("[GitService] Local commit data retrieved", "debug", {
|
|
3824
3795
|
commitSha,
|
|
3825
3796
|
diffSizeBytes,
|
|
3826
|
-
timestamp: timestamp.toISOString()
|
|
3827
|
-
parentCommitCount: parentCommits?.length ?? 0
|
|
3797
|
+
timestamp: timestamp.toISOString()
|
|
3828
3798
|
});
|
|
3829
3799
|
return {
|
|
3830
3800
|
diff,
|
|
3831
|
-
timestamp
|
|
3832
|
-
parentCommits
|
|
3801
|
+
timestamp
|
|
3833
3802
|
};
|
|
3834
3803
|
} catch (error) {
|
|
3835
3804
|
const errorMessage = `Failed to get local commit data: ${error.message}`;
|
|
@@ -6144,6 +6113,9 @@ var GetReferenceResultZ = z14.object({
|
|
|
6144
6113
|
type: z14.nativeEnum(ReferenceType)
|
|
6145
6114
|
});
|
|
6146
6115
|
|
|
6116
|
+
// src/features/analysis/scm/utils/diffUtils.ts
|
|
6117
|
+
import parseDiff from "parse-diff";
|
|
6118
|
+
|
|
6147
6119
|
// src/features/analysis/scm/ado/constants.ts
|
|
6148
6120
|
init_types2();
|
|
6149
6121
|
var DEFUALT_ADO_ORIGIN = scmCloudUrl.Ado;
|
|
@@ -6245,17 +6217,12 @@ init_env();
|
|
|
6245
6217
|
|
|
6246
6218
|
// src/features/analysis/scm/github/GithubSCMLib.ts
|
|
6247
6219
|
init_env();
|
|
6248
|
-
import
|
|
6220
|
+
import pLimit from "p-limit";
|
|
6249
6221
|
import { z as z22 } from "zod";
|
|
6250
6222
|
init_client_generates();
|
|
6251
6223
|
|
|
6252
6224
|
// src/features/analysis/scm/github/github.ts
|
|
6253
6225
|
import { RequestError } from "@octokit/request-error";
|
|
6254
|
-
import pLimit from "p-limit";
|
|
6255
|
-
|
|
6256
|
-
// src/utils/contextLogger.ts
|
|
6257
|
-
import debugModule from "debug";
|
|
6258
|
-
var debug4 = debugModule("mobb:shared");
|
|
6259
6226
|
|
|
6260
6227
|
// src/features/analysis/scm/github/utils/encrypt_secret.ts
|
|
6261
6228
|
import sodium from "libsodium-wrappers";
|
|
@@ -6274,11 +6241,18 @@ import {
|
|
|
6274
6241
|
Gitlab
|
|
6275
6242
|
} from "@gitbeaker/rest";
|
|
6276
6243
|
import Debug4 from "debug";
|
|
6244
|
+
import pLimit2 from "p-limit";
|
|
6277
6245
|
import {
|
|
6278
6246
|
Agent,
|
|
6279
6247
|
fetch as undiciFetch,
|
|
6280
6248
|
ProxyAgent as ProxyAgent2
|
|
6281
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
|
|
6282
6256
|
init_env();
|
|
6283
6257
|
|
|
6284
6258
|
// src/features/analysis/scm/gitlab/types.ts
|
|
@@ -6292,6 +6266,9 @@ var GitlabAuthResultZ = z23.object({
|
|
|
6292
6266
|
// src/features/analysis/scm/gitlab/gitlab.ts
|
|
6293
6267
|
var debug5 = Debug4("scm:gitlab");
|
|
6294
6268
|
|
|
6269
|
+
// src/features/analysis/scm/gitlab/GitlabSCMLib.ts
|
|
6270
|
+
init_client_generates();
|
|
6271
|
+
|
|
6295
6272
|
// src/features/analysis/scm/scmFactory.ts
|
|
6296
6273
|
import { z as z24 } from "zod";
|
|
6297
6274
|
|
|
@@ -7491,7 +7468,7 @@ async function getRepositoryUrl() {
|
|
|
7491
7468
|
}
|
|
7492
7469
|
const remoteUrl = await gitService.getRemoteUrl();
|
|
7493
7470
|
const parsed = parseScmURL(remoteUrl);
|
|
7494
|
-
return parsed?.scmType === "GitHub" /* GitHub */ ? remoteUrl : null;
|
|
7471
|
+
return parsed?.scmType === "GitHub" /* GitHub */ || parsed?.scmType === "GitLab" /* GitLab */ ? remoteUrl : null;
|
|
7495
7472
|
} catch {
|
|
7496
7473
|
return null;
|
|
7497
7474
|
}
|