@knpkv/codecommit-core 0.11.0 → 0.13.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/README.md +44 -3
- package/dist/AwsClient/approvalRuleContent.js.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.js +4 -4
- package/dist/AwsClient/getCommentsForPullRequest.js.map +1 -1
- package/dist/AwsClient/getDifferences.js +1 -1
- package/dist/AwsClient/getDifferences.js.map +1 -1
- package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequest.js +7 -1
- package/dist/AwsClient/getPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequests.d.ts +1 -1
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +6 -7
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/internal.d.ts +7 -3
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +15 -5
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/AwsClientConfig.d.ts +3 -3
- package/dist/AwsClientConfig.d.ts.map +1 -1
- package/dist/AwsClientConfig.js.map +1 -1
- package/dist/CacheService/CacheError.js +1 -1
- package/dist/CacheService/CacheError.js.map +1 -1
- package/dist/CacheService/Database.d.ts +5 -4
- package/dist/CacheService/Database.d.ts.map +1 -1
- package/dist/CacheService/Database.js +8 -5
- package/dist/CacheService/Database.js.map +1 -1
- package/dist/CacheService/EventsHub.d.ts +2 -2
- package/dist/CacheService/EventsHub.d.ts.map +1 -1
- package/dist/CacheService/diff.js +2 -2
- package/dist/CacheService/diff.js.map +1 -1
- package/dist/CacheService/internal/PrivateDatabasePathNode.d.ts +34 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.d.ts.map +1 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.js +63 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.js.map +1 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.d.ts +5 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.d.ts.map +1 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.js +4 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.js.map +1 -0
- package/dist/CacheService/repos/CommentRepo.d.ts +3 -3
- package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/NotificationRepo.d.ts +3 -3
- package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts +108 -108
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts +106 -106
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.d.ts +73 -67
- package/dist/CacheService/repos/SandboxRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.js +3 -2
- package/dist/CacheService/repos/SandboxRepo.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/index.d.ts +3 -3
- package/dist/CacheService/repos/StatsRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/SubscriptionRepo.d.ts +8 -8
- package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts +3 -3
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/commentLocations.d.ts.map +1 -1
- package/dist/CacheService/repos/commentLocations.js +9 -8
- package/dist/CacheService/repos/commentLocations.js.map +1 -1
- package/dist/ChildEnv.d.ts +67 -2
- package/dist/ChildEnv.d.ts.map +1 -1
- package/dist/ChildEnv.js +47 -14
- package/dist/ChildEnv.js.map +1 -1
- package/dist/ConfigService/SandboxPolicy.d.ts +37 -0
- package/dist/ConfigService/SandboxPolicy.d.ts.map +1 -0
- package/dist/ConfigService/SandboxPolicy.js +72 -0
- package/dist/ConfigService/SandboxPolicy.js.map +1 -0
- package/dist/ConfigService/index.d.ts +3 -1
- package/dist/ConfigService/index.d.ts.map +1 -1
- package/dist/ConfigService/index.js +10 -2
- package/dist/ConfigService/index.js.map +1 -1
- package/dist/ConfigService/internal.d.ts +33 -0
- package/dist/ConfigService/internal.d.ts.map +1 -1
- package/dist/ConfigService/internal.js +64 -9
- package/dist/ConfigService/internal.js.map +1 -1
- package/dist/ConfigService/load.d.ts +34 -23
- package/dist/ConfigService/load.d.ts.map +1 -1
- package/dist/ConfigService/load.js +2 -2
- package/dist/ConfigService/load.js.map +1 -1
- package/dist/ConfigService/reset.d.ts +33 -22
- package/dist/ConfigService/reset.d.ts.map +1 -1
- package/dist/ConfigService/save.d.ts +33 -22
- package/dist/ConfigService/save.d.ts.map +1 -1
- package/dist/Domain.d.ts +11 -0
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +12 -7
- package/dist/Domain.js.map +1 -1
- package/dist/Errors.d.ts +11 -1
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +19 -10
- package/dist/Errors.js.map +1 -1
- package/dist/PRService/index.d.ts +8 -7
- package/dist/PRService/index.d.ts.map +1 -1
- package/dist/PRService/index.js.map +1 -1
- package/dist/PRService/internal.d.ts +31 -31
- package/dist/PRService/internal.d.ts.map +1 -1
- package/dist/PRService/internal.js +5 -5
- package/dist/PRService/internal.js.map +1 -1
- package/dist/PRService/refresh.d.ts.map +1 -1
- package/dist/PRService/refresh.js +12 -3
- package/dist/PRService/refresh.js.map +1 -1
- package/dist/PRService/refreshFetch.d.ts +2 -1
- package/dist/PRService/refreshFetch.d.ts.map +1 -1
- package/dist/PRService/refreshFetch.js +24 -6
- package/dist/PRService/refreshFetch.js.map +1 -1
- package/dist/PRService/refreshResolve.d.ts +6 -6
- package/dist/PRService/refreshResolve.d.ts.map +1 -1
- package/dist/PRService/refreshResolve.js +3 -1
- package/dist/PRService/refreshResolve.js.map +1 -1
- package/dist/PRService/refreshSinglePR.d.ts +7 -1
- package/dist/PRService/refreshSinglePR.d.ts.map +1 -1
- package/dist/PRService/refreshSinglePR.js +8 -5
- package/dist/PRService/refreshSinglePR.js.map +1 -1
- package/dist/PermissionService/AuditLog.d.ts +3 -3
- package/dist/PermissionService/AuditLog.d.ts.map +1 -1
- package/dist/PermissionService/AuditLog.js +2 -2
- package/dist/PermissionService/AuditLog.js.map +1 -1
- package/dist/PermissionService/PermissionGateLive.d.ts +3 -0
- package/dist/PermissionService/PermissionGateLive.d.ts.map +1 -1
- package/dist/PermissionService/PermissionGateLive.js +9 -20
- package/dist/PermissionService/PermissionGateLive.js.map +1 -1
- package/dist/PermissionService/index.d.ts +2 -2
- package/dist/PermissionService/index.d.ts.map +1 -1
- package/dist/PermissionService/index.js +9 -1
- package/dist/PermissionService/index.js.map +1 -1
- package/dist/PermissionService/operations.d.ts +24 -2
- package/dist/PermissionService/operations.d.ts.map +1 -1
- package/dist/PermissionService/operations.js +18 -0
- package/dist/PermissionService/operations.js.map +1 -1
- package/dist/ReadClient/ReadClient.d.ts +18 -3
- package/dist/ReadClient/ReadClient.d.ts.map +1 -1
- package/dist/ReadClient/ReadClient.js +35 -7
- package/dist/ReadClient/ReadClient.js.map +1 -1
- package/dist/ReadClient/ReadProvider.d.ts +6 -0
- package/dist/ReadClient/ReadProvider.d.ts.map +1 -1
- package/dist/ReadClient/ReadProvider.js +4 -3
- package/dist/ReadClient/ReadProvider.js.map +1 -1
- package/dist/ReadClient/errors.js +3 -3
- package/dist/ReadClient/errors.js.map +1 -1
- package/dist/ReadClient/models.d.ts +15 -1
- package/dist/ReadClient/models.d.ts.map +1 -1
- package/dist/ReadClient/models.js +14 -1
- package/dist/ReadClient/models.js.map +1 -1
- package/dist/ReviewClient/ReviewClient.d.ts.map +1 -1
- package/dist/ReviewClient/ReviewClient.js +57 -4
- package/dist/ReviewClient/ReviewClient.js.map +1 -1
- package/dist/ReviewClient/ReviewProvider.d.ts +30 -0
- package/dist/ReviewClient/ReviewProvider.d.ts.map +1 -1
- package/dist/ReviewClient/ReviewProvider.js +67 -5
- package/dist/ReviewClient/ReviewProvider.js.map +1 -1
- package/dist/ReviewClient/errors.d.ts +3 -1
- package/dist/ReviewClient/errors.d.ts.map +1 -1
- package/dist/ReviewClient/errors.js +73 -2
- package/dist/ReviewClient/errors.js.map +1 -1
- package/dist/ReviewClient/index.d.ts +1 -1
- package/dist/ReviewClient/index.d.ts.map +1 -1
- package/dist/ReviewClient/index.js +1 -1
- package/dist/ReviewClient/index.js.map +1 -1
- package/dist/ReviewClient/models.d.ts +38 -1
- package/dist/ReviewClient/models.d.ts.map +1 -1
- package/dist/ReviewClient/models.js +15 -3
- package/dist/ReviewClient/models.js.map +1 -1
- package/dist/ReviewProfile.d.ts +3 -0
- package/dist/ReviewProfile.d.ts.map +1 -0
- package/dist/ReviewProfile.js +3 -0
- package/dist/ReviewProfile.js.map +1 -0
- package/dist/SandboxService/DockerService.d.ts +24 -15
- package/dist/SandboxService/DockerService.d.ts.map +1 -1
- package/dist/SandboxService/DockerService.js +22 -6
- package/dist/SandboxService/DockerService.js.map +1 -1
- package/dist/SandboxService/PluginService.d.ts +2 -2
- package/dist/SandboxService/PluginService.d.ts.map +1 -1
- package/dist/SandboxService/SandboxService.d.ts +88 -73
- package/dist/SandboxService/SandboxService.d.ts.map +1 -1
- package/dist/SandboxService/SandboxService.js +69 -21
- package/dist/SandboxService/SandboxService.js.map +1 -1
- package/dist/SandboxService/SandboxWorkerScope.d.ts +2 -2
- package/dist/SandboxService/SandboxWorkerScope.d.ts.map +1 -1
- package/dist/SandboxService/SandboxWorkerScope.js.map +1 -1
- package/package.json +7 -6
|
@@ -6,117 +6,117 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @category CacheService
|
|
8
8
|
*/
|
|
9
|
-
import { Effect
|
|
9
|
+
import { Effect } from "effect";
|
|
10
10
|
import type * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
11
11
|
import type { CacheError } from "../../CacheError.js";
|
|
12
12
|
import { type SearchResult } from "./internal.js";
|
|
13
|
-
export declare const findAll: (sql: SqlClient.SqlClient) => () => Effect.Effect<
|
|
14
|
-
readonly id:
|
|
15
|
-
readonly awsAccountId:
|
|
16
|
-
readonly repoAccountId:
|
|
17
|
-
readonly accountProfile:
|
|
18
|
-
readonly accountRegion:
|
|
19
|
-
readonly title:
|
|
20
|
-
readonly description:
|
|
21
|
-
readonly author:
|
|
22
|
-
readonly repositoryName:
|
|
23
|
-
readonly creationDate:
|
|
24
|
-
readonly lastModifiedDate:
|
|
25
|
-
readonly status:
|
|
26
|
-
readonly sourceBranch:
|
|
27
|
-
readonly destinationBranch:
|
|
28
|
-
readonly isMergeable:
|
|
29
|
-
readonly isApproved:
|
|
30
|
-
readonly commentCount:
|
|
31
|
-
readonly healthScore:
|
|
32
|
-
readonly link:
|
|
33
|
-
readonly fetchedAt:
|
|
34
|
-
readonly filesAdded:
|
|
35
|
-
readonly filesModified:
|
|
36
|
-
readonly filesDeleted:
|
|
37
|
-
readonly closedAt:
|
|
38
|
-
readonly mergedBy:
|
|
39
|
-
readonly approvedBy:
|
|
40
|
-
readonly approvedByArns:
|
|
41
|
-
readonly commentedBy:
|
|
42
|
-
readonly approvalRules:
|
|
43
|
-
}
|
|
44
|
-
export declare const findMissingDiffStats: (sql: SqlClient.SqlClient) => () => Effect.Effect<
|
|
45
|
-
readonly id:
|
|
46
|
-
readonly awsAccountId:
|
|
47
|
-
readonly repoAccountId:
|
|
48
|
-
readonly accountProfile:
|
|
49
|
-
readonly accountRegion:
|
|
50
|
-
readonly title:
|
|
51
|
-
readonly description:
|
|
52
|
-
readonly author:
|
|
53
|
-
readonly repositoryName:
|
|
54
|
-
readonly creationDate:
|
|
55
|
-
readonly lastModifiedDate:
|
|
56
|
-
readonly status:
|
|
57
|
-
readonly sourceBranch:
|
|
58
|
-
readonly destinationBranch:
|
|
59
|
-
readonly isMergeable:
|
|
60
|
-
readonly isApproved:
|
|
61
|
-
readonly commentCount:
|
|
62
|
-
readonly healthScore:
|
|
63
|
-
readonly link:
|
|
64
|
-
readonly fetchedAt:
|
|
65
|
-
readonly filesAdded:
|
|
66
|
-
readonly filesModified:
|
|
67
|
-
readonly filesDeleted:
|
|
68
|
-
readonly closedAt:
|
|
69
|
-
readonly mergedBy:
|
|
70
|
-
readonly approvedBy:
|
|
71
|
-
readonly approvedByArns:
|
|
72
|
-
readonly commentedBy:
|
|
73
|
-
readonly approvalRules:
|
|
74
|
-
}
|
|
75
|
-
export declare const findByAccountAndId: (sql: SqlClient.SqlClient) => (awsAccountId: string, id: string) => Effect.Effect<
|
|
76
|
-
readonly id:
|
|
77
|
-
readonly awsAccountId:
|
|
78
|
-
readonly repoAccountId:
|
|
79
|
-
readonly accountProfile:
|
|
80
|
-
readonly accountRegion:
|
|
81
|
-
readonly title:
|
|
82
|
-
readonly description:
|
|
83
|
-
readonly author:
|
|
84
|
-
readonly repositoryName:
|
|
85
|
-
readonly creationDate:
|
|
86
|
-
readonly lastModifiedDate:
|
|
87
|
-
readonly status:
|
|
88
|
-
readonly sourceBranch:
|
|
89
|
-
readonly destinationBranch:
|
|
90
|
-
readonly isMergeable:
|
|
91
|
-
readonly isApproved:
|
|
92
|
-
readonly commentCount:
|
|
93
|
-
readonly healthScore:
|
|
94
|
-
readonly link:
|
|
95
|
-
readonly fetchedAt:
|
|
96
|
-
readonly filesAdded:
|
|
97
|
-
readonly filesModified:
|
|
98
|
-
readonly filesDeleted:
|
|
99
|
-
readonly closedAt:
|
|
100
|
-
readonly mergedBy:
|
|
101
|
-
readonly approvedBy:
|
|
102
|
-
readonly approvedByArns:
|
|
103
|
-
readonly commentedBy:
|
|
104
|
-
readonly approvalRules:
|
|
105
|
-
},
|
|
13
|
+
export declare const findAll: (sql: SqlClient.SqlClient) => () => Effect.Effect<{
|
|
14
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
15
|
+
readonly awsAccountId: string;
|
|
16
|
+
readonly repoAccountId: string | null;
|
|
17
|
+
readonly accountProfile: string;
|
|
18
|
+
readonly accountRegion: string;
|
|
19
|
+
readonly title: string;
|
|
20
|
+
readonly description: string | null;
|
|
21
|
+
readonly author: string;
|
|
22
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
23
|
+
readonly creationDate: Date;
|
|
24
|
+
readonly lastModifiedDate: Date;
|
|
25
|
+
readonly status: "CLOSED" | "MERGED" | "OPEN";
|
|
26
|
+
readonly sourceBranch: string;
|
|
27
|
+
readonly destinationBranch: string;
|
|
28
|
+
readonly isMergeable: boolean;
|
|
29
|
+
readonly isApproved: boolean;
|
|
30
|
+
readonly commentCount: number | null;
|
|
31
|
+
readonly healthScore: number | null;
|
|
32
|
+
readonly link: string;
|
|
33
|
+
readonly fetchedAt: string;
|
|
34
|
+
readonly filesAdded: number | null;
|
|
35
|
+
readonly filesModified: number | null;
|
|
36
|
+
readonly filesDeleted: number | null;
|
|
37
|
+
readonly closedAt: string | null;
|
|
38
|
+
readonly mergedBy: string | null;
|
|
39
|
+
readonly approvedBy: readonly string[];
|
|
40
|
+
readonly approvedByArns: readonly string[];
|
|
41
|
+
readonly commentedBy: readonly string[];
|
|
42
|
+
readonly approvalRules: readonly import("../../../Domain.js").ApprovalRule[];
|
|
43
|
+
}[], CacheError, never>;
|
|
44
|
+
export declare const findMissingDiffStats: (sql: SqlClient.SqlClient) => () => Effect.Effect<{
|
|
45
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
46
|
+
readonly awsAccountId: string;
|
|
47
|
+
readonly repoAccountId: string | null;
|
|
48
|
+
readonly accountProfile: string;
|
|
49
|
+
readonly accountRegion: string;
|
|
50
|
+
readonly title: string;
|
|
51
|
+
readonly description: string | null;
|
|
52
|
+
readonly author: string;
|
|
53
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
54
|
+
readonly creationDate: Date;
|
|
55
|
+
readonly lastModifiedDate: Date;
|
|
56
|
+
readonly status: "CLOSED" | "MERGED" | "OPEN";
|
|
57
|
+
readonly sourceBranch: string;
|
|
58
|
+
readonly destinationBranch: string;
|
|
59
|
+
readonly isMergeable: boolean;
|
|
60
|
+
readonly isApproved: boolean;
|
|
61
|
+
readonly commentCount: number | null;
|
|
62
|
+
readonly healthScore: number | null;
|
|
63
|
+
readonly link: string;
|
|
64
|
+
readonly fetchedAt: string;
|
|
65
|
+
readonly filesAdded: number | null;
|
|
66
|
+
readonly filesModified: number | null;
|
|
67
|
+
readonly filesDeleted: number | null;
|
|
68
|
+
readonly closedAt: string | null;
|
|
69
|
+
readonly mergedBy: string | null;
|
|
70
|
+
readonly approvedBy: readonly string[];
|
|
71
|
+
readonly approvedByArns: readonly string[];
|
|
72
|
+
readonly commentedBy: readonly string[];
|
|
73
|
+
readonly approvalRules: readonly import("../../../Domain.js").ApprovalRule[];
|
|
74
|
+
}[], CacheError, never>;
|
|
75
|
+
export declare const findByAccountAndId: (sql: SqlClient.SqlClient) => (awsAccountId: string, id: string) => Effect.Effect<{
|
|
76
|
+
readonly id: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
77
|
+
readonly awsAccountId: string;
|
|
78
|
+
readonly repoAccountId: string | null;
|
|
79
|
+
readonly accountProfile: string;
|
|
80
|
+
readonly accountRegion: string;
|
|
81
|
+
readonly title: string;
|
|
82
|
+
readonly description: string | null;
|
|
83
|
+
readonly author: string;
|
|
84
|
+
readonly repositoryName: string & import("effect/Brand").Brand<"RepositoryName">;
|
|
85
|
+
readonly creationDate: Date;
|
|
86
|
+
readonly lastModifiedDate: Date;
|
|
87
|
+
readonly status: "CLOSED" | "MERGED" | "OPEN";
|
|
88
|
+
readonly sourceBranch: string;
|
|
89
|
+
readonly destinationBranch: string;
|
|
90
|
+
readonly isMergeable: boolean;
|
|
91
|
+
readonly isApproved: boolean;
|
|
92
|
+
readonly commentCount: number | null;
|
|
93
|
+
readonly healthScore: number | null;
|
|
94
|
+
readonly link: string;
|
|
95
|
+
readonly fetchedAt: string;
|
|
96
|
+
readonly filesAdded: number | null;
|
|
97
|
+
readonly filesModified: number | null;
|
|
98
|
+
readonly filesDeleted: number | null;
|
|
99
|
+
readonly closedAt: string | null;
|
|
100
|
+
readonly mergedBy: string | null;
|
|
101
|
+
readonly approvedBy: readonly string[];
|
|
102
|
+
readonly approvedByArns: readonly string[];
|
|
103
|
+
readonly commentedBy: readonly string[];
|
|
104
|
+
readonly approvalRules: readonly import("../../../Domain.js").ApprovalRule[];
|
|
105
|
+
}, CacheError, never>;
|
|
106
106
|
export declare const search: (sql: SqlClient.SqlClient) => (query: string, opts?: {
|
|
107
107
|
readonly limit?: number;
|
|
108
108
|
readonly offset?: number;
|
|
109
109
|
}) => Effect.Effect<SearchResult, CacheError, never>;
|
|
110
|
-
export declare const findStaleOpen: (sql: SqlClient.SqlClient) => (olderThan: string) => Effect.Effect<
|
|
111
|
-
readonly id:
|
|
112
|
-
readonly awsAccountId:
|
|
113
|
-
readonly accountProfile:
|
|
114
|
-
readonly accountRegion:
|
|
115
|
-
}
|
|
116
|
-
export declare const findOpenInRange: (sql: SqlClient.SqlClient) => (weekStart: string, weekEnd: string) => Effect.Effect<
|
|
117
|
-
readonly id:
|
|
118
|
-
readonly awsAccountId:
|
|
119
|
-
readonly accountProfile:
|
|
120
|
-
readonly accountRegion:
|
|
121
|
-
}
|
|
110
|
+
export declare const findStaleOpen: (sql: SqlClient.SqlClient) => (olderThan: string) => Effect.Effect<{
|
|
111
|
+
readonly id: string;
|
|
112
|
+
readonly awsAccountId: string;
|
|
113
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
114
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
115
|
+
}[], CacheError, never>;
|
|
116
|
+
export declare const findOpenInRange: (sql: SqlClient.SqlClient) => (weekStart: string, weekEnd: string) => Effect.Effect<{
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly awsAccountId: string;
|
|
119
|
+
readonly accountProfile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
120
|
+
readonly accountRegion: string & import("effect/Brand").Brand<"AwsRegion">;
|
|
121
|
+
}[], CacheError, never>;
|
|
122
122
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/queries.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/PullRequestRepo/queries.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAA4D,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAS3G,eAAO,MAAM,OAAO,QAAS,SAAS,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAQ/C,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAS,SAAS,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAQ5D,CAAA;AAED,eAAO,MAAM,kBAAkB,QAAS,SAAS,CAAC,SAAS,oBAQnC,MAAM,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACzC,CAAA;AAED,eAAO,MAAM,MAAM,QAAS,SAAS,CAAC,SAAS,aAsBpC,MAAM,SACN;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC3D,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAqBjD,CAAA;AAED,eAAO,MAAM,aAAa,QAAS,SAAS,CAAC,SAAS,iBASjC,MAAM;;;;;uBAC1B,CAAA;AAED,eAAO,MAAM,eAAe,QAAS,SAAS,CAAC,SAAS,iBAanC,MAAM,WAAW,MAAM;;;;;uBAC3C,CAAA"}
|
|
@@ -10,6 +10,7 @@ export declare const SandboxRow: Schema.Struct<{
|
|
|
10
10
|
readonly awsAccountId: Schema.String;
|
|
11
11
|
readonly repositoryName: Schema.String;
|
|
12
12
|
readonly sourceBranch: Schema.String;
|
|
13
|
+
readonly accessPassword: Schema.NullOr<Schema.String>;
|
|
13
14
|
readonly containerId: Schema.NullOr<Schema.String>;
|
|
14
15
|
readonly port: Schema.NullOr<Schema.Number>;
|
|
15
16
|
readonly workspacePath: Schema.String;
|
|
@@ -27,6 +28,7 @@ export interface InsertSandbox {
|
|
|
27
28
|
readonly awsAccountId: string;
|
|
28
29
|
readonly repositoryName: string;
|
|
29
30
|
readonly sourceBranch: string;
|
|
31
|
+
readonly accessPassword: string;
|
|
30
32
|
readonly workspacePath: string;
|
|
31
33
|
readonly status: string;
|
|
32
34
|
readonly createdAt: string;
|
|
@@ -39,80 +41,84 @@ declare const makeSandboxRepo: Effect.Effect<{
|
|
|
39
41
|
port?: number;
|
|
40
42
|
error?: string;
|
|
41
43
|
}) => Effect.Effect<readonly import("effect/unstable/sql/SqlConnection").Row[], CacheError, never>;
|
|
42
|
-
findById: (id: SandboxId) => Effect.Effect<
|
|
43
|
-
readonly id:
|
|
44
|
-
readonly pullRequestId:
|
|
45
|
-
readonly awsAccountId:
|
|
46
|
-
readonly repositoryName:
|
|
47
|
-
readonly sourceBranch:
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
readonly
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
readonly
|
|
98
|
-
readonly
|
|
99
|
-
readonly
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
105
|
-
|
|
44
|
+
findById: (id: SandboxId) => Effect.Effect<{
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly pullRequestId: string;
|
|
47
|
+
readonly awsAccountId: string;
|
|
48
|
+
readonly repositoryName: string;
|
|
49
|
+
readonly sourceBranch: string;
|
|
50
|
+
readonly accessPassword: string | null;
|
|
51
|
+
readonly containerId: string | null;
|
|
52
|
+
readonly port: number | null;
|
|
53
|
+
readonly workspacePath: string;
|
|
54
|
+
readonly status: string;
|
|
55
|
+
readonly statusDetail: string | null;
|
|
56
|
+
readonly logs: string | null;
|
|
57
|
+
readonly error: string | null;
|
|
58
|
+
readonly createdAt: string;
|
|
59
|
+
readonly lastActivityAt: string;
|
|
60
|
+
}, CacheError | Schema.SchemaError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
61
|
+
findByPr: (awsAccountId: string, pullRequestId: string) => Effect.Effect<Option.Option<{
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly pullRequestId: string;
|
|
64
|
+
readonly awsAccountId: string;
|
|
65
|
+
readonly repositoryName: string;
|
|
66
|
+
readonly sourceBranch: string;
|
|
67
|
+
readonly accessPassword: string | null;
|
|
68
|
+
readonly containerId: string | null;
|
|
69
|
+
readonly port: number | null;
|
|
70
|
+
readonly workspacePath: string;
|
|
71
|
+
readonly status: string;
|
|
72
|
+
readonly statusDetail: string | null;
|
|
73
|
+
readonly logs: string | null;
|
|
74
|
+
readonly error: string | null;
|
|
75
|
+
readonly createdAt: string;
|
|
76
|
+
readonly lastActivityAt: string;
|
|
77
|
+
}>, CacheError, never>;
|
|
78
|
+
findActive: () => Effect.Effect<{
|
|
79
|
+
readonly id: string;
|
|
80
|
+
readonly pullRequestId: string;
|
|
81
|
+
readonly awsAccountId: string;
|
|
82
|
+
readonly repositoryName: string;
|
|
83
|
+
readonly sourceBranch: string;
|
|
84
|
+
readonly accessPassword: string | null;
|
|
85
|
+
readonly containerId: string | null;
|
|
86
|
+
readonly port: number | null;
|
|
87
|
+
readonly workspacePath: string;
|
|
88
|
+
readonly status: string;
|
|
89
|
+
readonly statusDetail: string | null;
|
|
90
|
+
readonly logs: string | null;
|
|
91
|
+
readonly error: string | null;
|
|
92
|
+
readonly createdAt: string;
|
|
93
|
+
readonly lastActivityAt: string;
|
|
94
|
+
}[], CacheError, never>;
|
|
95
|
+
findAll: () => Effect.Effect<{
|
|
96
|
+
readonly id: string;
|
|
97
|
+
readonly pullRequestId: string;
|
|
98
|
+
readonly awsAccountId: string;
|
|
99
|
+
readonly repositoryName: string;
|
|
100
|
+
readonly sourceBranch: string;
|
|
101
|
+
readonly accessPassword: string | null;
|
|
102
|
+
readonly containerId: string | null;
|
|
103
|
+
readonly port: number | null;
|
|
104
|
+
readonly workspacePath: string;
|
|
105
|
+
readonly status: string;
|
|
106
|
+
readonly statusDetail: string | null;
|
|
107
|
+
readonly logs: string | null;
|
|
108
|
+
readonly error: string | null;
|
|
109
|
+
readonly createdAt: string;
|
|
110
|
+
readonly lastActivityAt: string;
|
|
111
|
+
}[], CacheError, never>;
|
|
106
112
|
delete: (id: SandboxId) => Effect.Effect<readonly import("effect/unstable/sql/SqlConnection").Row[], CacheError, never>;
|
|
107
113
|
updateDetail: (id: SandboxId, detail: string) => Effect.Effect<readonly import("effect/unstable/sql/SqlConnection").Row[], CacheError, never>;
|
|
108
114
|
appendLog: (id: SandboxId, line: string) => Effect.Effect<readonly import("effect/unstable/sql/SqlConnection").Row[], CacheError, never>;
|
|
109
115
|
updateActivity: (id: SandboxId) => Effect.Effect<readonly import("effect/unstable/sql/SqlConnection").Row[], CacheError, never>;
|
|
110
116
|
}, never, EventsHub | SqlClient.SqlClient>;
|
|
111
|
-
export interface
|
|
117
|
+
export interface SandboxRepoContract extends Success<typeof makeSandboxRepo> {
|
|
112
118
|
}
|
|
113
|
-
declare const SandboxRepo_base: Context.ServiceClass<SandboxRepo, "SandboxRepo",
|
|
119
|
+
declare const SandboxRepo_base: Context.ServiceClass<SandboxRepo, "SandboxRepo", SandboxRepoContract>;
|
|
114
120
|
export declare class SandboxRepo extends SandboxRepo_base {
|
|
115
|
-
static readonly Default: Layer.Layer<SandboxRepo, import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/
|
|
121
|
+
static readonly Default: Layer.Layer<SandboxRepo, CacheError | import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
116
122
|
}
|
|
117
123
|
export {};
|
|
118
124
|
//# sourceMappingURL=SandboxRepo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/SandboxRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO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,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAUD,QAAA,MAAM,eAAe;sBAuCC,aAAa;uBASzB,SAAS,UACL,aAAa,UACb;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;mBAiBlD,SAAS;;;;;;;;;;;;;;;;;6BAUC,MAAM,iBAAiB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOzC,SAAS;uBAMH,SAAS,UAAU,MAAM;oBAa5B,SAAS,QAAQ,MAAM;yBAalB,SAAS;0CAOhC,CAAA;AAEF,MAAM,WAAW,mBAAoB,SAAQ,OAAO,CAAC,OAAO,eAAe,CAAC;CAAG;;AAE/E,qBAAa,WAAY,SAAQ,gBAGf;IAChB,MAAM,CAAC,QAAQ,CAAC,OAAO,mMAEtB;CACF"}
|
|
@@ -10,6 +10,7 @@ export const SandboxRow = Schema.Struct({
|
|
|
10
10
|
awsAccountId: Schema.String,
|
|
11
11
|
repositoryName: Schema.String,
|
|
12
12
|
sourceBranch: Schema.String,
|
|
13
|
+
accessPassword: Schema.NullOr(Schema.String),
|
|
13
14
|
containerId: Schema.NullOr(Schema.String),
|
|
14
15
|
port: Schema.NullOr(Schema.Number),
|
|
15
16
|
workspacePath: Schema.String,
|
|
@@ -53,8 +54,8 @@ const makeSandboxRepo = Effect.gen(function* () {
|
|
|
53
54
|
});
|
|
54
55
|
const voidRequest = undefined;
|
|
55
56
|
const service = {
|
|
56
|
-
insert: (sandbox) => sql `INSERT INTO sandboxes (id, pull_request_id, aws_account_id, repository_name, source_branch, workspace_path, status, created_at, last_activity_at)
|
|
57
|
-
VALUES (${sandbox.id}, ${sandbox.pullRequestId}, ${sandbox.awsAccountId}, ${sandbox.repositoryName}, ${sandbox.sourceBranch}, ${sandbox.workspacePath}, ${sandbox.status}, ${sandbox.createdAt}, ${sandbox.lastActivityAt})`
|
|
57
|
+
insert: (sandbox) => sql `INSERT INTO sandboxes (id, pull_request_id, aws_account_id, repository_name, source_branch, access_password, workspace_path, status, created_at, last_activity_at)
|
|
58
|
+
VALUES (${sandbox.id}, ${sandbox.pullRequestId}, ${sandbox.awsAccountId}, ${sandbox.repositoryName}, ${sandbox.sourceBranch}, ${sandbox.accessPassword}, ${sandbox.workspacePath}, ${sandbox.status}, ${sandbox.createdAt}, ${sandbox.lastActivityAt})`
|
|
58
59
|
.pipe(Effect.tap(() => publish), cacheError("insert")),
|
|
59
60
|
updateStatus: (id, status, extra) => isoNow.pipe(Effect.flatMap((now) => sql `UPDATE sandboxes SET
|
|
60
61
|
status = ${status},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxRepo.js","sourceRoot":"","sources":["../../../src/CacheService/repos/SandboxRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEtE,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAE1D,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,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,MAAM,CAAC,MAAM;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM;IAC5B,YAAY,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AAC,IAAI,CACT,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CACrB,GAAG,CAAA;+CACkC,IAAI,GAAG,IAAI;qCACrB,GAAG;6BACX,EAAE,EAAE,CAAC,IAAI,CAC1B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAC1B,CACF,EACD,UAAU,CAAC,WAAW,CAAC,CACxB;QAEH,cAAc,EAAE,CAAC,EAAa,EAAE,EAAE,CAChC,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAA,2CAA2C,GAAG,eAAe,EAAE,EAAE,CAAC,EAC7F,UAAU,CAAC,gBAAgB,CAAC,CAC7B;KACJ,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAC,CAAA;AAIF,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,aAAa,CAAC;IAChB,MAAM,CAAU,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,IAAI,CACvE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC/D,CAAA;CACF"}
|
|
@@ -75,11 +75,11 @@ declare const makeStatsRepo: Effect.Effect<{
|
|
|
75
75
|
avgTimeToMerge: (weekStart: string, weekEnd: string, filters: import("./internal.ts").Filters) => Effect.Effect<number | null, import("../../CacheError.ts").CacheError, never>;
|
|
76
76
|
dataAvailableSince: () => Effect.Effect<string | null, import("../../CacheError.ts").CacheError, never>;
|
|
77
77
|
}, never, SqlClient.SqlClient>;
|
|
78
|
-
export interface
|
|
78
|
+
export interface StatsRepoContract extends Success<typeof makeStatsRepo> {
|
|
79
79
|
}
|
|
80
|
-
declare const StatsRepo_base: Context.ServiceClass<StatsRepo, "StatsRepo",
|
|
80
|
+
declare const StatsRepo_base: Context.ServiceClass<StatsRepo, "StatsRepo", StatsRepoContract>;
|
|
81
81
|
export declare class StatsRepo extends StatsRepo_base {
|
|
82
|
-
static readonly Default: Layer.Layer<StatsRepo, import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/
|
|
82
|
+
static readonly Default: Layer.Layer<StatsRepo, import("../../CacheError.ts").CacheError | import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
83
83
|
}
|
|
84
84
|
export declare namespace StatsRepo {
|
|
85
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/StatsRepo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAS1D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAoBjB,CAAA;AAEF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/CacheService/repos/StatsRepo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAS1D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAoBjB,CAAA;AAEF,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,OAAO,aAAa,CAAC;CAAG;;AAE3E,qBAAa,SAAU,SAAQ,cAGf;IACd,MAAM,CAAC,QAAQ,CAAC,OAAO,+NAEtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC;;OAEG;IACH,UAAiB,OAAO;QACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KACtC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Effect, Layer
|
|
1
|
+
import { Context, Effect, Layer } from "effect";
|
|
2
2
|
import type { Success } from "effect/Effect";
|
|
3
3
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
4
4
|
import { CacheError } from "../CacheError.js";
|
|
@@ -6,17 +6,17 @@ import { EventsHub } from "../EventsHub.js";
|
|
|
6
6
|
declare const makeSubscriptionRepo: Effect.Effect<{
|
|
7
7
|
subscribe: (awsAccountId: string, prId: string) => Effect.Effect<void, CacheError, never>;
|
|
8
8
|
unsubscribe: (awsAccountId: string, prId: string) => Effect.Effect<void, CacheError, never>;
|
|
9
|
-
findAll: () => Effect.Effect<
|
|
10
|
-
readonly awsAccountId:
|
|
11
|
-
readonly pullRequestId:
|
|
12
|
-
}
|
|
9
|
+
findAll: () => Effect.Effect<{
|
|
10
|
+
readonly awsAccountId: string;
|
|
11
|
+
readonly pullRequestId: string;
|
|
12
|
+
}[], CacheError, never>;
|
|
13
13
|
isSubscribed: (awsAccountId: string, prId: string) => Effect.Effect<boolean, CacheError, never>;
|
|
14
14
|
}, never, EventsHub | SqlClient.SqlClient>;
|
|
15
|
-
export interface
|
|
15
|
+
export interface SubscriptionRepoContract extends Success<typeof makeSubscriptionRepo> {
|
|
16
16
|
}
|
|
17
|
-
declare const SubscriptionRepo_base: Context.ServiceClass<SubscriptionRepo, "SubscriptionRepo",
|
|
17
|
+
declare const SubscriptionRepo_base: Context.ServiceClass<SubscriptionRepo, "SubscriptionRepo", SubscriptionRepoContract>;
|
|
18
18
|
export declare class SubscriptionRepo extends SubscriptionRepo_base {
|
|
19
|
-
static readonly Default: Layer.Layer<SubscriptionRepo, import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/
|
|
19
|
+
static readonly Default: Layer.Layer<SubscriptionRepo, CacheError | import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=SubscriptionRepo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/SubscriptionRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"SubscriptionRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/SubscriptionRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAU,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAavD,QAAA,MAAM,oBAAoB;8BAsCI,MAAM,QAAQ,MAAM;gCAGlB,MAAM,QAAQ,MAAM;;;;;iCAKnB,MAAM,QAAQ,MAAM;0CAOnD,CAAA;AAEF,MAAM,WAAW,wBAAyB,SAAQ,OAAO,CAAC,OAAO,oBAAoB,CAAC;CAAG;;AAEzF,qBAAa,gBAAiB,SAAQ,qBAGf;IACrB,MAAM,CAAC,QAAQ,CAAC,OAAO,wMAEtB;CACF"}
|
|
@@ -6,11 +6,11 @@ declare const makeSyncMetadataRepo: Effect.Effect<{
|
|
|
6
6
|
getLastSyncedAt: (accountId: string, region: string) => Effect.Effect<Option.Option<string>, CacheError, never>;
|
|
7
7
|
update: (accountId: string, region: string) => Effect.Effect<void, CacheError, never>;
|
|
8
8
|
}, never, SqlClient.SqlClient>;
|
|
9
|
-
export interface
|
|
9
|
+
export interface SyncMetadataRepoContract extends Success<typeof makeSyncMetadataRepo> {
|
|
10
10
|
}
|
|
11
|
-
declare const SyncMetadataRepo_base: Context.ServiceClass<SyncMetadataRepo, "SyncMetadataRepo",
|
|
11
|
+
declare const SyncMetadataRepo_base: Context.ServiceClass<SyncMetadataRepo, "SyncMetadataRepo", SyncMetadataRepoContract>;
|
|
12
12
|
export declare class SyncMetadataRepo extends SyncMetadataRepo_base {
|
|
13
|
-
static readonly Default: Layer.Layer<SyncMetadataRepo, import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/
|
|
13
|
+
static readonly Default: Layer.Layer<SyncMetadataRepo, CacheError | import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=SyncMetadataRepo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncMetadataRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/SyncMetadataRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAkB7C,QAAA,MAAM,oBAAoB;iCAmBO,MAAM,UAAU,MAAM;wBAM/B,MAAM,UAAU,MAAM;8BAG5C,CAAA;AAEF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"SyncMetadataRepo.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/SyncMetadataRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAkB7C,QAAA,MAAM,oBAAoB;iCAmBO,MAAM,UAAU,MAAM;wBAM/B,MAAM,UAAU,MAAM;8BAG5C,CAAA;AAEF,MAAM,WAAW,wBAAyB,SAAQ,OAAO,CAAC,OAAO,oBAAoB,CAAC;CAAG;;AAEzF,qBAAa,gBAAiB,SAAQ,qBAGf;IACrB,MAAM,CAAC,QAAQ,CAAC,OAAO,wMAEtB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commentLocations.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/commentLocations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAIL,KAAK,iBAAiB,EACtB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA;AACnE,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"commentLocations.d.ts","sourceRoot":"","sources":["../../../src/CacheService/repos/commentLocations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAIL,KAAK,iBAAiB,EACtB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA;AACnE,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AA0CvE,eAAO,MAAM,sBAAsB,kBAClB,MAAM,KACpB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAG9C,CAAA;AAEH,eAAO,MAAM,yBAAyB,kBACrB,MAAM,KACpB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,CACoB,CAAA"}
|
|
@@ -2,9 +2,10 @@ import { Effect, Option, Schema } from "effect";
|
|
|
2
2
|
import { CommentId, PRComment, PRCommentLocationJson } from "../../Domain.js";
|
|
3
3
|
const decodeCommentId = Schema.decodeUnknownSync(CommentId);
|
|
4
4
|
const decodeCommentLocationJsonArray = Schema.decodeUnknownOption(Schema.Array(PRCommentLocationJson));
|
|
5
|
+
const decodeJson = Schema.decodeUnknownSync(Schema.fromJsonString(Schema.Json));
|
|
5
6
|
const parseJson = (json) => {
|
|
6
7
|
try {
|
|
7
|
-
return
|
|
8
|
+
return decodeJson(json);
|
|
8
9
|
}
|
|
9
10
|
catch {
|
|
10
11
|
return undefined;
|
|
@@ -21,18 +22,18 @@ const threadFromJson = (thread) => ({
|
|
|
21
22
|
content: thread.root.content,
|
|
22
23
|
author: thread.root.author,
|
|
23
24
|
creationDate: new Date(thread.root.creationDate),
|
|
24
|
-
...(thread.root.inReplyTo !== undefined
|
|
25
|
+
...((thread.root.inReplyTo !== undefined) && { inReplyTo: decodeCommentId(thread.root.inReplyTo) }),
|
|
25
26
|
deleted: thread.root.deleted,
|
|
26
|
-
...(thread.root.filePath !== undefined
|
|
27
|
-
...(thread.root.lineNumber !== undefined
|
|
27
|
+
...((thread.root.filePath !== undefined) && { filePath: thread.root.filePath }),
|
|
28
|
+
...((thread.root.lineNumber !== undefined) && { lineNumber: thread.root.lineNumber })
|
|
28
29
|
}),
|
|
29
30
|
replies: thread.replies.map(threadFromJson)
|
|
30
31
|
});
|
|
31
32
|
const locationFromJson = (location) => ({
|
|
32
|
-
...(location.filePath !== undefined
|
|
33
|
-
...(location.beforeCommitId !== undefined
|
|
34
|
-
...(location.afterCommitId !== undefined
|
|
35
|
-
...(location.relativeFileVersion !== undefined
|
|
33
|
+
...((location.filePath !== undefined) && { filePath: location.filePath }),
|
|
34
|
+
...((location.beforeCommitId !== undefined) && { beforeCommitId: location.beforeCommitId }),
|
|
35
|
+
...((location.afterCommitId !== undefined) && { afterCommitId: location.afterCommitId }),
|
|
36
|
+
...((location.relativeFileVersion !== undefined) && { relativeFileVersion: location.relativeFileVersion }),
|
|
36
37
|
comments: location.comments.map(threadFromJson)
|
|
37
38
|
});
|
|
38
39
|
export const decodeCommentLocations = (locationsJson) => decodeCommentLocationJson(locationsJson).pipe(Effect.map((locations) => locations.map(locationFromJson)));
|