@effected/github-actions 0.7.0 → 0.8.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.
@@ -286,6 +286,26 @@ var ActionEnvironment = class ActionEnvironment extends Context.Service()("@effe
286
286
  * `undefined` means *not served*, so a suite cannot arrange `undefined` as
287
287
  * the payload itself. A webhook payload is always a JSON object; the case
288
288
  * does not arise, and reserving the sentinel keeps the argument optional.
289
+ *
290
+ * When a suite wants the **real read path** rather than a served value —
291
+ * exercising the actual `GITHUB_EVENT_PATH` read-and-parse — this member is
292
+ * the seam: it leaves `FileSystem` in `R` precisely so the suite chooses
293
+ * the filesystem. Compose it with `@effected/memfs`'s seeded in-memory
294
+ * volume rather than a hand-rolled stub: the volume honors the whole
295
+ * `FileSystem` contract, and an unseeded path fails typed `NotFound`
296
+ * instead of whatever a hand stub happens to answer.
297
+ *
298
+ * @example
299
+ * ```ts
300
+ * import { ActionEnvironment } from "@effected/github-actions";
301
+ * import { MemoryFileSystem } from "@effected/memfs";
302
+ * import { Layer } from "effect";
303
+ *
304
+ * const layer = Layer.effect(
305
+ * ActionEnvironment,
306
+ * ActionEnvironment.makeTest({ GITHUB_EVENT_PATH: "/event.json" }),
307
+ * ).pipe(Layer.provide(MemoryFileSystem.layerWith({ "/event.json": JSON.stringify({ action: "opened" }) })));
308
+ * ```
289
309
  */
290
310
  static makeTest = (overrides = {}, payload) => Effect.map(make({
291
311
  ...TEST_DEFAULTS,
@@ -302,7 +322,10 @@ var ActionEnvironment = class ActionEnvironment extends Context.Service()("@effe
302
322
  * The stub is why the payload has to be served here rather than through the
303
323
  * filesystem: `make` captures the filesystem at construction, so seeding
304
324
  * `GITHUB_EVENT_PATH` through `overrides` would send the read to a noop
305
- * filesystem and fail. Pass the payload as the second argument instead.
325
+ * filesystem and fail. Pass the payload as the second argument instead —
326
+ * or, for a suite that wants the real read path over a full filesystem,
327
+ * compose {@link ActionEnvironment.makeTest} with `@effected/memfs`'s
328
+ * seeded volume; the recipe is on that member.
306
329
  *
307
330
  * @example
308
331
  * ```ts
package/README.md CHANGED
@@ -8,7 +8,7 @@
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-release.** This package is part of the `@effected/*` kit, in pre-`1.0.0`
11
- > development against a single pinned Effect v4 beta. Packages graduate to
11
+ > development against a single pinned Effect v4 prerelease. Packages graduate to
12
12
  > `1.0.0` once Effect `4.0.0` ships. To hold your own `effect` versions at
13
13
  > exactly the ones the kit is built and tested against, install
14
14
  > [`@effected/pnpm-plugin-effect`](https://www.npmjs.com/package/@effected/pnpm-plugin-effect).
package/index.d.ts CHANGED
@@ -194,6 +194,26 @@ declare class ActionEnvironment extends ActionEnvironment_base {
194
194
  * `undefined` means *not served*, so a suite cannot arrange `undefined` as
195
195
  * the payload itself. A webhook payload is always a JSON object; the case
196
196
  * does not arise, and reserving the sentinel keeps the argument optional.
197
+ *
198
+ * When a suite wants the **real read path** rather than a served value —
199
+ * exercising the actual `GITHUB_EVENT_PATH` read-and-parse — this member is
200
+ * the seam: it leaves `FileSystem` in `R` precisely so the suite chooses
201
+ * the filesystem. Compose it with `@effected/memfs`'s seeded in-memory
202
+ * volume rather than a hand-rolled stub: the volume honors the whole
203
+ * `FileSystem` contract, and an unseeded path fails typed `NotFound`
204
+ * instead of whatever a hand stub happens to answer.
205
+ *
206
+ * @example
207
+ * ```ts
208
+ * import { ActionEnvironment } from "@effected/github-actions";
209
+ * import { MemoryFileSystem } from "@effected/memfs";
210
+ * import { Layer } from "effect";
211
+ *
212
+ * const layer = Layer.effect(
213
+ * ActionEnvironment,
214
+ * ActionEnvironment.makeTest({ GITHUB_EVENT_PATH: "/event.json" }),
215
+ * ).pipe(Layer.provide(MemoryFileSystem.layerWith({ "/event.json": JSON.stringify({ action: "opened" }) })));
216
+ * ```
197
217
  */
198
218
  static readonly makeTest: (overrides?: Readonly<Record<string, string>>, payload?: unknown) => Effect.Effect<ActionEnvironmentShape, never, FileSystem.FileSystem>;
199
219
  /**
@@ -204,7 +224,10 @@ declare class ActionEnvironment extends ActionEnvironment_base {
204
224
  * The stub is why the payload has to be served here rather than through the
205
225
  * filesystem: `make` captures the filesystem at construction, so seeding
206
226
  * `GITHUB_EVENT_PATH` through `overrides` would send the read to a noop
207
- * filesystem and fail. Pass the payload as the second argument instead.
227
+ * filesystem and fail. Pass the payload as the second argument instead —
228
+ * or, for a suite that wants the real read path over a full filesystem,
229
+ * compose {@link ActionEnvironment.makeTest} with `@effected/memfs`'s
230
+ * seeded volume; the recipe is on that member.
208
231
  *
209
232
  * @example
210
233
  * ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/github-actions",
3
- "version": "0.7.0",
3
+ "version": "0.8.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,16 +39,16 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@azure/storage-blob": "^12.33.0",
42
- "@effected/github": "^0.4.2",
43
- "@effected/glob": "^0.3.0",
44
- "@effected/markdown": "^0.5.1",
45
- "@effected/npm": "^0.9.0",
46
- "@effected/sbom": "^0.3.1",
47
- "@effected/templates": "^0.2.0"
42
+ "@effected/github": "^0.5.0",
43
+ "@effected/glob": "^0.4.0",
44
+ "@effected/markdown": "^0.6.0",
45
+ "@effected/npm": "^0.10.0",
46
+ "@effected/sbom": "^0.4.0",
47
+ "@effected/templates": "^0.3.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@effect/platform-node": "4.0.0-beta.107",
51
- "effect": "4.0.0-beta.107"
50
+ "@effect/platform-node": "4.0.0-rc.109",
51
+ "effect": "4.0.0-rc.109"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=24.11.0"