@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.
- package/README.md +66 -0
- package/dist/AwsClient/createPullRequest.d.ts +1 -6
- package/dist/AwsClient/createPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/createPullRequest.js +3 -11
- package/dist/AwsClient/createPullRequest.js.map +1 -1
- package/dist/AwsClient/getCallerIdentity.d.ts +5 -6
- package/dist/AwsClient/getCallerIdentity.d.ts.map +1 -1
- package/dist/AwsClient/getCallerIdentity.js +7 -12
- package/dist/AwsClient/getCallerIdentity.js.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts +1 -6
- package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.js +9 -16
- package/dist/AwsClient/getCommentsForPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequest.d.ts +2 -7
- package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequest.js +13 -26
- package/dist/AwsClient/getPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +16 -13
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/index.d.ts +3 -2
- package/dist/AwsClient/index.d.ts.map +1 -1
- package/dist/AwsClient/index.js.map +1 -1
- package/dist/AwsClient/internal.d.ts +47 -11
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +38 -9
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/AwsClient/listBranches.d.ts +1 -6
- package/dist/AwsClient/listBranches.d.ts.map +1 -1
- package/dist/AwsClient/listBranches.js +3 -11
- package/dist/AwsClient/listBranches.js.map +1 -1
- package/dist/AwsClient/updatePullRequestDescription.d.ts +1 -6
- package/dist/AwsClient/updatePullRequestDescription.d.ts.map +1 -1
- package/dist/AwsClient/updatePullRequestDescription.js +3 -11
- package/dist/AwsClient/updatePullRequestDescription.js.map +1 -1
- package/dist/AwsClient/updatePullRequestTitle.d.ts +1 -6
- package/dist/AwsClient/updatePullRequestTitle.d.ts.map +1 -1
- package/dist/AwsClient/updatePullRequestTitle.js +3 -11
- package/dist/AwsClient/updatePullRequestTitle.js.map +1 -1
- package/dist/CacheService/CacheError.d.ts +21 -0
- package/dist/CacheService/CacheError.d.ts.map +1 -0
- package/dist/CacheService/CacheError.js +17 -0
- package/dist/CacheService/CacheError.js.map +1 -0
- package/dist/CacheService/Database.d.ts +13 -0
- package/dist/CacheService/Database.d.ts.map +1 -0
- package/dist/CacheService/Database.js +34 -0
- package/dist/CacheService/Database.js.map +1 -0
- package/dist/CacheService/EventsHub.d.ts +163 -0
- package/dist/CacheService/EventsHub.d.ts.map +1 -0
- package/dist/CacheService/EventsHub.js +22 -0
- package/dist/CacheService/EventsHub.js.map +1 -0
- package/dist/CacheService/diff.d.ts +28 -0
- package/dist/CacheService/diff.d.ts.map +1 -0
- package/dist/CacheService/diff.js +102 -0
- package/dist/CacheService/diff.js.map +1 -0
- package/dist/CacheService/index.d.ts +17 -0
- package/dist/CacheService/index.d.ts.map +1 -0
- package/dist/CacheService/index.js +15 -0
- package/dist/CacheService/index.js.map +1 -0
- package/dist/CacheService/migrations/0001_initial.d.ts +5 -0
- package/dist/CacheService/migrations/0001_initial.d.ts.map +1 -0
- package/dist/CacheService/migrations/0001_initial.js +72 -0
- package/dist/CacheService/migrations/0001_initial.js.map +1 -0
- package/dist/CacheService/migrations/0002_indexes.d.ts +5 -0
- package/dist/CacheService/migrations/0002_indexes.d.ts.map +1 -0
- package/dist/CacheService/migrations/0002_indexes.js +7 -0
- package/dist/CacheService/migrations/0002_indexes.js.map +1 -0
- package/dist/CacheService/migrations/0003_add_health_score.d.ts +5 -0
- package/dist/CacheService/migrations/0003_add_health_score.d.ts.map +1 -0
- package/dist/CacheService/migrations/0003_add_health_score.js +4 -0
- package/dist/CacheService/migrations/0003_add_health_score.js.map +1 -0
- package/dist/CacheService/migrations/0004_unify_notifications.d.ts +5 -0
- package/dist/CacheService/migrations/0004_unify_notifications.d.ts.map +1 -0
- package/dist/CacheService/migrations/0004_unify_notifications.js +7 -0
- package/dist/CacheService/migrations/0004_unify_notifications.js.map +1 -0
- package/dist/CacheService/repos/CommentRepo.d.ts +16 -0
- package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -0
- package/dist/CacheService/repos/CommentRepo.js +42 -0
- package/dist/CacheService/repos/CommentRepo.js.map +1 -0
- package/dist/CacheService/repos/NotificationRepo.d.ts +48 -0
- package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -0
- package/dist/CacheService/repos/NotificationRepo.js +128 -0
- package/dist/CacheService/repos/NotificationRepo.js.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo.d.ts +112 -0
- package/dist/CacheService/repos/PullRequestRepo.d.ts.map +1 -0
- package/dist/CacheService/repos/PullRequestRepo.js +146 -0
- package/dist/CacheService/repos/PullRequestRepo.js.map +1 -0
- package/dist/CacheService/repos/SubscriptionRepo.d.ts +20 -0
- package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -0
- package/dist/CacheService/repos/SubscriptionRepo.js +49 -0
- package/dist/CacheService/repos/SubscriptionRepo.js.map +1 -0
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts +14 -0
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -0
- package/dist/CacheService/repos/SyncMetadataRepo.js +36 -0
- package/dist/CacheService/repos/SyncMetadataRepo.js.map +1 -0
- package/dist/ConfigService/backup.d.ts +1 -1
- package/dist/ConfigService/detectProfiles.d.ts +1 -1
- package/dist/ConfigService/index.d.ts +2 -1
- package/dist/ConfigService/index.d.ts.map +1 -1
- package/dist/ConfigService/index.js +3 -1
- package/dist/ConfigService/index.js.map +1 -1
- package/dist/ConfigService/internal.d.ts +6 -0
- package/dist/ConfigService/internal.d.ts.map +1 -1
- package/dist/ConfigService/internal.js +3 -1
- package/dist/ConfigService/internal.js.map +1 -1
- package/dist/ConfigService/load.d.ts +3 -1
- package/dist/ConfigService/load.d.ts.map +1 -1
- package/dist/ConfigService/load.js +4 -2
- package/dist/ConfigService/load.js.map +1 -1
- package/dist/ConfigService/reset.d.ts.map +1 -1
- package/dist/ConfigService/reset.js +3 -1
- package/dist/ConfigService/reset.js.map +1 -1
- package/dist/ConfigService/save.d.ts +1 -1
- package/dist/ConfigService/validate.d.ts +1 -1
- package/dist/DateUtils.d.ts +1 -1
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/DateUtils.js +2 -2
- package/dist/DateUtils.js.map +1 -1
- package/dist/Domain.d.ts +179 -10
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +23 -5
- package/dist/Domain.js.map +1 -1
- package/dist/HealthScore.d.ts.map +1 -1
- package/dist/HealthScore.js +1 -3
- package/dist/HealthScore.js.map +1 -1
- package/dist/PRService/index.d.ts +46 -18
- package/dist/PRService/index.d.ts.map +1 -1
- package/dist/PRService/index.js +58 -27
- package/dist/PRService/index.js.map +1 -1
- package/dist/PRService/internal.d.ts +86 -1
- package/dist/PRService/internal.d.ts.map +1 -1
- package/dist/PRService/internal.js +106 -1
- package/dist/PRService/internal.js.map +1 -1
- package/dist/PRService/refresh.d.ts +10 -4
- package/dist/PRService/refresh.d.ts.map +1 -1
- package/dist/PRService/refresh.js +30 -89
- package/dist/PRService/refresh.js.map +1 -1
- package/dist/PRService/refreshEnrich.d.ts +15 -0
- package/dist/PRService/refreshEnrich.d.ts.map +1 -0
- package/dist/PRService/refreshEnrich.js +72 -0
- package/dist/PRService/refreshEnrich.js.map +1 -0
- package/dist/PRService/refreshFetch.d.ts +20 -0
- package/dist/PRService/refreshFetch.d.ts.map +1 -0
- package/dist/PRService/refreshFetch.js +78 -0
- package/dist/PRService/refreshFetch.js.map +1 -0
- package/dist/PRService/refreshResolve.d.ts +29 -0
- package/dist/PRService/refreshResolve.d.ts.map +1 -0
- package/dist/PRService/refreshResolve.js +84 -0
- package/dist/PRService/refreshResolve.js.map +1 -0
- package/dist/PRService/refreshScore.d.ts +9 -0
- package/dist/PRService/refreshScore.d.ts.map +1 -0
- package/dist/PRService/refreshScore.js +24 -0
- package/dist/PRService/refreshScore.js.map +1 -0
- package/dist/PRService/refreshSinglePR.d.ts +13 -0
- package/dist/PRService/refreshSinglePR.d.ts.map +1 -0
- package/dist/PRService/refreshSinglePR.js +102 -0
- package/dist/PRService/refreshSinglePR.js.map +1 -0
- package/dist/PRService/setAllAccounts.d.ts +1 -3
- package/dist/PRService/setAllAccounts.d.ts.map +1 -1
- package/dist/PRService/setAllAccounts.js +2 -2
- package/dist/PRService/setAllAccounts.js.map +1 -1
- package/dist/PRService/toggleAccount.d.ts +1 -3
- package/dist/PRService/toggleAccount.d.ts.map +1 -1
- package/dist/PRService/toggleAccount.js +2 -2
- package/dist/PRService/toggleAccount.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/dist/NotificationsService.d.ts +0 -46
- package/dist/NotificationsService.d.ts.map +0 -1
- package/dist/NotificationsService.js +0 -57
- package/dist/NotificationsService.js.map +0 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from "@effect/platform";
|
|
2
|
+
import { Credentials, Region } from "distilled-aws";
|
|
3
|
+
import { Effect, Schema } from "effect";
|
|
2
4
|
import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
3
|
-
import type { AwsProfileName, AwsRegion } from "../Domain.js";
|
|
5
|
+
import type { Account, AwsProfileName, AwsRegion } from "../Domain.js";
|
|
4
6
|
import { AwsApiError, AwsCredentialError } from "../Errors.js";
|
|
5
7
|
export { AwsApiError, AwsCredentialError } from "../Errors.js";
|
|
6
8
|
export type { AwsClientError } from "../Errors.js";
|
|
7
9
|
/**
|
|
8
10
|
* Check if an error is an AWS throttling exception.
|
|
11
|
+
* Inspects structured error properties instead of pretty-printing.
|
|
9
12
|
*/
|
|
10
13
|
export declare const isThrottlingError: (error: unknown) => boolean;
|
|
11
14
|
/**
|
|
@@ -33,12 +36,18 @@ export declare const acquireCredentials: (profile: AwsProfileName, region: AwsRe
|
|
|
33
36
|
*/
|
|
34
37
|
export declare const makeApiError: (operation: string, profile: AwsProfileName, region: AwsRegion, cause: unknown) => AwsApiError;
|
|
35
38
|
/**
|
|
36
|
-
* Common account parameter shape.
|
|
39
|
+
* Common account parameter shape. Derived from Domain.Account.
|
|
37
40
|
*/
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
export type AccountParams = Pick<Account, "profile" | "region">;
|
|
42
|
+
/**
|
|
43
|
+
* Shared combinator: acquire credentials → build Layer → provide → retry → timeout.
|
|
44
|
+
* Eliminates boilerplate repeated across all AwsClient method files.
|
|
45
|
+
*/
|
|
46
|
+
export declare const withAwsContext: <A, E>(operation: string, account: AccountParams, effect: Effect.Effect<A, E, HttpClient.HttpClient | Region.Region | Credentials.Credentials>, options?: {
|
|
47
|
+
readonly timeout?: "stream";
|
|
48
|
+
}) => Effect.Effect<A, AwsCredentialError | AwsApiError | Exclude<E, {
|
|
49
|
+
_tag: "TimeoutException";
|
|
50
|
+
}>, AwsClientConfig | HttpClient.HttpClient>;
|
|
42
51
|
export interface CreatePullRequestParams {
|
|
43
52
|
readonly account: AccountParams;
|
|
44
53
|
readonly repositoryName: string;
|
|
@@ -71,14 +80,41 @@ export interface GetPullRequestParams {
|
|
|
71
80
|
readonly account: AccountParams;
|
|
72
81
|
readonly pullRequestId: string;
|
|
73
82
|
}
|
|
74
|
-
|
|
83
|
+
declare const PullRequestDetail_base: Schema.Class<PullRequestDetail, {
|
|
84
|
+
title: typeof Schema.String;
|
|
85
|
+
description: Schema.optional<typeof Schema.String>;
|
|
86
|
+
author: typeof Schema.String;
|
|
87
|
+
status: typeof Schema.String;
|
|
88
|
+
repositoryName: typeof Schema.String;
|
|
89
|
+
sourceBranch: typeof Schema.String;
|
|
90
|
+
destinationBranch: typeof Schema.String;
|
|
91
|
+
creationDate: typeof Schema.DateFromSelf;
|
|
92
|
+
}, Schema.Struct.Encoded<{
|
|
93
|
+
title: typeof Schema.String;
|
|
94
|
+
description: Schema.optional<typeof Schema.String>;
|
|
95
|
+
author: typeof Schema.String;
|
|
96
|
+
status: typeof Schema.String;
|
|
97
|
+
repositoryName: typeof Schema.String;
|
|
98
|
+
sourceBranch: typeof Schema.String;
|
|
99
|
+
destinationBranch: typeof Schema.String;
|
|
100
|
+
creationDate: typeof Schema.DateFromSelf;
|
|
101
|
+
}>, never, {
|
|
75
102
|
readonly title: string;
|
|
76
|
-
|
|
103
|
+
} & {
|
|
77
104
|
readonly author: string;
|
|
78
|
-
|
|
105
|
+
} & {
|
|
79
106
|
readonly repositoryName: string;
|
|
107
|
+
} & {
|
|
108
|
+
readonly creationDate: Date;
|
|
109
|
+
} & {
|
|
110
|
+
readonly status: string;
|
|
111
|
+
} & {
|
|
80
112
|
readonly sourceBranch: string;
|
|
113
|
+
} & {
|
|
81
114
|
readonly destinationBranch: string;
|
|
82
|
-
|
|
115
|
+
} & {
|
|
116
|
+
readonly description?: string | undefined;
|
|
117
|
+
}, {}, {}>;
|
|
118
|
+
export declare class PullRequestDetail extends PullRequestDetail_base {
|
|
83
119
|
}
|
|
84
120
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/AwsClient/internal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/AwsClient/internal.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM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,qBAAa,iBAAkB,SAAQ,sBASrC;CAAG"}
|
|
@@ -4,22 +4,29 @@
|
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
6
|
import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { HttpClient } from "@effect/platform";
|
|
8
|
+
import { Credentials, Region } from "distilled-aws";
|
|
9
|
+
import { Effect, Layer, Schedule, Schema } from "effect";
|
|
9
10
|
import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
10
11
|
import { AwsApiError, AwsCredentialError } from "../Errors.js";
|
|
11
12
|
export { AwsApiError, AwsCredentialError } from "../Errors.js";
|
|
12
13
|
/**
|
|
13
14
|
* Check if an error is an AWS throttling exception.
|
|
15
|
+
* Inspects structured error properties instead of pretty-printing.
|
|
14
16
|
*/
|
|
15
17
|
export const isThrottlingError = (error) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
||
|
|
18
|
+
if (typeof error !== "object" || error === null)
|
|
19
|
+
return false;
|
|
20
|
+
const name = "name" in error ? String(error.name) : "";
|
|
21
|
+
const code = "code" in error ? String(error.code).toLowerCase() : "";
|
|
22
|
+
const message = "message" in error ? String(error.message).toLowerCase() : "";
|
|
23
|
+
return name === "ThrottlingException"
|
|
24
|
+
|| name === "TooManyRequestsException"
|
|
25
|
+
|| code === "throttling"
|
|
26
|
+
|| code === "requestlimitexceeded"
|
|
27
|
+
|| code === "slowdown"
|
|
28
|
+
|| message.includes("rate exceed")
|
|
29
|
+
|| message.includes("too many requests");
|
|
23
30
|
};
|
|
24
31
|
const makeThrottleSchedule = (config) => Schedule.intersect(Schedule.exponential(config.retryBaseDelay, 2).pipe(Schedule.jittered), Schedule.recurs(config.maxRetries)).pipe(Schedule.upTo(config.maxRetryDelay));
|
|
25
32
|
/**
|
|
@@ -49,4 +56,26 @@ export const acquireCredentials = (profile, region) => Effect.flatMap(AwsClientC
|
|
|
49
56
|
* Create a typed AwsApiError for a specific operation.
|
|
50
57
|
*/
|
|
51
58
|
export const makeApiError = (operation, profile, region, cause) => new AwsApiError({ operation, profile, region, cause });
|
|
59
|
+
/**
|
|
60
|
+
* Shared combinator: acquire credentials → build Layer → provide → retry → timeout.
|
|
61
|
+
* Eliminates boilerplate repeated across all AwsClient method files.
|
|
62
|
+
*/
|
|
63
|
+
export const withAwsContext = (operation, account, effect, options) => Effect.gen(function* () {
|
|
64
|
+
const config = yield* AwsClientConfig;
|
|
65
|
+
const httpClient = yield* HttpClient.HttpClient;
|
|
66
|
+
const credentials = yield* acquireCredentials(account.profile, account.region);
|
|
67
|
+
const timeout = options?.timeout === "stream" ? config.streamTimeout : config.operationTimeout;
|
|
68
|
+
return yield* Effect.provide(effect, Layer.mergeAll(Layer.succeed(HttpClient.HttpClient, httpClient), Layer.succeed(Region.Region, account.region), Layer.succeed(Credentials.Credentials, credentials))).pipe(throttleRetry, Effect.timeout(timeout), Effect.catchTag("TimeoutException", (cause) => Effect.fail(makeApiError(operation, account.profile, account.region, cause))));
|
|
69
|
+
});
|
|
70
|
+
export class PullRequestDetail extends Schema.Class("PullRequestDetail")({
|
|
71
|
+
title: Schema.String,
|
|
72
|
+
description: Schema.optional(Schema.String),
|
|
73
|
+
author: Schema.String,
|
|
74
|
+
status: Schema.String,
|
|
75
|
+
repositoryName: Schema.String,
|
|
76
|
+
sourceBranch: Schema.String,
|
|
77
|
+
destinationBranch: Schema.String,
|
|
78
|
+
creationDate: Schema.DateFromSelf
|
|
79
|
+
}) {
|
|
80
|
+
}
|
|
52
81
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/AwsClient/internal.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MA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AY,EAAE,MAAM,CAAC,YAAY;CAClC,CAAC;CAAG"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
1
|
import { Effect } from "effect";
|
|
6
|
-
import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
7
2
|
import { type ListBranchesParams } from "./internal.js";
|
|
8
|
-
export declare const listBranches: (params: ListBranchesParams) => Effect.Effect<string[], import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, AwsClientConfig | HttpClient.HttpClient>;
|
|
3
|
+
export declare const listBranches: (params: ListBranchesParams) => Effect.Effect<string[], import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, import("../AwsClientConfig.ts").AwsClientConfig | import("@effect/platform/HttpClient").HttpClient>;
|
|
9
4
|
//# sourceMappingURL=listBranches.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listBranches.d.ts","sourceRoot":"","sources":["../../src/AwsClient/listBranches.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listBranches.d.ts","sourceRoot":"","sources":["../../src/AwsClient/listBranches.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,KAAK,kBAAkB,EAAgC,MAAM,eAAe,CAAA;AAqBrF,eAAO,MAAM,YAAY,GAAI,QAAQ,kBAAkB,kNAQL,CAAA"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
|
-
import { Credentials, Region } from "distilled-aws";
|
|
6
4
|
import * as codecommit from "distilled-aws/codecommit";
|
|
7
|
-
import { Effect,
|
|
8
|
-
import {
|
|
9
|
-
import { acquireCredentials, makeApiError, throttleRetry } from "./internal.js";
|
|
5
|
+
import { Effect, Option, Stream } from "effect";
|
|
6
|
+
import { makeApiError, withAwsContext } from "./internal.js";
|
|
10
7
|
const fetchBranchPages = (repositoryName) => Stream.paginateEffect(undefined, (nextToken) => codecommit.listBranches({
|
|
11
8
|
repositoryName,
|
|
12
9
|
...(nextToken && { nextToken })
|
|
@@ -14,10 +11,5 @@ const fetchBranchPages = (repositoryName) => Stream.paginateEffect(undefined, (n
|
|
|
14
11
|
resp.branches ?? [],
|
|
15
12
|
resp.nextToken ? Option.some(resp.nextToken) : Option.none()
|
|
16
13
|
]))).pipe(Stream.flatMap(Stream.fromIterable));
|
|
17
|
-
export const listBranches = (params) => Effect.
|
|
18
|
-
const config = yield* AwsClientConfig;
|
|
19
|
-
const httpClient = yield* HttpClient.HttpClient;
|
|
20
|
-
const credentials = yield* acquireCredentials(params.account.profile, params.account.region);
|
|
21
|
-
return yield* Effect.provide(fetchBranchPages(params.repositoryName).pipe(Stream.mapError((cause) => makeApiError("listBranches", params.account.profile, params.account.region, cause)), Stream.runCollect), Layer.mergeAll(Layer.succeed(HttpClient.HttpClient, httpClient), Layer.succeed(Region.Region, params.account.region), Layer.succeed(Credentials.Credentials, credentials))).pipe(throttleRetry, Effect.map((chunk) => Array.from(chunk)), Effect.timeout(config.operationTimeout), Effect.catchTag("TimeoutException", (cause) => Effect.fail(makeApiError("listBranches", params.account.profile, params.account.region, cause))));
|
|
22
|
-
});
|
|
14
|
+
export const listBranches = (params) => withAwsContext("listBranches", params.account, fetchBranchPages(params.repositoryName).pipe(Stream.mapError((cause) => makeApiError("listBranches", params.account.profile, params.account.region, cause)), Stream.runCollect)).pipe(Effect.map((chunk) => Array.from(chunk)));
|
|
23
15
|
//# sourceMappingURL=listBranches.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listBranches.js","sourceRoot":"","sources":["../../src/AwsClient/listBranches.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"listBranches.js","sourceRoot":"","s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AE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
1
|
import { Effect } from "effect";
|
|
6
|
-
import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
7
2
|
import { type UpdatePullRequestDescriptionParams } from "./internal.js";
|
|
8
|
-
export declare const updatePullRequestDescription: (params: UpdatePullRequestDescriptionParams) => Effect.Effect<void, import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, AwsClientConfig | HttpClient.HttpClient>;
|
|
3
|
+
export declare const updatePullRequestDescription: (params: UpdatePullRequestDescriptionParams) => Effect.Effect<void, import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, import("../AwsClientConfig.ts").AwsClientConfig | import("@effect/platform/HttpClient").HttpClient>;
|
|
9
4
|
//# sourceMappingURL=updatePullRequestDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePullRequestDescription.d.ts","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestDescription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updatePullRequestDescription.d.ts","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestDescription.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAgB,KAAK,kCAAkC,EAAkB,MAAM,eAAe,CAAA;AAarG,eAAO,MAAM,4BAA4B,GACvC,QAAQ,kCAAkC,8MACsD,CAAA"}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
|
-
import { Credentials, Region } from "distilled-aws";
|
|
6
4
|
import * as codecommit from "distilled-aws/codecommit";
|
|
7
|
-
import { Effect
|
|
8
|
-
import {
|
|
9
|
-
import { acquireCredentials, makeApiError, throttleRetry } from "./internal.js";
|
|
5
|
+
import { Effect } from "effect";
|
|
6
|
+
import { makeApiError, withAwsContext } from "./internal.js";
|
|
10
7
|
const callUpdateDescription = (params) => codecommit.updatePullRequestDescription({
|
|
11
8
|
pullRequestId: params.pullRequestId,
|
|
12
9
|
description: params.description
|
|
13
10
|
}).pipe(Effect.asVoid, Effect.mapError((cause) => makeApiError("updatePullRequestDescription", params.account.profile, params.account.region, cause)));
|
|
14
|
-
export const updatePullRequestDescription = (params) =>
|
|
15
|
-
const config = yield* AwsClientConfig;
|
|
16
|
-
const httpClient = yield* HttpClient.HttpClient;
|
|
17
|
-
const credentials = yield* acquireCredentials(params.account.profile, params.account.region);
|
|
18
|
-
return yield* Effect.provide(callUpdateDescription(params), Layer.mergeAll(Layer.succeed(HttpClient.HttpClient, httpClient), Layer.succeed(Region.Region, params.account.region), Layer.succeed(Credentials.Credentials, credentials))).pipe(throttleRetry, Effect.timeout(config.operationTimeout), Effect.catchTag("TimeoutException", (cause) => Effect.fail(makeApiError("updatePullRequestDescription", params.account.profile, params.account.region, cause))));
|
|
19
|
-
});
|
|
11
|
+
export const updatePullRequestDescription = (params) => withAwsContext("updatePullRequestDescription", params.account, callUpdateDescription(params));
|
|
20
12
|
//# sourceMappingURL=updatePullRequestDescription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePullRequestDescription.js","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestDescription.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"updatePullRequestDescription.js","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestDescription.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,YAAY,EAA2C,cAAc,EAAE,MAAM,eAAe,CAAA;AAErG,MAAM,qBAAqB,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC3E,UAAU,CAAC,4BAA4B,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,aAAa;IACnC,WAAW,EAAE,MAAM,CAAC,WAAW;CAChC,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,YAAY,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CACnG,CACF,CAAA;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,MAA0C,EAC1C,EAAE,CAAC,cAAc,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
1
|
import { Effect } from "effect";
|
|
6
|
-
import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
7
2
|
import { type UpdatePullRequestTitleParams } from "./internal.js";
|
|
8
|
-
export declare const updatePullRequestTitle: (params: UpdatePullRequestTitleParams) => Effect.Effect<void, import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, AwsClientConfig | HttpClient.HttpClient>;
|
|
3
|
+
export declare const updatePullRequestTitle: (params: UpdatePullRequestTitleParams) => Effect.Effect<void, import("./internal.js").AwsCredentialError | import("./internal.js").AwsApiError, import("../AwsClientConfig.ts").AwsClientConfig | import("@effect/platform/HttpClient").HttpClient>;
|
|
9
4
|
//# sourceMappingURL=updatePullRequestTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePullRequestTitle.d.ts","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestTitle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updatePullRequestTitle.d.ts","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestTitle.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAgB,KAAK,4BAA4B,EAAkB,MAAM,eAAe,CAAA;AAa/F,eAAO,MAAM,sBAAsB,GAAI,QAAQ,4BAA4B,8MACQ,CAAA"}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { HttpClient } from "@effect/platform";
|
|
5
|
-
import { Credentials, Region } from "distilled-aws";
|
|
6
4
|
import * as codecommit from "distilled-aws/codecommit";
|
|
7
|
-
import { Effect
|
|
8
|
-
import {
|
|
9
|
-
import { acquireCredentials, makeApiError, throttleRetry } from "./internal.js";
|
|
5
|
+
import { Effect } from "effect";
|
|
6
|
+
import { makeApiError, withAwsContext } from "./internal.js";
|
|
10
7
|
const callUpdateTitle = (params) => codecommit.updatePullRequestTitle({
|
|
11
8
|
pullRequestId: params.pullRequestId,
|
|
12
9
|
title: params.title
|
|
13
10
|
}).pipe(Effect.asVoid, Effect.mapError((cause) => makeApiError("updatePullRequestTitle", params.account.profile, params.account.region, cause)));
|
|
14
|
-
export const updatePullRequestTitle = (params) =>
|
|
15
|
-
const config = yield* AwsClientConfig;
|
|
16
|
-
const httpClient = yield* HttpClient.HttpClient;
|
|
17
|
-
const credentials = yield* acquireCredentials(params.account.profile, params.account.region);
|
|
18
|
-
return yield* Effect.provide(callUpdateTitle(params), Layer.mergeAll(Layer.succeed(HttpClient.HttpClient, httpClient), Layer.succeed(Region.Region, params.account.region), Layer.succeed(Credentials.Credentials, credentials))).pipe(throttleRetry, Effect.timeout(config.operationTimeout), Effect.catchTag("TimeoutException", (cause) => Effect.fail(makeApiError("updatePullRequestTitle", params.account.profile, params.account.region, cause))));
|
|
19
|
-
});
|
|
11
|
+
export const updatePullRequestTitle = (params) => withAwsContext("updatePullRequestTitle", params.account, callUpdateTitle(params));
|
|
20
12
|
//# sourceMappingURL=updatePullRequestTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePullRequestTitle.js","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestTitle.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"updatePullRequestTitle.js","sourceRoot":"","sources":["../../src/AwsClient/updatePullRequestTitle.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAqC,cAAc,EAAE,MAAM,eAAe,CAAA;AAE/F,MAAM,eAAe,GAAG,CAAC,MAAoC,EAAE,EAAE,CAC/D,UAAU,CAAC,sBAAsB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,aAAa;IACnC,KAAK,EAAE,MAAM,CAAC,KAAK;CACpB,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,YAAY,CAAC,wBAAwB,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAC7F,CACF,CAAA;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAoC,EAAE,EAAE,CAC7E,cAAc,CAAC,wBAAwB,EAAE,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed error for all cache/SQL operations.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
declare const CacheError_base: Schema.TaggedErrorClass<CacheError, "CacheError", {
|
|
8
|
+
readonly _tag: Schema.tag<"CacheError">;
|
|
9
|
+
} & {
|
|
10
|
+
operation: typeof Schema.String;
|
|
11
|
+
cause: typeof Schema.Defect;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Cache layer operation failure (SQL, parse, or connection error).
|
|
15
|
+
*
|
|
16
|
+
* @category Errors
|
|
17
|
+
*/
|
|
18
|
+
export declare class CacheError extends CacheError_base {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=CacheError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CacheError.d.ts","sourceRoot":"","sources":["../../src/CacheService/CacheError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;;;;AAE/B;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,eAM/B;CAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed error for all cache/SQL operations.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
/**
|
|
8
|
+
* Cache layer operation failure (SQL, parse, or connection error).
|
|
9
|
+
*
|
|
10
|
+
* @category Errors
|
|
11
|
+
*/
|
|
12
|
+
export class CacheError extends Schema.TaggedError()("CacheError", {
|
|
13
|
+
operation: Schema.String,
|
|
14
|
+
cause: Schema.Defect
|
|
15
|
+
}) {
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=CacheError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CacheError.js","sourceRoot":"","sources":["../../src/CacheService/CacheError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B;;;;GAIG;AACH,MAAM,OAAO,UAAW,SAAQ,MAAM,CAAC,WAAW,EAAc,CAC9D,YAAY,EACZ;IACE,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CACF;CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database layer for local SQLite cache via libsql/Turso.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { FileSystem } from "@effect/platform";
|
|
7
|
+
import * as LibsqlClient from "@effect/sql-libsql/LibsqlClient";
|
|
8
|
+
import * as LibsqlMigrator from "@effect/sql-libsql/LibsqlMigrator";
|
|
9
|
+
import { Layer } from "effect";
|
|
10
|
+
export declare const LibsqlLive: Layer.Layer<import("@effect/sql/SqlClient").SqlClient | LibsqlClient.LibsqlClient, import("effect/ConfigError").ConfigError, FileSystem.FileSystem>;
|
|
11
|
+
export declare const MigrationsLive: Layer.Layer<never, import("@effect/sql/SqlError").SqlError | LibsqlMigrator.MigrationError, import("@effect/sql/SqlClient").SqlClient>;
|
|
12
|
+
export declare const DatabaseLive: Layer.Layer<import("@effect/sql/SqlClient").SqlClient | LibsqlClient.LibsqlClient, import("@effect/sql/SqlError").SqlError | import("effect/ConfigError").ConfigError | LibsqlMigrator.MigrationError, FileSystem.FileSystem>;
|
|
13
|
+
//# sourceMappingURL=Database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Database.d.ts","sourceRoot":"","sources":["../../src/CacheService/Database.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAkB,KAAK,EAAE,MAAM,QAAQ,CAAA;AAsB9C,eAAO,MAAM,UAAU,qJAMW,CAAA;AAElC,eAAO,MAAM,cAAc,wIAOzB,CAAA;AAEF,eAAO,MAAM,YAAY,+NAAsD,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database layer for local SQLite cache via libsql/Turso.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { FileSystem } from "@effect/platform";
|
|
7
|
+
import * as LibsqlClient from "@effect/sql-libsql/LibsqlClient";
|
|
8
|
+
import * as LibsqlMigrator from "@effect/sql-libsql/LibsqlMigrator";
|
|
9
|
+
import { Config, Effect, Layer } from "effect";
|
|
10
|
+
import migration0001 from "./migrations/0001_initial.js";
|
|
11
|
+
import migration0002 from "./migrations/0002_indexes.js";
|
|
12
|
+
import migration0003 from "./migrations/0003_add_health_score.js";
|
|
13
|
+
import migration0004 from "./migrations/0004_unify_notifications.js";
|
|
14
|
+
const homeDir = Config.string("HOME").pipe(Config.orElse(() => Config.string("USERPROFILE")));
|
|
15
|
+
const dbUrl = homeDir.pipe(Config.map((h) => `file:${h}/.codecommit/cache.db`));
|
|
16
|
+
const EnsureDbDir = Layer.effectDiscard(Effect.gen(function* () {
|
|
17
|
+
const fs = yield* FileSystem.FileSystem;
|
|
18
|
+
const h = yield* homeDir;
|
|
19
|
+
yield* fs.makeDirectory(`${h}/.codecommit`, { recursive: true }).pipe(Effect.catchAll(() => Effect.void));
|
|
20
|
+
}));
|
|
21
|
+
export const LibsqlLive = Layer.unwrapEffect(Effect.map(dbUrl, (url) => LibsqlClient.layer({
|
|
22
|
+
url,
|
|
23
|
+
transformResultNames: (s) => s.replace(/_([a-z])/g, (_, c) => c.toUpperCase())
|
|
24
|
+
}))).pipe(Layer.provide(EnsureDbDir));
|
|
25
|
+
export const MigrationsLive = LibsqlMigrator.layer({
|
|
26
|
+
loader: LibsqlMigrator.fromRecord({
|
|
27
|
+
"0001_initial": migration0001,
|
|
28
|
+
"0002_indexes": migration0002,
|
|
29
|
+
"0003_add_health_score": migration0003,
|
|
30
|
+
"0004_unify_notifications": migration0004
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
export const DatabaseLive = MigrationsLive.pipe(Layer.provideMerge(LibsqlLive));
|
|
34
|
+
//# sourceMappingURL=Database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../src/CacheService/Database.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,aAAa,MAAM,uCAAuC,CAAA;AACjE,OAAO,aAAa,MAAM,0CAA0C,CAAA;AAEpE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACxC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAClD,CAAA;AAED,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,CAAA;AAE/E,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CACrC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAA;IACvC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IACxB,KAAK,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CACnE,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACnC,CAAA;AACH,CAAC,CAAC,CACH,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAC1C,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CACxB,YAAY,CAAC,KAAK,CAAC;IACjB,GAAG;IACH,oBAAoB,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;CAC/F,CAAC,CAAC,CACN,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAA;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC;IACjD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC;QAChC,cAAc,EAAE,aAAa;QAC7B,cAAc,EAAE,aAAa;QAC7B,uBAAuB,EAAE,aAAa;QACtC,0BAA0B,EAAE,aAAa;KAC1C,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Data, Effect, Stream } from "effect";
|
|
2
|
+
export type RepoChange = Data.TaggedEnum<{
|
|
3
|
+
PullRequests: {};
|
|
4
|
+
Notifications: {};
|
|
5
|
+
Subscriptions: {};
|
|
6
|
+
Comments: {};
|
|
7
|
+
Config: {};
|
|
8
|
+
AppState: {};
|
|
9
|
+
SystemNotifications: {};
|
|
10
|
+
}>;
|
|
11
|
+
export declare const RepoChange: {
|
|
12
|
+
readonly Comments: Data.Case.Constructor<{
|
|
13
|
+
readonly _tag: "Comments";
|
|
14
|
+
}, "_tag">;
|
|
15
|
+
readonly PullRequests: Data.Case.Constructor<{
|
|
16
|
+
readonly _tag: "PullRequests";
|
|
17
|
+
}, "_tag">;
|
|
18
|
+
readonly Notifications: Data.Case.Constructor<{
|
|
19
|
+
readonly _tag: "Notifications";
|
|
20
|
+
}, "_tag">;
|
|
21
|
+
readonly Subscriptions: Data.Case.Constructor<{
|
|
22
|
+
readonly _tag: "Subscriptions";
|
|
23
|
+
}, "_tag">;
|
|
24
|
+
readonly Config: Data.Case.Constructor<{
|
|
25
|
+
readonly _tag: "Config";
|
|
26
|
+
}, "_tag">;
|
|
27
|
+
readonly AppState: Data.Case.Constructor<{
|
|
28
|
+
readonly _tag: "AppState";
|
|
29
|
+
}, "_tag">;
|
|
30
|
+
readonly SystemNotifications: Data.Case.Constructor<{
|
|
31
|
+
readonly _tag: "SystemNotifications";
|
|
32
|
+
}, "_tag">;
|
|
33
|
+
readonly $is: <Tag extends "Comments" | "PullRequests" | "Notifications" | "Subscriptions" | "Config" | "AppState" | "SystemNotifications">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
34
|
+
readonly _tag: "Comments";
|
|
35
|
+
}, {
|
|
36
|
+
readonly _tag: Tag;
|
|
37
|
+
}> | Extract<{
|
|
38
|
+
readonly _tag: "PullRequests";
|
|
39
|
+
}, {
|
|
40
|
+
readonly _tag: Tag;
|
|
41
|
+
}> | Extract<{
|
|
42
|
+
readonly _tag: "Notifications";
|
|
43
|
+
}, {
|
|
44
|
+
readonly _tag: Tag;
|
|
45
|
+
}> | Extract<{
|
|
46
|
+
readonly _tag: "Subscriptions";
|
|
47
|
+
}, {
|
|
48
|
+
readonly _tag: Tag;
|
|
49
|
+
}> | Extract<{
|
|
50
|
+
readonly _tag: "Config";
|
|
51
|
+
}, {
|
|
52
|
+
readonly _tag: Tag;
|
|
53
|
+
}> | Extract<{
|
|
54
|
+
readonly _tag: "AppState";
|
|
55
|
+
}, {
|
|
56
|
+
readonly _tag: Tag;
|
|
57
|
+
}> | Extract<{
|
|
58
|
+
readonly _tag: "SystemNotifications";
|
|
59
|
+
}, {
|
|
60
|
+
readonly _tag: Tag;
|
|
61
|
+
}>;
|
|
62
|
+
readonly $match: {
|
|
63
|
+
<const Cases extends {
|
|
64
|
+
readonly Comments: (args: {
|
|
65
|
+
readonly _tag: "Comments";
|
|
66
|
+
}) => any;
|
|
67
|
+
readonly PullRequests: (args: {
|
|
68
|
+
readonly _tag: "PullRequests";
|
|
69
|
+
}) => any;
|
|
70
|
+
readonly Notifications: (args: {
|
|
71
|
+
readonly _tag: "Notifications";
|
|
72
|
+
}) => any;
|
|
73
|
+
readonly Subscriptions: (args: {
|
|
74
|
+
readonly _tag: "Subscriptions";
|
|
75
|
+
}) => any;
|
|
76
|
+
readonly Config: (args: {
|
|
77
|
+
readonly _tag: "Config";
|
|
78
|
+
}) => any;
|
|
79
|
+
readonly AppState: (args: {
|
|
80
|
+
readonly _tag: "AppState";
|
|
81
|
+
}) => any;
|
|
82
|
+
readonly SystemNotifications: (args: {
|
|
83
|
+
readonly _tag: "SystemNotifications";
|
|
84
|
+
}) => any;
|
|
85
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Comments" | "PullRequests" | "Notifications" | "Subscriptions" | "Config" | "AppState" | "SystemNotifications">]: never; }): (value: {
|
|
86
|
+
readonly _tag: "Comments";
|
|
87
|
+
} | {
|
|
88
|
+
readonly _tag: "PullRequests";
|
|
89
|
+
} | {
|
|
90
|
+
readonly _tag: "Notifications";
|
|
91
|
+
} | {
|
|
92
|
+
readonly _tag: "Subscriptions";
|
|
93
|
+
} | {
|
|
94
|
+
readonly _tag: "Config";
|
|
95
|
+
} | {
|
|
96
|
+
readonly _tag: "AppState";
|
|
97
|
+
} | {
|
|
98
|
+
readonly _tag: "SystemNotifications";
|
|
99
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Comments" | "PullRequests" | "Notifications" | "Subscriptions" | "Config" | "AppState" | "SystemNotifications"]>>;
|
|
100
|
+
<const Cases extends {
|
|
101
|
+
readonly Comments: (args: {
|
|
102
|
+
readonly _tag: "Comments";
|
|
103
|
+
}) => any;
|
|
104
|
+
readonly PullRequests: (args: {
|
|
105
|
+
readonly _tag: "PullRequests";
|
|
106
|
+
}) => any;
|
|
107
|
+
readonly Notifications: (args: {
|
|
108
|
+
readonly _tag: "Notifications";
|
|
109
|
+
}) => any;
|
|
110
|
+
readonly Subscriptions: (args: {
|
|
111
|
+
readonly _tag: "Subscriptions";
|
|
112
|
+
}) => any;
|
|
113
|
+
readonly Config: (args: {
|
|
114
|
+
readonly _tag: "Config";
|
|
115
|
+
}) => any;
|
|
116
|
+
readonly AppState: (args: {
|
|
117
|
+
readonly _tag: "AppState";
|
|
118
|
+
}) => any;
|
|
119
|
+
readonly SystemNotifications: (args: {
|
|
120
|
+
readonly _tag: "SystemNotifications";
|
|
121
|
+
}) => any;
|
|
122
|
+
}>(value: {
|
|
123
|
+
readonly _tag: "Comments";
|
|
124
|
+
} | {
|
|
125
|
+
readonly _tag: "PullRequests";
|
|
126
|
+
} | {
|
|
127
|
+
readonly _tag: "Notifications";
|
|
128
|
+
} | {
|
|
129
|
+
readonly _tag: "Subscriptions";
|
|
130
|
+
} | {
|
|
131
|
+
readonly _tag: "Config";
|
|
132
|
+
} | {
|
|
133
|
+
readonly _tag: "AppState";
|
|
134
|
+
} | {
|
|
135
|
+
readonly _tag: "SystemNotifications";
|
|
136
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Comments" | "PullRequests" | "Notifications" | "Subscriptions" | "Config" | "AppState" | "SystemNotifications">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Comments" | "PullRequests" | "Notifications" | "Subscriptions" | "Config" | "AppState" | "SystemNotifications"]>>;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
declare const EventsHub_base: Effect.Service.Class<EventsHub, "EventsHub", {
|
|
140
|
+
readonly effect: Effect.Effect<{
|
|
141
|
+
publish: (change: RepoChange) => Effect.Effect<void>;
|
|
142
|
+
batch: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
143
|
+
subscribe: Stream.Stream<{
|
|
144
|
+
readonly _tag: "Comments";
|
|
145
|
+
} | {
|
|
146
|
+
readonly _tag: "PullRequests";
|
|
147
|
+
} | {
|
|
148
|
+
readonly _tag: "Notifications";
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "Subscriptions";
|
|
151
|
+
} | {
|
|
152
|
+
readonly _tag: "Config";
|
|
153
|
+
} | {
|
|
154
|
+
readonly _tag: "AppState";
|
|
155
|
+
} | {
|
|
156
|
+
readonly _tag: "SystemNotifications";
|
|
157
|
+
}, never, never>;
|
|
158
|
+
}, never, never>;
|
|
159
|
+
}>;
|
|
160
|
+
export declare class EventsHub extends EventsHub_base {
|
|
161
|
+
}
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=EventsHub.d.ts.map
|