@shivaedev/github 0.9.0 → 0.10.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/CHANGELOG.md +18 -0
- package/README.md +95 -5
- package/dist/GitHub.d.ts +262 -3
- package/dist/GitHub.d.ts.map +1 -1
- package/dist/GitHub.js +15 -5
- package/dist/GitHub.js.map +1 -1
- package/dist/adapters/resolveApiUrl.d.ts +2 -0
- package/dist/adapters/resolveApiUrl.d.ts.map +1 -0
- package/dist/adapters/resolveApiUrl.js +6 -0
- package/dist/adapters/resolveApiUrl.js.map +1 -0
- package/dist/adapters/zipEntries.d.ts +17 -0
- package/dist/adapters/zipEntries.d.ts.map +1 -0
- package/dist/adapters/zipEntries.js +57 -0
- package/dist/adapters/zipEntries.js.map +1 -0
- package/dist/appTokens.d.ts.map +1 -1
- package/dist/appTokens.js +2 -1
- package/dist/appTokens.js.map +1 -1
- package/dist/artifactErrors.d.ts +34 -0
- package/dist/artifactErrors.d.ts.map +1 -0
- package/dist/artifactErrors.js +27 -0
- package/dist/artifactErrors.js.map +1 -0
- package/dist/artifactExtraction.d.ts +12 -0
- package/dist/artifactExtraction.d.ts.map +1 -0
- package/dist/artifactExtraction.js +40 -0
- package/dist/artifactExtraction.js.map +1 -0
- package/dist/artifactPaths.d.ts +4 -0
- package/dist/artifactPaths.d.ts.map +1 -0
- package/dist/artifactPaths.js +35 -0
- package/dist/artifactPaths.js.map +1 -0
- package/dist/artifacts.d.ts +13 -8
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +15 -8
- package/dist/artifacts.js.map +1 -1
- package/dist/checkRuns.d.ts.map +1 -1
- package/dist/checkRuns.js +5 -3
- package/dist/checkRuns.js.map +1 -1
- package/dist/gitSchemas.d.ts +195 -0
- package/dist/gitSchemas.d.ts.map +1 -0
- package/dist/gitSchemas.js +45 -0
- package/dist/gitSchemas.js.map +1 -0
- package/dist/installationClients.d.ts +278 -2
- package/dist/installationClients.d.ts.map +1 -1
- package/dist/installationClients.js +14 -5
- package/dist/installationClients.js.map +1 -1
- package/dist/pagedLists.d.ts +15 -0
- package/dist/pagedLists.d.ts.map +1 -0
- package/dist/pagedLists.js +16 -0
- package/dist/pagedLists.js.map +1 -0
- package/dist/repositoryReads.d.ts +261 -0
- package/dist/repositoryReads.d.ts.map +1 -0
- package/dist/repositoryReads.js +30 -0
- package/dist/repositoryReads.js.map +1 -0
- package/dist/repositorySchemas.d.ts +73 -0
- package/dist/repositorySchemas.d.ts.map +1 -0
- package/dist/repositorySchemas.js +38 -0
- package/dist/repositorySchemas.js.map +1 -0
- package/dist/representations.d.ts.map +1 -1
- package/dist/representations.js +3 -2
- package/dist/representations.js.map +1 -1
- package/dist/viewerRepositoryAccess.d.ts +46 -0
- package/dist/viewerRepositoryAccess.d.ts.map +1 -0
- package/dist/viewerRepositoryAccess.js +54 -0
- package/dist/viewerRepositoryAccess.js.map +1 -0
- package/package.json +11 -4
- package/src/GitHub.ts +17 -10
- package/src/adapters/resolveApiUrl.ts +5 -0
- package/src/adapters/zipEntries.ts +69 -0
- package/src/appTokens.ts +2 -1
- package/src/artifactErrors.ts +26 -0
- package/src/artifactExtraction.ts +62 -0
- package/src/artifactPaths.ts +36 -0
- package/src/artifacts.ts +36 -39
- package/src/checkRuns.ts +5 -5
- package/src/gitSchemas.ts +52 -0
- package/src/installationClients.ts +18 -12
- package/src/pagedLists.ts +40 -0
- package/src/repositoryReads.ts +61 -0
- package/src/repositorySchemas.ts +43 -0
- package/src/representations.ts +3 -2
- package/src/viewerRepositoryAccess.ts +66 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Effect, Option, Schema, Stream } from "effect";
|
|
2
|
+
export function decodedPages(client, path, schema, options = {}) {
|
|
3
|
+
const settings = typeof options === "number" ? { responseByteLimit: options } : options;
|
|
4
|
+
const decode = Schema.decodeUnknownEffect(schema);
|
|
5
|
+
return Stream.unwrap(client.list(path, settings.beforeRequest, settings.responseByteLimit)).pipe(Stream.mapEffect((page) => Effect.gen(function* () {
|
|
6
|
+
const body = yield* page.decode(Schema.Unknown);
|
|
7
|
+
const source = settings.arrayKey === undefined
|
|
8
|
+
? body
|
|
9
|
+
: (yield* Schema.decodeUnknownEffect(Schema.Record(Schema.String, Schema.Unknown))(body))[settings.arrayKey];
|
|
10
|
+
const values = yield* Schema.decodeUnknownEffect(Schema.Array(Schema.Unknown))(source);
|
|
11
|
+
const decoded = yield* Effect.forEach(values, (value) => decode(value).pipe(Effect.map(Option.some), Effect.catchTag("SchemaError", (error) => (settings.onDecodeError === "skip" ? Effect.succeed(Option.none()) : Effect.fail(error)))));
|
|
12
|
+
const items = decoded.flatMap(Option.toArray);
|
|
13
|
+
return { hasNext: page.hasNext, items, skipped: values.length - items.length };
|
|
14
|
+
})));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pagedLists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagedLists.js","sourceRoot":"","sources":["../src/pagedLists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAWxD,MAAM,UAAU,YAAY,CAC3B,MAAuB,EACvB,IAAY,EACZ,MAAe,EACf,OAAO,GAAyB,EAAE;IAElC,MAAM,QAAQ,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxF,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAC/F,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CACzB,MAAM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E,CAAC;IAChF,CAAC,CAAC,CACF,CACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { type ListOptions } from "#pagedLists.ts";
|
|
3
|
+
import type { Representations } from "#representations.ts";
|
|
4
|
+
export interface RepositoryListOptions extends ListOptions {
|
|
5
|
+
readonly query?: Readonly<Record<string, string | number | boolean | undefined>>;
|
|
6
|
+
}
|
|
7
|
+
export declare function repositoryReads(client: Representations): {
|
|
8
|
+
compareCommits: (owner: string, repo: string, base: string, head: string, byteLimit?: number) => Effect.Effect<{
|
|
9
|
+
readonly aheadBy: number;
|
|
10
|
+
readonly behindBy: number;
|
|
11
|
+
readonly commits: readonly {
|
|
12
|
+
readonly author: {
|
|
13
|
+
readonly avatarUrl: string;
|
|
14
|
+
readonly htmlUrl: string;
|
|
15
|
+
readonly id: number;
|
|
16
|
+
readonly login: string;
|
|
17
|
+
readonly type: string;
|
|
18
|
+
} | null;
|
|
19
|
+
readonly commit: {
|
|
20
|
+
readonly author: {
|
|
21
|
+
readonly date: string;
|
|
22
|
+
readonly email: string;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
} | null;
|
|
25
|
+
readonly committer: {
|
|
26
|
+
readonly date: string;
|
|
27
|
+
readonly email: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
} | null;
|
|
30
|
+
readonly message: string;
|
|
31
|
+
readonly tree: {
|
|
32
|
+
readonly sha: string;
|
|
33
|
+
readonly url: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly committer: {
|
|
37
|
+
readonly avatarUrl: string;
|
|
38
|
+
readonly htmlUrl: string;
|
|
39
|
+
readonly id: number;
|
|
40
|
+
readonly login: string;
|
|
41
|
+
readonly type: string;
|
|
42
|
+
} | null;
|
|
43
|
+
readonly htmlUrl: string;
|
|
44
|
+
readonly parents: readonly {
|
|
45
|
+
readonly sha: string;
|
|
46
|
+
readonly url: string;
|
|
47
|
+
}[];
|
|
48
|
+
readonly sha: string;
|
|
49
|
+
}[];
|
|
50
|
+
readonly files?: readonly {
|
|
51
|
+
readonly additions: number;
|
|
52
|
+
readonly changes: number;
|
|
53
|
+
readonly deletions: number;
|
|
54
|
+
readonly filename: string;
|
|
55
|
+
readonly patch?: string | undefined;
|
|
56
|
+
readonly previousFilename?: string | undefined;
|
|
57
|
+
readonly sha: string;
|
|
58
|
+
readonly status: string;
|
|
59
|
+
}[] | undefined;
|
|
60
|
+
readonly status: "ahead" | "behind" | "diverged" | "identical";
|
|
61
|
+
readonly totalCommits: number;
|
|
62
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
63
|
+
getCollaboratorPermission: (owner: string, repo: string, username: string, byteLimit?: number) => Effect.Effect<{
|
|
64
|
+
readonly permission: string;
|
|
65
|
+
readonly roleName: string;
|
|
66
|
+
readonly user: {
|
|
67
|
+
readonly avatarUrl: string;
|
|
68
|
+
readonly htmlUrl: string;
|
|
69
|
+
readonly id: number;
|
|
70
|
+
readonly login: string;
|
|
71
|
+
readonly type: string;
|
|
72
|
+
};
|
|
73
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
74
|
+
getCommit: (owner: string, repo: string, ref: string, byteLimit?: number) => Effect.Effect<{
|
|
75
|
+
readonly author: {
|
|
76
|
+
readonly avatarUrl: string;
|
|
77
|
+
readonly htmlUrl: string;
|
|
78
|
+
readonly id: number;
|
|
79
|
+
readonly login: string;
|
|
80
|
+
readonly type: string;
|
|
81
|
+
} | null;
|
|
82
|
+
readonly commit: {
|
|
83
|
+
readonly author: {
|
|
84
|
+
readonly date: string;
|
|
85
|
+
readonly email: string;
|
|
86
|
+
readonly name: string;
|
|
87
|
+
} | null;
|
|
88
|
+
readonly committer: {
|
|
89
|
+
readonly date: string;
|
|
90
|
+
readonly email: string;
|
|
91
|
+
readonly name: string;
|
|
92
|
+
} | null;
|
|
93
|
+
readonly message: string;
|
|
94
|
+
readonly tree: {
|
|
95
|
+
readonly sha: string;
|
|
96
|
+
readonly url: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly committer: {
|
|
100
|
+
readonly avatarUrl: string;
|
|
101
|
+
readonly htmlUrl: string;
|
|
102
|
+
readonly id: number;
|
|
103
|
+
readonly login: string;
|
|
104
|
+
readonly type: string;
|
|
105
|
+
} | null;
|
|
106
|
+
readonly htmlUrl: string;
|
|
107
|
+
readonly parents: readonly {
|
|
108
|
+
readonly sha: string;
|
|
109
|
+
readonly url: string;
|
|
110
|
+
}[];
|
|
111
|
+
readonly sha: string;
|
|
112
|
+
readonly files?: readonly {
|
|
113
|
+
readonly additions: number;
|
|
114
|
+
readonly changes: number;
|
|
115
|
+
readonly deletions: number;
|
|
116
|
+
readonly filename: string;
|
|
117
|
+
readonly patch?: string | undefined;
|
|
118
|
+
readonly previousFilename?: string | undefined;
|
|
119
|
+
readonly sha: string;
|
|
120
|
+
readonly status: string;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
readonly stats: {
|
|
123
|
+
readonly additions: number;
|
|
124
|
+
readonly deletions: number;
|
|
125
|
+
readonly total: number;
|
|
126
|
+
};
|
|
127
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
128
|
+
getIssue: (owner: string, repo: string, number: number, byteLimit?: number) => Effect.Effect<{
|
|
129
|
+
readonly body: string | null;
|
|
130
|
+
readonly closedAt: string | null;
|
|
131
|
+
readonly createdAt: string;
|
|
132
|
+
readonly htmlUrl: string;
|
|
133
|
+
readonly id: number;
|
|
134
|
+
readonly labels: readonly (string | {
|
|
135
|
+
readonly name?: string | undefined;
|
|
136
|
+
})[];
|
|
137
|
+
readonly number: number;
|
|
138
|
+
readonly pullRequest?: {
|
|
139
|
+
readonly url: string;
|
|
140
|
+
} | undefined;
|
|
141
|
+
readonly state: "closed" | "open";
|
|
142
|
+
readonly title: string;
|
|
143
|
+
readonly updatedAt: string;
|
|
144
|
+
readonly user: {
|
|
145
|
+
readonly avatarUrl: string;
|
|
146
|
+
readonly htmlUrl: string;
|
|
147
|
+
readonly id: number;
|
|
148
|
+
readonly login: string;
|
|
149
|
+
readonly type: string;
|
|
150
|
+
} | null;
|
|
151
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
152
|
+
getTree: (owner: string, repo: string, sha: string, options?: {
|
|
153
|
+
readonly recursive?: boolean;
|
|
154
|
+
readonly responseByteLimit?: number | undefined;
|
|
155
|
+
}) => Effect.Effect<{
|
|
156
|
+
readonly sha: string;
|
|
157
|
+
readonly tree: readonly {
|
|
158
|
+
readonly mode: string;
|
|
159
|
+
readonly path: string;
|
|
160
|
+
readonly sha: string;
|
|
161
|
+
readonly size?: number | undefined;
|
|
162
|
+
readonly type: "blob" | "commit" | "tree";
|
|
163
|
+
readonly url?: string | undefined;
|
|
164
|
+
}[];
|
|
165
|
+
readonly truncated: boolean;
|
|
166
|
+
readonly url: string;
|
|
167
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
168
|
+
getUser: (username?: string, byteLimit?: number) => Effect.Effect<{
|
|
169
|
+
readonly avatarUrl: string;
|
|
170
|
+
readonly htmlUrl: string;
|
|
171
|
+
readonly id: number;
|
|
172
|
+
readonly login: string;
|
|
173
|
+
readonly type: string;
|
|
174
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
175
|
+
listCommits: (owner: string, repo: string, options?: RepositoryListOptions) => Effect.Effect<import("effect/Stream").Stream<{
|
|
176
|
+
hasNext: boolean;
|
|
177
|
+
items: {
|
|
178
|
+
readonly author: {
|
|
179
|
+
readonly avatarUrl: string;
|
|
180
|
+
readonly htmlUrl: string;
|
|
181
|
+
readonly id: number;
|
|
182
|
+
readonly login: string;
|
|
183
|
+
readonly type: string;
|
|
184
|
+
} | null;
|
|
185
|
+
readonly commit: {
|
|
186
|
+
readonly author: {
|
|
187
|
+
readonly date: string;
|
|
188
|
+
readonly email: string;
|
|
189
|
+
readonly name: string;
|
|
190
|
+
} | null;
|
|
191
|
+
readonly committer: {
|
|
192
|
+
readonly date: string;
|
|
193
|
+
readonly email: string;
|
|
194
|
+
readonly name: string;
|
|
195
|
+
} | null;
|
|
196
|
+
readonly message: string;
|
|
197
|
+
readonly tree: {
|
|
198
|
+
readonly sha: string;
|
|
199
|
+
readonly url: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
readonly committer: {
|
|
203
|
+
readonly avatarUrl: string;
|
|
204
|
+
readonly htmlUrl: string;
|
|
205
|
+
readonly id: number;
|
|
206
|
+
readonly login: string;
|
|
207
|
+
readonly type: string;
|
|
208
|
+
} | null;
|
|
209
|
+
readonly htmlUrl: string;
|
|
210
|
+
readonly parents: readonly {
|
|
211
|
+
readonly sha: string;
|
|
212
|
+
readonly url: string;
|
|
213
|
+
}[];
|
|
214
|
+
readonly sha: string;
|
|
215
|
+
}[];
|
|
216
|
+
skipped: number;
|
|
217
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
218
|
+
listIssues: (owner: string, repo: string, options?: RepositoryListOptions) => Effect.Effect<import("effect/Stream").Stream<{
|
|
219
|
+
hasNext: boolean;
|
|
220
|
+
items: {
|
|
221
|
+
readonly body: string | null;
|
|
222
|
+
readonly closedAt: string | null;
|
|
223
|
+
readonly createdAt: string;
|
|
224
|
+
readonly htmlUrl: string;
|
|
225
|
+
readonly id: number;
|
|
226
|
+
readonly labels: readonly (string | {
|
|
227
|
+
readonly name?: string | undefined;
|
|
228
|
+
})[];
|
|
229
|
+
readonly number: number;
|
|
230
|
+
readonly pullRequest?: {
|
|
231
|
+
readonly url: string;
|
|
232
|
+
} | undefined;
|
|
233
|
+
readonly state: "closed" | "open";
|
|
234
|
+
readonly title: string;
|
|
235
|
+
readonly updatedAt: string;
|
|
236
|
+
readonly user: {
|
|
237
|
+
readonly avatarUrl: string;
|
|
238
|
+
readonly htmlUrl: string;
|
|
239
|
+
readonly id: number;
|
|
240
|
+
readonly login: string;
|
|
241
|
+
readonly type: string;
|
|
242
|
+
} | null;
|
|
243
|
+
}[];
|
|
244
|
+
skipped: number;
|
|
245
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
246
|
+
listPullRequestFiles: (owner: string, repo: string, number: number, options?: RepositoryListOptions) => Effect.Effect<import("effect/Stream").Stream<{
|
|
247
|
+
hasNext: boolean;
|
|
248
|
+
items: {
|
|
249
|
+
readonly additions: number;
|
|
250
|
+
readonly changes: number;
|
|
251
|
+
readonly deletions: number;
|
|
252
|
+
readonly filename: string;
|
|
253
|
+
readonly patch?: string | undefined;
|
|
254
|
+
readonly previousFilename?: string | undefined;
|
|
255
|
+
readonly sha: string;
|
|
256
|
+
readonly status: string;
|
|
257
|
+
}[];
|
|
258
|
+
skipped: number;
|
|
259
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("effect/Schema").SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
260
|
+
};
|
|
261
|
+
//# sourceMappingURL=repositoryReads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositoryReads.d.ts","sourceRoot":"","sources":["../src/repositoryReads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;CACjF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe;IAcrD,cAAc,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM,QAAQ,MAAM,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI5F,yBAAyB,UAAU,MAAM,QAAQ,MAAM,YAAY,MAAM,cAAc,MAAM;;;;;;;;;;;IAI7F,SAAS,UAAU,MAAM,QAAQ,MAAM,OAAO,MAAM,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAExE,QAAQ,UAAU,MAAM,QAAQ,MAAM,UAAU,MAAM,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;IAE1E,OAAO,UACC,MAAM,QACP,MAAM,OACP,MAAM,YACD;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE;;;;;;;;;;;;;IAS5F,OAAO,cAAc,MAAM,cAAc,MAAM;;;;;;;IAI/C,WAAW,UAAU,MAAM,QAAQ,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE1E,UAAU,UAAU,MAAM,QAAQ,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEzE,oBAAoB,UAAU,MAAM,QAAQ,MAAM,UAAU,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;EAGpG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Commit, CommitDetail, Comparison, GitTree } from "#gitSchemas.ts";
|
|
3
|
+
import { decodedPages } from "#pagedLists.ts";
|
|
4
|
+
import { CollaboratorPermission, Issue, PullRequestFile, User } from "#repositorySchemas.ts";
|
|
5
|
+
export function repositoryReads(client) {
|
|
6
|
+
function repository(owner, repo) {
|
|
7
|
+
return `/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`;
|
|
8
|
+
}
|
|
9
|
+
function pathWithQuery(path, options) {
|
|
10
|
+
const query = new URLSearchParams({ "per_page": "100" });
|
|
11
|
+
for (const [key, value] of Object.entries(options?.query ?? {})) {
|
|
12
|
+
if (value !== undefined) {
|
|
13
|
+
query.set(key, String(value));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return `${path}?${query}`;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
compareCommits: (owner, repo, base, head, byteLimit) => Effect.flatMap(client.read(`${repository(owner, repo)}/compare/${encodeURIComponent(base)}...${encodeURIComponent(head)}`, byteLimit), (page) => page.decode(Comparison)),
|
|
20
|
+
getCollaboratorPermission: (owner, repo, username, byteLimit) => Effect.flatMap(client.read(`${repository(owner, repo)}/collaborators/${encodeURIComponent(username)}/permission`, byteLimit), (page) => page.decode(CollaboratorPermission)),
|
|
21
|
+
getCommit: (owner, repo, ref, byteLimit) => Effect.flatMap(client.read(`${repository(owner, repo)}/commits/${encodeURIComponent(ref)}`, byteLimit), (page) => page.decode(CommitDetail)),
|
|
22
|
+
getIssue: (owner, repo, number, byteLimit) => Effect.flatMap(client.read(`${repository(owner, repo)}/issues/${number}`, byteLimit), (page) => page.decode(Issue)),
|
|
23
|
+
getTree: (owner, repo, sha, options) => Effect.flatMap(client.read(`${repository(owner, repo)}/git/trees/${encodeURIComponent(sha)}${options?.recursive ? "?recursive=1" : ""}`, options?.responseByteLimit), (page) => page.decode(GitTree)),
|
|
24
|
+
getUser: (username, byteLimit) => Effect.flatMap(client.read(username === undefined ? "/user" : `/users/${encodeURIComponent(username)}`, byteLimit), (page) => page.decode(User)),
|
|
25
|
+
listCommits: (owner, repo, options) => Effect.succeed(decodedPages(client, pathWithQuery(`${repository(owner, repo)}/commits`, options), Commit, options)),
|
|
26
|
+
listIssues: (owner, repo, options) => Effect.succeed(decodedPages(client, pathWithQuery(`${repository(owner, repo)}/issues`, options), Issue, options)),
|
|
27
|
+
listPullRequestFiles: (owner, repo, number, options) => Effect.succeed(decodedPages(client, pathWithQuery(`${repository(owner, repo)}/pulls/${number}/files`, options), PullRequestFile, options)),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=repositoryReads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositoryReads.js","sourceRoot":"","sources":["../src/repositoryReads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,sBAAsB,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AO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAC5H,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CACjB;QACF,WAAW,EAAE,CAAC,KAAa,EAAE,IAAY,EAAE,OAA+B,EAAE,EAAE,CAC7E,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACpH,UAAU,EAAE,CAAC,KAAa,EAAE,IAAY,EAAE,OAA+B,EAAE,EAAE,CAC5E,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAClH,oBAAoB,EAAE,CAAC,KAAa,EAAE,IAAY,EAAE,MAAc,EAAE,OAA+B,EAAE,EAAE,CACtG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,MAAM,QAAQ,EAAE,OAAO,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;KAC3I,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const User: Schema.encodeKeys<Schema.Struct<{
|
|
3
|
+
readonly avatarUrl: Schema.String;
|
|
4
|
+
readonly htmlUrl: Schema.String;
|
|
5
|
+
readonly id: Schema.Number;
|
|
6
|
+
readonly login: Schema.String;
|
|
7
|
+
readonly type: Schema.String;
|
|
8
|
+
}>, {
|
|
9
|
+
readonly avatarUrl: "avatar_url";
|
|
10
|
+
readonly htmlUrl: "html_url";
|
|
11
|
+
}>;
|
|
12
|
+
export declare const Issue: Schema.encodeKeys<Schema.Struct<{
|
|
13
|
+
readonly body: Schema.NullOr<Schema.String>;
|
|
14
|
+
readonly closedAt: Schema.NullOr<Schema.String>;
|
|
15
|
+
readonly createdAt: Schema.String;
|
|
16
|
+
readonly htmlUrl: Schema.String;
|
|
17
|
+
readonly id: Schema.Number;
|
|
18
|
+
readonly labels: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
19
|
+
readonly name: Schema.optional<Schema.String>;
|
|
20
|
+
}>]>>;
|
|
21
|
+
readonly number: Schema.Number;
|
|
22
|
+
readonly pullRequest: Schema.optional<Schema.Struct<{
|
|
23
|
+
readonly url: Schema.String;
|
|
24
|
+
}>>;
|
|
25
|
+
readonly state: Schema.Literals<readonly ["open", "closed"]>;
|
|
26
|
+
readonly title: Schema.String;
|
|
27
|
+
readonly updatedAt: Schema.String;
|
|
28
|
+
readonly user: Schema.NullOr<Schema.encodeKeys<Schema.Struct<{
|
|
29
|
+
readonly avatarUrl: Schema.String;
|
|
30
|
+
readonly htmlUrl: Schema.String;
|
|
31
|
+
readonly id: Schema.Number;
|
|
32
|
+
readonly login: Schema.String;
|
|
33
|
+
readonly type: Schema.String;
|
|
34
|
+
}>, {
|
|
35
|
+
readonly avatarUrl: "avatar_url";
|
|
36
|
+
readonly htmlUrl: "html_url";
|
|
37
|
+
}>>;
|
|
38
|
+
}>, {
|
|
39
|
+
readonly closedAt: "closed_at";
|
|
40
|
+
readonly createdAt: "created_at";
|
|
41
|
+
readonly htmlUrl: "html_url";
|
|
42
|
+
readonly pullRequest: "pull_request";
|
|
43
|
+
readonly updatedAt: "updated_at";
|
|
44
|
+
}>;
|
|
45
|
+
export declare const PullRequestFile: Schema.encodeKeys<Schema.Struct<{
|
|
46
|
+
readonly additions: Schema.Number;
|
|
47
|
+
readonly changes: Schema.Number;
|
|
48
|
+
readonly deletions: Schema.Number;
|
|
49
|
+
readonly filename: Schema.String;
|
|
50
|
+
readonly patch: Schema.optional<Schema.String>;
|
|
51
|
+
readonly previousFilename: Schema.optional<Schema.String>;
|
|
52
|
+
readonly sha: Schema.String;
|
|
53
|
+
readonly status: Schema.String;
|
|
54
|
+
}>, {
|
|
55
|
+
readonly previousFilename: "previous_filename";
|
|
56
|
+
}>;
|
|
57
|
+
export declare const CollaboratorPermission: Schema.encodeKeys<Schema.Struct<{
|
|
58
|
+
readonly permission: Schema.String;
|
|
59
|
+
readonly roleName: Schema.String;
|
|
60
|
+
readonly user: Schema.encodeKeys<Schema.Struct<{
|
|
61
|
+
readonly avatarUrl: Schema.String;
|
|
62
|
+
readonly htmlUrl: Schema.String;
|
|
63
|
+
readonly id: Schema.Number;
|
|
64
|
+
readonly login: Schema.String;
|
|
65
|
+
readonly type: Schema.String;
|
|
66
|
+
}>, {
|
|
67
|
+
readonly avatarUrl: "avatar_url";
|
|
68
|
+
readonly htmlUrl: "html_url";
|
|
69
|
+
}>;
|
|
70
|
+
}>, {
|
|
71
|
+
readonly roleName: "role_name";
|
|
72
|
+
}>;
|
|
73
|
+
//# sourceMappingURL=repositorySchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositorySchemas.d.ts","sourceRoot":"","sources":["../src/repositorySchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,IAAI;;;;;;;;;EAM2D,CAAC;AAE7E,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAejB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;EASyC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAIkB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const User = Schema.Struct({
|
|
3
|
+
avatarUrl: Schema.String,
|
|
4
|
+
htmlUrl: Schema.String,
|
|
5
|
+
id: Schema.Number,
|
|
6
|
+
login: Schema.String,
|
|
7
|
+
type: Schema.String,
|
|
8
|
+
}).pipe(Schema.encodeKeys({ avatarUrl: "avatar_url", htmlUrl: "html_url" }));
|
|
9
|
+
export const Issue = Schema.Struct({
|
|
10
|
+
body: Schema.NullOr(Schema.String),
|
|
11
|
+
closedAt: Schema.NullOr(Schema.String),
|
|
12
|
+
createdAt: Schema.String,
|
|
13
|
+
htmlUrl: Schema.String,
|
|
14
|
+
id: Schema.Number,
|
|
15
|
+
labels: Schema.Array(Schema.Union([Schema.String, Schema.Struct({ name: Schema.optional(Schema.String) })])),
|
|
16
|
+
number: Schema.Number,
|
|
17
|
+
pullRequest: Schema.optional(Schema.Struct({ url: Schema.String })),
|
|
18
|
+
state: Schema.Literals(["open", "closed"]),
|
|
19
|
+
title: Schema.String,
|
|
20
|
+
updatedAt: Schema.String,
|
|
21
|
+
user: Schema.NullOr(User),
|
|
22
|
+
}).pipe(Schema.encodeKeys({ closedAt: "closed_at", createdAt: "created_at", htmlUrl: "html_url", pullRequest: "pull_request", updatedAt: "updated_at" }));
|
|
23
|
+
export const PullRequestFile = Schema.Struct({
|
|
24
|
+
additions: Schema.Number,
|
|
25
|
+
changes: Schema.Number,
|
|
26
|
+
deletions: Schema.Number,
|
|
27
|
+
filename: Schema.String,
|
|
28
|
+
patch: Schema.optional(Schema.String),
|
|
29
|
+
previousFilename: Schema.optional(Schema.String),
|
|
30
|
+
sha: Schema.String,
|
|
31
|
+
status: Schema.String,
|
|
32
|
+
}).pipe(Schema.encodeKeys({ previousFilename: "previous_filename" }));
|
|
33
|
+
export const CollaboratorPermission = Schema.Struct({
|
|
34
|
+
permission: Schema.String,
|
|
35
|
+
roleName: Schema.String,
|
|
36
|
+
user: User,
|
|
37
|
+
}).pipe(Schema.encodeKeys({ roleName: "role_name" }));
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
|
1
|
-
{"version":3,"file":"representations.d.ts","sourceRoot":"","sources":["../src/representations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAc,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"representations.d.ts","sourceRoot":"","sources":["../src/representations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAc,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAMxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,wBAAgB,eAAe,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,EACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAClC,iBAAiB,SAAc;gBAEZ,MAAM;iBAOlB,MAAM,kBACI,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC;;;;iBAL5C,MAAM;;;oBA6BH,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,QAAQ,MAAM,SAAS,OAAO;;;EAQtG;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
package/dist/representations.js
CHANGED
|
@@ -2,10 +2,11 @@ import { Effect, Stream } from "effect";
|
|
|
2
2
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
3
3
|
import { nextLink } from "@shivaedev/http/nextLink.ts";
|
|
4
4
|
import { paginate } from "@shivaedev/http/paginate.ts";
|
|
5
|
+
import { resolveApiUrl } from "#adapters/resolveApiUrl.ts";
|
|
5
6
|
import { jsonResponse } from "#json.ts";
|
|
6
7
|
export function representations(apiUrl, request, resource, responseByteLimit = 1024 * 1024) {
|
|
7
8
|
function get(path, accept = "application/vnd.github+json") {
|
|
8
|
-
return HttpClientRequest.get(
|
|
9
|
+
return HttpClientRequest.get(resolveApiUrl(apiUrl, path), { headers: { Accept: accept } });
|
|
9
10
|
}
|
|
10
11
|
function readRepresentation(path, byteLimit = responseByteLimit) {
|
|
11
12
|
return Effect.map(request(get(path), byteLimit), jsonResponse);
|
|
@@ -22,7 +23,7 @@ export function representations(apiUrl, request, resource, responseByteLimit = 1
|
|
|
22
23
|
return Effect.succeed(paginate(client, get(path)).pipe(Stream.mapEffect((response) => Effect.fromNullishOr(entries.get(response))), Stream.map((entry) => ({ ...jsonResponse(entry), hasNext: nextLink(entry.response.headers.link) !== undefined }))));
|
|
23
24
|
}
|
|
24
25
|
function writeRepresentation(method, path, body, byteLimit = responseByteLimit) {
|
|
25
|
-
return HttpClientRequest.make(method)(
|
|
26
|
+
return HttpClientRequest.make(method)(resolveApiUrl(apiUrl, path), { headers: { Accept: "application/vnd.github+json" } }).pipe((input) => (body === undefined ? Effect.succeed(input) : HttpClientRequest.bodyJson(input, body)), Effect.flatMap((input) => request(input, byteLimit)), Effect.map(jsonResponse));
|
|
26
27
|
}
|
|
27
28
|
return { get, list: listRepresentations, read: readRepresentation, write: writeRepresentation };
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"representations.js","sourceRoot":"","sources":["../src/representations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,M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I,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EACjG,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,EACpD,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CACxB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Cache, Effect, Schema } from "effect";
|
|
2
|
+
import type { Representations } from "#representations.ts";
|
|
3
|
+
export declare const InstalledRepository: Schema.encodeKeys<Schema.Struct<{
|
|
4
|
+
readonly htmlUrl: Schema.String;
|
|
5
|
+
readonly id: Schema.Number;
|
|
6
|
+
readonly name: Schema.String;
|
|
7
|
+
readonly owner: Schema.Struct<{
|
|
8
|
+
readonly login: Schema.String;
|
|
9
|
+
}>;
|
|
10
|
+
readonly private: Schema.Boolean;
|
|
11
|
+
}>, {
|
|
12
|
+
readonly htmlUrl: "html_url";
|
|
13
|
+
}>;
|
|
14
|
+
export interface ViewerRepositoryAccess {
|
|
15
|
+
readonly administrable: readonly (typeof InstalledRepository.Type & {
|
|
16
|
+
readonly installationId: number;
|
|
17
|
+
})[];
|
|
18
|
+
readonly readable: readonly (typeof InstalledRepository.Type & {
|
|
19
|
+
readonly installationId: number;
|
|
20
|
+
})[];
|
|
21
|
+
}
|
|
22
|
+
export declare function viewerRepositoryAccess(app: Representations, installation: (id: number) => Effect.Effect<Representations>): Effect.Effect<Cache.Cache<string, {
|
|
23
|
+
administrable: ({
|
|
24
|
+
readonly htmlUrl: string;
|
|
25
|
+
readonly id: number;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly owner: {
|
|
28
|
+
readonly login: string;
|
|
29
|
+
};
|
|
30
|
+
readonly private: boolean;
|
|
31
|
+
} & {
|
|
32
|
+
readonly installationId: number;
|
|
33
|
+
})[];
|
|
34
|
+
readable: ({
|
|
35
|
+
readonly htmlUrl: string;
|
|
36
|
+
readonly id: number;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly owner: {
|
|
39
|
+
readonly login: string;
|
|
40
|
+
};
|
|
41
|
+
readonly private: boolean;
|
|
42
|
+
} & {
|
|
43
|
+
readonly installationId: number;
|
|
44
|
+
})[];
|
|
45
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
46
|
+
//# sourceMappingURL=viewerRepositoryAccess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewerRepositoryAccess.d.ts","sourceRoot":"","sources":["../src/viewerRepositoryAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAQ,MAAM,EAAU,MAAM,QAAQ,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,mBAAmB;;;;;;;;;;EAMmB,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,OAAO,mBAAmB,CAAC,IAAI,GAAG;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3G,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,OAAO,mBAAmB,CAAC,IAAI,GAAG;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CACtG;AA6BD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC;;;;;;;;;;iCA/BzB,MAAM;;;;;;;;;;;iCACX,MAAM;;wlBAmDhG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Cache, Effect, Exit, Schema, Stream } from "effect";
|
|
2
|
+
import { decodedPages } from "#pagedLists.ts";
|
|
3
|
+
export const InstalledRepository = Schema.Struct({
|
|
4
|
+
htmlUrl: Schema.String,
|
|
5
|
+
id: Schema.Number,
|
|
6
|
+
name: Schema.String,
|
|
7
|
+
owner: Schema.Struct({ login: Schema.String }),
|
|
8
|
+
private: Schema.Boolean,
|
|
9
|
+
}).pipe(Schema.encodeKeys({ htmlUrl: "html_url" }));
|
|
10
|
+
const Account = Schema.Struct({ login: Schema.String });
|
|
11
|
+
const Installation = Schema.Struct({ id: Schema.Number });
|
|
12
|
+
const Permission = Schema.Struct({ permission: Schema.String });
|
|
13
|
+
const installationAccess = Effect.fnUntraced(function* (client, installationId, login) {
|
|
14
|
+
const pages = yield* decodedPages(client, "/installation/repositories?per_page=100", InstalledRepository, {
|
|
15
|
+
arrayKey: "repositories",
|
|
16
|
+
}).pipe(Stream.runCollect);
|
|
17
|
+
const readable = [];
|
|
18
|
+
const administrable = [];
|
|
19
|
+
for (const repository of pages.flatMap((page) => page.items)) {
|
|
20
|
+
const permissionPath = `/repos/${encodeURIComponent(repository.owner.login)}/${encodeURIComponent(repository.name)}/collaborators/${encodeURIComponent(login)}/permission`;
|
|
21
|
+
const permission = yield* Effect.flatMap(client.read(permissionPath), (response) => response.decode(Permission)).pipe(Effect.map((grant) => grant.permission), Effect.catchTag("RemoteNotFound", () => Effect.succeed("none")));
|
|
22
|
+
const installed = { ...repository, installationId };
|
|
23
|
+
if (!repository.private || ["read", "triage", "write", "maintain", "admin"].includes(permission)) {
|
|
24
|
+
readable.push(installed);
|
|
25
|
+
}
|
|
26
|
+
if (permission === "admin") {
|
|
27
|
+
administrable.push(installed);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return { administrable, readable };
|
|
31
|
+
});
|
|
32
|
+
export function viewerRepositoryAccess(app, installation) {
|
|
33
|
+
const lookup = Effect.fnUntraced(function* (account) {
|
|
34
|
+
const path = account.startsWith("id:") ? `/user/${account.slice(3)}` : `/users/${encodeURIComponent(account.slice(6))}`;
|
|
35
|
+
const installations = yield* decodedPages(app, "/app/installations?per_page=100", Installation).pipe(Stream.runCollect);
|
|
36
|
+
const first = installations.flatMap((page) => page.items)[0];
|
|
37
|
+
if (first === undefined) {
|
|
38
|
+
return { administrable: [], readable: [] };
|
|
39
|
+
}
|
|
40
|
+
const resolver = yield* installation(first.id);
|
|
41
|
+
const { login } = yield* Effect.flatMap(resolver.read(path), (response) => response.decode(Account));
|
|
42
|
+
const readable = [];
|
|
43
|
+
const administrable = [];
|
|
44
|
+
for (const { id } of installations.flatMap((page) => page.items)) {
|
|
45
|
+
const client = yield* installation(id);
|
|
46
|
+
const access = yield* installationAccess(client, id, login);
|
|
47
|
+
readable.push(...access.readable);
|
|
48
|
+
administrable.push(...access.administrable);
|
|
49
|
+
}
|
|
50
|
+
return { administrable, readable };
|
|
51
|
+
});
|
|
52
|
+
return Cache.makeWith(lookup, { capacity: 100, timeToLive: (exit) => (Exit.isSuccess(exit) ? "60 seconds" : 0) });
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=viewerRepositoryAccess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewerRepositoryAccess.js","sourceRoot":"","sources":["../src/viewerRepositoryAccess.ts"],"names":[],"m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