@knpkv/codecommit-core 0.3.0 → 0.5.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.
Files changed (210) hide show
  1. package/README.md +66 -0
  2. package/dist/AwsClient/createPullRequest.d.ts +1 -6
  3. package/dist/AwsClient/createPullRequest.d.ts.map +1 -1
  4. package/dist/AwsClient/createPullRequest.js +3 -11
  5. package/dist/AwsClient/createPullRequest.js.map +1 -1
  6. package/dist/AwsClient/getCallerIdentity.d.ts +5 -6
  7. package/dist/AwsClient/getCallerIdentity.d.ts.map +1 -1
  8. package/dist/AwsClient/getCallerIdentity.js +7 -12
  9. package/dist/AwsClient/getCallerIdentity.js.map +1 -1
  10. package/dist/AwsClient/getCommentsForPullRequest.d.ts +1 -6
  11. package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
  12. package/dist/AwsClient/getCommentsForPullRequest.js +9 -16
  13. package/dist/AwsClient/getCommentsForPullRequest.js.map +1 -1
  14. package/dist/AwsClient/getPullRequest.d.ts +2 -7
  15. package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
  16. package/dist/AwsClient/getPullRequest.js +15 -28
  17. package/dist/AwsClient/getPullRequest.js.map +1 -1
  18. package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
  19. package/dist/AwsClient/getPullRequests.js +18 -15
  20. package/dist/AwsClient/getPullRequests.js.map +1 -1
  21. package/dist/AwsClient/index.d.ts +3 -2
  22. package/dist/AwsClient/index.d.ts.map +1 -1
  23. package/dist/AwsClient/index.js.map +1 -1
  24. package/dist/AwsClient/internal.d.ts +47 -11
  25. package/dist/AwsClient/internal.d.ts.map +1 -1
  26. package/dist/AwsClient/internal.js +38 -9
  27. package/dist/AwsClient/internal.js.map +1 -1
  28. package/dist/AwsClient/listBranches.d.ts +1 -6
  29. package/dist/AwsClient/listBranches.d.ts.map +1 -1
  30. package/dist/AwsClient/listBranches.js +3 -11
  31. package/dist/AwsClient/listBranches.js.map +1 -1
  32. package/dist/AwsClient/updatePullRequestDescription.d.ts +1 -6
  33. package/dist/AwsClient/updatePullRequestDescription.d.ts.map +1 -1
  34. package/dist/AwsClient/updatePullRequestDescription.js +3 -11
  35. package/dist/AwsClient/updatePullRequestDescription.js.map +1 -1
  36. package/dist/AwsClient/updatePullRequestTitle.d.ts +1 -6
  37. package/dist/AwsClient/updatePullRequestTitle.d.ts.map +1 -1
  38. package/dist/AwsClient/updatePullRequestTitle.js +3 -11
  39. package/dist/AwsClient/updatePullRequestTitle.js.map +1 -1
  40. package/dist/CacheService/CacheError.d.ts +21 -0
  41. package/dist/CacheService/CacheError.d.ts.map +1 -0
  42. package/dist/CacheService/CacheError.js +17 -0
  43. package/dist/CacheService/CacheError.js.map +1 -0
  44. package/dist/CacheService/Database.d.ts +13 -0
  45. package/dist/CacheService/Database.d.ts.map +1 -0
  46. package/dist/CacheService/Database.js +38 -0
  47. package/dist/CacheService/Database.js.map +1 -0
  48. package/dist/CacheService/EventsHub.d.ts +183 -0
  49. package/dist/CacheService/EventsHub.d.ts.map +1 -0
  50. package/dist/CacheService/EventsHub.js +22 -0
  51. package/dist/CacheService/EventsHub.js.map +1 -0
  52. package/dist/CacheService/diff.d.ts +28 -0
  53. package/dist/CacheService/diff.d.ts.map +1 -0
  54. package/dist/CacheService/diff.js +102 -0
  55. package/dist/CacheService/diff.js.map +1 -0
  56. package/dist/CacheService/index.d.ts +19 -0
  57. package/dist/CacheService/index.d.ts.map +1 -0
  58. package/dist/CacheService/index.js +16 -0
  59. package/dist/CacheService/index.js.map +1 -0
  60. package/dist/CacheService/migrations/0001_initial.d.ts +5 -0
  61. package/dist/CacheService/migrations/0001_initial.d.ts.map +1 -0
  62. package/dist/CacheService/migrations/0001_initial.js +72 -0
  63. package/dist/CacheService/migrations/0001_initial.js.map +1 -0
  64. package/dist/CacheService/migrations/0002_indexes.d.ts +5 -0
  65. package/dist/CacheService/migrations/0002_indexes.d.ts.map +1 -0
  66. package/dist/CacheService/migrations/0002_indexes.js +7 -0
  67. package/dist/CacheService/migrations/0002_indexes.js.map +1 -0
  68. package/dist/CacheService/migrations/0003_add_health_score.d.ts +5 -0
  69. package/dist/CacheService/migrations/0003_add_health_score.d.ts.map +1 -0
  70. package/dist/CacheService/migrations/0003_add_health_score.js +4 -0
  71. package/dist/CacheService/migrations/0003_add_health_score.js.map +1 -0
  72. package/dist/CacheService/migrations/0004_unify_notifications.d.ts +5 -0
  73. package/dist/CacheService/migrations/0004_unify_notifications.d.ts.map +1 -0
  74. package/dist/CacheService/migrations/0004_unify_notifications.js +7 -0
  75. package/dist/CacheService/migrations/0004_unify_notifications.js.map +1 -0
  76. package/dist/CacheService/migrations/0005_add_sandboxes.d.ts +5 -0
  77. package/dist/CacheService/migrations/0005_add_sandboxes.d.ts.map +1 -0
  78. package/dist/CacheService/migrations/0005_add_sandboxes.js +23 -0
  79. package/dist/CacheService/migrations/0005_add_sandboxes.js.map +1 -0
  80. package/dist/CacheService/migrations/0006_sandbox_logs.d.ts +5 -0
  81. package/dist/CacheService/migrations/0006_sandbox_logs.d.ts.map +1 -0
  82. package/dist/CacheService/migrations/0006_sandbox_logs.js +7 -0
  83. package/dist/CacheService/migrations/0006_sandbox_logs.js.map +1 -0
  84. package/dist/CacheService/repos/CommentRepo.d.ts +16 -0
  85. package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -0
  86. package/dist/CacheService/repos/CommentRepo.js +42 -0
  87. package/dist/CacheService/repos/CommentRepo.js.map +1 -0
  88. package/dist/CacheService/repos/NotificationRepo.d.ts +48 -0
  89. package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -0
  90. package/dist/CacheService/repos/NotificationRepo.js +128 -0
  91. package/dist/CacheService/repos/NotificationRepo.js.map +1 -0
  92. package/dist/CacheService/repos/PullRequestRepo.d.ts +112 -0
  93. package/dist/CacheService/repos/PullRequestRepo.d.ts.map +1 -0
  94. package/dist/CacheService/repos/PullRequestRepo.js +146 -0
  95. package/dist/CacheService/repos/PullRequestRepo.js.map +1 -0
  96. package/dist/CacheService/repos/SandboxRepo.d.ts +116 -0
  97. package/dist/CacheService/repos/SandboxRepo.d.ts.map +1 -0
  98. package/dist/CacheService/repos/SandboxRepo.js +88 -0
  99. package/dist/CacheService/repos/SandboxRepo.js.map +1 -0
  100. package/dist/CacheService/repos/SubscriptionRepo.d.ts +20 -0
  101. package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -0
  102. package/dist/CacheService/repos/SubscriptionRepo.js +49 -0
  103. package/dist/CacheService/repos/SubscriptionRepo.js.map +1 -0
  104. package/dist/CacheService/repos/SyncMetadataRepo.d.ts +14 -0
  105. package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -0
  106. package/dist/CacheService/repos/SyncMetadataRepo.js +36 -0
  107. package/dist/CacheService/repos/SyncMetadataRepo.js.map +1 -0
  108. package/dist/ConfigService/backup.d.ts +1 -1
  109. package/dist/ConfigService/detectProfiles.d.ts +1 -1
  110. package/dist/ConfigService/index.d.ts +3 -2
  111. package/dist/ConfigService/index.d.ts.map +1 -1
  112. package/dist/ConfigService/index.js +4 -2
  113. package/dist/ConfigService/index.js.map +1 -1
  114. package/dist/ConfigService/internal.d.ts +104 -0
  115. package/dist/ConfigService/internal.d.ts.map +1 -1
  116. package/dist/ConfigService/internal.js +18 -1
  117. package/dist/ConfigService/internal.js.map +1 -1
  118. package/dist/ConfigService/load.d.ts +18 -1
  119. package/dist/ConfigService/load.d.ts.map +1 -1
  120. package/dist/ConfigService/load.js +12 -3
  121. package/dist/ConfigService/load.js.map +1 -1
  122. package/dist/ConfigService/reset.d.ts.map +1 -1
  123. package/dist/ConfigService/reset.js +5 -2
  124. package/dist/ConfigService/reset.js.map +1 -1
  125. package/dist/ConfigService/save.d.ts +1 -1
  126. package/dist/ConfigService/validate.d.ts +1 -1
  127. package/dist/DateUtils.d.ts +1 -1
  128. package/dist/DateUtils.d.ts.map +1 -1
  129. package/dist/DateUtils.js +2 -2
  130. package/dist/DateUtils.js.map +1 -1
  131. package/dist/Domain.d.ts +251 -10
  132. package/dist/Domain.d.ts.map +1 -1
  133. package/dist/Domain.js +55 -5
  134. package/dist/Domain.js.map +1 -1
  135. package/dist/Errors.d.ts +28 -1
  136. package/dist/Errors.d.ts.map +1 -1
  137. package/dist/Errors.js +22 -1
  138. package/dist/Errors.js.map +1 -1
  139. package/dist/HealthScore.d.ts.map +1 -1
  140. package/dist/HealthScore.js +1 -3
  141. package/dist/HealthScore.js.map +1 -1
  142. package/dist/PRService/index.d.ts +46 -18
  143. package/dist/PRService/index.d.ts.map +1 -1
  144. package/dist/PRService/index.js +58 -27
  145. package/dist/PRService/index.js.map +1 -1
  146. package/dist/PRService/internal.d.ts +86 -1
  147. package/dist/PRService/internal.d.ts.map +1 -1
  148. package/dist/PRService/internal.js +106 -1
  149. package/dist/PRService/internal.js.map +1 -1
  150. package/dist/PRService/refresh.d.ts +10 -4
  151. package/dist/PRService/refresh.d.ts.map +1 -1
  152. package/dist/PRService/refresh.js +30 -89
  153. package/dist/PRService/refresh.js.map +1 -1
  154. package/dist/PRService/refreshEnrich.d.ts +15 -0
  155. package/dist/PRService/refreshEnrich.d.ts.map +1 -0
  156. package/dist/PRService/refreshEnrich.js +72 -0
  157. package/dist/PRService/refreshEnrich.js.map +1 -0
  158. package/dist/PRService/refreshFetch.d.ts +20 -0
  159. package/dist/PRService/refreshFetch.d.ts.map +1 -0
  160. package/dist/PRService/refreshFetch.js +78 -0
  161. package/dist/PRService/refreshFetch.js.map +1 -0
  162. package/dist/PRService/refreshResolve.d.ts +29 -0
  163. package/dist/PRService/refreshResolve.d.ts.map +1 -0
  164. package/dist/PRService/refreshResolve.js +84 -0
  165. package/dist/PRService/refreshResolve.js.map +1 -0
  166. package/dist/PRService/refreshScore.d.ts +9 -0
  167. package/dist/PRService/refreshScore.d.ts.map +1 -0
  168. package/dist/PRService/refreshScore.js +24 -0
  169. package/dist/PRService/refreshScore.js.map +1 -0
  170. package/dist/PRService/refreshSinglePR.d.ts +13 -0
  171. package/dist/PRService/refreshSinglePR.d.ts.map +1 -0
  172. package/dist/PRService/refreshSinglePR.js +102 -0
  173. package/dist/PRService/refreshSinglePR.js.map +1 -0
  174. package/dist/PRService/setAllAccounts.d.ts +1 -3
  175. package/dist/PRService/setAllAccounts.d.ts.map +1 -1
  176. package/dist/PRService/setAllAccounts.js +2 -2
  177. package/dist/PRService/setAllAccounts.js.map +1 -1
  178. package/dist/PRService/toggleAccount.d.ts +1 -3
  179. package/dist/PRService/toggleAccount.d.ts.map +1 -1
  180. package/dist/PRService/toggleAccount.js +2 -2
  181. package/dist/PRService/toggleAccount.js.map +1 -1
  182. package/dist/SandboxService/DockerService.d.ts +57 -0
  183. package/dist/SandboxService/DockerService.d.ts.map +1 -0
  184. package/dist/SandboxService/DockerService.js +83 -0
  185. package/dist/SandboxService/DockerService.js.map +1 -0
  186. package/dist/SandboxService/PluginService.d.ts +38 -0
  187. package/dist/SandboxService/PluginService.d.ts.map +1 -0
  188. package/dist/SandboxService/PluginService.js +26 -0
  189. package/dist/SandboxService/PluginService.js.map +1 -0
  190. package/dist/SandboxService/SandboxService.d.ts +102 -0
  191. package/dist/SandboxService/SandboxService.d.ts.map +1 -0
  192. package/dist/SandboxService/SandboxService.js +272 -0
  193. package/dist/SandboxService/SandboxService.js.map +1 -0
  194. package/dist/SandboxService/index.d.ts +13 -0
  195. package/dist/SandboxService/index.d.ts.map +1 -0
  196. package/dist/SandboxService/index.js +10 -0
  197. package/dist/SandboxService/index.js.map +1 -0
  198. package/dist/SandboxService/plugins/ClaudeCodePlugin.d.ts +18 -0
  199. package/dist/SandboxService/plugins/ClaudeCodePlugin.d.ts.map +1 -0
  200. package/dist/SandboxService/plugins/ClaudeCodePlugin.js +24 -0
  201. package/dist/SandboxService/plugins/ClaudeCodePlugin.js.map +1 -0
  202. package/dist/index.d.ts +2 -1
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +2 -1
  205. package/dist/index.js.map +1 -1
  206. package/package.json +4 -1
  207. package/dist/NotificationsService.d.ts +0 -46
  208. package/dist/NotificationsService.d.ts.map +0 -1
  209. package/dist/NotificationsService.js +0 -57
  210. package/dist/NotificationsService.js.map +0 -1
