@knpkv/codecommit-core 0.3.0 → 0.4.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 (174) 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 +13 -26
  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 +16 -13
  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 +34 -0
  47. package/dist/CacheService/Database.js.map +1 -0
  48. package/dist/CacheService/EventsHub.d.ts +163 -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 +17 -0
  57. package/dist/CacheService/index.d.ts.map +1 -0
  58. package/dist/CacheService/index.js +15 -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/repos/CommentRepo.d.ts +16 -0
  77. package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -0
  78. package/dist/CacheService/repos/CommentRepo.js +42 -0
  79. package/dist/CacheService/repos/CommentRepo.js.map +1 -0
  80. package/dist/CacheService/repos/NotificationRepo.d.ts +48 -0
  81. package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -0
  82. package/dist/CacheService/repos/NotificationRepo.js +128 -0
  83. package/dist/CacheService/repos/NotificationRepo.js.map +1 -0
  84. package/dist/CacheService/repos/PullRequestRepo.d.ts +112 -0
  85. package/dist/CacheService/repos/PullRequestRepo.d.ts.map +1 -0
  86. package/dist/CacheService/repos/PullRequestRepo.js +146 -0
  87. package/dist/CacheService/repos/PullRequestRepo.js.map +1 -0
  88. package/dist/CacheService/repos/SubscriptionRepo.d.ts +20 -0
  89. package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -0
  90. package/dist/CacheService/repos/SubscriptionRepo.js +49 -0
  91. package/dist/CacheService/repos/SubscriptionRepo.js.map +1 -0
  92. package/dist/CacheService/repos/SyncMetadataRepo.d.ts +14 -0
  93. package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -0
  94. package/dist/CacheService/repos/SyncMetadataRepo.js +36 -0
  95. package/dist/CacheService/repos/SyncMetadataRepo.js.map +1 -0
  96. package/dist/ConfigService/backup.d.ts +1 -1
  97. package/dist/ConfigService/detectProfiles.d.ts +1 -1
  98. package/dist/ConfigService/index.d.ts +2 -1
  99. package/dist/ConfigService/index.d.ts.map +1 -1
  100. package/dist/ConfigService/index.js +3 -1
  101. package/dist/ConfigService/index.js.map +1 -1
  102. package/dist/ConfigService/internal.d.ts +6 -0
  103. package/dist/ConfigService/internal.d.ts.map +1 -1
  104. package/dist/ConfigService/internal.js +3 -1
  105. package/dist/ConfigService/internal.js.map +1 -1
  106. package/dist/ConfigService/load.d.ts +3 -1
  107. package/dist/ConfigService/load.d.ts.map +1 -1
  108. package/dist/ConfigService/load.js +4 -2
  109. package/dist/ConfigService/load.js.map +1 -1
  110. package/dist/ConfigService/reset.d.ts.map +1 -1
  111. package/dist/ConfigService/reset.js +3 -1
  112. package/dist/ConfigService/reset.js.map +1 -1
  113. package/dist/ConfigService/save.d.ts +1 -1
  114. package/dist/ConfigService/validate.d.ts +1 -1
  115. package/dist/DateUtils.d.ts +1 -1
  116. package/dist/DateUtils.d.ts.map +1 -1
  117. package/dist/DateUtils.js +2 -2
  118. package/dist/DateUtils.js.map +1 -1
  119. package/dist/Domain.d.ts +179 -10
  120. package/dist/Domain.d.ts.map +1 -1
  121. package/dist/Domain.js +23 -5
  122. package/dist/Domain.js.map +1 -1
  123. package/dist/HealthScore.d.ts.map +1 -1
  124. package/dist/HealthScore.js +1 -3
  125. package/dist/HealthScore.js.map +1 -1
  126. package/dist/PRService/index.d.ts +46 -18
  127. package/dist/PRService/index.d.ts.map +1 -1
  128. package/dist/PRService/index.js +58 -27
  129. package/dist/PRService/index.js.map +1 -1
  130. package/dist/PRService/internal.d.ts +86 -1
  131. package/dist/PRService/internal.d.ts.map +1 -1
  132. package/dist/PRService/internal.js +106 -1
  133. package/dist/PRService/internal.js.map +1 -1
  134. package/dist/PRService/refresh.d.ts +10 -4
  135. package/dist/PRService/refresh.d.ts.map +1 -1
  136. package/dist/PRService/refresh.js +30 -89
  137. package/dist/PRService/refresh.js.map +1 -1
  138. package/dist/PRService/refreshEnrich.d.ts +15 -0
  139. package/dist/PRService/refreshEnrich.d.ts.map +1 -0
  140. package/dist/PRService/refreshEnrich.js +72 -0
  141. package/dist/PRService/refreshEnrich.js.map +1 -0
  142. package/dist/PRService/refreshFetch.d.ts +20 -0
  143. package/dist/PRService/refreshFetch.d.ts.map +1 -0
  144. package/dist/PRService/refreshFetch.js +78 -0
  145. package/dist/PRService/refreshFetch.js.map +1 -0
  146. package/dist/PRService/refreshResolve.d.ts +29 -0
  147. package/dist/PRService/refreshResolve.d.ts.map +1 -0
  148. package/dist/PRService/refreshResolve.js +84 -0
  149. package/dist/PRService/refreshResolve.js.map +1 -0
  150. package/dist/PRService/refreshScore.d.ts +9 -0
  151. package/dist/PRService/refreshScore.d.ts.map +1 -0
  152. package/dist/PRService/refreshScore.js +24 -0
  153. package/dist/PRService/refreshScore.js.map +1 -0
  154. package/dist/PRService/refreshSinglePR.d.ts +13 -0
  155. package/dist/PRService/refreshSinglePR.d.ts.map +1 -0
  156. package/dist/PRService/refreshSinglePR.js +102 -0
  157. package/dist/PRService/refreshSinglePR.js.map +1 -0
  158. package/dist/PRService/setAllAccounts.d.ts +1 -3
  159. package/dist/PRService/setAllAccounts.d.ts.map +1 -1
  160. package/dist/PRService/setAllAccounts.js +2 -2
  161. package/dist/PRService/setAllAccounts.js.map +1 -1
  162. package/dist/PRService/toggleAccount.d.ts +1 -3
  163. package/dist/PRService/toggleAccount.d.ts.map +1 -1
  164. package/dist/PRService/toggleAccount.js +2 -2
  165. package/dist/PRService/toggleAccount.js.map +1 -1
  166. package/dist/index.d.ts +1 -1
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +1 -1
  169. package/dist/index.js.map +1 -1
  170. package/package.json +4 -1
  171. package/dist/NotificationsService.d.ts +0 -46
  172. package/dist/NotificationsService.d.ts.map +0 -1
  173. package/dist/NotificationsService.js +0 -57
  174. package/dist/NotificationsService.js.map +0 -1
