@effected/github-actions 0.11.0 → 0.13.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 +19 -18
- package/ActionOutputs.js +121 -16
- package/Secret.js +1 -1
- package/index.d.ts +84 -5
- package/index.js +2 -2
- package/package.json +9 -9
- package/tsdoc-metadata.json +1 -1
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
|
-
* `
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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/ActionOutputs.js
CHANGED
|
@@ -103,6 +103,44 @@ const delimiterFor = (value) => {
|
|
|
103
103
|
};
|
|
104
104
|
/** A name that would break the block structure it lives in. */
|
|
105
105
|
const isUsableName = (name) => name !== "" && !/[\r\n]/.test(name);
|
|
106
|
+
/**
|
|
107
|
+
* The JSON text `setJson` publishes for `value`: encoded through `schema`,
|
|
108
|
+
* then stringified. The one step of `setJson` that can fail, shared by the
|
|
109
|
+
* real layer and both test doubles so that none of them can skip it.
|
|
110
|
+
*/
|
|
111
|
+
const encodeJson = (name, value, schema) => Schema.encodeUnknownEffect(schema)(value).pipe(Effect.mapError((cause) => new OutputEncodeError({
|
|
112
|
+
name,
|
|
113
|
+
cause
|
|
114
|
+
})), Effect.map((encoded) => JSON.stringify(encoded)));
|
|
115
|
+
/**
|
|
116
|
+
* One call an {@link ActionOutputs.recording} double observed.
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* `value` is always the string the runner would have seen: for `setJson` that
|
|
120
|
+
* is the **encoded** JSON text, after the same schema encode the real layer
|
|
121
|
+
* performs, so a test asserting on it reads exactly what a later step's
|
|
122
|
+
* `steps.<id>.outputs.<name>` expression would. `name` is present for the
|
|
123
|
+
* members that take one (`set`, `setJson`, `exportVariable`) and absent
|
|
124
|
+
* otherwise.
|
|
125
|
+
*
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
var RecordedOutput = class extends Schema.Class("RecordedOutput")({
|
|
129
|
+
/** Which {@link ActionOutputsShape} member was called. */
|
|
130
|
+
member: Schema.Literals([
|
|
131
|
+
"set",
|
|
132
|
+
"setJson",
|
|
133
|
+
"summary",
|
|
134
|
+
"exportVariable",
|
|
135
|
+
"addPath",
|
|
136
|
+
"setFailed",
|
|
137
|
+
"setSecret"
|
|
138
|
+
]),
|
|
139
|
+
/** The output or variable name, for the members that take one. */
|
|
140
|
+
name: Schema.optionalKey(Schema.String),
|
|
141
|
+
/** What was published — value, message, path, content or secret — as the runner would have read it. */
|
|
142
|
+
value: Schema.String
|
|
143
|
+
}) {};
|
|
106
144
|
const make = Effect.gen(function* () {
|
|
107
145
|
const env = yield* ActionEnvironment;
|
|
108
146
|
const fs = yield* FileSystem.FileSystem;
|
|
@@ -124,10 +162,7 @@ const make = Effect.gen(function* () {
|
|
|
124
162
|
const set = (name, value) => appendBlock("GITHUB_OUTPUT", name, value);
|
|
125
163
|
return {
|
|
126
164
|
set,
|
|
127
|
-
setJson: (name, value, schema) =>
|
|
128
|
-
name,
|
|
129
|
-
cause
|
|
130
|
-
})), Effect.flatMap((encoded) => set(name, JSON.stringify(encoded)))),
|
|
165
|
+
setJson: (name, value, schema) => encodeJson(name, value, schema).pipe(Effect.flatMap((json) => set(name, json))),
|
|
131
166
|
summary: (content) => append("GITHUB_STEP_SUMMARY", content),
|
|
132
167
|
exportVariable: (name, value) => appendBlock("GITHUB_ENV", name, value),
|
|
133
168
|
addPath: (path) => append("GITHUB_PATH", `${path}\n`),
|
|
@@ -211,20 +246,90 @@ var ActionOutputs = class ActionOutputs extends Context.Service()("@effected/git
|
|
|
211
246
|
setFailed: (message) => Console.error(message),
|
|
212
247
|
setSecret: () => Effect.void
|
|
213
248
|
});
|
|
214
|
-
/**
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
249
|
+
/**
|
|
250
|
+
* A test double. Unstubbed members die rather than silently succeeding.
|
|
251
|
+
*
|
|
252
|
+
* @remarks
|
|
253
|
+
* **`setJson` always encodes first.** The value is encoded through its
|
|
254
|
+
* schema exactly as the real layer does — failing typed with
|
|
255
|
+
* {@link OutputEncodeError} — and only then is a supplied `setJson`
|
|
256
|
+
* override called, with the original `(name, value, schema)`. An override
|
|
257
|
+
* that accepts `schema` and ignores it therefore **cannot disable
|
|
258
|
+
* output-schema checking**: a value/schema drift is a typed failure under
|
|
259
|
+
* this double whether or not the override looks at the schema. Without an
|
|
260
|
+
* override, a valid value still dies unimplemented as every other unstubbed
|
|
261
|
+
* member does. Most tests want neither: reach for
|
|
262
|
+
* {@link ActionOutputs.recording} instead.
|
|
263
|
+
*/
|
|
264
|
+
static makeTest = (overrides = {}) => {
|
|
265
|
+
const setJson = overrides.setJson ?? (() => Effect.sync(() => unimplemented("setJson")));
|
|
266
|
+
return {
|
|
267
|
+
set: () => Effect.sync(() => unimplemented("set")),
|
|
268
|
+
summary: () => Effect.sync(() => unimplemented("summary")),
|
|
269
|
+
exportVariable: () => Effect.sync(() => unimplemented("exportVariable")),
|
|
270
|
+
addPath: () => Effect.sync(() => unimplemented("addPath")),
|
|
271
|
+
setFailed: () => Effect.sync(() => unimplemented("setFailed")),
|
|
272
|
+
setSecret: () => Effect.sync(() => unimplemented("setSecret")),
|
|
273
|
+
...overrides,
|
|
274
|
+
setJson: (name, value, schema) => encodeJson(name, value, schema).pipe(Effect.flatMap(() => setJson(name, value, schema)))
|
|
275
|
+
};
|
|
276
|
+
};
|
|
225
277
|
/** {@link ActionOutputs.makeTest} behind `Layer.succeed`. */
|
|
226
278
|
static layerTest = (overrides = {}) => Layer.succeed(ActionOutputs, ActionOutputs.makeTest(overrides));
|
|
279
|
+
/**
|
|
280
|
+
* A recording double: every member appends a {@link RecordedOutput} to a
|
|
281
|
+
* journal the test reads back, in call order.
|
|
282
|
+
*
|
|
283
|
+
* @remarks
|
|
284
|
+
* This is the double most tests of an action want — "what did it publish?"
|
|
285
|
+
* — shipped so that nobody hand-writes a `setJson` override that drops the
|
|
286
|
+
* schema encode (the trap `makeTest` now closes too). `setJson` encodes
|
|
287
|
+
* through its schema exactly as the real layer does, failing typed with
|
|
288
|
+
* {@link OutputEncodeError} and recording nothing on a drift, and records
|
|
289
|
+
* the **encoded JSON text** — what the runner would have read — not the
|
|
290
|
+
* decoded value. `set`, `exportVariable` and `setJson` refuse an unusable
|
|
291
|
+
* name with {@link InvalidOutputNameError}, as the real layer does, rather
|
|
292
|
+
* than recording it.
|
|
293
|
+
*
|
|
294
|
+
* `setSecret` records the secret's **plaintext** under
|
|
295
|
+
* `member: "setSecret"`. That is deliberate for a recording double: the
|
|
296
|
+
* journal never leaves the test, and a test asserting that a value *was*
|
|
297
|
+
* masked needs to see which one. Do not hand this journal to anything that
|
|
298
|
+
* logs.
|
|
299
|
+
*
|
|
300
|
+
* Each call returns a fresh, independent journal — there is no state shared
|
|
301
|
+
* between two `recording()` calls.
|
|
302
|
+
*/
|
|
303
|
+
static recording = () => {
|
|
304
|
+
const entries = [];
|
|
305
|
+
const record = (member, value, name) => Effect.sync(() => {
|
|
306
|
+
entries.push(RecordedOutput.make({
|
|
307
|
+
member,
|
|
308
|
+
value,
|
|
309
|
+
...name === void 0 ? {} : { name }
|
|
310
|
+
}));
|
|
311
|
+
});
|
|
312
|
+
const recordNamed = (member, file, name, value) => isUsableName(name) ? record(member, value, name) : Effect.fail(new InvalidOutputNameError({
|
|
313
|
+
file,
|
|
314
|
+
name
|
|
315
|
+
}));
|
|
316
|
+
return {
|
|
317
|
+
layer: Layer.succeed(ActionOutputs, {
|
|
318
|
+
set: (name, value) => recordNamed("set", "GITHUB_OUTPUT", name, value),
|
|
319
|
+
setJson: (name, value, schema) => isUsableName(name) ? encodeJson(name, value, schema).pipe(Effect.flatMap((json) => record("setJson", json, name))) : Effect.fail(new InvalidOutputNameError({
|
|
320
|
+
file: "GITHUB_OUTPUT",
|
|
321
|
+
name
|
|
322
|
+
})),
|
|
323
|
+
summary: (content) => record("summary", content),
|
|
324
|
+
exportVariable: (name, value) => recordNamed("exportVariable", "GITHUB_ENV", name, value),
|
|
325
|
+
addPath: (path) => record("addPath", path),
|
|
326
|
+
setFailed: (message) => record("setFailed", message),
|
|
327
|
+
setSecret: (value) => record("setSecret", value)
|
|
328
|
+
}),
|
|
329
|
+
entries: () => entries.slice()
|
|
330
|
+
};
|
|
331
|
+
};
|
|
227
332
|
};
|
|
228
333
|
|
|
229
334
|
//#endregion
|
|
230
|
-
export { ActionOutputs, DetachedOutputError, InvalidOutputNameError, OutputEncodeError, RunnerFileUnavailableError, RunnerFileWriteError };
|
|
335
|
+
export { ActionOutputs, DetachedOutputError, InvalidOutputNameError, OutputEncodeError, RecordedOutput, RunnerFileUnavailableError, RunnerFileWriteError };
|
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.
|
|
205
|
+
static adopt = (name) => Config.Redacted(name);
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
//#endregion
|
package/index.d.ts
CHANGED
|
@@ -586,6 +586,46 @@ export declare class DetachedOutputError extends DetachedOutputError_base {
|
|
|
586
586
|
* @public
|
|
587
587
|
*/
|
|
588
588
|
type ActionOutputError = RunnerFileUnavailableError | RunnerFileWriteError | InvalidOutputNameError | OutputEncodeError | DetachedOutputError;
|
|
589
|
+
declare const RecordedOutput_base: Schema.Class<RecordedOutput, Schema.Struct<{
|
|
590
|
+
/** Which {@link ActionOutputsShape} member was called. */
|
|
591
|
+
readonly member: Schema.Literals<readonly ["set", "setJson", "summary", "exportVariable", "addPath", "setFailed", "setSecret"]>;
|
|
592
|
+
/** The output or variable name, for the members that take one. */
|
|
593
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
594
|
+
/** What was published — value, message, path, content or secret — as the runner would have read it. */
|
|
595
|
+
readonly value: Schema.String;
|
|
596
|
+
}>, {}>;
|
|
597
|
+
/**
|
|
598
|
+
* One call an {@link ActionOutputs.recording} double observed.
|
|
599
|
+
*
|
|
600
|
+
* @remarks
|
|
601
|
+
* `value` is always the string the runner would have seen: for `setJson` that
|
|
602
|
+
* is the **encoded** JSON text, after the same schema encode the real layer
|
|
603
|
+
* performs, so a test asserting on it reads exactly what a later step's
|
|
604
|
+
* `steps.<id>.outputs.<name>` expression would. `name` is present for the
|
|
605
|
+
* members that take one (`set`, `setJson`, `exportVariable`) and absent
|
|
606
|
+
* otherwise.
|
|
607
|
+
*
|
|
608
|
+
* @public
|
|
609
|
+
*/
|
|
610
|
+
export declare class RecordedOutput extends RecordedOutput_base {}
|
|
611
|
+
/**
|
|
612
|
+
* The member names a {@link RecordedOutput} can carry.
|
|
613
|
+
*
|
|
614
|
+
* @public
|
|
615
|
+
*/
|
|
616
|
+
type RecordedOutputMember = RecordedOutput["member"];
|
|
617
|
+
/**
|
|
618
|
+
* What {@link ActionOutputs.recording} returns: the layer to provide and the
|
|
619
|
+
* journal it fills.
|
|
620
|
+
*
|
|
621
|
+
* @public
|
|
622
|
+
*/
|
|
623
|
+
interface RecordingOutputs {
|
|
624
|
+
/** An {@link ActionOutputs} whose every member records into this journal. */
|
|
625
|
+
readonly layer: Layer.Layer<ActionOutputs>;
|
|
626
|
+
/** A snapshot of every recorded call so far, in call order. */
|
|
627
|
+
readonly entries: () => ReadonlyArray<RecordedOutput>;
|
|
628
|
+
}
|
|
589
629
|
/**
|
|
590
630
|
* The {@link ActionOutputs} service shape.
|
|
591
631
|
*
|
|
@@ -674,10 +714,49 @@ export declare class ActionOutputs extends ActionOutputs_base {
|
|
|
674
714
|
* channel to fail through.
|
|
675
715
|
*/
|
|
676
716
|
static readonly layerDetached: Layer.Layer<ActionOutputs>;
|
|
677
|
-
/**
|
|
717
|
+
/**
|
|
718
|
+
* A test double. Unstubbed members die rather than silently succeeding.
|
|
719
|
+
*
|
|
720
|
+
* @remarks
|
|
721
|
+
* **`setJson` always encodes first.** The value is encoded through its
|
|
722
|
+
* schema exactly as the real layer does — failing typed with
|
|
723
|
+
* {@link OutputEncodeError} — and only then is a supplied `setJson`
|
|
724
|
+
* override called, with the original `(name, value, schema)`. An override
|
|
725
|
+
* that accepts `schema` and ignores it therefore **cannot disable
|
|
726
|
+
* output-schema checking**: a value/schema drift is a typed failure under
|
|
727
|
+
* this double whether or not the override looks at the schema. Without an
|
|
728
|
+
* override, a valid value still dies unimplemented as every other unstubbed
|
|
729
|
+
* member does. Most tests want neither: reach for
|
|
730
|
+
* {@link ActionOutputs.recording} instead.
|
|
731
|
+
*/
|
|
678
732
|
static readonly makeTest: (overrides?: Partial<ActionOutputsShape>) => ActionOutputsShape;
|
|
679
733
|
/** {@link ActionOutputs.makeTest} behind `Layer.succeed`. */
|
|
680
734
|
static readonly layerTest: (overrides?: Partial<ActionOutputsShape>) => Layer.Layer<ActionOutputs>;
|
|
735
|
+
/**
|
|
736
|
+
* A recording double: every member appends a {@link RecordedOutput} to a
|
|
737
|
+
* journal the test reads back, in call order.
|
|
738
|
+
*
|
|
739
|
+
* @remarks
|
|
740
|
+
* This is the double most tests of an action want — "what did it publish?"
|
|
741
|
+
* — shipped so that nobody hand-writes a `setJson` override that drops the
|
|
742
|
+
* schema encode (the trap `makeTest` now closes too). `setJson` encodes
|
|
743
|
+
* through its schema exactly as the real layer does, failing typed with
|
|
744
|
+
* {@link OutputEncodeError} and recording nothing on a drift, and records
|
|
745
|
+
* the **encoded JSON text** — what the runner would have read — not the
|
|
746
|
+
* decoded value. `set`, `exportVariable` and `setJson` refuse an unusable
|
|
747
|
+
* name with {@link InvalidOutputNameError}, as the real layer does, rather
|
|
748
|
+
* than recording it.
|
|
749
|
+
*
|
|
750
|
+
* `setSecret` records the secret's **plaintext** under
|
|
751
|
+
* `member: "setSecret"`. That is deliberate for a recording double: the
|
|
752
|
+
* journal never leaves the test, and a test asserting that a value *was*
|
|
753
|
+
* masked needs to see which one. Do not hand this journal to anything that
|
|
754
|
+
* logs.
|
|
755
|
+
*
|
|
756
|
+
* Each call returns a fresh, independent journal — there is no state shared
|
|
757
|
+
* between two `recording()` calls.
|
|
758
|
+
*/
|
|
759
|
+
static readonly recording: () => RecordingOutputs;
|
|
681
760
|
}
|
|
682
761
|
//#endregion
|
|
683
762
|
//#region src/ActionState.d.ts
|
|
@@ -1675,7 +1754,7 @@ export declare class ActionInput {
|
|
|
1675
1754
|
* A **flat single-segment** lookup additionally tries the `INPUT_`
|
|
1676
1755
|
* derivation of the name first, mirroring the order the production runtime
|
|
1677
1756
|
* installs ({@link ActionInput.providerOver} via `layerDefault`) — so a
|
|
1678
|
-
* bare `Config.
|
|
1757
|
+
* bare `Config.String("biome-version")` resolves under this provider
|
|
1679
1758
|
* exactly as it does inside `Action.run`. Nested and numeric paths pass
|
|
1680
1759
|
* through as the joined spelling only, as ever.
|
|
1681
1760
|
*
|
|
@@ -1722,7 +1801,7 @@ export declare class ActionInput {
|
|
|
1722
1801
|
* Inputs-first resolution layered over an existing provider.
|
|
1723
1802
|
*
|
|
1724
1803
|
* @remarks
|
|
1725
|
-
* A bare `Config.
|
|
1804
|
+
* A bare `Config.String("dry-run")` resolves a **flat** name — one string
|
|
1726
1805
|
* segment — by first trying the variable the runner would have published for
|
|
1727
1806
|
* an input of that name (the `INPUT_` derivation this module owns), and only
|
|
1728
1807
|
* then trying the name unchanged through `ambient`. Anything the runner
|
|
@@ -1754,7 +1833,7 @@ export declare class ActionInput {
|
|
|
1754
1833
|
*
|
|
1755
1834
|
* **The single-segment retry above makes the obvious test
|
|
1756
1835
|
* non-discriminating**, which is worth knowing before writing one. Because a
|
|
1757
|
-
* bare `Config.
|
|
1836
|
+
* bare `Config.String("release-branch")` resolves through the same `INPUT_`
|
|
1758
1837
|
* derivation as `ActionInput.string("release-branch")`, a test meant to prove
|
|
1759
1838
|
* the accessor reads the mangled key passes just as well with the accessor
|
|
1760
1839
|
* swapped for a bare `Config`. Only a bare `fromEnv` underneath tells them
|
|
@@ -4791,5 +4870,5 @@ export declare class Secret {
|
|
|
4791
4870
|
static readonly adopt: (name: string) => Config.Config<Redacted.Redacted<string>>;
|
|
4792
4871
|
}
|
|
4793
4872
|
//#endregion
|
|
4794
|
-
export type { ActionCacheShape, ActionEnvironmentShape, ActionLoggerShape, ActionOutputError, ActionOutputsShape, ActionRunOptions, ActionServices, ActionStateShape, AnnotationProperties, ArtifactItem, ArtifactRef, ArtifactShape, BlobEnvelopeError, BlobStoreShape, CacheKeyError, CheckDocumentOptions, CheckDocumentShape, CheckDocumentSink, CheckFlushOutcome, CheckRunConclusion, CheckRunProjection, ClientLayerOptions, DataBlobTransfer, DetachedProcessError, DetachedProcessOps, DetachedSpawnOptions, DownloadOptions, DownloadResult, DryRunShape, ExtractOptions, FileBlobTransfer, GitHubHeadingDepth, GitHubListOptions, GitHubRowSchema, GitHubSchemaTable, GitHubSchemaTableColumn, GitHubSchemaTableColumns, GitHubSchemaTableFormatRequiredKeys, GitHubSchemaTableFormattedColumn, GitHubSchemaTableOptions, ManagedDocumentSource, OidcTokenIssuerShape, PackageManagerInstallOptions, PackageManagerInstallerShape, PairsOptions, PathPrependEnv, PathPrependOptions, ProvisionFileOptions, ProvisionOptions, ProvisionedFile, ReadOptions, ReadinessOptions, S3Config, StoredBlob, ToolDownloadOptions, ToolInstallerShape, UploadOptions, UploadResult, WithBufferOptions, WithStepOptions };
|
|
4873
|
+
export type { ActionCacheShape, ActionEnvironmentShape, ActionLoggerShape, ActionOutputError, ActionOutputsShape, ActionRunOptions, ActionServices, ActionStateShape, AnnotationProperties, ArtifactItem, ArtifactRef, ArtifactShape, BlobEnvelopeError, BlobStoreShape, CacheKeyError, CheckDocumentOptions, CheckDocumentShape, CheckDocumentSink, CheckFlushOutcome, CheckRunConclusion, CheckRunProjection, ClientLayerOptions, DataBlobTransfer, DetachedProcessError, DetachedProcessOps, DetachedSpawnOptions, DownloadOptions, DownloadResult, DryRunShape, ExtractOptions, FileBlobTransfer, GitHubHeadingDepth, GitHubListOptions, GitHubRowSchema, GitHubSchemaTable, GitHubSchemaTableColumn, GitHubSchemaTableColumns, GitHubSchemaTableFormatRequiredKeys, GitHubSchemaTableFormattedColumn, GitHubSchemaTableOptions, ManagedDocumentSource, OidcTokenIssuerShape, PackageManagerInstallOptions, PackageManagerInstallerShape, PairsOptions, PathPrependEnv, PathPrependOptions, ProvisionFileOptions, ProvisionOptions, ProvisionedFile, ReadOptions, ReadinessOptions, RecordedOutputMember, RecordingOutputs, S3Config, StoredBlob, ToolDownloadOptions, ToolInstallerShape, UploadOptions, UploadResult, WithBufferOptions, WithStepOptions };
|
|
4795
4874
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ActionEnvironment, ActionEnvironmentError, GitHubContext, RunnerContext
|
|
|
2
2
|
import { ActionInput } from "./ActionInput.js";
|
|
3
3
|
import { WorkflowCommand } from "./WorkflowCommand.js";
|
|
4
4
|
import { ActionLogger } from "./ActionLogger.js";
|
|
5
|
-
import { ActionOutputs, DetachedOutputError, InvalidOutputNameError, OutputEncodeError, RunnerFileUnavailableError, RunnerFileWriteError } from "./ActionOutputs.js";
|
|
5
|
+
import { ActionOutputs, DetachedOutputError, InvalidOutputNameError, OutputEncodeError, RecordedOutput, RunnerFileUnavailableError, RunnerFileWriteError } from "./ActionOutputs.js";
|
|
6
6
|
import { ActionState, ActionStateError } from "./ActionState.js";
|
|
7
7
|
import { Action, ActionRuntime, describeCause } from "./Action.js";
|
|
8
8
|
import { BlobTransferError } from "./BlobTransfer.js";
|
|
@@ -27,4 +27,4 @@ import { GitHubToken, GitHubTokenError } from "./GitHubToken.js";
|
|
|
27
27
|
import { ToolInstaller, ToolInstallerError } from "./ToolInstaller.js";
|
|
28
28
|
import { AmbientPackageManager, CachedPackageManager, InstalledPackageManager, PackageManagerInstaller, PackageManagerInstallerError } from "./PackageManagerInstaller.js";
|
|
29
29
|
|
|
30
|
-
export { Action, ActionCache, ActionCacheError, ActionEnvironment, ActionEnvironmentError, ActionInput, ActionLogger, ActionOutputs, ActionRuntime, ActionState, ActionStateError, ActionsIdentityToken, ActionsProvenance, 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, OidcClaims, OidcTokenError, OidcTokenIssuer, OutputEncodeError, PackageManagerInstaller, PackageManagerInstallerError, ProcessId, RunnerContext, RunnerFileUnavailableError, RunnerFileWriteError, Secret, ToolInstaller, ToolInstallerError, TruncatedBlobEnvelopeError, UnsupportedBlobEnvelopeVersionError, WorkflowCommand, describeCause, projectCheckState };
|
|
30
|
+
export { Action, ActionCache, ActionCacheError, ActionEnvironment, ActionEnvironmentError, ActionInput, ActionLogger, ActionOutputs, ActionRuntime, ActionState, ActionStateError, ActionsIdentityToken, ActionsProvenance, 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, OidcClaims, 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.13.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.
|
|
43
|
-
"@effected/glob": "^0.
|
|
44
|
-
"@effected/markdown": "^0.
|
|
45
|
-
"@effected/npm": "^0.
|
|
46
|
-
"@effected/sbom": "^0.
|
|
47
|
-
"@effected/templates": "^0.
|
|
42
|
+
"@effected/github": "^0.10.1",
|
|
43
|
+
"@effected/glob": "^0.6.0",
|
|
44
|
+
"@effected/markdown": "^0.10.0",
|
|
45
|
+
"@effected/npm": "^0.14.0",
|
|
46
|
+
"@effected/sbom": "^0.6.1",
|
|
47
|
+
"@effected/templates": "^0.6.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
51
|
-
"effect": "4.0.0-rc.
|
|
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"
|