@effected/github-actions 0.11.0 → 0.12.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/ActionInput.js CHANGED
@@ -21,13 +21,14 @@ const inputVariable = (name) => `INPUT_${name.replaceAll(" ", "_").toUpperCase()
21
21
  * A validation failure for an input that is present but unusable.
22
22
  *
23
23
  * @remarks
24
- * `actual` carries the offending value, and that is load-bearing rather than
25
- * decorative: `Config.withDefault` and `Config.option` fall back only for
26
- * *missing data*, and their `isMissingDataOnly` check reads an `InvalidValue`
27
- * whose `actual` is `None` as missing (`Config.ts:304`). An error built without
28
- * it would therefore be **swallowed by a default** — so `dry-run: yes` would
29
- * quietly become `false` and the action would perform the mutations the author
30
- * meant to rehearse.
24
+ * `Config.withDefault` and `Config.option` fall back only when the config
25
+ * resolves *absent* — no provider input at all. A failure raised from inside
26
+ * `Config.mapEffect` is a hard evaluation failure carrying the evidence that
27
+ * input WAS present, so a default never swallows it (`Config.ts`: the
28
+ * `Resolved`/`Absent` resolution model and `mapEffect`). That is the guard
29
+ * against the shipped defect where `dry-run: yes` quietly became `false` and
30
+ * the action performed the mutations the author meant to rehearse. `actual`
31
+ * carries the offending value so the rendered error names it.
31
32
  */
32
33
  const configError = (message, actual) => new Config.ConfigError(new Schema.SchemaError(new SchemaIssue.InvalidValue({ message }, actual)));
33
34
  /** YAML 1.2 core-schema booleans, which is what the runner documents. */
@@ -154,7 +155,7 @@ var ActionInput = class ActionInput {
154
155
  * manifest default explicitly instead of omitting the key.
155
156
  */
156
157
  static string(name) {
157
- return Config.string(inputVariable(name));
158
+ return Config.String(inputVariable(name));
158
159
  }
159
160
  /**
160
161
  * A boolean input, per the runner's documented YAML 1.2 core schema.
@@ -167,7 +168,7 @@ var ActionInput = class ActionInput {
167
168
  * a malformed `dry-run` quietly reading as `false`.
168
169
  */
169
170
  static boolean(name) {
170
- return Config.string(inputVariable(name)).pipe(Config.mapOrFail((raw) => {
171
+ return Config.String(inputVariable(name)).pipe(Config.mapEffect((raw) => {
171
172
  const value = raw.trim();
172
173
  if (TRUE.has(value)) return Effect.succeed(true);
173
174
  if (FALSE.has(value)) return Effect.succeed(false);
@@ -182,7 +183,7 @@ var ActionInput = class ActionInput {
182
183
  * `.pipe(Config.withDefault(n))`.
183
184
  */
184
185
  static integer(name) {
185
- return Config.int(inputVariable(name));
186
+ return Config.Int(inputVariable(name));
186
187
  }
187
188
  /**
188
189
  * A secret input, kept redacted.
@@ -193,7 +194,7 @@ var ActionInput = class ActionInput {
193
194
  * default to redact.
194
195
  */
195
196
  static redacted(name) {
196
- return Config.redacted(inputVariable(name));
197
+ return Config.Redacted(inputVariable(name));
197
198
  }
198
199
  /**
199
200
  * A multiline input, split on newlines.
@@ -207,7 +208,7 @@ var ActionInput = class ActionInput {
207
208
  * `Config.withDefault([])` is load-bearing for an optional multiline input.
208
209
  */
209
210
  static lines(name) {
210
- return Config.string(inputVariable(name)).pipe(Config.map((raw) => raw.split("\n").map((line) => line.trim()).filter((line) => line !== "")));
211
+ return Config.String(inputVariable(name)).pipe(Config.map((raw) => raw.split("\n").map((line) => line.trim()).filter((line) => line !== "")));
211
212
  }
212
213
  /**
213
214
  * A list input, accepting the shapes workflow authors actually write.
@@ -244,7 +245,7 @@ var ActionInput = class ActionInput {
244
245
  * newline) is present, and parses to `[]`.
245
246
  */
246
247
  static list(name) {
247
- return Config.string(inputVariable(name)).pipe(Config.mapOrFail((raw) => {
248
+ return Config.String(inputVariable(name)).pipe(Config.mapEffect((raw) => {
248
249
  const trimmed = raw.trim();
249
250
  if (trimmed === "") return Effect.succeed([]);
250
251
  if (trimmed.startsWith("[")) try {
@@ -280,7 +281,7 @@ var ActionInput = class ActionInput {
280
281
  */
281
282
  static pairs(name, options) {
282
283
  const requireValue = options?.requireValue ?? false;
283
- return Config.string(inputVariable(name)).pipe(Config.mapOrFail((raw) => {
284
+ return Config.String(inputVariable(name)).pipe(Config.mapEffect((raw) => {
284
285
  const result = {};
285
286
  for (const line of raw.split("\n")) {
286
287
  const stripped = stripComment(line);
@@ -307,7 +308,7 @@ var ActionInput = class ActionInput {
307
308
  * never swallowed by a default.
308
309
  */
309
310
  static schema(name, schema) {
310
- return Config.string(inputVariable(name)).pipe(Config.mapOrFail((raw) => {
311
+ return Config.String(inputVariable(name)).pipe(Config.mapEffect((raw) => {
311
312
  let parsed;
312
313
  try {
313
314
  parsed = JSON.parse(raw);
@@ -339,7 +340,7 @@ var ActionInput = class ActionInput {
339
340
  * A **flat single-segment** lookup additionally tries the `INPUT_`
340
341
  * derivation of the name first, mirroring the order the production runtime
341
342
  * installs ({@link ActionInput.providerOver} via `layerDefault`) — so a
342
- * bare `Config.string("biome-version")` resolves under this provider
343
+ * bare `Config.String("biome-version")` resolves under this provider
343
344
  * exactly as it does inside `Action.run`. Nested and numeric paths pass
344
345
  * through as the joined spelling only, as ever.
345
346
  *
@@ -408,7 +409,7 @@ var ActionInput = class ActionInput {
408
409
  * Inputs-first resolution layered over an existing provider.
409
410
  *
410
411
  * @remarks
411
- * A bare `Config.string("dry-run")` resolves a **flat** name — one string
412
+ * A bare `Config.String("dry-run")` resolves a **flat** name — one string
412
413
  * segment — by first trying the variable the runner would have published for
413
414
  * an input of that name (the `INPUT_` derivation this module owns), and only
414
415
  * then trying the name unchanged through `ambient`. Anything the runner
@@ -440,7 +441,7 @@ var ActionInput = class ActionInput {
440
441
  *
441
442
  * **The single-segment retry above makes the obvious test
442
443
  * non-discriminating**, which is worth knowing before writing one. Because a
443
- * bare `Config.string("release-branch")` resolves through the same `INPUT_`
444
+ * bare `Config.String("release-branch")` resolves through the same `INPUT_`
444
445
  * derivation as `ActionInput.string("release-branch")`, a test meant to prove
445
446
  * the accessor reads the mangled key passes just as well with the accessor
446
447
  * swapped for a bare `Config`. Only a bare `fromEnv` underneath tells them
package/Secret.js CHANGED
@@ -202,7 +202,7 @@ var Secret = class Secret {
202
202
  * naming the variable rather than an empty `Redacted` that fails much later
203
203
  * as an authentication error.
204
204
  */
205
- static adopt = (name) => Config.redacted(name);
205
+ static adopt = (name) => Config.Redacted(name);
206
206
  };
207
207
 
208
208
  //#endregion
package/index.d.ts CHANGED
@@ -1675,7 +1675,7 @@ export declare class ActionInput {
1675
1675
  * A **flat single-segment** lookup additionally tries the `INPUT_`
1676
1676
  * derivation of the name first, mirroring the order the production runtime
1677
1677
  * installs ({@link ActionInput.providerOver} via `layerDefault`) — so a
1678
- * bare `Config.string("biome-version")` resolves under this provider
1678
+ * bare `Config.String("biome-version")` resolves under this provider
1679
1679
  * exactly as it does inside `Action.run`. Nested and numeric paths pass
1680
1680
  * through as the joined spelling only, as ever.
1681
1681
  *
@@ -1722,7 +1722,7 @@ export declare class ActionInput {
1722
1722
  * Inputs-first resolution layered over an existing provider.
1723
1723
  *
1724
1724
  * @remarks
1725
- * A bare `Config.string("dry-run")` resolves a **flat** name — one string
1725
+ * A bare `Config.String("dry-run")` resolves a **flat** name — one string
1726
1726
  * segment — by first trying the variable the runner would have published for
1727
1727
  * an input of that name (the `INPUT_` derivation this module owns), and only
1728
1728
  * then trying the name unchanged through `ambient`. Anything the runner
@@ -1754,7 +1754,7 @@ export declare class ActionInput {
1754
1754
  *
1755
1755
  * **The single-segment retry above makes the obvious test
1756
1756
  * non-discriminating**, which is worth knowing before writing one. Because a
1757
- * bare `Config.string("release-branch")` resolves through the same `INPUT_`
1757
+ * bare `Config.String("release-branch")` resolves through the same `INPUT_`
1758
1758
  * derivation as `ActionInput.string("release-branch")`, a test meant to prove
1759
1759
  * the accessor reads the mangled key passes just as well with the accessor
1760
1760
  * swapped for a bare `Config`. Only a bare `fromEnv` underneath tells them
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/github-actions",
3
- "version": "0.11.0",
3
+ "version": "0.12.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.9.0",
43
- "@effected/glob": "^0.5.0",
44
- "@effected/markdown": "^0.9.0",
45
- "@effected/npm": "^0.13.0",
46
- "@effected/sbom": "^0.5.0",
47
- "@effected/templates": "^0.5.0"
42
+ "@effected/github": "^0.10.0",
43
+ "@effected/glob": "^0.6.0",
44
+ "@effected/markdown": "^0.10.0",
45
+ "@effected/npm": "^0.14.0",
46
+ "@effected/sbom": "^0.6.0",
47
+ "@effected/templates": "^0.6.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@effect/platform-node": "4.0.0-rc.112",
51
- "effect": "4.0.0-rc.112"
50
+ "@effect/platform-node": "4.0.0-rc.115",
51
+ "effect": "4.0.0-rc.115"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=24.11.0"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.0"
8
+ "packageVersion": "7.59.1"
9
9
  }
10
10
  ]
11
11
  }