@knpkv/codecommit-core 0.5.0 → 0.5.1
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/AwsClient/getDifferences.d.ts +16 -0
- package/dist/AwsClient/getDifferences.d.ts.map +1 -0
- package/dist/AwsClient/getDifferences.js +22 -0
- package/dist/AwsClient/getDifferences.js.map +1 -0
- package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequest.js +26 -5
- package/dist/AwsClient/getPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +29 -11
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/index.d.ts +21 -13
- package/dist/AwsClient/index.d.ts.map +1 -1
- package/dist/AwsClient/index.js +3 -1
- package/dist/AwsClient/index.js.map +1 -1
- package/dist/AwsClient/internal.d.ts +23 -0
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +4 -1
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/CacheService/Database.d.ts.map +1 -1
- package/dist/CacheService/Database.js +9 -1
- package/dist/CacheService/Database.js.map +1 -1
- package/dist/CacheService/index.d.ts +3 -2
- package/dist/CacheService/index.d.ts.map +1 -1
- package/dist/CacheService/index.js +2 -1
- package/dist/CacheService/index.js.map +1 -1
- package/dist/CacheService/migrations/0007_stats_columns.d.ts +5 -0
- package/dist/CacheService/migrations/0007_stats_columns.d.ts.map +1 -0
- package/dist/CacheService/migrations/0007_stats_columns.js +13 -0
- package/dist/CacheService/migrations/0007_stats_columns.js.map +1 -0
- package/dist/CacheService/migrations/0008_merged_by.d.ts +5 -0
- package/dist/CacheService/migrations/0008_merged_by.d.ts.map +1 -0
- package/dist/CacheService/migrations/0008_merged_by.js +4 -0
- package/dist/CacheService/migrations/0008_merged_by.js.map +1 -0
- package/dist/CacheService/migrations/0009_approved_by.d.ts +5 -0
- package/dist/CacheService/migrations/0009_approved_by.d.ts.map +1 -0
- package/dist/CacheService/migrations/0009_approved_by.js +4 -0
- package/dist/CacheService/migrations/0009_approved_by.js.map +1 -0
- package/dist/CacheService/migrations/0010_commented_by.d.ts +5 -0
- package/dist/CacheService/migrations/0010_commented_by.d.ts.map +1 -0
- package/dist/CacheService/migrations/0010_commented_by.js +4 -0
- package/dist/CacheService/migrations/0010_commented_by.js.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts +132 -0
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/index.js +35 -0
- package/dist/CacheService/repos/PullRequestRepo/index.js.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/internal.d.ts +72 -0
- package/dist/CacheService/repos/PullRequestRepo/internal.d.ts.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/internal.js +69 -0
- package/dist/CacheService/repos/PullRequestRepo/internal.js.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/mutations.d.ts +24 -0
- package/dist/CacheService/repos/PullRequestRepo/mutations.d.ts.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/mutations.js +94 -0
- package/dist/CacheService/repos/PullRequestRepo/mutations.js.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts +113 -0
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo/queries.js +89 -0
- package/dist/CacheService/repos/PullRequestRepo/queries.js.map +1 -0
- package/dist/CacheService/repos/StatsRepo/index.d.ts +93 -0
- package/dist/CacheService/repos/StatsRepo/index.d.ts.map +1 -0
- package/dist/CacheService/repos/StatsRepo/index.js +41 -0
- package/dist/CacheService/repos/StatsRepo/index.js.map +1 -0
- package/dist/CacheService/repos/StatsRepo/internal.d.ts +120 -0
- package/dist/CacheService/repos/StatsRepo/internal.d.ts.map +1 -0
- package/dist/CacheService/repos/StatsRepo/internal.js +34 -0
- package/dist/CacheService/repos/StatsRepo/internal.js.map +1 -0
- package/dist/CacheService/repos/StatsRepo/queries.d.ts +42 -0
- package/dist/CacheService/repos/StatsRepo/queries.d.ts.map +1 -0
- package/dist/CacheService/repos/StatsRepo/queries.js +182 -0
- package/dist/CacheService/repos/StatsRepo/queries.js.map +1 -0
- package/dist/CacheService/repos/StatsRepo/reviewerData.d.ts +47 -0
- package/dist/CacheService/repos/StatsRepo/reviewerData.d.ts.map +1 -0
- package/dist/CacheService/repos/StatsRepo/reviewerData.js +172 -0
- package/dist/CacheService/repos/StatsRepo/reviewerData.js.map +1 -0
- package/dist/DateUtils.d.ts +28 -0
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/DateUtils.js +69 -1
- package/dist/DateUtils.js.map +1 -1
- package/dist/Domain.d.ts +13 -3
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +6 -5
- package/dist/Domain.js.map +1 -1
- package/dist/PRService/index.d.ts +3 -3
- package/dist/PRService/index.d.ts.map +1 -1
- package/dist/PRService/index.js +1 -1
- package/dist/PRService/index.js.map +1 -1
- package/dist/PRService/internal.d.ts +24 -2
- package/dist/PRService/internal.d.ts.map +1 -1
- package/dist/PRService/internal.js +23 -8
- package/dist/PRService/internal.js.map +1 -1
- package/dist/PRService/refresh.d.ts +1 -1
- package/dist/PRService/refresh.d.ts.map +1 -1
- package/dist/PRService/refresh.js +2 -0
- package/dist/PRService/refresh.js.map +1 -1
- package/dist/PRService/refreshDiffs.d.ts +16 -0
- package/dist/PRService/refreshDiffs.d.ts.map +1 -0
- package/dist/PRService/refreshDiffs.js +54 -0
- package/dist/PRService/refreshDiffs.js.map +1 -0
- package/dist/PRService/refreshEnrich.d.ts +1 -1
- package/dist/PRService/refreshEnrich.d.ts.map +1 -1
- package/dist/PRService/refreshEnrich.js +3 -1
- package/dist/PRService/refreshEnrich.js.map +1 -1
- package/dist/PRService/refreshFetch.d.ts +1 -1
- package/dist/PRService/refreshFetch.d.ts.map +1 -1
- package/dist/PRService/refreshFetch.js +12 -3
- package/dist/PRService/refreshFetch.js.map +1 -1
- package/dist/PRService/refreshHistory.d.ts +19 -0
- package/dist/PRService/refreshHistory.d.ts.map +1 -0
- package/dist/PRService/refreshHistory.js +110 -0
- package/dist/PRService/refreshHistory.js.map +1 -0
- package/dist/PRService/refreshResolve.d.ts +1 -1
- package/dist/PRService/refreshResolve.d.ts.map +1 -1
- package/dist/PRService/refreshResolve.js +1 -1
- package/dist/PRService/refreshResolve.js.map +1 -1
- package/dist/PRService/refreshScore.d.ts +1 -1
- package/dist/PRService/refreshScore.d.ts.map +1 -1
- package/dist/PRService/refreshScore.js +1 -1
- package/dist/PRService/refreshScore.js.map +1 -1
- package/dist/PRService/refreshSinglePR.d.ts +1 -1
- package/dist/PRService/refreshSinglePR.d.ts.map +1 -1
- package/dist/PRService/refreshSinglePR.js +4 -3
- package/dist/PRService/refreshSinglePR.js.map +1 -1
- package/dist/StatsService/WeeklyStats.d.ts +174 -0
- package/dist/StatsService/WeeklyStats.d.ts.map +1 -0
- package/dist/StatsService/WeeklyStats.js +110 -0
- package/dist/StatsService/WeeklyStats.js.map +1 -0
- package/dist/StatsService/index.d.ts +45 -0
- package/dist/StatsService/index.d.ts.map +1 -0
- package/dist/StatsService/index.js +145 -0
- package/dist/StatsService/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/CacheService/repos/PullRequestRepo.d.ts +0 -112
- package/dist/CacheService/repos/PullRequestRepo.d.ts.map +0 -1
- package/dist/CacheService/repos/PullRequestRepo.js +0 -146
- package/dist/CacheService/repos/PullRequestRepo.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0008_merged_by.d.ts","sourceRoot":"","sources":["../../../src/CacheService/migrations/0008_merged_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;;AAEvC,wBAMC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
export default Effect.flatMap(SqlClient.SqlClient, (sql) => sql `ALTER TABLE pull_requests ADD COLUMN merged_by TEXT`.pipe(Effect.catchAll(() => Effect.void)));
|
|
4
|
+
//# sourceMappingURL=0008_merged_by.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0008_merged_by.js","sourceRoot":"","sources":["../../../src/CacheService/migrations/0008_merged_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,eAAe,MAAM,CAAC,OAAO,CAC3B,SAAS,CAAC,SAAS,EACnB,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAA,qDAAqD,CAAC,IAAI,CAC3D,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACnC,CACJ,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
declare const _default: Effect.Effect<void | readonly import("@effect/sql/SqlConnection").Row[], never, SqlClient.SqlClient>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=0009_approved_by.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0009_approved_by.d.ts","sourceRoot":"","sources":["../../../src/CacheService/migrations/0009_approved_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;;AAEvC,wBAMC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
export default Effect.flatMap(SqlClient.SqlClient, (sql) => sql `ALTER TABLE pull_requests ADD COLUMN approved_by TEXT`.pipe(Effect.catchAll(() => Effect.void)));
|
|
4
|
+
//# sourceMappingURL=0009_approved_by.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0009_approved_by.js","sourceRoot":"","sources":["../../../src/CacheService/migrations/0009_approved_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,eAAe,MAAM,CAAC,OAAO,CAC3B,SAAS,CAAC,SAAS,EACnB,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAA,uDAAuD,CAAC,IAAI,CAC7D,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACnC,CACJ,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
declare const _default: Effect.Effect<void | readonly import("@effect/sql/SqlConnection").Row[], never, SqlClient.SqlClient>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=0010_commented_by.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0010_commented_by.d.ts","sourceRoot":"","sources":["../../../src/CacheService/migrations/0010_commented_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;;AAEvC,wBAMC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
export default Effect.flatMap(SqlClient.SqlClient, (sql) => sql `ALTER TABLE pull_requests ADD COLUMN commented_by TEXT`.pipe(Effect.catchAll(() => Effect.void)));
|
|
4
|
+
//# sourceMappingURL=0010_commented_by.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0010_commented_by.js","sourceRoot":"","sources":["../../../src/CacheService/migrations/0010_commented_by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,eAAe,MAAM,CAAC,OAAO,CAC3B,SAAS,CAAC,SAAS,EACnB,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAA,wDAAwD,CAAC,IAAI,CAC9D,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACnC,CACJ,CAAA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module PullRequestRepo
|
|
3
|
+
*
|
|
4
|
+
* SQLite-backed cache for CodeCommit pull requests.
|
|
5
|
+
* Assembles query methods from `./queries` and mutation methods from
|
|
6
|
+
* `./mutations` into a single Effect.Service.
|
|
7
|
+
*
|
|
8
|
+
* @category CacheService
|
|
9
|
+
*/
|
|
10
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
11
|
+
import { Effect } from "effect";
|
|
12
|
+
import { EventsHub } from "../../EventsHub.js";
|
|
13
|
+
export { CachedPullRequest, type SearchResult, UpsertInput } from "./internal.js";
|
|
14
|
+
export type { CachedPullRequest as CachedPullRequestType } from "./internal.js";
|
|
15
|
+
declare const PullRequestRepo_base: Effect.Service.Class<PullRequestRepo, "PullRequestRepo", {
|
|
16
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<SqlClient.SqlClient | import("@effect/sql-libsql/LibsqlClient").LibsqlClient, import("@effect/sql/SqlError").SqlError | import("effect/ConfigError").ConfigError | import("@effect/sql/Migrator").MigrationError, import("@effect/platform/FileSystem").FileSystem>, import("effect/Layer").Layer<EventsHub, never, never>];
|
|
17
|
+
readonly effect: Effect.Effect<{
|
|
18
|
+
readonly upsert: (input: import("./internal.js").UpsertInput) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
19
|
+
readonly upsertMany: (prs: ReadonlyArray<import("./internal.js").UpsertInput>) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
20
|
+
readonly deleteStale: (olderThan: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
21
|
+
readonly deleteStaleOpen: (olderThan: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
22
|
+
readonly deleteOne: (awsAccountId: string, id: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
23
|
+
readonly updateDiffStats: (awsAccountId: string, id: string, filesAdded: number, filesModified: number, filesDeleted: number) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
24
|
+
readonly updateStatusAndClosedAt: (awsAccountId: string, id: string, status: string, closedAt: string, mergedBy?: string, approvedBy?: ReadonlyArray<string>) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
25
|
+
readonly updateCommentCount: (awsAccountId: string, id: string, count: number | null) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
26
|
+
readonly updateHealthScore: (awsAccountId: string, id: string, score: number) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
27
|
+
readonly refreshCommentedBy: () => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
28
|
+
readonly findAll: () => Effect.Effect<readonly {
|
|
29
|
+
readonly link: string;
|
|
30
|
+
readonly awsAccountId: string;
|
|
31
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly author: string;
|
|
34
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
35
|
+
readonly creationDate: Date;
|
|
36
|
+
readonly lastModifiedDate: Date;
|
|
37
|
+
readonly status: "OPEN" | "CLOSED" | "MERGED";
|
|
38
|
+
readonly sourceBranch: string;
|
|
39
|
+
readonly destinationBranch: string;
|
|
40
|
+
readonly isMergeable: boolean;
|
|
41
|
+
readonly isApproved: boolean;
|
|
42
|
+
readonly description: string | null;
|
|
43
|
+
readonly commentCount: number | null;
|
|
44
|
+
readonly healthScore: number | null;
|
|
45
|
+
readonly fetchedAt: string;
|
|
46
|
+
readonly approvedBy: readonly string[];
|
|
47
|
+
readonly commentedBy: readonly string[];
|
|
48
|
+
readonly mergedBy: string | null;
|
|
49
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
50
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
51
|
+
readonly filesAdded: number | null;
|
|
52
|
+
readonly filesModified: number | null;
|
|
53
|
+
readonly filesDeleted: number | null;
|
|
54
|
+
readonly closedAt: string | null;
|
|
55
|
+
}[], import("../../CacheError.ts").CacheError, never>;
|
|
56
|
+
readonly findMissingDiffStats: () => Effect.Effect<readonly {
|
|
57
|
+
readonly link: string;
|
|
58
|
+
readonly awsAccountId: string;
|
|
59
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
60
|
+
readonly title: string;
|
|
61
|
+
readonly author: string;
|
|
62
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
63
|
+
readonly creationDate: Date;
|
|
64
|
+
readonly lastModifiedDate: Date;
|
|
65
|
+
readonly status: "OPEN" | "CLOSED" | "MERGED";
|
|
66
|
+
readonly sourceBranch: string;
|
|
67
|
+
readonly destinationBranch: string;
|
|
68
|
+
readonly isMergeable: boolean;
|
|
69
|
+
readonly isApproved: boolean;
|
|
70
|
+
readonly description: string | null;
|
|
71
|
+
readonly commentCount: number | null;
|
|
72
|
+
readonly healthScore: number | null;
|
|
73
|
+
readonly fetchedAt: string;
|
|
74
|
+
readonly approvedBy: readonly string[];
|
|
75
|
+
readonly commentedBy: readonly string[];
|
|
76
|
+
readonly mergedBy: string | null;
|
|
77
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
78
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
79
|
+
readonly filesAdded: number | null;
|
|
80
|
+
readonly filesModified: number | null;
|
|
81
|
+
readonly filesDeleted: number | null;
|
|
82
|
+
readonly closedAt: string | null;
|
|
83
|
+
}[], import("../../CacheError.ts").CacheError, never>;
|
|
84
|
+
readonly findByAccountAndId: (awsAccountId: string, id: string) => Effect.Effect<import("effect/Option").Option<{
|
|
85
|
+
readonly link: string;
|
|
86
|
+
readonly awsAccountId: string;
|
|
87
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
88
|
+
readonly title: string;
|
|
89
|
+
readonly author: string;
|
|
90
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
91
|
+
readonly creationDate: Date;
|
|
92
|
+
readonly lastModifiedDate: Date;
|
|
93
|
+
readonly status: "OPEN" | "CLOSED" | "MERGED";
|
|
94
|
+
readonly sourceBranch: string;
|
|
95
|
+
readonly destinationBranch: string;
|
|
96
|
+
readonly isMergeable: boolean;
|
|
97
|
+
readonly isApproved: boolean;
|
|
98
|
+
readonly description: string | null;
|
|
99
|
+
readonly commentCount: number | null;
|
|
100
|
+
readonly healthScore: number | null;
|
|
101
|
+
readonly fetchedAt: string;
|
|
102
|
+
readonly approvedBy: readonly string[];
|
|
103
|
+
readonly commentedBy: readonly string[];
|
|
104
|
+
readonly mergedBy: string | null;
|
|
105
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
106
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
107
|
+
readonly filesAdded: number | null;
|
|
108
|
+
readonly filesModified: number | null;
|
|
109
|
+
readonly filesDeleted: number | null;
|
|
110
|
+
readonly closedAt: string | null;
|
|
111
|
+
}>, import("../../CacheError.ts").CacheError, never>;
|
|
112
|
+
readonly search: (query: string, opts?: {
|
|
113
|
+
readonly limit?: number;
|
|
114
|
+
readonly offset?: number;
|
|
115
|
+
}) => Effect.Effect<import("./internal.js").SearchResult, import("../../CacheError.ts").CacheError>;
|
|
116
|
+
readonly findStaleOpen: (olderThan: string) => Effect.Effect<readonly {
|
|
117
|
+
readonly awsAccountId: string;
|
|
118
|
+
readonly id: string;
|
|
119
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
120
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
121
|
+
}[], import("../../CacheError.ts").CacheError, never>;
|
|
122
|
+
readonly findOpenInRange: (weekStart: string, weekEnd: string) => Effect.Effect<readonly {
|
|
123
|
+
readonly awsAccountId: string;
|
|
124
|
+
readonly id: string;
|
|
125
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
126
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
127
|
+
}[], import("../../CacheError.ts").CacheError, never>;
|
|
128
|
+
}, never, SqlClient.SqlClient | EventsHub>;
|
|
129
|
+
}>;
|
|
130
|
+
export declare class PullRequestRepo extends PullRequestRepo_base {
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAA;AAI1D,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACjF,YAAY,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAoBk6C,CAAC;2BAAyB,CAAC;;;;;;;;;;;;;;;;AAlB5gD,qBAAa,eAAgB,SAAQ,oBAiBnC;CAAG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module PullRequestRepo
|
|
3
|
+
*
|
|
4
|
+
* SQLite-backed cache for CodeCommit pull requests.
|
|
5
|
+
* Assembles query methods from `./queries` and mutation methods from
|
|
6
|
+
* `./mutations` into a single Effect.Service.
|
|
7
|
+
*
|
|
8
|
+
* @category CacheService
|
|
9
|
+
*/
|
|
10
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
11
|
+
import { Effect } from "effect";
|
|
12
|
+
import { DatabaseLive } from "../../Database.js";
|
|
13
|
+
import { EventsHub, RepoChange } from "../../EventsHub.js";
|
|
14
|
+
import { mutations } from "./mutations.js";
|
|
15
|
+
import * as Q from "./queries.js";
|
|
16
|
+
export { CachedPullRequest, UpsertInput } from "./internal.js";
|
|
17
|
+
export class PullRequestRepo extends Effect.Service()("PullRequestRepo", {
|
|
18
|
+
dependencies: [DatabaseLive, EventsHub.Default],
|
|
19
|
+
effect: Effect.gen(function* () {
|
|
20
|
+
const sql = yield* SqlClient.SqlClient;
|
|
21
|
+
const hub = yield* EventsHub;
|
|
22
|
+
const publish = hub.publish(RepoChange.PullRequests());
|
|
23
|
+
return {
|
|
24
|
+
findAll: Q.findAll(sql),
|
|
25
|
+
findMissingDiffStats: Q.findMissingDiffStats(sql),
|
|
26
|
+
findByAccountAndId: Q.findByAccountAndId(sql),
|
|
27
|
+
search: Q.search(sql),
|
|
28
|
+
findStaleOpen: Q.findStaleOpen(sql),
|
|
29
|
+
findOpenInRange: Q.findOpenInRange(sql),
|
|
30
|
+
...mutations(sql, publish)
|
|
31
|
+
};
|
|
32
|
+
})
|
|
33
|
+
}) {
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,OAAO,EAAE,iBAAiB,EAAqB,WAAW,EAAE,MAAM,eAAe,CAAA;AAGjF,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,OAAO,EAAmB,CAAC,iBAAiB,EAAE;IACxF,YAAY,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAA;QACtC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,SAAS,CAAA;QAC5B,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAA;QAEtD,OAAO;YACL,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACvB,oBAAoB,EAAE,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC;YACjD,kBAAkB,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC;YAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;YACrB,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC;YACvC,GAAG,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;SAClB,CAAA;IACZ,CAAC,CAAC;CACH,CAAC;CAAG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module PullRequestRepo/internal
|
|
3
|
+
*
|
|
4
|
+
* Schemas, types, and helpers shared across the PullRequestRepo modules.
|
|
5
|
+
*
|
|
6
|
+
* @category CacheService
|
|
7
|
+
*/
|
|
8
|
+
import * as Model from "@effect/sql/Model";
|
|
9
|
+
import { Effect, Schema } from "effect";
|
|
10
|
+
import { CacheError } from "../../CacheError.js";
|
|
11
|
+
/** DB column `TEXT` (comma-separated) <-> `readonly string[]` */
|
|
12
|
+
export declare const CommaSeparatedArray: Schema.transform<Schema.NullOr<typeof Schema.String>, Schema.Array$<typeof Schema.String>>;
|
|
13
|
+
export declare const CachedPullRequest: Schema.Struct<{
|
|
14
|
+
id: Schema.brand<typeof Schema.String, "PullRequestId">;
|
|
15
|
+
awsAccountId: typeof Schema.String;
|
|
16
|
+
accountProfile: Schema.brand<typeof Schema.String, "AwsProfileName">;
|
|
17
|
+
accountRegion: Schema.brand<typeof Schema.String, "AwsRegion">;
|
|
18
|
+
title: typeof Schema.String;
|
|
19
|
+
description: Schema.NullOr<typeof Schema.String>;
|
|
20
|
+
author: typeof Schema.String;
|
|
21
|
+
repositoryName: Schema.brand<typeof Schema.String, "RepositoryName">;
|
|
22
|
+
creationDate: typeof Schema.DateFromString;
|
|
23
|
+
lastModifiedDate: typeof Schema.DateFromString;
|
|
24
|
+
status: Schema.Literal<["OPEN", "CLOSED", "MERGED"]>;
|
|
25
|
+
sourceBranch: typeof Schema.String;
|
|
26
|
+
destinationBranch: typeof Schema.String;
|
|
27
|
+
isMergeable: typeof Model.BooleanFromNumber;
|
|
28
|
+
isApproved: typeof Model.BooleanFromNumber;
|
|
29
|
+
commentCount: Schema.NullOr<typeof Schema.Number>;
|
|
30
|
+
healthScore: Schema.NullOr<typeof Schema.Number>;
|
|
31
|
+
link: typeof Schema.String;
|
|
32
|
+
fetchedAt: typeof Schema.String;
|
|
33
|
+
filesAdded: Schema.NullOr<typeof Schema.Number>;
|
|
34
|
+
filesModified: Schema.NullOr<typeof Schema.Number>;
|
|
35
|
+
filesDeleted: Schema.NullOr<typeof Schema.Number>;
|
|
36
|
+
closedAt: Schema.NullOr<typeof Schema.String>;
|
|
37
|
+
mergedBy: Schema.NullOr<typeof Schema.String>;
|
|
38
|
+
approvedBy: Schema.transform<Schema.NullOr<typeof Schema.String>, Schema.Array$<typeof Schema.String>>;
|
|
39
|
+
commentedBy: Schema.transform<Schema.NullOr<typeof Schema.String>, Schema.Array$<typeof Schema.String>>;
|
|
40
|
+
}>;
|
|
41
|
+
export type CachedPullRequest = typeof CachedPullRequest.Type;
|
|
42
|
+
export interface SearchResult {
|
|
43
|
+
readonly items: ReadonlyArray<CachedPullRequest>;
|
|
44
|
+
readonly total: number;
|
|
45
|
+
readonly hasMore: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare const UpsertInput: Schema.Struct<{
|
|
48
|
+
id: typeof Schema.String;
|
|
49
|
+
awsAccountId: typeof Schema.String;
|
|
50
|
+
accountProfile: typeof Schema.String;
|
|
51
|
+
accountRegion: typeof Schema.String;
|
|
52
|
+
title: typeof Schema.String;
|
|
53
|
+
description: Schema.NullOr<typeof Schema.String>;
|
|
54
|
+
author: typeof Schema.String;
|
|
55
|
+
repositoryName: typeof Schema.String;
|
|
56
|
+
creationDate: typeof Schema.String;
|
|
57
|
+
lastModifiedDate: typeof Schema.String;
|
|
58
|
+
status: typeof Schema.String;
|
|
59
|
+
sourceBranch: typeof Schema.String;
|
|
60
|
+
destinationBranch: typeof Schema.String;
|
|
61
|
+
isMergeable: typeof Schema.Number;
|
|
62
|
+
isApproved: typeof Schema.Number;
|
|
63
|
+
commentCount: Schema.NullOr<typeof Schema.Number>;
|
|
64
|
+
link: typeof Schema.String;
|
|
65
|
+
approvedBy: Schema.Array$<typeof Schema.String>;
|
|
66
|
+
}>;
|
|
67
|
+
export type UpsertInput = typeof UpsertInput.Type;
|
|
68
|
+
/** Wrap an Effect with CacheError mapping and a span. */
|
|
69
|
+
export declare const cacheError: (op: string) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, CacheError, Exclude<R, import("effect/Tracer").ParentSpan>>;
|
|
70
|
+
/** Join a string array for the approved_by TEXT column. */
|
|
71
|
+
export declare const joinApprovedBy: (arr: ReadonlyArray<string>) => string | null;
|
|
72
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,4FAO/B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2B5B,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;EAmBtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,yDAAyD;AACzD,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,iFAI/E,CAAA;AAEH,2DAA2D;AAC3D,eAAO,MAAM,cAAc,GAAI,KAAK,aAAa,CAAC,MAAM,CAAC,kBAA4C,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module PullRequestRepo/internal
|
|
3
|
+
*
|
|
4
|
+
* Schemas, types, and helpers shared across the PullRequestRepo modules.
|
|
5
|
+
*
|
|
6
|
+
* @category CacheService
|
|
7
|
+
*/
|
|
8
|
+
import * as Model from "@effect/sql/Model";
|
|
9
|
+
import { Effect, Schema } from "effect";
|
|
10
|
+
import { AwsProfileName, AwsRegion, PullRequestId, PullRequestStatus, RepositoryName } from "../../../Domain.js";
|
|
11
|
+
import { CacheError } from "../../CacheError.js";
|
|
12
|
+
/** DB column `TEXT` (comma-separated) <-> `readonly string[]` */
|
|
13
|
+
export const CommaSeparatedArray = Schema.transform(Schema.NullOr(Schema.String), Schema.Array(Schema.String), {
|
|
14
|
+
decode: (s) => (s ? s.split(",") : []),
|
|
15
|
+
encode: (arr) => (arr.length > 0 ? arr.join(",") : null)
|
|
16
|
+
});
|
|
17
|
+
export const CachedPullRequest = Schema.Struct({
|
|
18
|
+
id: PullRequestId,
|
|
19
|
+
awsAccountId: Schema.String,
|
|
20
|
+
accountProfile: AwsProfileName,
|
|
21
|
+
accountRegion: AwsRegion,
|
|
22
|
+
title: Schema.String,
|
|
23
|
+
description: Schema.NullOr(Schema.String),
|
|
24
|
+
author: Schema.String,
|
|
25
|
+
repositoryName: RepositoryName,
|
|
26
|
+
creationDate: Schema.DateFromString,
|
|
27
|
+
lastModifiedDate: Schema.DateFromString,
|
|
28
|
+
status: PullRequestStatus,
|
|
29
|
+
sourceBranch: Schema.String,
|
|
30
|
+
destinationBranch: Schema.String,
|
|
31
|
+
isMergeable: Model.BooleanFromNumber,
|
|
32
|
+
isApproved: Model.BooleanFromNumber,
|
|
33
|
+
commentCount: Schema.NullOr(Schema.Number),
|
|
34
|
+
healthScore: Schema.NullOr(Schema.Number),
|
|
35
|
+
link: Schema.String,
|
|
36
|
+
fetchedAt: Schema.String,
|
|
37
|
+
filesAdded: Schema.NullOr(Schema.Number),
|
|
38
|
+
filesModified: Schema.NullOr(Schema.Number),
|
|
39
|
+
filesDeleted: Schema.NullOr(Schema.Number),
|
|
40
|
+
closedAt: Schema.NullOr(Schema.String),
|
|
41
|
+
mergedBy: Schema.NullOr(Schema.String),
|
|
42
|
+
approvedBy: CommaSeparatedArray,
|
|
43
|
+
commentedBy: CommaSeparatedArray
|
|
44
|
+
});
|
|
45
|
+
export const UpsertInput = Schema.Struct({
|
|
46
|
+
id: Schema.String,
|
|
47
|
+
awsAccountId: Schema.String,
|
|
48
|
+
accountProfile: Schema.String,
|
|
49
|
+
accountRegion: Schema.String,
|
|
50
|
+
title: Schema.String,
|
|
51
|
+
description: Schema.NullOr(Schema.String),
|
|
52
|
+
author: Schema.String,
|
|
53
|
+
repositoryName: Schema.String,
|
|
54
|
+
creationDate: Schema.String,
|
|
55
|
+
lastModifiedDate: Schema.String,
|
|
56
|
+
status: Schema.String,
|
|
57
|
+
sourceBranch: Schema.String,
|
|
58
|
+
destinationBranch: Schema.String,
|
|
59
|
+
isMergeable: Schema.Number,
|
|
60
|
+
isApproved: Schema.Number,
|
|
61
|
+
commentCount: Schema.NullOr(Schema.Number),
|
|
62
|
+
link: Schema.String,
|
|
63
|
+
approvedBy: Schema.Array(Schema.String)
|
|
64
|
+
});
|
|
65
|
+
/** Wrap an Effect with CacheError mapping and a span. */
|
|
66
|
+
export const cacheError = (op) => (effect) => effect.pipe(Effect.mapError((cause) => new CacheError({ operation: `PullRequestRepo.${op}`, cause })), Effect.withSpan(`PullRequestRepo.${op}`, { captureStackTrace: false }));
|
|
67
|
+
/** Join a string array for the approved_by TEXT column. */
|
|
68
|
+
export const joinApprovedBy = (arr) => (arr.length > 0 ? arr.join(",") : null);
|
|
69
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAChH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,CACjD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAC3B;IACE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;CACzD,CACF,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,aAAa;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,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C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module PullRequestRepo/mutations
|
|
3
|
+
*
|
|
4
|
+
* SQL write operations. Each function takes `sql` and `publish` (change event)
|
|
5
|
+
* and returns the mutation implementations as an object.
|
|
6
|
+
*
|
|
7
|
+
* @category CacheService
|
|
8
|
+
*/
|
|
9
|
+
import type * as SqlClient from "@effect/sql/SqlClient";
|
|
10
|
+
import { Effect } from "effect";
|
|
11
|
+
import { UpsertInput } from "./internal.js";
|
|
12
|
+
export declare const mutations: (sql: SqlClient.SqlClient, publish: Effect.Effect<void>) => {
|
|
13
|
+
readonly upsert: (input: UpsertInput) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
14
|
+
readonly upsertMany: (prs: ReadonlyArray<UpsertInput>) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
15
|
+
readonly deleteStale: (olderThan: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
16
|
+
readonly deleteStaleOpen: (olderThan: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
17
|
+
readonly deleteOne: (awsAccountId: string, id: string) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
18
|
+
readonly updateDiffStats: (awsAccountId: string, id: string, filesAdded: number, filesModified: number, filesDeleted: number) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
19
|
+
readonly updateStatusAndClosedAt: (awsAccountId: string, id: string, status: string, closedAt: string, mergedBy?: string, approvedBy?: ReadonlyArray<string>) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
20
|
+
readonly updateCommentCount: (awsAccountId: string, id: string, count: number | null) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
21
|
+
readonly updateHealthScore: (awsAccountId: string, id: string, score: number) => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
22
|
+
readonly refreshCommentedBy: () => Effect.Effect<void, import("../../CacheError.ts").CacheError, never>;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/mutations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAEvC,OAAO,EAA8B,WAAW,EAAE,MAAM,eAAe,CAAA;AAEvE,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,CAAC,SAAS,EAAE,SAAS,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;6BAgD5D,WAAW;+BAET,aAAa,CAAC,WAAW,CAAC;sCAMnB,MAAM;0CAGF,MAAM;uCAGT,MAAM,MAAM,MAAM;6CAQ5B,MAAM,MAChB,MAAM,cACE,MAAM,iBACH,MAAM,gBACP,MAAM;qDAUN,MAAM,MAChB,MAAM,UACF,MAAM,YACJ,MAAM,aACL,MAAM,eACJ,aAAa,CAAC,MAAM,CAAC;gDAaD,MAAM,MAAM,MAAM,SAAS,MAAM,GAAG,IAAI;+CAQzC,MAAM,MAAM,MAAM,SAAS,MAAM;;CAsCtE,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as SqlSchema from "@effect/sql/SqlSchema";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
import { PRCommentLocationJson } from "../../../Domain.js";
|
|
4
|
+
import { cacheError, joinApprovedBy, UpsertInput } from "./internal.js";
|
|
5
|
+
export const mutations = (sql, publish) => {
|
|
6
|
+
const upsert_ = SqlSchema.void({
|
|
7
|
+
Request: UpsertInput,
|
|
8
|
+
execute: (req) => {
|
|
9
|
+
const approvedByStr = joinApprovedBy(req.approvedBy);
|
|
10
|
+
return sql `INSERT INTO pull_requests
|
|
11
|
+
(id, aws_account_id, account_profile, account_region, title, description,
|
|
12
|
+
author, repository_name, creation_date, last_modified_date, status,
|
|
13
|
+
source_branch, destination_branch, is_mergeable, is_approved,
|
|
14
|
+
comment_count, link, approved_by, fetched_at)
|
|
15
|
+
VALUES (${req.id}, ${req.awsAccountId}, ${req.accountProfile}, ${req.accountRegion},
|
|
16
|
+
${req.title}, ${req.description}, ${req.author}, ${req.repositoryName},
|
|
17
|
+
${req.creationDate}, ${req.lastModifiedDate}, ${req.status},
|
|
18
|
+
${req.sourceBranch}, ${req.destinationBranch}, ${req.isMergeable}, ${req.isApproved},
|
|
19
|
+
${req.commentCount}, ${req.link}, ${approvedByStr}, strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
|
|
20
|
+
ON CONFLICT (aws_account_id, id) DO UPDATE SET
|
|
21
|
+
account_profile = excluded.account_profile,
|
|
22
|
+
account_region = excluded.account_region,
|
|
23
|
+
title = excluded.title,
|
|
24
|
+
description = excluded.description,
|
|
25
|
+
author = excluded.author,
|
|
26
|
+
repository_name = excluded.repository_name,
|
|
27
|
+
creation_date = excluded.creation_date,
|
|
28
|
+
last_modified_date = excluded.last_modified_date,
|
|
29
|
+
status = excluded.status,
|
|
30
|
+
source_branch = excluded.source_branch,
|
|
31
|
+
destination_branch = excluded.destination_branch,
|
|
32
|
+
is_mergeable = excluded.is_mergeable,
|
|
33
|
+
is_approved = excluded.is_approved,
|
|
34
|
+
comment_count = COALESCE(excluded.comment_count, pull_requests.comment_count),
|
|
35
|
+
health_score = COALESCE(excluded.health_score, pull_requests.health_score),
|
|
36
|
+
link = excluded.link,
|
|
37
|
+
approved_by = COALESCE(excluded.approved_by, pull_requests.approved_by),
|
|
38
|
+
fetched_at = excluded.fetched_at`;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const deleteStale_ = SqlSchema.void({
|
|
42
|
+
Request: Schema.Struct({ olderThan: Schema.String }),
|
|
43
|
+
execute: (req) => sql `DELETE FROM pull_requests WHERE fetched_at < ${req.olderThan}`
|
|
44
|
+
});
|
|
45
|
+
const deleteStaleOpen_ = SqlSchema.void({
|
|
46
|
+
Request: Schema.Struct({ olderThan: Schema.String }),
|
|
47
|
+
execute: (req) => sql `DELETE FROM pull_requests WHERE status = 'OPEN' AND fetched_at < ${req.olderThan}`
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
upsert: (input) => upsert_(input).pipe(Effect.tap(() => publish), cacheError("upsert")),
|
|
51
|
+
upsertMany: (prs) => sql.withTransaction(Effect.forEach(prs, (pr) => upsert_(pr), { discard: true })).pipe(Effect.tap(() => publish), cacheError("upsertMany")),
|
|
52
|
+
deleteStale: (olderThan) => deleteStale_({ olderThan }).pipe(Effect.tap(() => publish), cacheError("deleteStale")),
|
|
53
|
+
deleteStaleOpen: (olderThan) => deleteStaleOpen_({ olderThan }).pipe(Effect.tap(() => publish), cacheError("deleteStaleOpen")),
|
|
54
|
+
deleteOne: (awsAccountId, id) => sql `DELETE FROM pull_requests WHERE aws_account_id = ${awsAccountId} AND id = ${id}`.pipe(Effect.asVoid, Effect.tap(() => publish), cacheError("deleteOne")),
|
|
55
|
+
updateDiffStats: (awsAccountId, id, filesAdded, filesModified, filesDeleted) => sql `UPDATE pull_requests SET files_added = ${filesAdded}, files_modified = ${filesModified}, files_deleted = ${filesDeleted}
|
|
56
|
+
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid, Effect.tap(() => publish), cacheError("updateDiffStats")),
|
|
57
|
+
updateStatusAndClosedAt: (awsAccountId, id, status, closedAt, mergedBy, approvedBy) => {
|
|
58
|
+
const approvedByStr = approvedBy ? joinApprovedBy([...approvedBy]) : null;
|
|
59
|
+
return sql `UPDATE pull_requests SET status = ${status}, closed_at = ${closedAt}, merged_by = ${mergedBy ?? null},
|
|
60
|
+
approved_by = COALESCE(${approvedByStr}, approved_by),
|
|
61
|
+
last_modified_date = ${closedAt}
|
|
62
|
+
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid, Effect.tap(() => publish), cacheError("updateStatusAndClosedAt"));
|
|
63
|
+
},
|
|
64
|
+
updateCommentCount: (awsAccountId, id, count) => sql `UPDATE pull_requests SET comment_count = ${count}
|
|
65
|
+
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid, Effect.tap(() => publish), cacheError("updateCommentCount")),
|
|
66
|
+
updateHealthScore: (awsAccountId, id, score) => sql `UPDATE pull_requests SET health_score = ${score}
|
|
67
|
+
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid, Effect.tap(() => publish), cacheError("updateHealthScore")),
|
|
68
|
+
refreshCommentedBy: () => sql.withTransaction(Effect.gen(function* () {
|
|
69
|
+
const LocationsFromJson = Schema.parseJson(Schema.Array(PRCommentLocationJson));
|
|
70
|
+
const rows = yield* sql `
|
|
71
|
+
SELECT c.aws_account_id, c.pull_request_id, p.author, c.locations_json
|
|
72
|
+
FROM pr_comments c
|
|
73
|
+
INNER JOIN pull_requests p ON p.id = c.pull_request_id AND p.aws_account_id = c.aws_account_id
|
|
74
|
+
`;
|
|
75
|
+
for (const row of rows) {
|
|
76
|
+
const parsed = yield* Schema.decodeUnknown(LocationsFromJson)(row.locationsJson).pipe(Effect.catchAll(() => Effect.succeed([])));
|
|
77
|
+
const commenters = new Set();
|
|
78
|
+
const walk = (threads) => {
|
|
79
|
+
for (const t of threads) {
|
|
80
|
+
if (t.root.author !== row.author)
|
|
81
|
+
commenters.add(t.root.author);
|
|
82
|
+
walk(t.replies);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
for (const loc of parsed)
|
|
86
|
+
walk(loc.comments);
|
|
87
|
+
const commentedBy = commenters.size > 0 ? [...commenters].join(",") : null;
|
|
88
|
+
yield* sql `UPDATE pull_requests SET commented_by = ${commentedBy}
|
|
89
|
+
WHERE id = ${row.pullRequestId} AND aws_account_id = ${row.awsAccountId}`;
|
|
90
|
+
}
|
|
91
|
+
})).pipe(Effect.asVoid, cacheError("refreshCommentedBy"))
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=mutations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/mutations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAwB,EAAE,OAA4B,EAAE,EAAE;IAClF,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC;QAC7B,OAAO,EAAE,WAAW;QACpB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACf,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;YACpD,OAAO,GAAG,CAAA;;;;;kBAKE,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,cAAc,KAAK,GAAG,CAAC,aAAa;YAC9E,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,cAAc;YACnE,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,gBAAgB,KAAK,GAAG,CAAC,MAAM;YACxD,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,iBAAiB,KAAK,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,UAAU;YACjF,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,IAAI,KAAK,aAAa;;;;;;;;;;;;;;;;;;;2CAmBhB,CAAA;QACvC,CAAC;K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