@effected/github 0.14.0 → 0.15.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/ArtifactMetadata.js +7 -5
- package/Attestation.js +7 -1
- package/CheckRun.js +10 -5
- package/CodeScanning.js +8 -1
- package/DeploymentEnvironment.js +19 -1
- package/GitBranch.js +22 -3
- package/GitCommit.js +25 -5
- package/GitHubApp.js +33 -14
- package/GitHubClient.js +24 -18
- package/GitHubCommit.js +20 -1
- package/GitHubContent.js +19 -1
- package/GitHubError.js +11 -22
- package/GitHubIssue.js +24 -8
- package/GitHubRelease.js +20 -2
- package/GitHubRepository.js +25 -11
- package/GitTag.js +19 -1
- package/GraphQL.js +21 -18
- package/PullRequest.js +27 -8
- package/PullRequestComment.js +25 -7
- package/README.md +5 -5
- package/Repo.js +8 -15
- package/RepositorySecret.js +19 -1
- package/RepositorySecurity.js +20 -1
- package/RepositoryVariable.js +19 -1
- package/Resilience.js +18 -16
- package/Rest.js +2 -4
- package/Ruleset.js +25 -4
- package/TokenPermissions.js +8 -11
- package/WorkflowDispatch.js +25 -1
- package/index.d.ts +684 -323
- package/internal/headers.js +0 -10
- package/internal/octokit.js +5 -11
- package/internal/paginate.js +1 -4
- package/package.json +4 -4
package/internal/headers.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
//#region src/internal/headers.ts
|
|
2
|
-
/**
|
|
3
|
-
* Reading GitHub's response headers.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* octokit hands headers back as a plain object whose values may be `string`,
|
|
7
|
-
* `number` or absent depending on the fetch implementation, so every read here
|
|
8
|
-
* is defensive about both. Header names are already lowercased by octokit.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
2
|
/** A header's value as a string, when it is present and non-empty. */
|
|
13
3
|
const headerString = (headers, name) => {
|
|
14
4
|
const value = headers?.[name];
|
package/internal/octokit.js
CHANGED
|
@@ -21,11 +21,9 @@ const SILENT_LOG = {
|
|
|
21
21
|
* distinction an app JWT and an installation token need, so the App path
|
|
22
22
|
* requires no separate auth strategy.
|
|
23
23
|
*
|
|
24
|
-
* `log` is silenced.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* inside a GitHub API client. Here retries log through `Effect.logDebug`, and an
|
|
28
|
-
* application maps Effect's logs to whatever its runtime wants.
|
|
24
|
+
* `log` is silenced. Retries log through `Effect.logDebug`, and an application
|
|
25
|
+
* maps Effect's logs to whatever its runtime wants, so no GitHub Actions
|
|
26
|
+
* knowledge lives in this client.
|
|
29
27
|
*/
|
|
30
28
|
const makeOctokit = (options) => new Octokit({
|
|
31
29
|
...options.token !== void 0 ? { auth: Redacted.value(options.token) } : {},
|
|
@@ -38,12 +36,8 @@ const makeOctokit = (options) => new Octokit({
|
|
|
38
36
|
* Build a transport over a freshly constructed octokit instance.
|
|
39
37
|
*
|
|
40
38
|
* @remarks
|
|
41
|
-
* The rate-limit cell lives here, in the closure of the layer that writes it
|
|
42
|
-
*
|
|
43
|
-
* the writer and the reader both resolved through `Effect.serviceOption`, so an
|
|
44
|
-
* application that forgot to provide it got two private cells, a limiter that
|
|
45
|
-
* never saw the client's headers, and no error, warning or type signal saying
|
|
46
|
-
* so.
|
|
39
|
+
* The rate-limit cell lives here, in the closure of the layer that writes it,
|
|
40
|
+
* so the writer and the reader can never see different cells.
|
|
47
41
|
*/
|
|
48
42
|
const makeTransport = (options) => Effect.gen(function* () {
|
|
49
43
|
const octokit = makeOctokit(options);
|
package/internal/paginate.js
CHANGED
|
@@ -8,10 +8,7 @@ import { Effect, Option, Stream } from "effect";
|
|
|
8
8
|
* **This is the only pagination implementation in the package**, and it is why
|
|
9
9
|
* the fixture double cannot drift from the live client: both build a
|
|
10
10
|
* `PageSource` and hand it here, so `maxPages` and item flattening have exactly
|
|
11
|
-
* one behavior.
|
|
12
|
-
* `maxPages` and a test double whose equivalent parameters were named
|
|
13
|
-
* `_options` and ignored — which made every truncation path structurally
|
|
14
|
-
* untestable.
|
|
11
|
+
* one behavior.
|
|
15
12
|
*
|
|
16
13
|
* `maxPages` bounds **requests, not items**: the walk stops issuing them rather
|
|
17
14
|
* than fetching everything and slicing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Typed GitHub REST and GraphQL services over the octokit core request surface, with app auth and resource helpers.",
|
|
6
6
|
"keywords": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@effected/github-references": "^0.
|
|
42
|
-
"@effected/semver": "^0.
|
|
41
|
+
"@effected/github-references": "^0.7.0",
|
|
42
|
+
"@effected/semver": "^0.11.0",
|
|
43
43
|
"@octokit/core": "^7.0.6",
|
|
44
44
|
"@octokit/plugin-paginate-rest": "^15.0.0",
|
|
45
45
|
"@octokit/types": "^18.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"universal-github-app-jwt": "^2.2.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"effect": "4.0.0
|
|
51
|
+
"effect": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=24.11.0"
|