@knpkv/codecommit-core 0.7.1 → 0.9.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 +36 -0
- package/dist/AwsClient/AwsClientGated.d.ts +1 -1
- package/dist/AwsClient/AwsClientGated.d.ts.map +1 -1
- package/dist/AwsClient/AwsClientGated.js +39 -19
- package/dist/AwsClient/AwsClientGated.js.map +1 -1
- package/dist/AwsClient/approvalRuleContent.d.ts +15 -0
- package/dist/AwsClient/approvalRuleContent.d.ts.map +1 -0
- package/dist/AwsClient/approvalRuleContent.js +39 -0
- package/dist/AwsClient/approvalRuleContent.js.map +1 -0
- package/dist/AwsClient/createApprovalRule.d.ts +1 -1
- package/dist/AwsClient/createApprovalRule.d.ts.map +1 -1
- package/dist/AwsClient/createApprovalRule.js +2 -2
- package/dist/AwsClient/createApprovalRule.js.map +1 -1
- package/dist/AwsClient/createPullRequest.d.ts +1 -1
- package/dist/AwsClient/createPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/createPullRequest.js +1 -1
- package/dist/AwsClient/createPullRequest.js.map +1 -1
- package/dist/AwsClient/deleteApprovalRule.d.ts +1 -1
- package/dist/AwsClient/deleteApprovalRule.d.ts.map +1 -1
- package/dist/AwsClient/deleteApprovalRule.js +2 -2
- package/dist/AwsClient/deleteApprovalRule.js.map +1 -1
- package/dist/AwsClient/getCallerIdentity.d.ts +1 -1
- package/dist/AwsClient/getCallerIdentity.d.ts.map +1 -1
- package/dist/AwsClient/getCallerIdentity.js +1 -1
- package/dist/AwsClient/getCallerIdentity.js.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts +2 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.js +29 -29
- package/dist/AwsClient/getCommentsForPullRequest.js.map +1 -1
- package/dist/AwsClient/getDifferences.d.ts +2 -13
- package/dist/AwsClient/getDifferences.d.ts.map +1 -1
- package/dist/AwsClient/getDifferences.js +1 -1
- package/dist/AwsClient/getDifferences.js.map +1 -1
- package/dist/AwsClient/getPullRequest.d.ts +1 -1
- package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequest.js +11 -11
- package/dist/AwsClient/getPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequests.d.ts +11 -27
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +60 -109
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/index.d.ts +5 -5
- package/dist/AwsClient/index.d.ts.map +1 -1
- package/dist/AwsClient/index.js +16 -28
- package/dist/AwsClient/index.js.map +1 -1
- package/dist/AwsClient/internal.d.ts +38 -105
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +36 -21
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/AwsClient/listBranches.d.ts +2 -1
- package/dist/AwsClient/listBranches.d.ts.map +1 -1
- package/dist/AwsClient/listBranches.js +6 -11
- package/dist/AwsClient/listBranches.js.map +1 -1
- package/dist/AwsClient/updateApprovalRule.d.ts +1 -1
- package/dist/AwsClient/updateApprovalRule.d.ts.map +1 -1
- package/dist/AwsClient/updateApprovalRule.js +2 -2
- package/dist/AwsClient/updateApprovalRule.js.map +1 -1
- package/dist/AwsClient/updatePullRequestDescription.d.ts +1 -1
- package/dist/AwsClient/updatePullRequestDescription.d.ts.map +1 -1
- package/dist/AwsClient/updatePullRequestDescription.js +1 -1
- package/dist/AwsClient/updatePullRequestDescription.js.map +1 -1
- package/dist/AwsClient/updatePullRequestTitle.d.ts +1 -1
- package/dist/AwsClient/updatePullRequestTitle.d.ts.map +1 -1
- package/dist/AwsClient/updatePullRequestTitle.js +1 -1
- package/dist/AwsClient/updatePullRequestTitle.js.map +1 -1
- package/dist/AwsClientConfig.d.ts +7 -7
- package/dist/AwsClientConfig.d.ts.map +1 -1
- package/dist/AwsClientConfig.js +1 -1
- package/dist/AwsClientConfig.js.map +1 -1
- package/dist/CacheService/CacheError.d.ts +4 -6
- package/dist/CacheService/CacheError.d.ts.map +1 -1
- package/dist/CacheService/CacheError.js +2 -2
- package/dist/CacheService/CacheError.js.map +1 -1
- package/dist/CacheService/Database.d.ts +5 -5
- package/dist/CacheService/Database.d.ts.map +1 -1
- package/dist/CacheService/Database.js +3 -3
- package/dist/CacheService/Database.js.map +1 -1
- package/dist/CacheService/EventsHub.d.ts +117 -132
- package/dist/CacheService/EventsHub.d.ts.map +1 -1
- package/dist/CacheService/EventsHub.js +19 -19
- package/dist/CacheService/EventsHub.js.map +1 -1
- package/dist/CacheService/diff.d.ts.map +1 -1
- package/dist/CacheService/migrations/0001_initial.d.ts +2 -2
- package/dist/CacheService/migrations/0001_initial.d.ts.map +1 -1
- package/dist/CacheService/migrations/0001_initial.js +1 -1
- package/dist/CacheService/migrations/0001_initial.js.map +1 -1
- package/dist/CacheService/migrations/0002_indexes.d.ts +2 -2
- package/dist/CacheService/migrations/0002_indexes.d.ts.map +1 -1
- package/dist/CacheService/migrations/0002_indexes.js +1 -1
- package/dist/CacheService/migrations/0002_indexes.js.map +1 -1
- package/dist/CacheService/migrations/0003_add_health_score.d.ts +2 -2
- package/dist/CacheService/migrations/0003_add_health_score.d.ts.map +1 -1
- package/dist/CacheService/migrations/0003_add_health_score.js +2 -2
- package/dist/CacheService/migrations/0003_add_health_score.js.map +1 -1
- package/dist/CacheService/migrations/0004_unify_notifications.d.ts +2 -2
- package/dist/CacheService/migrations/0004_unify_notifications.d.ts.map +1 -1
- package/dist/CacheService/migrations/0004_unify_notifications.js +3 -3
- package/dist/CacheService/migrations/0004_unify_notifications.js.map +1 -1
- package/dist/CacheService/migrations/0005_add_sandboxes.d.ts +2 -2
- package/dist/CacheService/migrations/0005_add_sandboxes.d.ts.map +1 -1
- package/dist/CacheService/migrations/0005_add_sandboxes.js +1 -1
- package/dist/CacheService/migrations/0005_add_sandboxes.js.map +1 -1
- package/dist/CacheService/migrations/0006_sandbox_logs.d.ts +2 -2
- package/dist/CacheService/migrations/0006_sandbox_logs.d.ts.map +1 -1
- package/dist/CacheService/migrations/0006_sandbox_logs.js +1 -1
- package/dist/CacheService/migrations/0006_sandbox_logs.js.map +1 -1
- package/dist/CacheService/migrations/0007_stats_columns.d.ts +2 -2
- package/dist/CacheService/migrations/0007_stats_columns.d.ts.map +1 -1
- package/dist/CacheService/migrations/0007_stats_columns.js +5 -5
- package/dist/CacheService/migrations/0007_stats_columns.js.map +1 -1
- package/dist/CacheService/migrations/0008_merged_by.d.ts +2 -2
- package/dist/CacheService/migrations/0008_merged_by.d.ts.map +1 -1
- package/dist/CacheService/migrations/0008_merged_by.js +2 -2
- package/dist/CacheService/migrations/0008_merged_by.js.map +1 -1
- package/dist/CacheService/migrations/0009_approved_by.d.ts +2 -2
- package/dist/CacheService/migrations/0009_approved_by.d.ts.map +1 -1
- package/dist/CacheService/migrations/0009_approved_by.js +2 -2
- package/dist/CacheService/migrations/0009_approved_by.js.map +1 -1
- package/dist/CacheService/migrations/0010_commented_by.d.ts +2 -2
- package/dist/CacheService/migrations/0010_commented_by.d.ts.map +1 -1
- package/dist/CacheService/migrations/0010_commented_by.js +2 -2
- package/dist/CacheService/migrations/0010_commented_by.js.map +1 -1
- package/dist/CacheService/migrations/0011_audit_log.d.ts +2 -2
- package/dist/CacheService/migrations/0011_audit_log.d.ts.map +1 -1
- package/dist/CacheService/migrations/0011_audit_log.js +2 -2
- package/dist/CacheService/migrations/0011_audit_log.js.map +1 -1
- package/dist/CacheService/migrations/0012_audit_log_indexes.d.ts +2 -2
- package/dist/CacheService/migrations/0012_audit_log_indexes.d.ts.map +1 -1
- package/dist/CacheService/migrations/0012_audit_log_indexes.js +2 -2
- package/dist/CacheService/migrations/0012_audit_log_indexes.js.map +1 -1
- package/dist/CacheService/migrations/0013_approval_rules.d.ts +2 -2
- package/dist/CacheService/migrations/0013_approval_rules.d.ts.map +1 -1
- package/dist/CacheService/migrations/0013_approval_rules.js +2 -2
- package/dist/CacheService/migrations/0013_approval_rules.js.map +1 -1
- package/dist/CacheService/migrations/0014_approved_by_arns.d.ts +2 -2
- package/dist/CacheService/migrations/0014_approved_by_arns.d.ts.map +1 -1
- package/dist/CacheService/migrations/0014_approved_by_arns.js +2 -2
- package/dist/CacheService/migrations/0014_approved_by_arns.js.map +1 -1
- package/dist/CacheService/migrations/0015_repo_account_id.d.ts +2 -2
- package/dist/CacheService/migrations/0015_repo_account_id.d.ts.map +1 -1
- package/dist/CacheService/migrations/0015_repo_account_id.js +2 -2
- package/dist/CacheService/migrations/0015_repo_account_id.js.map +1 -1
- package/dist/CacheService/repos/CommentRepo.d.ts +11 -9
- package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/CommentRepo.js +26 -29
- package/dist/CacheService/repos/CommentRepo.js.map +1 -1
- package/dist/CacheService/repos/NotificationRepo.d.ts +36 -34
- package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/NotificationRepo.js +93 -94
- package/dist/CacheService/repos/NotificationRepo.js.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts +129 -127
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/index.js +19 -19
- package/dist/CacheService/repos/PullRequestRepo/index.js.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/internal.d.ts +51 -54
- package/dist/CacheService/repos/PullRequestRepo/internal.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/internal.js +22 -19
- package/dist/CacheService/repos/PullRequestRepo/internal.js.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/mutations.d.ts +12 -12
- package/dist/CacheService/repos/PullRequestRepo/mutations.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/mutations.js +22 -5
- package/dist/CacheService/repos/PullRequestRepo/mutations.js.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts +108 -108
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/queries.js +17 -6
- package/dist/CacheService/repos/PullRequestRepo/queries.js.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.d.ts +97 -95
- package/dist/CacheService/repos/SandboxRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.js +49 -48
- package/dist/CacheService/repos/SandboxRepo.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/index.d.ts +65 -63
- package/dist/CacheService/repos/StatsRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/StatsRepo/index.js +25 -25
- package/dist/CacheService/repos/StatsRepo/index.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/internal.d.ts +8 -13
- package/dist/CacheService/repos/StatsRepo/internal.d.ts.map +1 -1
- package/dist/CacheService/repos/StatsRepo/internal.js +11 -4
- package/dist/CacheService/repos/StatsRepo/internal.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/queries.d.ts +1 -1
- package/dist/CacheService/repos/StatsRepo/queries.d.ts.map +1 -1
- package/dist/CacheService/repos/StatsRepo/queries.js +8 -0
- package/dist/CacheService/repos/StatsRepo/queries.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/reviewerData.d.ts +2 -2
- package/dist/CacheService/repos/StatsRepo/reviewerData.d.ts.map +1 -1
- package/dist/CacheService/repos/StatsRepo/reviewerData.js +15 -4
- package/dist/CacheService/repos/StatsRepo/reviewerData.js.map +1 -1
- package/dist/CacheService/repos/SubscriptionRepo.d.ts +16 -14
- package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SubscriptionRepo.js +38 -37
- package/dist/CacheService/repos/SubscriptionRepo.js.map +1 -1
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts +11 -9
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SyncMetadataRepo.js +23 -23
- package/dist/CacheService/repos/SyncMetadataRepo.js.map +1 -1
- package/dist/CacheService/repos/commentLocations.d.ts +7 -0
- package/dist/CacheService/repos/commentLocations.d.ts.map +1 -0
- package/dist/CacheService/repos/commentLocations.js +105 -0
- package/dist/CacheService/repos/commentLocations.js.map +1 -0
- package/dist/ConfigService/backup.d.ts +2 -2
- package/dist/ConfigService/backup.d.ts.map +1 -1
- package/dist/ConfigService/backup.js +1 -1
- package/dist/ConfigService/backup.js.map +1 -1
- package/dist/ConfigService/detectProfiles.d.ts +6 -3
- package/dist/ConfigService/detectProfiles.d.ts.map +1 -1
- package/dist/ConfigService/detectProfiles.js +11 -6
- package/dist/ConfigService/detectProfiles.js.map +1 -1
- package/dist/ConfigService/index.d.ts +12 -12
- package/dist/ConfigService/index.d.ts.map +1 -1
- package/dist/ConfigService/index.js +14 -6
- package/dist/ConfigService/index.js.map +1 -1
- package/dist/ConfigService/internal.d.ts +41 -137
- package/dist/ConfigService/internal.d.ts.map +1 -1
- package/dist/ConfigService/internal.js +40 -20
- package/dist/ConfigService/internal.js.map +1 -1
- package/dist/ConfigService/load.d.ts +25 -28
- package/dist/ConfigService/load.d.ts.map +1 -1
- package/dist/ConfigService/load.js +12 -28
- package/dist/ConfigService/load.js.map +1 -1
- package/dist/ConfigService/reset.d.ts +26 -5
- package/dist/ConfigService/reset.d.ts.map +1 -1
- package/dist/ConfigService/reset.js +10 -16
- package/dist/ConfigService/reset.js.map +1 -1
- package/dist/ConfigService/save.d.ts +3 -2
- package/dist/ConfigService/save.d.ts.map +1 -1
- package/dist/ConfigService/save.js +2 -1
- package/dist/ConfigService/save.js.map +1 -1
- package/dist/ConfigService/validate.d.ts +7 -21
- package/dist/ConfigService/validate.d.ts.map +1 -1
- package/dist/ConfigService/validate.js +11 -11
- package/dist/ConfigService/validate.js.map +1 -1
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/Domain.d.ts +177 -377
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +77 -20
- package/dist/Domain.js.map +1 -1
- package/dist/Errors.d.ts +45 -65
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +20 -20
- package/dist/Errors.js.map +1 -1
- package/dist/HealthScore.d.ts.map +1 -1
- package/dist/HealthScore.js +4 -1
- package/dist/HealthScore.js.map +1 -1
- package/dist/PRService/index.d.ts +37 -34
- package/dist/PRService/index.d.ts.map +1 -1
- package/dist/PRService/index.js +45 -45
- package/dist/PRService/index.js.map +1 -1
- package/dist/PRService/internal.d.ts +86 -118
- package/dist/PRService/internal.d.ts.map +1 -1
- package/dist/PRService/internal.js +28 -25
- 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 +10 -8
- package/dist/PRService/refresh.js.map +1 -1
- package/dist/PRService/refreshDiffs.d.ts +1 -1
- package/dist/PRService/refreshDiffs.d.ts.map +1 -1
- package/dist/PRService/refreshDiffs.js +9 -6
- package/dist/PRService/refreshDiffs.js.map +1 -1
- package/dist/PRService/refreshEnrich.d.ts +1 -1
- package/dist/PRService/refreshEnrich.d.ts.map +1 -1
- package/dist/PRService/refreshEnrich.js +15 -12
- package/dist/PRService/refreshEnrich.js.map +1 -1
- package/dist/PRService/refreshFetch.d.ts.map +1 -1
- package/dist/PRService/refreshFetch.js +14 -14
- package/dist/PRService/refreshFetch.js.map +1 -1
- package/dist/PRService/refreshHistory.d.ts +1 -1
- package/dist/PRService/refreshHistory.d.ts.map +1 -1
- package/dist/PRService/refreshHistory.js +19 -11
- package/dist/PRService/refreshHistory.js.map +1 -1
- package/dist/PRService/refreshResolve.d.ts +7 -7
- package/dist/PRService/refreshResolve.d.ts.map +1 -1
- package/dist/PRService/refreshResolve.js +24 -14
- package/dist/PRService/refreshResolve.js.map +1 -1
- package/dist/PRService/refreshScore.d.ts.map +1 -1
- package/dist/PRService/refreshScore.js +5 -5
- package/dist/PRService/refreshScore.js.map +1 -1
- package/dist/PRService/refreshSinglePR.d.ts +4 -1
- package/dist/PRService/refreshSinglePR.d.ts.map +1 -1
- package/dist/PRService/refreshSinglePR.js +96 -85
- package/dist/PRService/refreshSinglePR.js.map +1 -1
- package/dist/PRService/setAllAccounts.d.ts.map +1 -1
- package/dist/PRService/setAllAccounts.js +5 -2
- package/dist/PRService/setAllAccounts.js.map +1 -1
- package/dist/PRService/toggleAccount.d.ts.map +1 -1
- package/dist/PRService/toggleAccount.js +5 -2
- package/dist/PRService/toggleAccount.js.map +1 -1
- package/dist/PermissionService/AuditLog.d.ts +30 -32
- package/dist/PermissionService/AuditLog.d.ts.map +1 -1
- package/dist/PermissionService/AuditLog.js +93 -90
- package/dist/PermissionService/AuditLog.js.map +1 -1
- package/dist/PermissionService/PermissionGate.d.ts +8 -21
- package/dist/PermissionService/PermissionGate.d.ts.map +1 -1
- package/dist/PermissionService/PermissionGate.js +2 -2
- package/dist/PermissionService/PermissionGate.js.map +1 -1
- package/dist/PermissionService/PermissionGateLive.d.ts +7 -11
- package/dist/PermissionService/PermissionGateLive.d.ts.map +1 -1
- package/dist/PermissionService/PermissionGateLive.js +49 -49
- package/dist/PermissionService/PermissionGateLive.js.map +1 -1
- package/dist/PermissionService/index.d.ts +17 -17
- package/dist/PermissionService/index.d.ts.map +1 -1
- package/dist/PermissionService/index.js +52 -50
- package/dist/PermissionService/index.js.map +1 -1
- package/dist/PermissionService/operations.d.ts +1 -19
- package/dist/PermissionService/operations.d.ts.map +1 -1
- package/dist/PermissionService/operations.js.map +1 -1
- package/dist/ReadClient/ReadClient.d.ts +31 -0
- package/dist/ReadClient/ReadClient.d.ts.map +1 -0
- package/dist/ReadClient/ReadClient.js +209 -0
- package/dist/ReadClient/ReadClient.js.map +1 -0
- package/dist/ReadClient/ReadProvider.d.ts +55 -0
- package/dist/ReadClient/ReadProvider.d.ts.map +1 -0
- package/dist/ReadClient/ReadProvider.js +51 -0
- package/dist/ReadClient/ReadProvider.js.map +1 -0
- package/dist/ReadClient/classification.d.ts +13 -0
- package/dist/ReadClient/classification.d.ts.map +1 -0
- package/dist/ReadClient/classification.js +35 -0
- package/dist/ReadClient/classification.js.map +1 -0
- package/dist/ReadClient/errors.d.ts +29 -0
- package/dist/ReadClient/errors.d.ts.map +1 -0
- package/dist/ReadClient/errors.js +21 -0
- package/dist/ReadClient/errors.js.map +1 -0
- package/dist/ReadClient/index.d.ts +7 -0
- package/dist/ReadClient/index.d.ts.map +1 -0
- package/dist/ReadClient/index.js +7 -0
- package/dist/ReadClient/index.js.map +1 -0
- package/dist/ReadClient/models.d.ts +104 -0
- package/dist/ReadClient/models.d.ts.map +1 -0
- package/dist/ReadClient/models.js +93 -0
- package/dist/ReadClient/models.js.map +1 -0
- package/dist/SandboxService/DockerService.d.ts +38 -19
- package/dist/SandboxService/DockerService.d.ts.map +1 -1
- package/dist/SandboxService/DockerService.js +90 -70
- package/dist/SandboxService/DockerService.js.map +1 -1
- package/dist/SandboxService/PluginService.d.ts +11 -8
- package/dist/SandboxService/PluginService.d.ts.map +1 -1
- package/dist/SandboxService/PluginService.js +17 -16
- package/dist/SandboxService/PluginService.js.map +1 -1
- package/dist/SandboxService/SandboxService.d.ts +78 -76
- package/dist/SandboxService/SandboxService.d.ts.map +1 -1
- package/dist/SandboxService/SandboxService.js +236 -226
- package/dist/SandboxService/SandboxService.js.map +1 -1
- package/dist/SandboxService/index.d.ts +0 -1
- package/dist/SandboxService/index.d.ts.map +1 -1
- package/dist/SandboxService/index.js +0 -1
- package/dist/SandboxService/index.js.map +1 -1
- package/dist/StatsService/WeeklyStats.d.ts +112 -112
- package/dist/StatsService/index.d.ts +4 -9
- package/dist/StatsService/index.d.ts.map +1 -1
- package/dist/StatsService/index.js +113 -112
- package/dist/StatsService/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/dist/SandboxService/plugins/ClaudeCodePlugin.d.ts +0 -18
- package/dist/SandboxService/plugins/ClaudeCodePlugin.d.ts.map +0 -1
- package/dist/SandboxService/plugins/ClaudeCodePlugin.js +0 -24
- package/dist/SandboxService/plugins/ClaudeCodePlugin.js.map +0 -1
|
@@ -2,21 +2,29 @@
|
|
|
2
2
|
* @internal
|
|
3
3
|
* Phases 1+2: Load cached PRs, resolve config/identity/subscriptions.
|
|
4
4
|
*/
|
|
5
|
-
import { Clock, DateTime, Effect, Ref, SubscriptionRef } from "effect";
|
|
5
|
+
import { Clock, DateTime, Effect, Ref, Schema, SubscriptionRef } from "effect";
|
|
6
6
|
import { AwsClient } from "../AwsClient/index.js";
|
|
7
7
|
import { NotificationRepo } from "../CacheService/repos/NotificationRepo.js";
|
|
8
8
|
import { PullRequestRepo } from "../CacheService/repos/PullRequestRepo/index.js";
|
|
9
9
|
import { SubscriptionRepo } from "../CacheService/repos/SubscriptionRepo.js";
|
|
10
10
|
import { ConfigService } from "../ConfigService/index.js";
|
|
11
|
+
import { AwsRegion } from "../Domain.js";
|
|
11
12
|
import { decodeCachedPR } from "./internal.js";
|
|
13
|
+
const decodeAwsRegion = Schema.decodeSync(AwsRegion);
|
|
14
|
+
const defaultAwsRegion = decodeAwsRegion("us-east-1");
|
|
15
|
+
const emptyAwsRegion = decodeAwsRegion("");
|
|
16
|
+
const loadingStatus = "loading";
|
|
17
|
+
const idleStatus = "idle";
|
|
18
|
+
const accountRegion = (region) => region === undefined ? emptyAwsRegion : decodeAwsRegion(region);
|
|
19
|
+
const primaryRegion = (account) => account.regions[0] ?? defaultAwsRegion;
|
|
12
20
|
const resolveIdentity = (accountIdRef, account, region, options) => Effect.gen(function* () {
|
|
13
21
|
const awsClient = yield* AwsClient;
|
|
14
22
|
const notificationRepo = yield* NotificationRepo;
|
|
15
23
|
const { clearCurrentUser, updateCurrentUser } = options ?? {};
|
|
16
24
|
const identity = yield* awsClient.getCallerIdentity({
|
|
17
25
|
profile: account.profile,
|
|
18
|
-
region
|
|
19
|
-
}).pipe(Effect.
|
|
26
|
+
region
|
|
27
|
+
}).pipe(Effect.catchIf(() => true, () => Effect.succeed(undefined)));
|
|
20
28
|
if (!identity) {
|
|
21
29
|
yield* notificationRepo.addSystem({
|
|
22
30
|
type: "error",
|
|
@@ -38,20 +46,20 @@ export const resolveAccounts = (state) => Effect.gen(function* () {
|
|
|
38
46
|
const prRepo = yield* PullRequestRepo;
|
|
39
47
|
const subscriptionRepo = yield* SubscriptionRepo;
|
|
40
48
|
// --- Phase 1: Load cached PRs immediately ---
|
|
41
|
-
const cachedPRs = yield* prRepo.findAll().pipe(Effect.
|
|
49
|
+
const cachedPRs = yield* prRepo.findAll().pipe(Effect.catchIf(() => true, () => Effect.succeed([])));
|
|
42
50
|
yield* SubscriptionRef.update(state, ({ error: _, statusDetail: __, ...s }) => ({
|
|
43
51
|
...s,
|
|
44
52
|
pullRequests: cachedPRs.map(decodeCachedPR),
|
|
45
|
-
status:
|
|
53
|
+
status: loadingStatus,
|
|
46
54
|
...(cachedPRs.length > 0 ? { statusDetail: "loading from cache..." } : {})
|
|
47
55
|
}));
|
|
48
56
|
const config = yield* configService.load.pipe(Effect.orDie);
|
|
49
|
-
const detected = yield* configService.detectProfiles.pipe(Effect.
|
|
57
|
+
const detected = yield* configService.detectProfiles.pipe(Effect.catchIf(() => true, () => Effect.succeed([])));
|
|
50
58
|
const accountsState = detected.map((d) => {
|
|
51
59
|
const configured = config.accounts.find((a) => a.profile === d.name);
|
|
52
60
|
return {
|
|
53
61
|
profile: d.name,
|
|
54
|
-
region: configured?.regions?.[0] ?? d.region
|
|
62
|
+
region: configured?.regions?.[0] ?? accountRegion(d.region),
|
|
55
63
|
enabled: configured?.enabled ?? false
|
|
56
64
|
};
|
|
57
65
|
});
|
|
@@ -59,24 +67,26 @@ export const resolveAccounts = (state) => Effect.gen(function* () {
|
|
|
59
67
|
const enabledAccounts = config.accounts.filter((a) => a.enabled);
|
|
60
68
|
if (enabledAccounts.length === 0) {
|
|
61
69
|
const now = yield* Clock.currentTimeMillis;
|
|
62
|
-
yield* SubscriptionRef.update(state, (s) => ({ ...s, status:
|
|
70
|
+
yield* SubscriptionRef.update(state, (s) => ({ ...s, status: idleStatus, lastUpdated: DateTime.toDate(DateTime.makeUnsafe(now)) }));
|
|
63
71
|
return undefined;
|
|
64
72
|
}
|
|
65
73
|
// --- Phase 2: Resolve AWS account IDs ---
|
|
66
74
|
const accountIdRef = yield* Ref.make(new Map());
|
|
67
|
-
const firstAccount = enabledAccounts
|
|
68
|
-
|
|
75
|
+
const [firstAccount, ...remainingAccounts] = enabledAccounts;
|
|
76
|
+
if (firstAccount === undefined)
|
|
77
|
+
return undefined;
|
|
78
|
+
const firstRegion = primaryRegion(firstAccount);
|
|
69
79
|
yield* resolveIdentity(accountIdRef, firstAccount, firstRegion, {
|
|
70
80
|
clearCurrentUser: SubscriptionRef.update(state, ({ currentUser: _, ...rest }) => rest),
|
|
71
81
|
updateCurrentUser: (username) => SubscriptionRef.update(state, (s) => ({ ...s, currentUser: username }))
|
|
72
82
|
});
|
|
73
|
-
yield* Effect.forEach(
|
|
74
|
-
const region = account
|
|
83
|
+
yield* Effect.forEach(remainingAccounts, (account) => {
|
|
84
|
+
const region = primaryRegion(account);
|
|
75
85
|
return resolveIdentity(accountIdRef, account, region);
|
|
76
|
-
}, { concurrency: 3 });
|
|
86
|
+
}, { concurrency: 3, discard: true });
|
|
77
87
|
const accountIdMap = yield* Ref.get(accountIdRef);
|
|
78
88
|
// Load subscriptions for diff
|
|
79
|
-
const subscriptions = yield* subscriptionRepo.findAll().pipe(Effect.
|
|
89
|
+
const subscriptions = yield* subscriptionRepo.findAll().pipe(Effect.catchIf(() => true, () => Effect.succeed([])));
|
|
80
90
|
const subscribedRef = yield* Ref.make(new Set(subscriptions.map((s) => `${s.awsAccountId}:${s.pullRequestId}`)));
|
|
81
91
|
const currentUser = (yield* SubscriptionRef.get(state)).currentUser;
|
|
82
92
|
return { accountIdMap, currentUser, enabledAccounts, subscribedRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshResolve.js","sourceRoot":"","sources":["../../src/PRService/refreshResolve.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"refreshResolve.js","sourceRoot":"","sources":["../../src/PRService/refreshResolve.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAkB,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,cAAc,EAAgB,MAAM,eAAe,CAAA;AAE5D,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;AACpD,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAA;AACrD,MAAM,cAAc,GAAG,eAAe,CAAC,EAAE,CAAC,CAAA;AAC1C,MAAM,aAAa,GAAc,SAAS,CAAA;AAC1C,MAAM,UAAU,GAAc,MAAM,CAAA;AAEpC,MAAM,aAAa,GAAG,CAAC,MAA0B,EAAa,EAAE,CAC9D,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AAEjE,MAAM,aAAa,GAAG,CAAC,OAAsB,EAAa,EAAE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AAC,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAClH,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAA;IAChH,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAA;IAEnE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAA6B,CAAA;AACjG,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshScore.d.ts","sourceRoot":"","sources":["../../src/PRService/refreshScore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,MAAM,EAAmB,MAAM,QAAQ,CAAA;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"refreshScore.d.ts","sourceRoot":"","sources":["../../src/PRService/refreshScore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,MAAM,EAAmB,MAAM,QAAQ,CAAA;AACjE,OAAO,EAA0B,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAExG,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5D,eAAO,MAAM,qBAAqB,UACzB,OAAO,KACb,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe,CAwB3C,CAAA"}
|
|
@@ -6,19 +6,19 @@ import { Clock, DateTime, Effect, SubscriptionRef } from "effect";
|
|
|
6
6
|
import { PullRequestRepo } from "../CacheService/repos/PullRequestRepo/index.js";
|
|
7
7
|
import { scoreTotalOr } from "../HealthScore.js";
|
|
8
8
|
import { decodeCachedPR } from "./internal.js";
|
|
9
|
-
export const calculateHealthScores = (state) => Effect.gen(function* () {
|
|
9
|
+
export const calculateHealthScores = (state) => (Effect.gen(function* () {
|
|
10
10
|
const prRepo = yield* PullRequestRepo;
|
|
11
11
|
yield* SubscriptionRef.update(state, (s) => ({
|
|
12
12
|
...s,
|
|
13
13
|
statusDetail: "calculating health scores"
|
|
14
14
|
}));
|
|
15
|
-
const scoredPRs = yield* prRepo.findAll().pipe(Effect.
|
|
15
|
+
const scoredPRs = yield* prRepo.findAll().pipe(Effect.catchCause(() => Effect.succeed([])));
|
|
16
16
|
const scoreNowMs = yield* Clock.currentTimeMillis;
|
|
17
|
-
const scoreNow = DateTime.toDate(DateTime.
|
|
17
|
+
const scoreNow = DateTime.toDate(DateTime.makeUnsafe(scoreNowMs));
|
|
18
18
|
yield* Effect.forEach(scoredPRs, (row) => {
|
|
19
19
|
const pr = decodeCachedPR(row);
|
|
20
20
|
const score = scoreTotalOr(pr, scoreNow, 0);
|
|
21
|
-
return prRepo.updateHealthScore(row.awsAccountId, row.id, score).pipe(Effect.
|
|
21
|
+
return prRepo.updateHealthScore(row.awsAccountId, row.id, score).pipe(Effect.catchCause(() => Effect.void));
|
|
22
22
|
}, { discard: true });
|
|
23
|
-
});
|
|
23
|
+
}).pipe(Effect.catchCause((cause) => Effect.logWarning("calculateHealthScores failed", cause))));
|
|
24
24
|
//# sourceMappingURL=refreshScore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshScore.js","sourceRoot":"","sources":["../../src/PRService/refreshScore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"refreshScore.js","sourceRoot":"","sources":["../../src/PRService/refreshScore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH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AC,CAAC,IAAI,CACnE,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACrC,CAAA;IACH,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAA;AACH,CAAC,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CACvF,CAAC,CAAA"}
|
|
@@ -15,6 +15,9 @@ import { NotificationRepo } from "../CacheService/repos/NotificationRepo.js";
|
|
|
15
15
|
import { PullRequestRepo } from "../CacheService/repos/PullRequestRepo/index.js";
|
|
16
16
|
import { SubscriptionRepo } from "../CacheService/repos/SubscriptionRepo.js";
|
|
17
17
|
import { ConfigService } from "../ConfigService/index.js";
|
|
18
|
+
import { type PullRequestId } from "../Domain.js";
|
|
18
19
|
import { type PRState } from "./internal.js";
|
|
19
|
-
|
|
20
|
+
type RefreshSinglePREnv = AwsClient | PullRequestRepo | CommentRepo | NotificationRepo | SubscriptionRepo | ConfigService;
|
|
21
|
+
export declare const makeRefreshSinglePR: (state: PRState) => (awsAccountId: string, prId: PullRequestId) => Effect.Effect<void, never, RefreshSinglePREnv>;
|
|
22
|
+
export {};
|
|
20
23
|
//# sourceMappingURL=refreshSinglePR.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSinglePR.d.ts","sourceRoot":"","sources":["../../src/PRService/refreshSinglePR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"refreshSinglePR.d.ts","sourceRoot":"","sources":["../../src/PRService/refreshSinglePR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAS,MAAM,EAAmC,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAM5E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAgB9D,KAAK,kBAAkB,GACnB,SAAS,GACT,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,CAAA;AAyBjB,eAAO,MAAM,mBAAmB,UACvB,OAAO,oBAuHQ,MAAM,QAAQ,aAAa,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,CAElG,CAAA"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
import { Cause, Effect, Option, SubscriptionRef } from "effect";
|
|
11
|
+
import { Cause, Effect, Option, Schema, SubscriptionRef } from "effect";
|
|
12
12
|
import { AwsClient } from "../AwsClient/index.js";
|
|
13
13
|
import { diffApprovalPools, diffComments, diffPR } from "../CacheService/diff.js";
|
|
14
14
|
import { CommentRepo } from "../CacheService/repos/CommentRepo.js";
|
|
@@ -16,101 +16,112 @@ import { NotificationRepo } from "../CacheService/repos/NotificationRepo.js";
|
|
|
16
16
|
import { PullRequestRepo } from "../CacheService/repos/PullRequestRepo/index.js";
|
|
17
17
|
import { SubscriptionRepo } from "../CacheService/repos/SubscriptionRepo.js";
|
|
18
18
|
import { ConfigService } from "../ConfigService/index.js";
|
|
19
|
-
import { codecommitConsoleUrl } from "../Domain.js";
|
|
19
|
+
import { AwsProfileName, AwsRegion, codecommitConsoleUrl, PullRequestStatus } from "../Domain.js";
|
|
20
20
|
import { countAllComments } from "./internal.js";
|
|
21
|
+
const decodeAwsProfileName = Schema.decodeUnknownSync(AwsProfileName);
|
|
22
|
+
const decodeAwsRegion = Schema.decodeUnknownSync(AwsRegion);
|
|
23
|
+
const decodePullRequestStatus = Schema.decodeUnknownSync(PullRequestStatus);
|
|
24
|
+
const resolvedAccount = (profile, region) => ({
|
|
25
|
+
profile: decodeAwsProfileName(profile),
|
|
26
|
+
region: decodeAwsRegion(region)
|
|
27
|
+
});
|
|
21
28
|
/** Resolve profile/region from any cached PR with matching awsAccountId, or from config */
|
|
22
29
|
const resolveAccountFromCache = (prRepo, awsAccountId) => Effect.gen(function* () {
|
|
23
30
|
// Check other cached PRs from the same AWS account
|
|
24
|
-
const allCached = yield* prRepo.findAll().pipe(Effect.
|
|
31
|
+
const allCached = yield* prRepo.findAll().pipe(Effect.catchCause(() => Effect.succeed([])));
|
|
25
32
|
const sibling = allCached.find((p) => p.awsAccountId === awsAccountId);
|
|
26
|
-
if (sibling)
|
|
27
|
-
return
|
|
33
|
+
if (sibling) {
|
|
34
|
+
return resolvedAccount(sibling.accountProfile, sibling.accountRegion);
|
|
35
|
+
}
|
|
28
36
|
// Fall back to config — match by profile name (awsAccountId might be the profile name from URL)
|
|
29
37
|
const configService = yield* ConfigService;
|
|
30
|
-
const config = yield* configService.load.pipe(Effect.
|
|
38
|
+
const config = yield* configService.load.pipe(Effect.catchCause(() => Effect.succeed({ accounts: [] })));
|
|
31
39
|
const configAccount = config.accounts.find((a) => a.profile === awsAccountId && a.enabled);
|
|
32
40
|
if (configAccount && configAccount.regions?.[0]) {
|
|
33
|
-
return
|
|
41
|
+
return resolvedAccount(configAccount.profile, configAccount.regions[0]);
|
|
34
42
|
}
|
|
35
43
|
return undefined;
|
|
36
44
|
});
|
|
37
|
-
export const makeRefreshSinglePR = (state) =>
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
45
|
+
export const makeRefreshSinglePR = (state) => {
|
|
46
|
+
const refreshSinglePR = Effect.fn("PRService.refreshSinglePR")(function* (awsAccountId, prId) {
|
|
47
|
+
const awsClient = yield* AwsClient;
|
|
48
|
+
const prRepo = yield* PullRequestRepo;
|
|
49
|
+
const commentRepo = yield* CommentRepo;
|
|
50
|
+
const notificationRepo = yield* NotificationRepo;
|
|
51
|
+
const subscriptionRepo = yield* SubscriptionRepo;
|
|
52
|
+
// Find PR in state to get account info
|
|
53
|
+
const currentState = yield* SubscriptionRef.get(state);
|
|
54
|
+
const pr = currentState.pullRequests.find((p) => p.id === prId && p.account.awsAccountId === awsAccountId);
|
|
55
|
+
// Also check cache
|
|
56
|
+
const cachedPR = yield* prRepo.findByAccountAndId(awsAccountId, prId).pipe(Effect.map((row) => Option.some(row)), Effect.catchCause(() => Effect.succeed(Option.none())));
|
|
57
|
+
// Resolve account: from state PR → cached PR → any cached PR with same awsAccountId → config
|
|
58
|
+
const account = pr
|
|
59
|
+
? resolvedAccount(pr.account.profile, pr.account.region)
|
|
60
|
+
: Option.isSome(cachedPR)
|
|
61
|
+
? resolvedAccount(cachedPR.value.accountProfile, cachedPR.value.accountRegion)
|
|
62
|
+
: yield* resolveAccountFromCache(prRepo, awsAccountId);
|
|
63
|
+
if (!account)
|
|
64
|
+
return;
|
|
65
|
+
// Fetch fresh PR details
|
|
66
|
+
const detail = yield* awsClient.getPullRequest({
|
|
67
|
+
account,
|
|
68
|
+
pullRequestId: prId
|
|
69
|
+
}).pipe(Effect.catchCause(() => Effect.succeed(undefined)));
|
|
70
|
+
if (!detail)
|
|
71
|
+
return;
|
|
72
|
+
// Fetch fresh comments
|
|
73
|
+
const locs = yield* awsClient.getCommentsForPullRequest({
|
|
74
|
+
account,
|
|
75
|
+
pullRequestId: prId,
|
|
76
|
+
repositoryName: detail.repositoryName
|
|
77
|
+
}).pipe(Effect.catchCause(() => Effect.succeed([])));
|
|
78
|
+
// Build fresh upsert — PullRequestDetail lacks some fields, fall back to cache
|
|
79
|
+
const cached = Option.isSome(cachedPR) ? cachedPR.value : undefined;
|
|
80
|
+
const freshUpsert = {
|
|
81
|
+
id: prId,
|
|
82
|
+
awsAccountId,
|
|
83
|
+
repoAccountId: detail.repoAccountId ?? cached?.repoAccountId ?? null,
|
|
84
|
+
accountProfile: account.profile,
|
|
85
|
+
accountRegion: account.region,
|
|
86
|
+
title: detail.title,
|
|
87
|
+
description: detail.description ?? null,
|
|
88
|
+
author: detail.author,
|
|
89
|
+
repositoryName: detail.repositoryName,
|
|
90
|
+
creationDate: detail.creationDate.toISOString(),
|
|
91
|
+
lastModifiedDate: cached?.lastModifiedDate.toISOString() ?? new Date().toISOString(),
|
|
92
|
+
status: decodePullRequestStatus(detail.status),
|
|
93
|
+
sourceBranch: detail.sourceBranch,
|
|
94
|
+
destinationBranch: detail.destinationBranch,
|
|
95
|
+
isMergeable: cached ? (cached.isMergeable ? 1 : 0) : detail.status === "MERGED" ? 1 : 0,
|
|
96
|
+
isApproved: cached ? (cached.isApproved ? 1 : 0) : detail.status === "MERGED" ? 1 : 0,
|
|
97
|
+
commentCount: countAllComments(locs),
|
|
98
|
+
link: cached?.link ?? pr?.link ?? codecommitConsoleUrl(account.region, detail.repositoryName, prId),
|
|
99
|
+
approvedBy: detail.approvedBy,
|
|
100
|
+
approvedByArns: detail.approvedByArns,
|
|
101
|
+
approvalRules: detail.approvalRules
|
|
102
|
+
};
|
|
103
|
+
// Diff for subscribed PRs
|
|
104
|
+
const isSubscribed = yield* subscriptionRepo.isSubscribed(awsAccountId, prId).pipe(Effect.catchCause(() => Effect.succeed(false)));
|
|
105
|
+
if (isSubscribed && Option.isSome(cachedPR)) {
|
|
106
|
+
const prNotifications = diffPR(cachedPR.value, freshUpsert, awsAccountId);
|
|
107
|
+
const poolNotifications = diffApprovalPools(cachedPR.value.approvalRules ?? [], freshUpsert.approvalRules, currentState.currentUser, prId, awsAccountId, detail.title, account.profile);
|
|
108
|
+
yield* Effect.forEach([...prNotifications, ...poolNotifications], (n) => notificationRepo.add(n), {
|
|
109
|
+
discard: true
|
|
110
|
+
}).pipe(Effect.catchCause(() => Effect.void));
|
|
111
|
+
// Diff comments
|
|
112
|
+
const cachedComments = yield* commentRepo.find(awsAccountId, prId).pipe(Effect.catchCause(() => Effect.succeed(Option.none())));
|
|
113
|
+
if (Option.isSome(cachedComments)) {
|
|
114
|
+
const commentNotifications = diffComments(cachedComments.value, locs, prId, awsAccountId);
|
|
115
|
+
yield* Effect.forEach(commentNotifications, (n) => notificationRepo.add(n), { discard: true }).pipe(Effect.catchCause(() => Effect.void));
|
|
116
|
+
}
|
|
107
117
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
// Cache comments
|
|
119
|
+
yield* commentRepo.upsert(awsAccountId, prId, JSON.stringify(locs)).pipe(Effect.catchCause(() => Effect.void));
|
|
120
|
+
// Always upsert fresh data to cache
|
|
121
|
+
yield* prRepo.upsert(freshUpsert).pipe(Effect.catchCause(() => Effect.void));
|
|
122
|
+
}, (effect) => effect.pipe(Effect.catchCause((cause) => Cause.hasInterruptsOnly(cause)
|
|
123
|
+
? Effect.interrupt
|
|
124
|
+
: Effect.logWarning("refreshSinglePR failed", cause))));
|
|
125
|
+
return (awsAccountId, prId) => refreshSinglePR(awsAccountId, prId);
|
|
126
|
+
};
|
|
116
127
|
//# sourceMappingURL=refreshSinglePR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSinglePR.js","sourceRoot":"","sources":["../../src/PRService/refreshSinglePR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"refreshSinglePR.js","sourceRoot":"","sources":["../../src/PRService/refreshSinglePR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAM5E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,C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CAAC,IAAI,CAAC,CAAC,CAAA;IAC9E,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CACZ,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAuB,EAAE,CAC/C,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC;QAC5B,CAAC,CAAC,MAAM,CAAC,SAAS;QAClB,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,wBAAwB,EAAE,KAAK,CAAC,CACvD,CACF,CAAC,CAAA;IAEJ,OAAO,CAAC,YAAoB,EAAE,IAAmB,EAAkD,EAAE,CACnG,eAAe,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AACvC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setAllAccounts.d.ts","sourceRoot":"","sources":["../../src/PRService/setAllAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"setAllAccounts.d.ts","sourceRoot":"","sources":["../../src/PRService/setAllAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAMzD,eAAO,MAAM,kBAAkB,YACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,wJAoB1B,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { Effect } from "effect";
|
|
4
|
+
import { Effect, Schema } from "effect";
|
|
5
5
|
import { ConfigService } from "../ConfigService/index.js";
|
|
6
|
+
import { AwsRegion } from "../Domain.js";
|
|
7
|
+
const decodeAwsRegion = Schema.decodeSync(AwsRegion);
|
|
8
|
+
const defaultAwsRegion = decodeAwsRegion("us-east-1");
|
|
6
9
|
export const makeSetAllAccounts = (refresh) => Effect.fn("PRService.setAllAccounts")(function* (enabled, profiles) {
|
|
7
10
|
const configService = yield* ConfigService;
|
|
8
11
|
const config = yield* configService.load.pipe(Effect.orDie);
|
|
@@ -13,7 +16,7 @@ export const makeSetAllAccounts = (refresh) => Effect.fn("PRService.setAllAccoun
|
|
|
13
16
|
const det = detected.find((d) => d.name === profile);
|
|
14
17
|
return {
|
|
15
18
|
profile,
|
|
16
|
-
regions: existing?.regions ?? [det?.region ??
|
|
19
|
+
regions: existing?.regions ?? [det?.region ?? defaultAwsRegion],
|
|
17
20
|
enabled
|
|
18
21
|
};
|
|
19
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setAllAccounts.js","sourceRoot":"","sources":["../../src/PRService/setAllAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"setAllAccounts.js","sourceRoot":"","sources":["../../src/PRService/setAllAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAuB,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7D,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;AACpD,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAA;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAA4B,EAC5B,EAAE,CACF,MAAM,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,EAAC,OAAgB,EAAE,QAAgC;IAChG,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,aAAa,CAAA;IAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC3D,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACvE,MAAM,cAAc,GAAG,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAE9D,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;QACnE,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;QACpD,OAAO;YACL,OAAO;YACP,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,gBAAgB,CAAC;YAC/D,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClF,KAAK,CAAC,CAAC,OAAO,CAAA;AAChB,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggleAccount.d.ts","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"toggleAccount.d.ts","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAMzD,eAAO,MAAM,iBAAiB,YACnB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,oHAyB1B,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { Effect } from "effect";
|
|
4
|
+
import { Effect, Schema } from "effect";
|
|
5
5
|
import { ConfigService } from "../ConfigService/index.js";
|
|
6
|
+
import { AwsRegion } from "../Domain.js";
|
|
7
|
+
const decodeAwsRegion = Schema.decodeSync(AwsRegion);
|
|
8
|
+
const defaultAwsRegion = decodeAwsRegion("us-east-1");
|
|
6
9
|
export const makeToggleAccount = (refresh) => Effect.fn("PRService.toggleAccount")(function* (profile) {
|
|
7
10
|
const configService = yield* ConfigService;
|
|
8
11
|
const config = yield* configService.load.pipe(Effect.orDie);
|
|
@@ -19,7 +22,7 @@ export const makeToggleAccount = (refresh) => Effect.fn("PRService.toggleAccount
|
|
|
19
22
|
const p = detected.find((d) => d.name === profile);
|
|
20
23
|
newAccounts.push({
|
|
21
24
|
profile,
|
|
22
|
-
regions: [p?.region ??
|
|
25
|
+
regions: [p?.region ?? defaultAwsRegion],
|
|
23
26
|
enabled: true
|
|
24
27
|
});
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggleAccount.js","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"toggleAccount.js","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2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C;YACxC,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClF,KAAK,CAAC,CAAC,OAAO,CAAA;AAChB,CAAC,CAAC,CAAA"}
|
|
@@ -15,18 +15,17 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @module
|
|
17
17
|
*/
|
|
18
|
-
import
|
|
19
|
-
import { Effect, Schema } from "effect";
|
|
18
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
20
19
|
import { CacheError } from "../CacheService/CacheError.js";
|
|
21
20
|
export declare const AuditLogEntry: Schema.Struct<{
|
|
22
|
-
id:
|
|
23
|
-
timestamp:
|
|
24
|
-
operation:
|
|
25
|
-
accountProfile:
|
|
26
|
-
region:
|
|
27
|
-
permissionState: Schema.
|
|
28
|
-
context:
|
|
29
|
-
durationMs: Schema.NullOr<
|
|
21
|
+
readonly id: Schema.Number;
|
|
22
|
+
readonly timestamp: Schema.String;
|
|
23
|
+
readonly operation: Schema.String;
|
|
24
|
+
readonly accountProfile: Schema.String;
|
|
25
|
+
readonly region: Schema.String;
|
|
26
|
+
readonly permissionState: Schema.Literals<readonly ["allowed", "always_allowed", "denied", "timed_out"]>;
|
|
27
|
+
readonly context: Schema.String;
|
|
28
|
+
readonly durationMs: Schema.NullOr<Schema.Number>;
|
|
30
29
|
}>;
|
|
31
30
|
export type AuditLogEntry = typeof AuditLogEntry.Type;
|
|
32
31
|
export type NewAuditLogEntry = Omit<AuditLogEntry, "id">;
|
|
@@ -35,29 +34,28 @@ export interface PaginatedAuditLog {
|
|
|
35
34
|
readonly total: number;
|
|
36
35
|
readonly nextCursor?: number;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, never, SqlClient.SqlClient>;
|
|
59
|
-
}>;
|
|
37
|
+
export interface AuditLogRepoShape {
|
|
38
|
+
readonly log: (entry: NewAuditLogEntry) => Effect.Effect<void, CacheError>;
|
|
39
|
+
readonly findAll: (opts?: {
|
|
40
|
+
readonly limit?: number | undefined;
|
|
41
|
+
readonly offset?: number | undefined;
|
|
42
|
+
readonly operation?: string | undefined;
|
|
43
|
+
readonly accountProfile?: string | undefined;
|
|
44
|
+
readonly permissionState?: string | undefined;
|
|
45
|
+
readonly from?: string | undefined;
|
|
46
|
+
readonly to?: string | undefined;
|
|
47
|
+
readonly search?: string | undefined;
|
|
48
|
+
}) => Effect.Effect<PaginatedAuditLog, CacheError, never>;
|
|
49
|
+
readonly prune: (retentionDays: number) => Effect.Effect<number, CacheError>;
|
|
50
|
+
readonly clearAll: () => Effect.Effect<number, CacheError>;
|
|
51
|
+
readonly exportAll: (opts?: {
|
|
52
|
+
readonly from?: string | undefined;
|
|
53
|
+
readonly to?: string | undefined;
|
|
54
|
+
}) => Effect.Effect<ReadonlyArray<AuditLogEntry>, CacheError>;
|
|
55
|
+
}
|
|
56
|
+
declare const AuditLogRepo_base: Context.ServiceClass<AuditLogRepo, "AuditLogRepo", AuditLogRepoShape>;
|
|
60
57
|
export declare class AuditLogRepo extends AuditLogRepo_base {
|
|
58
|
+
static readonly Default: Layer.Layer<AuditLogRepo, import("effect/Config").ConfigError | import("@effect/sql-libsql/LibsqlMigrator").MigrationError | import("effect/PlatformError").PlatformError | import("effect/unstable/sql/SqlError").SqlError, import("effect/FileSystem").FileSystem>;
|
|
61
59
|
}
|
|
62
60
|
export {};
|
|
63
61
|
//# sourceMappingURL=AuditLog.d.ts.map
|