@@ -3,7 +3,5 @@
3
3
  */
4
4
  import { Effect } from "effect";
5
5
  import { ConfigService } from "../ConfigService/index.js";
6
- import type { AwsProfileName } from "../Domain.js";
7
- import type { PRState } from "./internal.js";
8
- export declare const makeToggleAccount: (state: PRState, refresh: Effect.Effect<void>) => (profile: AwsProfileName) => Effect.Effect<void, never, ConfigService>;
6
+ export declare const makeToggleAccount: (refresh: Effect.Effect<void>) => (profile: string & import("effect/Brand").Brand<"AwsProfileName">) => Effect.Effect<void, never, ConfigService>;
9
7
  //# sourceMappingURL=toggleAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggleAccount.d.ts","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,cAAc,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,eAAO,MAAM,iBAAiB,GAC5B,OAAO,OAAO,EACd,SAAS,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAE7B,SAAS,cAAc,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,aAAa,CAwBd,CAAA"}
1
+ {"version":3,"file":"toggleAccount.d.ts","sourceRoot":"","sources":["../../src/PRService/toggleAccount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAGzD,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,oHAyB1B,CAAA"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Effect } from "effect";
5
5
  import { ConfigService } from "../ConfigService/index.js";
6
- export const makeToggleAccount = (state, refresh) => (profile) => Effect.gen(function* () {
6
+ export const makeToggleAccount = (refresh) => Effect.fn("PRService.toggleAccount")(function* (profile) {
7
7
  const configService = yield* ConfigService;
8
8
  const config = yield* configService.load.pipe(Effect.orDie);
9
9
  const existingIdx = config.accounts.findIndex((a) => a.profile === profile);
@@ -25,5 +25,5 @@ export const makeToggleAccount = (state, refresh) => (profile) => Effect.gen(fun
25
25
  }
26
26
  yield* configService.save({ ...config, accounts: newAccounts }).pipe(Effect.orDie);
27
27
  yield* refresh;
28
- }).pipe(Effect.withSpan("PRService.toggleAccount"));
28
+ });
29
29
  //# sourceMappingURL=toggleAccount.js.map
@@ -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;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAIzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAc,EACd,OAA4B,EAC5B,EAAE,CACJ,CAAC,OAAuB,EAA6C,EAAE,CACrE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,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,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;IAE3E,MAAM,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACxC,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;QACrB,WAAW,CAAC,WAAW,CAAC,GAAG;YACzB,GAA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AAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;IAE3E,MAAM,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACxC,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;QACrB,WAAW,CAAC,WAAW,CAAC,GAAG;YACzB,GAAG,WAAW,CAAC,WAAW,CAAE;YAC5B,OAAO,EAAE,CAAC,WAAW,CAAC,WAAW,CAAE,CAAC,OAAO;SAC5C,CAAA;IACH,CAAC;SAAM,CAAC;QACN,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACvE,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;QAClD,WAAW,CAAC,IAAI,CAAC;YACf,OAAO;YACP,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,IAAK,WAAyB,CAAC;YAClD,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"}
package/dist/index.d.ts CHANGED
@@ -15,11 +15,11 @@
15
15
  */
16
16
  export * as AwsClient from "./AwsClient/index.js";
17
17
  export * as AwsClientConfig from "./AwsClientConfig.js";
18
+ export * as CacheService from "./CacheService/index.js";
18
19
  export * as ConfigService from "./ConfigService/index.js";
19
20
  export * as DateUtils from "./DateUtils.js";
20
21
  export * as Domain from "./Domain.js";
21
22
  export * as Errors from "./Errors.js";
22
- export * as NotificationsService from "./NotificationsService.js";
23
23
  export * as PRService from "./PRService/index.js";
24
24
  export { Registry } from "@effect-atom/atom";
25
25
  export { Reactivity } from "@effect/experimental";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
package/dist/index.js CHANGED
@@ -15,11 +15,11 @@
15
15
  */
16
16
  export * as AwsClient from "./AwsClient/index.js";
17
17
  export * as AwsClientConfig from "./AwsClientConfig.js";
18
+ export * as CacheService from "./CacheService/index.js";
18
19
  export * as ConfigService from "./ConfigService/index.js";
19
20
  export * as DateUtils from "./DateUtils.js";
20
21
  export * as Domain from "./Domain.js";
21
22
  export * as Errors from "./Errors.js";
22
- export * as NotificationsService from "./NotificationsService.js";
23
23
  export * as PRService from "./PRService/index.js";
24
24
  // Re-export Effect dependencies for convenience
25
25
  export { Registry } from "@effect-atom/atom";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AAEjD,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AAEjD,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/codecommit-core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Core logic for CodeCommit PR browser",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,6 +20,9 @@
20
20
  "@effect/experimental": "latest",
21
21
  "@effect/platform": "latest",
22
22
  "@effect/schema": "latest",
23
+ "@effect/sql": "latest",
24
+ "@effect/sql-libsql": "latest",
25
+ "@libsql/client": "^0.14.0",
23
26
  "distilled-aws": "0.0.21",
24
27
  "effect": "latest"
25
28
  },
