File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,13 @@ async function run() {
114
114
115
115
if ( request . url === '/stackList' ) {
116
116
response . writeHead ( 200 , { 'Content-Type' : 'application/json' } ) ;
117
- response . end ( JSON . stringify ( stackList ) , 'utf-8' ) ;
117
+
118
+ const stackListAvailable : string [ ] | undefined =
119
+ options . cdkstack && stackList ?. includes ( options . cdkstack )
120
+ ? [ options . cdkstack ]
121
+ : stackList ;
122
+
123
+ response . end ( JSON . stringify ( stackListAvailable ) , 'utf-8' ) ;
118
124
} else if ( request . url ?. match ( '^/wsUrl' ) ) {
119
125
let wsUrl : string | undefined ;
120
126
if ( options . ws ) {
@@ -124,10 +130,6 @@ async function run() {
124
130
const urlPaths = request . url . split ( '/' ) ;
125
131
let stack = urlPaths [ 2 ] ;
126
132
127
- if ( ! stack ) {
128
- stack = options . cdkstack ;
129
- }
130
-
131
133
if ( stack ) {
132
134
wsUrl = cdkOutput [ stack ] . ServerlessSpyWsUrl ;
133
135
} else {
You can’t perform that action at this time.
0 commit comments