Skip to content

Commit 4fb6147

Browse files
committed
Add ReadOnlyEnv to FeatureState
1 parent f133996 commit 4fb6147

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/action-common.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as core from "@actions/core";
22

33
import { ActionsEnv, getActionsEnv } from "./actions-util";
4-
import { Env } from "./environment";
4+
import { Env, ReadOnlyEnv } from "./environment";
55
import { FeatureEnablement } from "./feature-flags";
66
import { getActionsLogger, Logger } from "./logging";
77
import {
@@ -29,6 +29,9 @@ export interface FeatureState {
2929
/** Information about environment variables. */
3030
env: Env;
3131
};
32+
ReadOnlyEnv: {
33+
env: ReadOnlyEnv;
34+
};
3235
Actions: {
3336
/** Access to Actions-related functionality. */
3437
actions: ActionsEnv;

‎src/testing-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export function getTestActionsEnv(): ActionsEnv {
193193
}
194194

195195
/** For testing purposes, we make all available state features accessible in `TestEnv`. */
196-
type AllState = ["Logger", "Env", "Actions", "FeatureFlags"];
196+
type AllState = ["Logger", "Env", "ReadOnlyEnv", "Actions", "FeatureFlags"];
197197

198198
/** Initialise a fresh `ActionState<AllState>` value. */
199199
export function initAllState(

0 commit comments

Comments
 (0)