1 |
|
2 | /**
|
3 | * Static session for a command session. This can be static as it is for a command line.
|
4 | *
|
5 | * Note: When vdev used as an API (not main use-case for now) command session will need to be redesigned.
|
6 | */
|
7 | type SessionState = 'NO_LOCAL_REGISTRY';
|
8 |
|
9 |
|
10 | const currentStates = new Set<SessionState>();
|
11 |
|
12 | export function addSessionState(state: SessionState) {
|
13 | currentStates.add(state);
|
14 | }
|
15 |
|
16 | export function hasSessionState(state: SessionState) {
|
17 | return currentStates.has(state);
|
18 | } |
\ | No newline at end of file |