@@ -1,57 +0,0 @@
1
- /**
2
- * Notification state management service.
3
- *
4
- * Manages application notifications using `SubscriptionRef` for reactive state
5
- * and `Clock.currentTimeMillis` for timestamps (testable with `TestClock`).
6
- *
7
- * @example
8
- * ```typescript
9
- * import { NotificationsService } from "@knpkv/codecommit-core"
10
- *
11
- * const program = Effect.gen(function* () {
12
- * const notifications = yield* NotificationsService
13
- * yield* notifications.add({ type: "info", title: "Refresh", message: "Complete" })
14
- * })
15
- * ```
16
- *
17
- * @category Service
18
- * @module
19
- */
20
- import { Clock, Context, DateTime, Effect, Layer, SubscriptionRef } from "effect";
21
- // ---------------------------------------------------------------------------
22
- // Service Definition
23
- // ---------------------------------------------------------------------------
24
- /**
25
- * Notifications service.
26
- *
27
- * @category Service
28
- */
29
- export class NotificationsService extends Context.Tag("@knpkv/codecommit-core/NotificationsService")() {
30
- }
31
- // ---------------------------------------------------------------------------
32
- // Live Implementation
33
- // ---------------------------------------------------------------------------
34
- /**
35
- * Live notifications service using Clock for timestamps.
36
- *
37
- * @category Service
38
- */
39
- export const NotificationsServiceLive = Layer.effect(NotificationsService, Effect.gen(function* () {
40
- const state = yield* SubscriptionRef.make({
41
- items: []
42
- });
43
- const add = (item) => Effect.gen(function* () {
44
- const now = yield* Clock.currentTimeMillis;
45
- const timestamp = DateTime.toDate(DateTime.unsafeMake(now));
46
- const notification = {
47
- ...item,
48
- timestamp
49
- };
50
- yield* SubscriptionRef.update(state, (s) => ({
51
- items: [...s.items, notification].slice(-100)
52
- }));
53
- }).pipe(Effect.withSpan("NotificationsService.add"));
54
- const clear = SubscriptionRef.update(state, () => ({ items: [] }));
55
- return { state, add, clear };
56
- }));
57
- //# sourceMappingURL=NotificationsService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationsService.js","sourceRoot":"","sources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