@effected/github-actions 0.17.0 → 0.18.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/Action.js +1 -1
- package/ActionCache.js +2 -2
- package/Artifact.js +2 -2
- package/BlobStore.githubCache.js +1 -1
- package/BlobStore.js +1 -1
- package/ChildEnv.js +1 -1
- package/DetachedProcess.js +2 -2
- package/OidcTokenIssuer.js +2 -2
- package/PackageManagerInstaller.js +1 -1
- package/ToolInstaller.js +2 -2
- package/index.d.ts +3 -3
- package/internal/archiveCommands.js +2 -2
- package/internal/digest.js +3 -2
- package/internal/jwt.js +5 -4
- package/internal/pnpmExe.js +5 -3
- package/internal/twirp.js +1 -1
- package/package.json +11 -11
package/Action.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ActionOutputs } from "./ActionOutputs.js";
|
|
|
6
6
|
import { ActionState } from "./ActionState.js";
|
|
7
7
|
import { NodeServices } from "@effect/platform-node";
|
|
8
8
|
import { Cause, Effect, Exit, Layer, Option, Result } from "effect";
|
|
9
|
-
import { FetchHttpClient } from "effect/
|
|
9
|
+
import { FetchHttpClient } from "effect/http";
|
|
10
10
|
|
|
11
11
|
//#region src/Action.ts
|
|
12
12
|
/**
|
package/ActionCache.js
CHANGED
|
@@ -8,10 +8,10 @@ import { sha256Hex } from "./internal/digest.js";
|
|
|
8
8
|
import { isWindowsRunner } from "./internal/runner.js";
|
|
9
9
|
import { spawnOnce } from "./internal/spawn.js";
|
|
10
10
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
|
|
11
|
-
import { HttpClient } from "effect/
|
|
11
|
+
import { HttpClient } from "effect/http";
|
|
12
12
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
|
13
13
|
import { GlobPattern, GlobSet } from "@effected/glob";
|
|
14
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/
|
|
14
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
15
15
|
|
|
16
16
|
//#region src/ActionCache.ts
|
|
17
17
|
/**
|
package/Artifact.js
CHANGED
|
@@ -8,9 +8,9 @@ import { isWindowsRunner } from "./internal/runner.js";
|
|
|
8
8
|
import { spawnOnce } from "./internal/spawn.js";
|
|
9
9
|
import { unzipCommand, zipCommand, zipManifest } from "./internal/archiveCommands.js";
|
|
10
10
|
import { Context, Effect, FileSystem, Layer, Option, Path, Result, Schema } from "effect";
|
|
11
|
-
import { HttpClient } from "effect/
|
|
11
|
+
import { HttpClient } from "effect/http";
|
|
12
12
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
|
13
|
-
import { ChildProcessSpawner } from "effect/
|
|
13
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
14
14
|
|
|
15
15
|
//#region src/Artifact.ts
|
|
16
16
|
/**
|
package/BlobStore.githubCache.js
CHANGED
|
@@ -7,7 +7,7 @@ import { sha256Hex } from "./internal/digest.js";
|
|
|
7
7
|
import { BlobEnvelope } from "./BlobEnvelope.js";
|
|
8
8
|
import { BlobStore, BlobStoreError } from "./BlobStore.js";
|
|
9
9
|
import { Effect, Layer, Option } from "effect";
|
|
10
|
-
import { HttpClient } from "effect/
|
|
10
|
+
import { HttpClient } from "effect/http";
|
|
11
11
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
|
12
12
|
|
|
13
13
|
//#region src/BlobStore.githubCache.ts
|
package/BlobStore.js
CHANGED
|
@@ -3,7 +3,7 @@ import { BlobEnvelope } from "./BlobEnvelope.js";
|
|
|
3
3
|
import { sign } from "./internal/sigv4.js";
|
|
4
4
|
import { Secret } from "./Secret.js";
|
|
5
5
|
import { Context, Effect, Layer, Option, Schema } from "effect";
|
|
6
|
-
import { HttpClient, HttpClientRequest } from "effect/
|
|
6
|
+
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
7
7
|
|
|
8
8
|
//#region src/BlobStore.ts
|
|
9
9
|
/**
|
package/ChildEnv.js
CHANGED
|
@@ -83,7 +83,7 @@ var ChildEnv = class ChildEnv {
|
|
|
83
83
|
* @example
|
|
84
84
|
* ```ts
|
|
85
85
|
* import { ChildEnv } from "@effected/github-actions";
|
|
86
|
-
* import { ChildProcess } from "effect/
|
|
86
|
+
* import { ChildProcess } from "effect/process";
|
|
87
87
|
*
|
|
88
88
|
* const command = ChildProcess.make("pnpm", ["install"], {
|
|
89
89
|
* ...ChildEnv.prependPath(["/opt/hostedtoolcache/pnpm/10.13.1/x64/bin"], {
|
package/DetachedProcess.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { unstubbed } from "./internal/unstubbed.js";
|
|
2
2
|
import { isErrno } from "./internal/fsProbe.js";
|
|
3
3
|
import { Effect, Schedule, Schema } from "effect";
|
|
4
|
-
import { HttpClient } from "effect/
|
|
5
|
-
import { ChildProcessSpawner } from "effect/
|
|
4
|
+
import { HttpClient } from "effect/http";
|
|
5
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import { closeSync, openSync } from "node:fs";
|
|
8
8
|
|
package/OidcTokenIssuer.js
CHANGED
|
@@ -2,8 +2,8 @@ import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
|
2
2
|
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
3
|
import { payloadOf, unsignedJwt } from "./internal/jwt.js";
|
|
4
4
|
import { Context, Effect, Layer, Redacted, Schema } from "effect";
|
|
5
|
-
import { HttpClient, HttpClientRequest } from "effect/
|
|
6
|
-
import * as HttpClientResponse from "effect/
|
|
5
|
+
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
6
|
+
import * as HttpClientResponse from "effect/http/HttpClientResponse";
|
|
7
7
|
|
|
8
8
|
//#region src/OidcTokenIssuer.ts
|
|
9
9
|
/**
|
|
@@ -6,7 +6,7 @@ import { typeAt } from "./internal/fsProbe.js";
|
|
|
6
6
|
import { PNPM_EXE_PREFIX, detectMusl, isNodeScript, pnpmExeTarget, strongestSri } from "./internal/pnpmExe.js";
|
|
7
7
|
import { ToolInstaller } from "./ToolInstaller.js";
|
|
8
8
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
|
|
9
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/
|
|
9
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
10
10
|
import { CorepackIntegrityHash, DEFAULT_REGISTRY, PackageManagerPin, PackageManagerPinName } from "@effected/npm";
|
|
11
11
|
|
|
12
12
|
//#region src/PackageManagerInstaller.ts
|
package/ToolInstaller.js
CHANGED
|
@@ -5,8 +5,8 @@ import { spawnOnce } from "./internal/spawn.js";
|
|
|
5
5
|
import { tarExtractCommand, unzipCommand } from "./internal/archiveCommands.js";
|
|
6
6
|
import { isErrno, typeAt } from "./internal/fsProbe.js";
|
|
7
7
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schedule, Schema, Stream } from "effect";
|
|
8
|
-
import { HttpClient } from "effect/
|
|
9
|
-
import { ChildProcessSpawner } from "effect/
|
|
8
|
+
import { HttpClient } from "effect/http";
|
|
9
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
10
10
|
|
|
11
11
|
//#region src/ToolInstaller.ts
|
|
12
12
|
/**
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NodeServices } from "@effect/platform-node";
|
|
2
2
|
import { Cause, Config, ConfigProvider, Context, Duration, Effect, FileSystem, Layer, Logger, Option, Path, Redacted, Result, Schema } from "effect";
|
|
3
|
-
import { HttpClient } from "effect/
|
|
4
|
-
import { ChildProcessSpawner } from "effect/
|
|
3
|
+
import { HttpClient } from "effect/http";
|
|
4
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
5
5
|
import { IdentityToken, SlsaProvenance } from "@effected/sbom";
|
|
6
6
|
import { BotIdentity, GitHubApp, GitHubClient, InstallationToken, PermissionLevel, RetryPolicy } from "@effected/github";
|
|
7
7
|
import { IntegrityHashBrand, PackageManagerPin } from "@effected/npm";
|
|
@@ -3205,7 +3205,7 @@ export declare class ChildEnv {
|
|
|
3205
3205
|
* @example
|
|
3206
3206
|
* ```ts
|
|
3207
3207
|
* import { ChildEnv } from "@effected/github-actions";
|
|
3208
|
-
* import { ChildProcess } from "effect/
|
|
3208
|
+
* import { ChildProcess } from "effect/process";
|
|
3209
3209
|
*
|
|
3210
3210
|
* const command = ChildProcess.make("pnpm", ["install"], {
|
|
3211
3211
|
* ...ChildEnv.prependPath(["/opt/hostedtoolcache/pnpm/10.13.1/x64/bin"], {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChildProcess } from "effect/
|
|
1
|
+
import { ChildProcess } from "effect/process";
|
|
2
2
|
|
|
3
3
|
//#region src/internal/archiveCommands.ts
|
|
4
4
|
/**
|
|
@@ -62,7 +62,7 @@ import { ChildProcess } from "effect/unstable/process";
|
|
|
62
62
|
* one is doubled — the only escape a single-quoted PowerShell literal has.
|
|
63
63
|
*
|
|
64
64
|
* Pure: no filesystem, no environment, no spawn. `internal/spawn.ts` is the
|
|
65
|
-
* execution half. Reaches `effect/
|
|
65
|
+
* execution half. Reaches `effect/process` alone, so it is safe for
|
|
66
66
|
* any module to import (`__test__/reachability.test.ts`).
|
|
67
67
|
*
|
|
68
68
|
* @internal
|
package/internal/digest.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Effect,
|
|
1
|
+
import { Effect, Stream } from "effect";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
+
import * as Hex from "effect/encoding/Hex";
|
|
3
4
|
|
|
4
5
|
//#region src/internal/digest.ts
|
|
5
6
|
/**
|
|
@@ -37,7 +38,7 @@ const digestFile = (fs, file, algorithm) => Effect.suspend(() => {
|
|
|
37
38
|
})).pipe(Effect.map(() => new Uint8Array(accumulator.digest())));
|
|
38
39
|
});
|
|
39
40
|
/** {@link digestFile}, as hex. @internal */
|
|
40
|
-
const digestFileHex = (fs, file, algorithm) => Effect.map(digestFile(fs, file, algorithm),
|
|
41
|
+
const digestFileHex = (fs, file, algorithm) => Effect.map(digestFile(fs, file, algorithm), Hex.encode);
|
|
41
42
|
|
|
42
43
|
//#endregion
|
|
43
44
|
export { digestFile, digestFileHex, sha256, sha256Hex };
|
package/internal/jwt.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Result } from "effect";
|
|
2
|
+
import * as Base64Url from "effect/encoding/Base64Url";
|
|
2
3
|
|
|
3
4
|
//#region src/internal/jwt.ts
|
|
4
5
|
/**
|
|
@@ -12,7 +13,7 @@ import { Encoding, Result } from "effect";
|
|
|
12
13
|
* elsewhere (`OidcTokenIssuer`); neither authorizes anything on the strength
|
|
13
14
|
* of the claim alone. Do not "fix" it here.
|
|
14
15
|
*
|
|
15
|
-
* Core `
|
|
16
|
+
* Core `Base64Url` does the base64url work, so no `Buffer` is involved: it is
|
|
16
17
|
* strict about the alphabet where Node's decoder is forgiving, which is why
|
|
17
18
|
* there is a test whose payload actually contains `-` and `_`.
|
|
18
19
|
*
|
|
@@ -31,7 +32,7 @@ const payloadOf = (token) => {
|
|
|
31
32
|
kind: "segments",
|
|
32
33
|
detail: `expected three segments, got ${segments.length}`
|
|
33
34
|
});
|
|
34
|
-
const json =
|
|
35
|
+
const json = Base64Url.decodeString(payload);
|
|
35
36
|
if (Result.isFailure(json)) return Result.fail({
|
|
36
37
|
kind: "payload",
|
|
37
38
|
detail: "the payload is not base64url JSON",
|
|
@@ -55,7 +56,7 @@ const payloadOf = (token) => {
|
|
|
55
56
|
* @internal
|
|
56
57
|
*/
|
|
57
58
|
const unsignedJwt = (header, payload) => {
|
|
58
|
-
const segment = (value) =>
|
|
59
|
+
const segment = (value) => Base64Url.encode(JSON.stringify(value));
|
|
59
60
|
return `${segment(header)}.${segment(payload)}.unsigned`;
|
|
60
61
|
};
|
|
61
62
|
|
package/internal/pnpmExe.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Option, Result } from "effect";
|
|
2
|
+
import * as Hex from "effect/encoding/Hex";
|
|
3
|
+
import * as Base64 from "effect/encoding/Base64";
|
|
2
4
|
|
|
3
5
|
//#region src/internal/pnpmExe.ts
|
|
4
6
|
/**
|
|
@@ -105,10 +107,10 @@ const strongestSri = (integrity) => {
|
|
|
105
107
|
const algorithm = entry.slice(0, dash).toLowerCase();
|
|
106
108
|
if (!SRI_ALGORITHMS.includes(algorithm)) return [];
|
|
107
109
|
const digest = entry.slice(dash + 1).split("?")[0] ?? "";
|
|
108
|
-
const decoded =
|
|
110
|
+
const decoded = Base64.decode(digest);
|
|
109
111
|
return Result.isSuccess(decoded) ? [{
|
|
110
112
|
algorithm,
|
|
111
|
-
hex:
|
|
113
|
+
hex: Hex.encode(decoded.success)
|
|
112
114
|
}] : [];
|
|
113
115
|
});
|
|
114
116
|
for (const algorithm of SRI_ALGORITHMS) {
|
package/internal/twirp.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/github-actions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The GitHub Actions runtime: env, inputs, outputs, state, logging, cache, artifacts, blob storage, OIDC and the token bridge.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@azure/storage-blob": "^12.33.0",
|
|
42
|
-
"@effected/github": "^0.
|
|
43
|
-
"@effected/glob": "^0.
|
|
44
|
-
"@effected/markdown": "^0.
|
|
45
|
-
"@effected/npm": "^0.
|
|
46
|
-
"@effected/sbom": "^0.
|
|
47
|
-
"@effected/semver": "^0.
|
|
48
|
-
"@effected/templates": "^0.
|
|
49
|
-
"@effected/walker": "^0.
|
|
42
|
+
"@effected/github": "^0.14.0",
|
|
43
|
+
"@effected/glob": "^0.9.0",
|
|
44
|
+
"@effected/markdown": "^0.14.0",
|
|
45
|
+
"@effected/npm": "^0.19.0",
|
|
46
|
+
"@effected/sbom": "^0.9.0",
|
|
47
|
+
"@effected/semver": "^0.10.0",
|
|
48
|
+
"@effected/templates": "^0.9.0",
|
|
49
|
+
"@effected/walker": "^0.13.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
53
|
-
"effect": "4.0.0-rc.
|
|
52
|
+
"@effect/platform-node": "4.0.0-rc.118",
|
|
53
|
+
"effect": "4.0.0-rc.118"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=24.11.0"
|