@@ -1,46 +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 { Context, Effect, Layer, SubscriptionRef } from "effect";
21
- import type { NotificationsState, NotificationType } from "./Domain.js";
22
- declare const NotificationsService_base: Context.TagClass<NotificationsService, "@knpkv/codecommit-core/NotificationsService", {
23
- readonly state: SubscriptionRef.SubscriptionRef<NotificationsState>;
24
- readonly add: (item: {
25
- readonly type: NotificationType;
26
- readonly title: string;
27
- readonly message: string;
28
- readonly profile?: string;
29
- }) => Effect.Effect<void>;
30
- readonly clear: Effect.Effect<void>;
31
- }>;
32
- /**
33
- * Notifications service.
34
- *
35
- * @category Service
36
- */
37
- export declare class NotificationsService extends NotificationsService_base {
38
- }
39
- /**
40
- * Live notifications service using Clock for timestamps.
41
- *
42
- * @category Service
43
- */
44
- export declare const NotificationsServiceLive: Layer.Layer<NotificationsService, never, never>;
45
- export {};
46
- //# sourceMappingURL=NotificationsService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationsService.d.ts","sourceRoot":"","sources":["../src/NotificationsService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAS,OAAO,EAAY,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACjF,OAAO,KAAK,EAAoB,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;;oBAcrE,eAAe,CAAC,eAAe,CAAC,kBAAkB,CAAC;kBACrD,CAAC,IAAI,EAAE;QACnB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;QAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAC1B,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;oBACT,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;;AAfvC;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,yBAYvC;CAAG;AAMN;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,iDA6BpC,CAAA"}
@@ -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":["../src/NotificationsService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAGjF,8EAA8E;AAC9E,qBAAq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