@effected/github 0.9.0 → 0.10.1
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/GitHubClient.js +1 -1
- package/Repo.js +1 -1
- package/WorkflowDispatch.js +2 -1
- package/index.d.ts +6 -1
- package/package.json +5 -5
- package/tsdoc-metadata.json +1 -1
package/GitHubClient.js
CHANGED
|
@@ -57,7 +57,7 @@ var GitHubClient = class GitHubClient extends Context.Service()("@effected/githu
|
|
|
57
57
|
* five-line comment explaining that the error did not mean what it said.
|
|
58
58
|
*/
|
|
59
59
|
static layerFromConfig = (options = {}) => Layer.effect(this, Effect.gen(function* () {
|
|
60
|
-
const token = yield* Config.
|
|
60
|
+
const token = yield* Config.Redacted(options.name ?? "GITHUB_TOKEN");
|
|
61
61
|
return yield* makeClientShape({
|
|
62
62
|
...options,
|
|
63
63
|
token
|
package/Repo.js
CHANGED
|
@@ -98,7 +98,7 @@ var Repo = class Repo extends Context.Service()("@effected/github/Repo") {
|
|
|
98
98
|
* than `process.env` — so a test provides a provider instead of mutating the
|
|
99
99
|
* environment, and a consumer outside Actions can source it however it likes.
|
|
100
100
|
*/
|
|
101
|
-
static layerFromConfig = (options = {}) => Layer.effect(Repo, Effect.flatMap(Config.
|
|
101
|
+
static layerFromConfig = (options = {}) => Layer.effect(Repo, Effect.flatMap(Config.String(options.name ?? "GITHUB_REPOSITORY"), (slug) => RepoRef.parse(slug)));
|
|
102
102
|
/** Run `effect` against a different repository. */
|
|
103
103
|
static provide = (ref) => (effect) => Effect.provideService(effect, Repo, ref);
|
|
104
104
|
};
|
package/WorkflowDispatch.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GitHubError } from "./GitHubError.js";
|
|
2
2
|
import { GitHubClient } from "./GitHubClient.js";
|
|
3
3
|
import { Repo } from "./Repo.js";
|
|
4
|
+
import { numericId } from "./internal/ids.js";
|
|
4
5
|
import { PageOptions } from "./Rest.js";
|
|
5
6
|
import { Clock, Context, Duration, Effect, Layer, Option, Schedule, Schema } from "effect";
|
|
6
7
|
|
|
@@ -46,7 +47,7 @@ const unstubbed = (member) => {
|
|
|
46
47
|
throw new Error(`WorkflowDispatch.makeTest: ${member}() was called but not stubbed — pass an override.`);
|
|
47
48
|
};
|
|
48
49
|
const statusOf = (raw) => WorkflowRunStatus.make({
|
|
49
|
-
id: raw.id,
|
|
50
|
+
id: numericId(raw.id),
|
|
50
51
|
status: raw.status ?? "unknown",
|
|
51
52
|
...raw.conclusion != null ? { conclusion: raw.conclusion } : {},
|
|
52
53
|
url: raw.html_url
|
package/index.d.ts
CHANGED
|
@@ -432,9 +432,14 @@ type Data<R extends Route> = Endpoints[R]["response"]["data"];
|
|
|
432
432
|
* Handing a non-paginating route to a paginating call is a **compile** error,
|
|
433
433
|
* which the string-keyed surface this package replaces could not express.
|
|
434
434
|
*
|
|
435
|
+
* Intersected with `Rest.Route` because `plugin-paginate-rest` generates its
|
|
436
|
+
* map from its own `@octokit/types` pin, which can trail the one this package
|
|
437
|
+
* resolves; a route the newer map has deleted must not survive here as a key
|
|
438
|
+
* `Endpoints` no longer indexes.
|
|
439
|
+
*
|
|
435
440
|
* @public
|
|
436
441
|
*/
|
|
437
|
-
type PaginatingRoute = keyof PaginatingEndpoints;
|
|
442
|
+
type PaginatingRoute = keyof PaginatingEndpoints & Route;
|
|
438
443
|
/**
|
|
439
444
|
* One element of a paginating route's collection.
|
|
440
445
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
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,17 +38,17 @@
|
|
|
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.3.0",
|
|
42
|
+
"@effected/semver": "^0.7.0",
|
|
43
43
|
"@octokit/core": "^7.0.6",
|
|
44
44
|
"@octokit/plugin-paginate-rest": "^15.0.0",
|
|
45
|
-
"@octokit/types": "^
|
|
45
|
+
"@octokit/types": "^18.0.0",
|
|
46
46
|
"blakejs": "1.2.1",
|
|
47
47
|
"tweetnacl": "1.0.3",
|
|
48
48
|
"universal-github-app-jwt": "^2.2.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"effect": "4.0.0-rc.
|
|
51
|
+
"effect": "4.0.0-rc.115"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=24.11.0"
|