@knpkv/codecommit-core 0.5.0 → 0.6.0
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/AwsClientGated.d.ts +27 -0
- package/dist/AwsClient/AwsClientGated.d.ts.map +1 -0
- package/dist/AwsClient/AwsClientGated.js +105 -0
- package/dist/AwsClient/AwsClientGated.js.map +1 -0
- 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 +13 -1
- package/dist/CacheService/Database.js.map +1 -1
- package/dist/CacheService/EventsHub.d.ts +44 -4
- package/dist/CacheService/EventsHub.d.ts.map +1 -1
- package/dist/CacheService/EventsHub.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/migrations/0011_audit_log.d.ts +5 -0
- package/dist/CacheService/migrations/0011_audit_log.d.ts.map +1 -0
- package/dist/CacheService/migrations/0011_audit_log.js +19 -0
- package/dist/CacheService/migrations/0011_audit_log.js.map +1 -0
- package/dist/CacheService/migrations/0012_audit_log_indexes.d.ts +5 -0
- package/dist/CacheService/migrations/0012_audit_log_indexes.d.ts.map +1 -0
- package/dist/CacheService/migrations/0012_audit_log_indexes.js +7 -0
- package/dist/CacheService/migrations/0012_audit_log_indexes.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/Errors.d.ts +14 -1
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +10 -0
- package/dist/Errors.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/PermissionService/AuditLog.d.ts +62 -0
- package/dist/PermissionService/AuditLog.d.ts.map +1 -0
- package/dist/PermissionService/AuditLog.js +113 -0
- package/dist/PermissionService/AuditLog.js.map +1 -0
- package/dist/PermissionService/PermissionGate.d.ts +47 -0
- package/dist/PermissionService/PermissionGate.d.ts.map +1 -0
- package/dist/PermissionService/PermissionGate.js +14 -0
- package/dist/PermissionService/PermissionGate.js.map +1 -0
- package/dist/PermissionService/PermissionGateLive.d.ts +41 -0
- package/dist/PermissionService/PermissionGateLive.d.ts.map +1 -0
- package/dist/PermissionService/PermissionGateLive.js +83 -0
- package/dist/PermissionService/PermissionGateLive.js.map +1 -0
- package/dist/PermissionService/index.d.ts +39 -0
- package/dist/PermissionService/index.d.ts.map +1 -0
- package/dist/PermissionService/index.js +87 -0
- package/dist/PermissionService/index.js.map +1 -0
- package/dist/PermissionService/operations.d.ts +40 -0
- package/dist/PermissionService/operations.d.ts.map +1 -0
- package/dist/PermissionService/operations.js +38 -0
- package/dist/PermissionService/operations.js.map +1 -0
- 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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -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,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module StatsService
|
|
3
|
+
*
|
|
4
|
+
* Mental model: this is an **orchestration layer** — it doesn't own data,
|
|
5
|
+
* it assembles a `WeeklyStats` view-model by fanning out to StatsRepo
|
|
6
|
+
* queries and reviewer analysis in parallel, then shaping the results for
|
|
7
|
+
* the client.
|
|
8
|
+
*
|
|
9
|
+
* - All repo queries run with `{ concurrency: "unbounded" }` for max throughput.
|
|
10
|
+
* - `getWeeklyStats` is a read path; `syncWeek` is a write path that back-fills
|
|
11
|
+
* historical PR data into the cache.
|
|
12
|
+
* - A `catchAll` fallback returns an empty `WeeklyStats` so the UI always gets
|
|
13
|
+
* a valid response, even when the cache is cold.
|
|
14
|
+
*
|
|
15
|
+
* @category Service
|
|
16
|
+
*/
|
|
17
|
+
import { Data, Effect, Layer, Option } from "effect";
|
|
18
|
+
import { AwsClient } from "../AwsClient/index.js";
|
|
19
|
+
import { PullRequestRepo } from "../CacheService/repos/PullRequestRepo/index.js";
|
|
20
|
+
import { StatsRepo } from "../CacheService/repos/StatsRepo/index.js";
|
|
21
|
+
import { ConfigService } from "../ConfigService/index.js";
|
|
22
|
+
import { median, parseISOWeek, toISOWeek } from "../DateUtils.js";
|
|
23
|
+
import { syncWeek as syncWeekImpl } from "../PRService/refreshHistory.js";
|
|
24
|
+
export { WeeklyStats } from "./WeeklyStats.js";
|
|
25
|
+
class InvalidISOWeek extends Data.TaggedError("InvalidISOWeek") {
|
|
26
|
+
}
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Service
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
export class StatsService extends Effect.Service()("@knpkv/codecommit-core/StatsService", {
|
|
31
|
+
effect: Effect.gen(function* () {
|
|
32
|
+
const statsRepo = yield* StatsRepo;
|
|
33
|
+
const prRepo = yield* PullRequestRepo;
|
|
34
|
+
const configService = yield* ConfigService;
|
|
35
|
+
const awsClient = yield* AwsClient;
|
|
36
|
+
const depsLayer = Layer.mergeAll(Layer.succeed(ConfigService, configService), Layer.succeed(AwsClient, awsClient), Layer.succeed(PullRequestRepo, prRepo));
|
|
37
|
+
const getWeeklyStats = Effect.fn("StatsService.getWeeklyStats")(function* (week, filters) {
|
|
38
|
+
const range = yield* Option.match(parseISOWeek(week), {
|
|
39
|
+
onNone: () => Effect.fail(new InvalidISOWeek({ week })),
|
|
40
|
+
onSome: Effect.succeed
|
|
41
|
+
});
|
|
42
|
+
const weekStart = range.start.toISOString();
|
|
43
|
+
const weekEnd = range.end.toISOString();
|
|
44
|
+
const nowISO = new Date().toISOString();
|
|
45
|
+
const [volume, topContributors, mostActivePRs, prSizeDistribution, avgDiffSize, diffSizeByContributor, stalePRs, health, filterOptions, totalComments, reviewerData, mergeTimeDetails, dataAvailableSince] = yield* Effect.all([
|
|
46
|
+
statsRepo.weeklyVolume(weekStart, weekEnd, filters),
|
|
47
|
+
statsRepo.topContributors(weekStart, weekEnd, filters),
|
|
48
|
+
statsRepo.mostActivePRs(weekStart, weekEnd, filters),
|
|
49
|
+
statsRepo.prSizeDistribution(weekStart, weekEnd, filters),
|
|
50
|
+
statsRepo.avgDiffSize(weekStart, weekEnd, filters),
|
|
51
|
+
statsRepo.diffSizeByContributor(weekStart, weekEnd, filters),
|
|
52
|
+
statsRepo.stalePRs(nowISO, filters),
|
|
53
|
+
statsRepo.healthIndicators(weekStart, weekEnd, filters),
|
|
54
|
+
statsRepo.filterOptions(),
|
|
55
|
+
statsRepo.totalComments(weekStart, weekEnd, filters),
|
|
56
|
+
statsRepo.reviewerData(weekStart, weekEnd, filters),
|
|
57
|
+
statsRepo.mergeTimeDetails(weekStart, weekEnd, filters),
|
|
58
|
+
statsRepo.dataAvailableSince()
|
|
59
|
+
], { concurrency: "unbounded" });
|
|
60
|
+
const reviewCoverage = health.total > 0 ? health.withComments / health.total : null;
|
|
61
|
+
const approvalRate = health.total > 0 ? health.approved / health.total : null;
|
|
62
|
+
const busFactor = topContributors.length > 0
|
|
63
|
+
? {
|
|
64
|
+
topContributorShare: volume.prsCreated > 0 ? topContributors[0].prCount / volume.prsCreated : 0,
|
|
65
|
+
uniqueContributors: topContributors.length
|
|
66
|
+
}
|
|
67
|
+
: null;
|
|
68
|
+
return {
|
|
69
|
+
week,
|
|
70
|
+
weekStart,
|
|
71
|
+
weekEnd,
|
|
72
|
+
dataAvailableSince,
|
|
73
|
+
prsCreated: volume.prsCreated,
|
|
74
|
+
prsMerged: volume.prsMerged,
|
|
75
|
+
prsClosed: volume.prsClosed,
|
|
76
|
+
totalComments,
|
|
77
|
+
topContributors: [...topContributors],
|
|
78
|
+
topReviewers: reviewerData.topReviewers,
|
|
79
|
+
topApprovers: reviewerData.topApprovers,
|
|
80
|
+
medianTimeToMerge: median(mergeTimeDetails.map((d) => d.durationMs)),
|
|
81
|
+
medianTimeToFirstReview: median(reviewerData.firstReviewDetails.map((d) => d.durationMs)),
|
|
82
|
+
medianTimeToAddressFeedback: median(reviewerData.feedbackDetails.map((d) => d.durationMs)),
|
|
83
|
+
mergeTimeDetails: [...mergeTimeDetails].sort((a, b) => b.durationMs - a.durationMs),
|
|
84
|
+
firstReviewDetails: [...reviewerData.firstReviewDetails].sort((a, b) => b.durationMs - a.durationMs),
|
|
85
|
+
feedbackDetails: [...reviewerData.feedbackDetails].sort((a, b) => b.durationMs - a.durationMs),
|
|
86
|
+
mostActivePRs: mostActivePRs.map((p) => ({
|
|
87
|
+
...p,
|
|
88
|
+
commentCount: p.commentCount ?? 0
|
|
89
|
+
})),
|
|
90
|
+
prSizeDistribution,
|
|
91
|
+
avgDiffSize,
|
|
92
|
+
diffSizeByContributor: [...diffSizeByContributor],
|
|
93
|
+
stalePRs: [...stalePRs],
|
|
94
|
+
reviewCoverage,
|
|
95
|
+
approvalRate,
|
|
96
|
+
busFactor,
|
|
97
|
+
availableRepos: filterOptions.repos,
|
|
98
|
+
availableAuthors: filterOptions.authors,
|
|
99
|
+
availableAccounts: filterOptions.accounts
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
getWeeklyStats: (week, filters) => {
|
|
104
|
+
const fallback = {
|
|
105
|
+
week,
|
|
106
|
+
weekStart: "",
|
|
107
|
+
weekEnd: "",
|
|
108
|
+
dataAvailableSince: null,
|
|
109
|
+
prsCreated: 0,
|
|
110
|
+
prsMerged: 0,
|
|
111
|
+
prsClosed: 0,
|
|
112
|
+
totalComments: 0,
|
|
113
|
+
topContributors: [],
|
|
114
|
+
topReviewers: [],
|
|
115
|
+
topApprovers: [],
|
|
116
|
+
medianTimeToMerge: null,
|
|
117
|
+
medianTimeToFirstReview: null,
|
|
118
|
+
medianTimeToAddressFeedback: null,
|
|
119
|
+
mergeTimeDetails: [],
|
|
120
|
+
firstReviewDetails: [],
|
|
121
|
+
feedbackDetails: [],
|
|
122
|
+
mostActivePRs: [],
|
|
123
|
+
prSizeDistribution: { small: 0, medium: 0, large: 0, extraLarge: 0 },
|
|
124
|
+
avgDiffSize: null,
|
|
125
|
+
diffSizeByContributor: [],
|
|
126
|
+
stalePRs: [],
|
|
127
|
+
reviewCoverage: null,
|
|
128
|
+
approvalRate: null,
|
|
129
|
+
busFactor: null,
|
|
130
|
+
availableRepos: [],
|
|
131
|
+
availableAuthors: [],
|
|
132
|
+
availableAccounts: []
|
|
133
|
+
};
|
|
134
|
+
return getWeeklyStats(week, filters).pipe(Effect.catchTags({
|
|
135
|
+
CacheError: (e) => Effect.logWarning("StatsService.getWeeklyStats failed", e).pipe(Effect.as(fallback)),
|
|
136
|
+
InvalidISOWeek: (e) => Effect.logWarning("StatsService.getWeeklyStats failed", e).pipe(Effect.as(fallback))
|
|
137
|
+
}));
|
|
138
|
+
},
|
|
139
|
+
syncWeek: (week, state) => syncWeekImpl(state, week).pipe(Effect.provide(depsLayer)),
|
|
140
|
+
currentWeek: () => toISOWeek(new Date())
|
|
141
|
+
};
|
|
142
|
+
})
|
|
143
|
+
}) {
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","source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oBACf,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;oBACvG,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;iBAC5G,CAAC,CACH,CAAA;YACH,CAAC;YAED,QAAQ,EAAE,CAAC,IAAY,EAAE,KAAgD,EAAuB,EAAE,CAChG,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAE3D,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;SAChC,CAAA;IACZ,CAAC,CAAC;CACH,CAAC;CAAG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,8 +20,10 @@ export * as ConfigService from "./ConfigService/index.js";
|
|
|
20
20
|
export * as DateUtils from "./DateUtils.js";
|
|
21
21
|
export * as Domain from "./Domain.js";
|
|
22
22
|
export * as Errors from "./Errors.js";
|
|
23
|
+
export * as PermissionService from "./PermissionService/index.js";
|
|
23
24
|
export * as PRService from "./PRService/index.js";
|
|
24
25
|
export * as SandboxService from "./SandboxService/index.js";
|
|
26
|
+
export * as StatsService from "./StatsService/index.js";
|
|
25
27
|
export { Registry } from "@effect-atom/atom";
|
|
26
28
|
export { Reactivity } from "@effect/experimental";
|
|
27
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -20,8 +20,10 @@ export * as ConfigService from "./ConfigService/index.js";
|
|
|
20
20
|
export * as DateUtils from "./DateUtils.js";
|
|
21
21
|
export * as Domain from "./Domain.js";
|
|
22
22
|
export * as Errors from "./Errors.js";
|
|
23
|
+
export * as PermissionService from "./PermissionService/index.js";
|
|
23
24
|
export * as PRService from "./PRService/index.js";
|
|
24
25
|
export * as SandboxService from "./SandboxService/index.js";
|
|
26
|
+
export * as StatsService from "./StatsService/index.js";
|
|
25
27
|
// Re-export Effect dependencies for convenience
|
|
26
28
|
export { Registry } from "@effect-atom/atom";
|
|
27
29
|
export { Reactivity } from "@effect/experimental";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AAEvD,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import * as Model from "@effect/sql/Model";
|
|
2
|
-
import * as SqlClient from "@effect/sql/SqlClient";
|
|
3
|
-
import { Effect, Option, Schema } from "effect";
|
|
4
|
-
import { CacheError } from "../CacheError.js";
|
|
5
|
-
import { EventsHub } from "../EventsHub.js";
|
|
6
|
-
export declare const CachedPullRequest: Schema.Struct<{
|
|
7
|
-
id: Schema.brand<typeof Schema.String, "PullRequestId">;
|
|
8
|
-
awsAccountId: typeof Schema.String;
|
|
9
|
-
accountProfile: Schema.brand<typeof Schema.String, "AwsProfileName">;
|
|
10
|
-
accountRegion: Schema.brand<typeof Schema.String, "AwsRegion">;
|
|
11
|
-
title: typeof Schema.String;
|
|
12
|
-
description: Schema.NullOr<typeof Schema.String>;
|
|
13
|
-
author: typeof Schema.String;
|
|
14
|
-
repositoryName: Schema.brand<typeof Schema.String, "RepositoryName">;
|
|
15
|
-
creationDate: typeof Schema.DateFromString;
|
|
16
|
-
lastModifiedDate: typeof Schema.DateFromString;
|
|
17
|
-
status: Schema.Literal<["OPEN", "CLOSED", "MERGED"]>;
|
|
18
|
-
sourceBranch: typeof Schema.String;
|
|
19
|
-
destinationBranch: typeof Schema.String;
|
|
20
|
-
isMergeable: typeof Model.BooleanFromNumber;
|
|
21
|
-
isApproved: typeof Model.BooleanFromNumber;
|
|
22
|
-
commentCount: Schema.NullOr<typeof Schema.Number>;
|
|
23
|
-
healthScore: Schema.NullOr<typeof Schema.Number>;
|
|
24
|
-
link: typeof Schema.String;
|
|
25
|
-
fetchedAt: typeof Schema.String;
|
|
26
|
-
}>;
|
|
27
|
-
export type CachedPullRequest = typeof CachedPullRequest.Type;
|
|
28
|
-
export interface SearchResult {
|
|
29
|
-
readonly items: ReadonlyArray<CachedPullRequest>;
|
|
30
|
-
readonly total: number;
|
|
31
|
-
readonly hasMore: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare const UpsertInput: Schema.Struct<{
|
|
34
|
-
id: typeof Schema.String;
|
|
35
|
-
awsAccountId: typeof Schema.String;
|
|
36
|
-
accountProfile: typeof Schema.String;
|
|
37
|
-
accountRegion: typeof Schema.String;
|
|
38
|
-
title: typeof Schema.String;
|
|
39
|
-
description: Schema.NullOr<typeof Schema.String>;
|
|
40
|
-
author: typeof Schema.String;
|
|
41
|
-
repositoryName: typeof Schema.String;
|
|
42
|
-
creationDate: typeof Schema.String;
|
|
43
|
-
lastModifiedDate: typeof Schema.String;
|
|
44
|
-
status: typeof Schema.String;
|
|
45
|
-
sourceBranch: typeof Schema.String;
|
|
46
|
-
destinationBranch: typeof Schema.String;
|
|
47
|
-
isMergeable: typeof Schema.Number;
|
|
48
|
-
isApproved: typeof Schema.Number;
|
|
49
|
-
commentCount: Schema.NullOr<typeof Schema.Number>;
|
|
50
|
-
link: typeof Schema.String;
|
|
51
|
-
}>;
|
|
52
|
-
export type UpsertInput = typeof UpsertInput.Type;
|
|
53
|
-
declare const PullRequestRepo_base: Effect.Service.Class<PullRequestRepo, "PullRequestRepo", {
|
|
54
|
-
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>];
|
|
55
|
-
readonly effect: Effect.Effect<{
|
|
56
|
-
readonly findAll: () => 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 accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
75
|
-
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
76
|
-
}[], CacheError, never>;
|
|
77
|
-
readonly findByAccountAndId: (awsAccountId: string, id: string) => Effect.Effect<Option.Option<{
|
|
78
|
-
readonly link: string;
|
|
79
|
-
readonly awsAccountId: string;
|
|
80
|
-
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
81
|
-
readonly title: string;
|
|
82
|
-
readonly author: string;
|
|
83
|
-
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
84
|
-
readonly creationDate: Date;
|
|
85
|
-
readonly lastModifiedDate: Date;
|
|
86
|
-
readonly status: "OPEN" | "CLOSED" | "MERGED";
|
|
87
|
-
readonly sourceBranch: string;
|
|
88
|
-
readonly destinationBranch: string;
|
|
89
|
-
readonly isMergeable: boolean;
|
|
90
|
-
readonly isApproved: boolean;
|
|
91
|
-
readonly description: string | null;
|
|
92
|
-
readonly commentCount: number | null;
|
|
93
|
-
readonly healthScore: number | null;
|
|
94
|
-
readonly fetchedAt: string;
|
|
95
|
-
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
96
|
-
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
97
|
-
}>, CacheError, never>;
|
|
98
|
-
readonly upsert: (input: UpsertInput) => Effect.Effect<void, CacheError, never>;
|
|
99
|
-
readonly upsertMany: (prs: ReadonlyArray<UpsertInput>) => Effect.Effect<void, CacheError, never>;
|
|
100
|
-
readonly search: (query: string, opts?: {
|
|
101
|
-
readonly limit?: number;
|
|
102
|
-
readonly offset?: number;
|
|
103
|
-
}) => Effect.Effect<SearchResult, CacheError>;
|
|
104
|
-
readonly deleteStale: (olderThan: string) => Effect.Effect<void, CacheError, never>;
|
|
105
|
-
readonly updateCommentCount: (awsAccountId: string, id: string, count: number | null) => Effect.Effect<void, CacheError, never>;
|
|
106
|
-
readonly updateHealthScore: (awsAccountId: string, id: string, score: number) => Effect.Effect<void, CacheError, never>;
|
|
107
|
-
}, never, SqlClient.SqlClient | EventsHub>;
|
|
108
|
-
}>;
|
|
109
|
-
export declare class PullRequestRepo extends PullRequestRepo_base {
|
|
110
|
-
}
|
|
111
|
-
export {};
|
|
112
|
-
//# sourceMappingURL=PullRequestRepo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/PullRequestRepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAC1C,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAEvD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;EAoB5B,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;;;;;;;;;;;;;;;;;;EAkBtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;oDAqGR,MAAM,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;iCAErC,WAAW;mCACT,aAAa,CAAC,WAAW,CAAC;iCAGnC,MAAM,SACN;YAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,KAC3D,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC;0CAoBjB,MAAM;oDAEI,MAAM,MAAM,MAAM,SAAS,MAAM,GAAG,IAAI;mDAEzC,MAAM,MAAM,MAAM,SAAS,MAAM;;;AA7HzE,qBAAa,eAAgB,SAAQ,oBAiInC;CAAG"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import * as Model from "@effect/sql/Model";
|
|
2
|
-
import * as SqlClient from "@effect/sql/SqlClient";
|
|
3
|
-
import * as SqlSchema from "@effect/sql/SqlSchema";
|
|
4
|
-
import { Effect, Option, Schema } from "effect";
|
|
5
|
-
import { AwsProfileName, AwsRegion, PullRequestId, PullRequestStatus, RepositoryName } from "../../Domain.js";
|
|
6
|
-
import { CacheError } from "../CacheError.js";
|
|
7
|
-
import { DatabaseLive } from "../Database.js";
|
|
8
|
-
import { EventsHub, RepoChange } from "../EventsHub.js";
|
|
9
|
-
export const CachedPullRequest = Schema.Struct({
|
|
10
|
-
id: PullRequestId,
|
|
11
|
-
awsAccountId: Schema.String,
|
|
12
|
-
accountProfile: AwsProfileName,
|
|
13
|
-
accountRegion: AwsRegion,
|
|
14
|
-
title: Schema.String,
|
|
15
|
-
description: Schema.NullOr(Schema.String),
|
|
16
|
-
author: Schema.String,
|
|
17
|
-
repositoryName: RepositoryName,
|
|
18
|
-
creationDate: Schema.DateFromString,
|
|
19
|
-
lastModifiedDate: Schema.DateFromString,
|
|
20
|
-
status: PullRequestStatus,
|
|
21
|
-
sourceBranch: Schema.String,
|
|
22
|
-
destinationBranch: Schema.String,
|
|
23
|
-
isMergeable: Model.BooleanFromNumber,
|
|
24
|
-
isApproved: Model.BooleanFromNumber,
|
|
25
|
-
commentCount: Schema.NullOr(Schema.Number),
|
|
26
|
-
healthScore: Schema.NullOr(Schema.Number),
|
|
27
|
-
link: Schema.String,
|
|
28
|
-
fetchedAt: Schema.String
|
|
29
|
-
});
|
|
30
|
-
export const UpsertInput = Schema.Struct({
|
|
31
|
-
id: Schema.String,
|
|
32
|
-
awsAccountId: Schema.String,
|
|
33
|
-
accountProfile: Schema.String,
|
|
34
|
-
accountRegion: Schema.String,
|
|
35
|
-
title: Schema.String,
|
|
36
|
-
description: Schema.NullOr(Schema.String),
|
|
37
|
-
author: Schema.String,
|
|
38
|
-
repositoryName: Schema.String,
|
|
39
|
-
creationDate: Schema.String,
|
|
40
|
-
lastModifiedDate: Schema.String,
|
|
41
|
-
status: Schema.String,
|
|
42
|
-
sourceBranch: Schema.String,
|
|
43
|
-
destinationBranch: Schema.String,
|
|
44
|
-
isMergeable: Schema.Number,
|
|
45
|
-
isApproved: Schema.Number,
|
|
46
|
-
commentCount: Schema.NullOr(Schema.Number),
|
|
47
|
-
link: Schema.String
|
|
48
|
-
});
|
|
49
|
-
const cacheError = (op) => (effect) => effect.pipe(Effect.mapError((cause) => new CacheError({ operation: `PullRequestRepo.${op}`, cause })), Effect.withSpan(`PullRequestRepo.${op}`, { captureStackTrace: false }));
|
|
50
|
-
export class PullRequestRepo extends Effect.Service()("PullRequestRepo", {
|
|
51
|
-
dependencies: [DatabaseLive, EventsHub.Default],
|
|
52
|
-
effect: Effect.gen(function* () {
|
|
53
|
-
const sql = yield* SqlClient.SqlClient;
|
|
54
|
-
const hub = yield* EventsHub;
|
|
55
|
-
const findAll_ = SqlSchema.findAll({
|
|
56
|
-
Result: CachedPullRequest,
|
|
57
|
-
Request: Schema.Void,
|
|
58
|
-
execute: () => sql `SELECT * FROM pull_requests ORDER BY creation_date DESC`
|
|
59
|
-
});
|
|
60
|
-
const findByAccountAndId_ = SqlSchema.findOne({
|
|
61
|
-
Result: CachedPullRequest,
|
|
62
|
-
Request: Schema.Struct({ awsAccountId: Schema.String, id: Schema.String }),
|
|
63
|
-
execute: (req) => sql `SELECT * FROM pull_requests
|
|
64
|
-
WHERE aws_account_id = ${req.awsAccountId} AND id = ${req.id}`
|
|
65
|
-
});
|
|
66
|
-
const upsert_ = SqlSchema.void({
|
|
67
|
-
Request: UpsertInput,
|
|
68
|
-
execute: (req) => sql `INSERT INTO pull_requests
|
|
69
|
-
(id, aws_account_id, account_profile, account_region, title, description,
|
|
70
|
-
author, repository_name, creation_date, last_modified_date, status,
|
|
71
|
-
source_branch, destination_branch, is_mergeable, is_approved,
|
|
72
|
-
comment_count, link, fetched_at)
|
|
73
|
-
VALUES (${req.id}, ${req.awsAccountId}, ${req.accountProfile}, ${req.accountRegion},
|
|
74
|
-
${req.title}, ${req.description}, ${req.author}, ${req.repositoryName},
|
|
75
|
-
${req.creationDate}, ${req.lastModifiedDate}, ${req.status},
|
|
76
|
-
${req.sourceBranch}, ${req.destinationBranch}, ${req.isMergeable}, ${req.isApproved},
|
|
77
|
-
${req.commentCount}, ${req.link}, strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
|
|
78
|
-
ON CONFLICT (aws_account_id, id) DO UPDATE SET
|
|
79
|
-
account_profile = excluded.account_profile,
|
|
80
|
-
account_region = excluded.account_region,
|
|
81
|
-
title = excluded.title,
|
|
82
|
-
description = excluded.description,
|
|
83
|
-
author = excluded.author,
|
|
84
|
-
repository_name = excluded.repository_name,
|
|
85
|
-
creation_date = excluded.creation_date,
|
|
86
|
-
last_modified_date = excluded.last_modified_date,
|
|
87
|
-
status = excluded.status,
|
|
88
|
-
source_branch = excluded.source_branch,
|
|
89
|
-
destination_branch = excluded.destination_branch,
|
|
90
|
-
is_mergeable = excluded.is_mergeable,
|
|
91
|
-
is_approved = excluded.is_approved,
|
|
92
|
-
comment_count = COALESCE(excluded.comment_count, pull_requests.comment_count),
|
|
93
|
-
health_score = COALESCE(excluded.health_score, pull_requests.health_score),
|
|
94
|
-
link = excluded.link,
|
|
95
|
-
fetched_at = excluded.fetched_at`
|
|
96
|
-
});
|
|
97
|
-
const search_ = SqlSchema.findAll({
|
|
98
|
-
Result: CachedPullRequest,
|
|
99
|
-
Request: Schema.Struct({ query: Schema.String, limit: Schema.Number, offset: Schema.Number }),
|
|
100
|
-
execute: (req) => sql `SELECT pull_requests.* FROM pull_requests
|
|
101
|
-
JOIN pull_requests_fts fts ON pull_requests.rowid = fts.rowid
|
|
102
|
-
WHERE pull_requests_fts MATCH ${req.query}
|
|
103
|
-
ORDER BY rank
|
|
104
|
-
LIMIT ${req.limit} OFFSET ${req.offset}`
|
|
105
|
-
});
|
|
106
|
-
const searchCount_ = SqlSchema.findOne({
|
|
107
|
-
Result: Schema.Struct({ count: Schema.Number }),
|
|
108
|
-
Request: Schema.Struct({ query: Schema.String }),
|
|
109
|
-
execute: (req) => sql `SELECT count(*) as count FROM pull_requests
|
|
110
|
-
JOIN pull_requests_fts fts ON pull_requests.rowid = fts.rowid
|
|
111
|
-
WHERE pull_requests_fts MATCH ${req.query}`
|
|
112
|
-
});
|
|
113
|
-
const deleteStale_ = SqlSchema.void({
|
|
114
|
-
Request: Schema.Struct({ olderThan: Schema.String }),
|
|
115
|
-
execute: (req) => sql `DELETE FROM pull_requests WHERE fetched_at < ${req.olderThan}`
|
|
116
|
-
});
|
|
117
|
-
const updateCommentCount_ = (awsAccountId, id, count) => sql `UPDATE pull_requests SET comment_count = ${count}
|
|
118
|
-
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid);
|
|
119
|
-
const updateHealthScore_ = (awsAccountId, id, score) => sql `UPDATE pull_requests SET health_score = ${score}
|
|
120
|
-
WHERE id = ${id} AND aws_account_id = ${awsAccountId}`.pipe(Effect.asVoid);
|
|
121
|
-
const upsertMany_ = (prs) => sql.withTransaction(Effect.forEach(prs, (pr) => upsert_(pr), { discard: true }));
|
|
122
|
-
const publish = hub.publish(RepoChange.PullRequests());
|
|
123
|
-
return {
|
|
124
|
-
findAll: () => findAll_(undefined).pipe(cacheError("findAll")),
|
|
125
|
-
findByAccountAndId: (awsAccountId, id) => findByAccountAndId_({ awsAccountId, id }).pipe(cacheError("findByAccountAndId")),
|
|
126
|
-
upsert: (input) => upsert_(input).pipe(Effect.tap(() => publish), cacheError("upsert")),
|
|
127
|
-
upsertMany: (prs) => upsertMany_(prs).pipe(Effect.tap(() => publish), cacheError("upsertMany")),
|
|
128
|
-
search: (query, opts) => {
|
|
129
|
-
const limit = opts?.limit ?? 20;
|
|
130
|
-
const offset = opts?.offset ?? 0;
|
|
131
|
-
const stripped = query.replace(/[*^"]/g, "").replace(/\b(NEAR|OR|NOT|AND)\b/gi, "");
|
|
132
|
-
const escaped = stripped.replace(/"/g, `""`);
|
|
133
|
-
const ftsQuery = `"${escaped}"`;
|
|
134
|
-
return Effect.all({
|
|
135
|
-
items: search_({ query: ftsQuery, limit, offset }),
|
|
136
|
-
total: searchCount_({ query: ftsQuery }).pipe(Effect.map((r) => r.pipe(Option.getOrElse(() => ({ count: 0 }))).count))
|
|
137
|
-
}).pipe(Effect.map(({ items, total }) => ({ items, total, hasMore: offset + items.length < total })), Effect.catchTag("SqlError", () => Effect.logWarning("FTS search failed").pipe(Effect.as({ items: [], total: 0, hasMore: false }))), cacheError("search"));
|
|
138
|
-
},
|
|
139
|
-
deleteStale: (olderThan) => deleteStale_({ olderThan }).pipe(Effect.tap(() => publish), cacheError("deleteStale")),
|
|
140
|
-
updateCommentCount: (awsAccountId, id, count) => updateCommentCount_(awsAccountId, id, count).pipe(Effect.tap(() => publish), cacheError("updateCommentCount")),
|
|
141
|
-
updateHealthScore: (awsAccountId, id, score) => updateHealthScore_(awsAccountId, id, score).pipe(Effect.tap(() => publish), cacheError("updateHealthScore"))
|
|
142
|
-
};
|
|
143
|
-
})
|
|
144
|
-
}) {
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=PullRequestRepo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestRepo.js","sourceRoot":"","sources":["../../../src/CacheService/repos/PullRequestRepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAC1C,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,aAAa;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM;IAC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