@effected/github-actions 0.29.1 → 0.31.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 +8 -2
- package/ActionCache.js +2 -2
- package/ActionLogger.js +1 -1
- package/ActionState.js +1 -1
- package/ActionsRegistryCredential.js +1 -1
- package/Artifact.js +3 -3
- package/BlobStore.githubCache.js +3 -3
- package/BlobStore.js +15 -9
- package/CheckDocument.js +1 -1
- package/DetachedProcess.js +1 -1
- package/OidcTokenIssuer.js +1 -1
- package/PackageManagerInstaller.js +2 -2
- package/README.md +3 -3
- package/ToolInstaller.js +3 -3
- package/index.d.ts +19 -7
- package/index.js +10 -10
- package/package.json +16 -16
- package/tsdoc-metadata.json +1 -1
package/Action.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ActionLogger } from "./ActionLogger.js";
|
|
|
4
4
|
import { ActionOutputs } from "./ActionOutputs.js";
|
|
5
5
|
import { ActionState } from "./ActionState.js";
|
|
6
6
|
import { WorkflowCommand } from "@effected/github-commands";
|
|
7
|
-
import { NodeServices } from "@effect/platform-node";
|
|
7
|
+
import { NodeCrypto, NodeServices } from "@effect/platform-node";
|
|
8
8
|
import { Cause, Effect, Exit, Layer, LogLevel, Option, References, Result } from "effect";
|
|
9
9
|
import { FetchHttpClient } from "effect/http";
|
|
10
10
|
|
|
@@ -33,11 +33,17 @@ var ActionRuntime = class {
|
|
|
33
33
|
* and the workflow-command `Logger`.
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
+
* The platform is `NodeServices.layer` plus Node's `Digest`, `Mac` and
|
|
37
|
+
* `SecureRandom` crypto layers (`NodeCrypto.layerDigest`,
|
|
38
|
+
* `NodeCrypto.layerMac` and `NodeCrypto.layerSecureRandom`), which
|
|
39
|
+
* `NodeServices.layer` does not carry; `BlobStore.layerS3` takes its
|
|
40
|
+
* digests and HMACs from them.
|
|
41
|
+
*
|
|
36
42
|
* A bound constant rather than a factory. A layer-returning function mints a
|
|
37
43
|
* fresh layer per call, and layers memoize by reference — a factory here
|
|
38
44
|
* would rebuild the environment snapshot for every composition site.
|
|
39
45
|
*/
|
|
40
|
-
static layer = Layer.mergeAll(ActionLogger.layer, ActionLogger.layerLogger, ActionState.layer, ActionInput.layerDefault).pipe(Layer.provideMerge(ActionOutputs.layer), Layer.provideMerge(ActionEnvironment.layer), Layer.provideMerge(Layer.mergeAll(NodeServices.layer, FetchHttpClient.layer)));
|
|
46
|
+
static layer = Layer.mergeAll(ActionLogger.layer, ActionLogger.layerLogger, ActionState.layer, ActionInput.layerDefault).pipe(Layer.provideMerge(ActionOutputs.layer), Layer.provideMerge(ActionEnvironment.layer), Layer.provideMerge(Layer.mergeAll(NodeServices.layer, NodeCrypto.layerDigest, NodeCrypto.layerMac, NodeCrypto.layerSecureRandom, FetchHttpClient.layer)));
|
|
41
47
|
};
|
|
42
48
|
/**
|
|
43
49
|
* Lower the minimum log level to `Debug` for the program when the runner has
|
package/ActionCache.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
2
|
import { BlobTransferError } from "./BlobTransfer.js";
|
|
4
3
|
import { misconfiguredDetail, resultsBackend } from "./internal/actionsResults.js";
|
|
5
4
|
import { blobCause } from "./internal/blobCause.js";
|
|
6
|
-
import { twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
7
5
|
import { CACHE_SERVICE, finalizeUpload, lookupDownload, reserveUpload } from "./internal/cacheService.js";
|
|
8
6
|
import { sha256Hex } from "./internal/digest.js";
|
|
9
7
|
import { isWindowsRunner } from "./internal/runner.js";
|
|
10
8
|
import { spawnOnce } from "./internal/spawn.js";
|
|
9
|
+
import { twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
10
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
11
11
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
|
|
12
12
|
import { HttpClient } from "effect/http";
|
|
13
13
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
package/ActionLogger.js
CHANGED
|
@@ -110,7 +110,7 @@ const ActiveBuffer = Context.Reference("@effected/github-actions/ActiveBuffer",
|
|
|
110
110
|
*
|
|
111
111
|
* Keyed by `WorkflowCommand.groupDepthKey`, the kit-wide key for this count,
|
|
112
112
|
* rather than a key of this package's own: Effect looks a reference up by its
|
|
113
|
-
* key, so `@effected/cli`'s `Render.context`, which builds its own reference
|
|
113
|
+
* key, so `@effected/cli-kit`'s `Render.context`, which builds its own reference
|
|
114
114
|
* from the same key, sees the depth this member provides, and a document it
|
|
115
115
|
* renders inside a group opens no second one.
|
|
116
116
|
*
|
package/ActionState.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
+
import { ActionOutputs } from "./ActionOutputs.js";
|
|
2
3
|
import { heredocBlock, isUsableName } from "./internal/runnerFile.js";
|
|
3
4
|
import { unstubbed } from "./internal/unstubbed.js";
|
|
4
|
-
import { ActionOutputs } from "./ActionOutputs.js";
|
|
5
5
|
import { Context, Effect, FileSystem, Layer, Option, Schema } from "effect";
|
|
6
6
|
|
|
7
7
|
// src/ActionState.ts
|
package/Artifact.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
2
|
import { BlobTransferError } from "./BlobTransfer.js";
|
|
4
3
|
import { misconfiguredDetail, resultsBackend } from "./internal/actionsResults.js";
|
|
4
|
+
import { unzipCommand, zipCommand, zipManifest } from "./internal/archiveCommands.js";
|
|
5
5
|
import { blobCause } from "./internal/blobCause.js";
|
|
6
|
-
import { CONFLICT, field, isOk, stringField, twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
7
6
|
import { digestFileHex } from "./internal/digest.js";
|
|
8
7
|
import { isWindowsRunner } from "./internal/runner.js";
|
|
9
8
|
import { spawnOnce } from "./internal/spawn.js";
|
|
10
|
-
import {
|
|
9
|
+
import { CONFLICT, field, isOk, stringField, twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
10
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
11
11
|
import { Context, DateTime, Duration, Effect, FileSystem, Layer, Option, Path, Result, Schema } from "effect";
|
|
12
12
|
import { HttpClient } from "effect/http";
|
|
13
13
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
package/BlobStore.githubCache.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
+
import { BlobEnvelope } from "./BlobEnvelope.js";
|
|
3
|
+
import { BlobStore, BlobStoreError } from "./BlobStore.js";
|
|
2
4
|
import { BlobTransferError } from "./BlobTransfer.js";
|
|
3
5
|
import { misconfiguredDetail, resultsBackend } from "./internal/actionsResults.js";
|
|
4
6
|
import { blobCause } from "./internal/blobCause.js";
|
|
5
|
-
import { twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
6
7
|
import { CACHE_SERVICE, finalizeUpload, lookupDownload, reserveUpload } from "./internal/cacheService.js";
|
|
7
8
|
import { sha256Hex } from "./internal/digest.js";
|
|
8
|
-
import {
|
|
9
|
-
import { BlobStore, BlobStoreError } from "./BlobStore.js";
|
|
9
|
+
import { twirpCall, twirpFailureFields } from "./internal/twirp.js";
|
|
10
10
|
import { Effect, Layer, Option } from "effect";
|
|
11
11
|
import { HttpClient } from "effect/http";
|
|
12
12
|
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
package/BlobStore.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { BlobEnvelope } from "./BlobEnvelope.js";
|
|
1
2
|
import { unstubbed } from "./internal/unstubbed.js";
|
|
2
3
|
import { Secret } from "./Secret.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Context, Crypto, DateTime, Effect, Layer, Option, Schema } from "effect";
|
|
4
|
+
import { Context, DateTime, Effect, Layer, Option, Schema } from "effect";
|
|
5
5
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
6
6
|
import { HttpRedaction, SigV4 } from "@effected/crypto";
|
|
7
|
+
import { Digest, Mac } from "effect/crypto";
|
|
7
8
|
|
|
8
9
|
// src/BlobStore.ts
|
|
9
10
|
/**
|
|
@@ -86,9 +87,14 @@ var BlobStore = class BlobStore extends Context.Service()("@effected/github-acti
|
|
|
86
87
|
* credential management, retries and a service catalogue none of which this
|
|
87
88
|
* needs.
|
|
88
89
|
*
|
|
89
|
-
* Requires core `
|
|
90
|
-
*
|
|
91
|
-
*
|
|
90
|
+
* Requires core's `Digest.Digest` and `Mac.Mac` (`effect/crypto`) for the
|
|
91
|
+
* SHA-256 digests and HMACs signing takes, resolved once when the layer is
|
|
92
|
+
* built: provide `Digest.layerWebCrypto` and `Mac.layerWebCrypto` (with
|
|
93
|
+
* `SecureRandom.layerWebCrypto`), or the platform family layers such as
|
|
94
|
+
* `NodeCrypto.layerDigest` and `NodeCrypto.layerMac`; `NodeServices.layer`
|
|
95
|
+
* includes neither, and `ActionRuntime.layer` provides both. A request
|
|
96
|
+
* whose signing fails with core's `CryptoError` fails as
|
|
97
|
+
* {@link BlobStoreError} `misconfigured`. A
|
|
92
98
|
* key with a `.` or `..` path segment fails as `invalidKey` before anything
|
|
93
99
|
* is signed or sent: every URL parser collapses such a segment, so the store
|
|
94
100
|
* would receive another path than the one signed.
|
|
@@ -133,7 +139,8 @@ var BlobStore = class BlobStore extends Context.Service()("@effected/github-acti
|
|
|
133
139
|
const dies = unstubbed("BlobStore.makeTest");
|
|
134
140
|
const makeS3 = (config) => Effect.gen(function* () {
|
|
135
141
|
const http = HttpClient.transform(yield* HttpClient.HttpClient, (effect) => Effect.provideService(effect, HttpClient.TracerPropagationEnabled, false));
|
|
136
|
-
const
|
|
142
|
+
const digest = yield* Digest.Digest;
|
|
143
|
+
const mac = yield* Mac.Mac;
|
|
137
144
|
let endpoint = config.endpoint ?? `https://s3.${config.region}.amazonaws.com`;
|
|
138
145
|
while (endpoint.endsWith("/")) endpoint = endpoint.slice(0, -1);
|
|
139
146
|
const host = new URL(endpoint).host;
|
|
@@ -166,15 +173,14 @@ const makeS3 = (config) => Effect.gen(function* () {
|
|
|
166
173
|
host,
|
|
167
174
|
body,
|
|
168
175
|
now
|
|
169
|
-
}, credentials).pipe(Effect.provideService(
|
|
176
|
+
}, credentials).pipe(Effect.provideService(Digest.Digest, digest), Effect.provideService(Mac.Mac, mac), Effect.catchTags({
|
|
170
177
|
SigV4PathError: (cause) => Effect.fail(new BlobStoreError({
|
|
171
178
|
reason: "invalidKey",
|
|
172
179
|
key,
|
|
173
180
|
detail: `the path has a "${cause.segment}" segment, which a URL collapses, so it cannot be sent as signed`,
|
|
174
181
|
cause
|
|
175
182
|
})),
|
|
176
|
-
CryptoError: (cause) => Effect.fail(unsignable(key, cause))
|
|
177
|
-
PlatformError: (cause) => Effect.fail(unsignable(key, cause))
|
|
183
|
+
CryptoError: (cause) => Effect.fail(unsignable(key, cause))
|
|
178
184
|
}));
|
|
179
185
|
return {
|
|
180
186
|
url: `${endpoint}${signed.path}${signed.query === "" ? "" : `?${signed.query}`}`,
|
package/CheckDocument.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
2
1
|
import { CheckState } from "./CheckState.js";
|
|
2
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
3
|
import { ManagedDocument } from "./ManagedDocument.js";
|
|
4
4
|
import { Clock, Context, Duration, Effect, Latch, Layer, Ref, Schema, Semaphore } from "effect";
|
|
5
5
|
|
package/DetachedProcess.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
2
1
|
import { isErrno } from "./internal/fsProbe.js";
|
|
2
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
3
|
import { Effect, Schedule, Schema } from "effect";
|
|
4
4
|
import { HttpClient } from "effect/http";
|
|
5
5
|
import { ChildProcessSpawner } from "effect/process";
|
package/OidcTokenIssuer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
2
|
import { ActionOutputs } from "./ActionOutputs.js";
|
|
3
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
4
4
|
import { Secret } from "./Secret.js";
|
|
5
5
|
import { Context, Effect, Layer, Redacted, Schema } from "effect";
|
|
6
6
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
2
|
import { digestFileHex } from "./internal/digest.js";
|
|
4
|
-
import { isWindowsRunner, runnerArch } from "./internal/runner.js";
|
|
5
3
|
import { typeAt } from "./internal/fsProbe.js";
|
|
6
4
|
import { PNPM_EXE_PREFIX, detectMusl, isNodeScript, pnpmExeTarget, strongestSri } from "./internal/pnpmExe.js";
|
|
5
|
+
import { isWindowsRunner, runnerArch } from "./internal/runner.js";
|
|
7
6
|
import { cmdShim, gitBashShim, posixShim } from "./internal/shim.js";
|
|
7
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
8
8
|
import { ToolInstaller } from "./ToolInstaller.js";
|
|
9
9
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
|
|
10
10
|
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
The GitHub Actions runtime for [Effect](https://effect.website) v4: the services an action needs to talk to the runner it is executing inside. `Action.run` composes the runtime, runs your program, renders a failure as an `::error::` annotation and sets the exit code. `ActionInput` reads workflow inputs as typed `Config` values — string, boolean, integer, redacted secret, multiline list, `key=value` pairs, or a schema-decoded JSON blob — with one absence rule shared by every accessor: unset and `""` are both missing data. `ActionOutputs`, `ActionState`, `ActionLogger` and a fiber-local `ActionEnvironment` round out the runner surface, alongside `ActionCache`, `Artifact`, a metadata-carrying `BlobStore` (S3-compatible or the runner's own cache), `OidcTokenIssuer` and `ToolInstaller` for the heavier protocols. A reporting suite — `GitHubMarkdown`, `ManagedDocument`, `CheckState` and `CheckDocument` — covers the other direction: rendering what a run did onto a pull request comment, a check run or the job summary. No `@actions/*` dependency anywhere — the cache, artifact and tool-cache protocols are implemented directly against their HTTP APIs.
|
|
9
9
|
|
|
10
10
|
> **Pre-`1.0.0`.** This package is part of the `@effected/*` kit, built on stable
|
|
11
|
-
> Effect v4 (`effect`
|
|
11
|
+
> Effect v4 (`effect` `~4.1.0`) and still in `0.x` development. Stable Effect
|
|
12
12
|
> makes a kit `1.0.0` possible, not automatic. To keep your `effect` and
|
|
13
13
|
> `@effect/*` versions on the line the kit is built and tested against, install
|
|
14
|
-
> [`@effected/pnpm-plugin-
|
|
14
|
+
> [`@effected/pnpm-plugin-effected`](https://www.npmjs.com/package/@effected/pnpm-plugin-effected).
|
|
15
15
|
>
|
|
16
16
|
> **Stability: unstable.** This package's API surface is not yet considered
|
|
17
17
|
> complete and may change across `0.x` releases. Pin an exact version — even a
|
|
@@ -311,7 +311,7 @@ const TestOutputs = ActionOutputs.layerTest({
|
|
|
311
311
|
- `CheckState` / `projectCheckState` — the kit's check vocabulary, wider than GitHub's conclusions, and its projection onto the check-run wire form.
|
|
312
312
|
- `CheckDocument` — the debounced check-to-document reconciler: report states as they change, and one write lands carrying the final one. `stamp` plus a readable sink lets two runs share one document, dropping a strictly older run's pass instead of clobbering the newer one; `flush` reports `written`, `unchanged` or `stale`.
|
|
313
313
|
- `ToolInstaller` — download, extract and cache a toolchain in the runner's tool cache, with no `@actions/tool-cache` dependency; `ToolInstallerError` always names its `subject`.
|
|
314
|
-
- `BlobStore` — durable `get`/`put`/`has` over `StoredBlob<A>` values (bytes plus caller-schema metadata; the type was named `Blob<A>` before, which collided with the global), backed by `layerS3` (SigV4-signed through `@effected/crypto`, so it needs core `
|
|
314
|
+
- `BlobStore` — durable `get`/`put`/`has` over `StoredBlob<A>` values (bytes plus caller-schema metadata; the type was named `Blob<A>` before, which collided with the global), backed by `layerS3` (SigV4-signed through `@effected/crypto`, so it needs core `Digest.Digest` (`effect/crypto`) in `R`, which `ActionRuntime.layer` provides; no `@aws-sdk/*` dependency) or `GitHubCacheBlobStore.layer` (the runner's own cache); `layerMemory` runs the real envelope framing for tests.
|
|
315
315
|
|
|
316
316
|
## License
|
|
317
317
|
|
package/ToolInstaller.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ActionEnvironment } from "./ActionEnvironment.js";
|
|
2
|
-
import { unstubbed } from "./internal/unstubbed.js";
|
|
3
|
-
import { isWindowsRunner, runnerArch, toolCacheRoot } from "./internal/runner.js";
|
|
4
|
-
import { spawnOnce } from "./internal/spawn.js";
|
|
5
2
|
import { tarExtractCommand, unzipCommand } from "./internal/archiveCommands.js";
|
|
6
3
|
import { isErrno, typeAt } from "./internal/fsProbe.js";
|
|
4
|
+
import { isWindowsRunner, runnerArch, toolCacheRoot } from "./internal/runner.js";
|
|
5
|
+
import { spawnOnce } from "./internal/spawn.js";
|
|
6
|
+
import { unstubbed } from "./internal/unstubbed.js";
|
|
7
7
|
import { Context, Effect, FileSystem, Layer, Option, Path, Schedule, Schema, Stream } from "effect";
|
|
8
8
|
import { HttpClient } from "effect/http";
|
|
9
9
|
import { ChildProcessSpawner } from "effect/process";
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnnotationProperties, AnnotationProperties as AnnotationProperties$1, WorkflowCommand } from "@effected/github-commands";
|
|
2
2
|
import { NodeServices } from "@effect/platform-node";
|
|
3
|
-
import { Cause, Config, ConfigProvider, Context,
|
|
3
|
+
import { Cause, Config, ConfigProvider, Context, Duration, Effect, FileSystem, Layer, Logger, Option, Path, Redacted, Result, Schema } from "effect";
|
|
4
|
+
import { Digest, Mac, SecureRandom } from "effect/crypto";
|
|
4
5
|
import { HttpClient } from "effect/http";
|
|
5
6
|
import { ChildProcessSpawner } from "effect/process";
|
|
6
7
|
import { IdentityToken } from "@effected/oidc";
|
|
@@ -325,7 +326,7 @@ interface ActionLoggerShape {
|
|
|
325
326
|
* that outlives the group still writes headers rather than a group.
|
|
326
327
|
* 3. **Only a writer that reads the shared depth is counted.** The depth
|
|
327
328
|
* lives in the fiber-local keyed by `WorkflowCommand.groupDepthKey`
|
|
328
|
-
* (from `@effected/github-commands`), which `@effected/cli` reads too:
|
|
329
|
+
* (from `@effected/github-commands`), which `@effected/cli-kit` reads too:
|
|
329
330
|
* `Render.context` built inside a group carries it as
|
|
330
331
|
* `RenderContext.groupDepth`, so `Doc.print` and `Render.githubLog`
|
|
331
332
|
* render a top-level collapsible as plain text there rather than as a
|
|
@@ -909,7 +910,7 @@ export declare class ActionState extends ActionState_base {
|
|
|
909
910
|
*
|
|
910
911
|
* @public
|
|
911
912
|
*/
|
|
912
|
-
type ActionServices = ActionEnvironment | ActionLogger | ActionOutputs | ActionState | NodeServices.NodeServices | HttpClient.HttpClient;
|
|
913
|
+
type ActionServices = ActionEnvironment | ActionLogger | ActionOutputs | ActionState | NodeServices.NodeServices | Digest.Digest | Mac.Mac | SecureRandom.SecureRandom | HttpClient.HttpClient;
|
|
913
914
|
/**
|
|
914
915
|
* The default runtime an action executes inside.
|
|
915
916
|
*
|
|
@@ -934,6 +935,12 @@ export declare class ActionRuntime {
|
|
|
934
935
|
* and the workflow-command `Logger`.
|
|
935
936
|
*
|
|
936
937
|
* @remarks
|
|
938
|
+
* The platform is `NodeServices.layer` plus Node's `Digest`, `Mac` and
|
|
939
|
+
* `SecureRandom` crypto layers (`NodeCrypto.layerDigest`,
|
|
940
|
+
* `NodeCrypto.layerMac` and `NodeCrypto.layerSecureRandom`), which
|
|
941
|
+
* `NodeServices.layer` does not carry; `BlobStore.layerS3` takes its
|
|
942
|
+
* digests and HMACs from them.
|
|
943
|
+
*
|
|
937
944
|
* A bound constant rather than a factory. A layer-returning function mints a
|
|
938
945
|
* fresh layer per call, and layers memoize by reference — a factory here
|
|
939
946
|
* would rebuild the environment snapshot for every composition site.
|
|
@@ -3277,9 +3284,14 @@ export declare class BlobStore extends BlobStore_base {
|
|
|
3277
3284
|
* credential management, retries and a service catalogue none of which this
|
|
3278
3285
|
* needs.
|
|
3279
3286
|
*
|
|
3280
|
-
* Requires core `
|
|
3281
|
-
*
|
|
3282
|
-
*
|
|
3287
|
+
* Requires core's `Digest.Digest` and `Mac.Mac` (`effect/crypto`) for the
|
|
3288
|
+
* SHA-256 digests and HMACs signing takes, resolved once when the layer is
|
|
3289
|
+
* built: provide `Digest.layerWebCrypto` and `Mac.layerWebCrypto` (with
|
|
3290
|
+
* `SecureRandom.layerWebCrypto`), or the platform family layers such as
|
|
3291
|
+
* `NodeCrypto.layerDigest` and `NodeCrypto.layerMac`; `NodeServices.layer`
|
|
3292
|
+
* includes neither, and `ActionRuntime.layer` provides both. A request
|
|
3293
|
+
* whose signing fails with core's `CryptoError` fails as
|
|
3294
|
+
* {@link BlobStoreError} `misconfigured`. A
|
|
3283
3295
|
* key with a `.` or `..` path segment fails as `invalidKey` before anything
|
|
3284
3296
|
* is signed or sent: every URL parser collapses such a segment, so the store
|
|
3285
3297
|
* would receive another path than the one signed.
|
|
@@ -3288,7 +3300,7 @@ export declare class BlobStore extends BlobStore_base {
|
|
|
3288
3300
|
* memoize by reference — bind it to a `const` rather than calling it at each
|
|
3289
3301
|
* composition site.
|
|
3290
3302
|
*/
|
|
3291
|
-
static readonly layerS3: (config: S3Config) => Layer.Layer<BlobStore, never, HttpClient.HttpClient | ActionOutputs |
|
|
3303
|
+
static readonly layerS3: (config: S3Config) => Layer.Layer<BlobStore, never, HttpClient.HttpClient | ActionOutputs | Digest.Digest | Mac.Mac>;
|
|
3292
3304
|
/** A test double. Unstubbed members die rather than reporting a miss. */
|
|
3293
3305
|
static readonly makeTest: (overrides?: Partial<BlobStoreShape>) => BlobStoreShape;
|
|
3294
3306
|
/** {@link BlobStore.makeTest} behind `Layer.succeed`. */
|
package/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
+
import { Action, ActionRuntime, describeCause } from "./Action.js";
|
|
2
|
+
import { ActionCache, ActionCacheError } from "./ActionCache.js";
|
|
1
3
|
import { ActionEnvironment, ActionEnvironmentError, GitHubContext, RunnerContext } from "./ActionEnvironment.js";
|
|
2
4
|
import { ActionInput } from "./ActionInput.js";
|
|
3
5
|
import { ActionLogger } from "./ActionLogger.js";
|
|
6
|
+
import { ActionManifest, ActionManifestBranding, ActionManifestCompositeRuns, ActionManifestDecodeError, ActionManifestDiff, ActionManifestDockerRuns, ActionManifestInput, ActionManifestNodeRuns, ActionManifestOutput, ActionManifestReadError } from "./ActionManifest.js";
|
|
4
7
|
import { ActionOutputs, DetachedOutputError, InvalidOutputNameError, OutputEncodeError, RecordedOutput, RunnerFileUnavailableError, RunnerFileWriteError } from "./ActionOutputs.js";
|
|
5
8
|
import { ActionState, ActionStateError } from "./ActionState.js";
|
|
6
|
-
import { Action, ActionRuntime, describeCause } from "./Action.js";
|
|
7
|
-
import { BlobTransferError } from "./BlobTransfer.js";
|
|
8
|
-
import { ActionCache, ActionCacheError } from "./ActionCache.js";
|
|
9
|
-
import { ActionManifest, ActionManifestBranding, ActionManifestCompositeRuns, ActionManifestDecodeError, ActionManifestDiff, ActionManifestDockerRuns, ActionManifestInput, ActionManifestNodeRuns, ActionManifestOutput, ActionManifestReadError } from "./ActionManifest.js";
|
|
10
|
-
import { Secret } from "./Secret.js";
|
|
11
|
-
import { OidcTokenError, OidcTokenIssuer } from "./OidcTokenIssuer.js";
|
|
12
9
|
import { ActionsIdentityToken } from "./ActionsIdentityToken.js";
|
|
13
10
|
import { ActionsProvenance } from "./ActionsProvenance.js";
|
|
14
11
|
import { ActionsRegistryCredential } from "./ActionsRegistryCredential.js";
|
|
15
12
|
import { Artifact, ArtifactError } from "./Artifact.js";
|
|
16
13
|
import { BlobEnvelope, BlobMetadataDecodeError, BlobMetadataEncodeError, NotABlobEnvelopeError, TruncatedBlobEnvelopeError, UnsupportedBlobEnvelopeVersionError } from "./BlobEnvelope.js";
|
|
17
|
-
import { BlobStore, BlobStoreError } from "./BlobStore.js";
|
|
18
14
|
import { GitHubCacheBlobStore } from "./BlobStore.githubCache.js";
|
|
15
|
+
import { BlobStore, BlobStoreError } from "./BlobStore.js";
|
|
16
|
+
import { BlobTransferError } from "./BlobTransfer.js";
|
|
19
17
|
import { CacheKey, CacheKeyBadPatternError, CacheKeyReadError } from "./CacheKey.js";
|
|
20
|
-
import { CheckState, projectCheckState } from "./CheckState.js";
|
|
21
|
-
import { ManagedDocument, ManagedDocumentError } from "./ManagedDocument.js";
|
|
22
18
|
import { CheckDocument, CheckDocumentError, CheckDocumentStamp, CheckReport } from "./CheckDocument.js";
|
|
19
|
+
import { CheckState, projectCheckState } from "./CheckState.js";
|
|
23
20
|
import { ChildEnv } from "./ChildEnv.js";
|
|
24
21
|
import { DetachedLogUnavailableError, DetachedNotReadyError, DetachedProcess, DetachedSignalFailedError, DetachedSpawnFailedError, InvalidPidError, ProcessId } from "./DetachedProcess.js";
|
|
25
22
|
import { DryRun } from "./DryRun.js";
|
|
26
23
|
import { GitHubMarkdown } from "./GitHubMarkdown.js";
|
|
27
24
|
import { GitHubToken, GitHubTokenError } from "./GitHubToken.js";
|
|
28
|
-
import {
|
|
25
|
+
import { ManagedDocument, ManagedDocumentError } from "./ManagedDocument.js";
|
|
26
|
+
import { OidcTokenError, OidcTokenIssuer } from "./OidcTokenIssuer.js";
|
|
29
27
|
import { AmbientPackageManager, CachedPackageManager, InstalledPackageManager, PackageManagerInstaller, PackageManagerInstallerError } from "./PackageManagerInstaller.js";
|
|
28
|
+
import { Secret } from "./Secret.js";
|
|
29
|
+
import { ToolInstaller, ToolInstallerError } from "./ToolInstaller.js";
|
|
30
30
|
import { WorkflowCommand } from "@effected/github-commands";
|
|
31
31
|
|
|
32
32
|
export { Action, ActionCache, ActionCacheError, ActionEnvironment, ActionEnvironmentError, ActionInput, ActionLogger, ActionManifest, ActionManifestBranding, ActionManifestCompositeRuns, ActionManifestDecodeError, ActionManifestDiff, ActionManifestDockerRuns, ActionManifestInput, ActionManifestNodeRuns, ActionManifestOutput, ActionManifestReadError, ActionOutputs, ActionRuntime, ActionState, ActionStateError, ActionsIdentityToken, ActionsProvenance, ActionsRegistryCredential, AmbientPackageManager, Artifact, ArtifactError, BlobEnvelope, BlobMetadataDecodeError, BlobMetadataEncodeError, BlobStore, BlobStoreError, BlobTransferError, CacheKey, CacheKeyBadPatternError, CacheKeyReadError, CachedPackageManager, CheckDocument, CheckDocumentError, CheckDocumentStamp, CheckReport, CheckState, ChildEnv, DetachedLogUnavailableError, DetachedNotReadyError, DetachedOutputError, DetachedProcess, DetachedSignalFailedError, DetachedSpawnFailedError, DryRun, GitHubCacheBlobStore, GitHubContext, GitHubMarkdown, GitHubToken, GitHubTokenError, InstalledPackageManager, InvalidOutputNameError, InvalidPidError, ManagedDocument, ManagedDocumentError, NotABlobEnvelopeError, OidcTokenError, OidcTokenIssuer, OutputEncodeError, PackageManagerInstaller, PackageManagerInstallerError, ProcessId, RecordedOutput, RunnerContext, RunnerFileUnavailableError, RunnerFileWriteError, Secret, ToolInstaller, ToolInstallerError, TruncatedBlobEnvelopeError, UnsupportedBlobEnvelopeVersionError, WorkflowCommand, describeCause, projectCheckState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/github-actions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.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,23 +39,23 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@azure/storage-blob": "^12.33.0",
|
|
42
|
-
"@effected/crypto": "^0.
|
|
43
|
-
"@effected/github": "^0.
|
|
44
|
-
"@effected/github-commands": "^0.
|
|
45
|
-
"@effected/glob": "^0.
|
|
46
|
-
"@effected/jwt": "^0.
|
|
47
|
-
"@effected/markdown": "^0.
|
|
48
|
-
"@effected/npm": "^0.
|
|
49
|
-
"@effected/oidc": "^0.
|
|
50
|
-
"@effected/sbom": "^0.
|
|
51
|
-
"@effected/semver": "^0.
|
|
52
|
-
"@effected/templates": "^0.
|
|
53
|
-
"@effected/walker": "^0.
|
|
54
|
-
"@effected/yaml": "^0.
|
|
42
|
+
"@effected/crypto": "^0.5.0",
|
|
43
|
+
"@effected/github": "^0.28.0",
|
|
44
|
+
"@effected/github-commands": "^0.9.0",
|
|
45
|
+
"@effected/glob": "^0.18.0",
|
|
46
|
+
"@effected/jwt": "^0.9.0",
|
|
47
|
+
"@effected/markdown": "^0.26.0",
|
|
48
|
+
"@effected/npm": "^0.30.0",
|
|
49
|
+
"@effected/oidc": "^0.4.0",
|
|
50
|
+
"@effected/sbom": "^0.20.0",
|
|
51
|
+
"@effected/semver": "^0.21.0",
|
|
52
|
+
"@effected/templates": "^0.17.0",
|
|
53
|
+
"@effected/walker": "^0.25.0",
|
|
54
|
+
"@effected/yaml": "^0.28.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@effect/platform-node": "
|
|
58
|
-
"effect": "
|
|
57
|
+
"@effect/platform-node": "~4.1.0",
|
|
58
|
+
"effect": "~4.1.0"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=24.11.0"
|