File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env tsx
2
2
3
- import { env } from 'node:process'
4
-
5
3
import landlubber , {
6
4
type DefaultContext ,
7
5
defaultMiddleware ,
@@ -27,17 +25,9 @@ interface ClientContext {
27
25
const commands = [ locks , unlock , workspace ]
28
26
29
27
const createAppContext : MiddlewareFunction = async ( argv ) => {
30
- const apiKey = argv [ 'api-key' ]
31
- if ( typeof apiKey !== 'string' ) throw new Error ( 'Missing Seam API key' )
32
- const seam = SeamHttp . fromApiKey ( apiKey )
33
- argv [ 'seam' ] = seam
28
+ argv [ 'seam' ] = new SeamHttp ( )
34
29
}
35
30
36
31
const middleware = [ ...defaultMiddleware , createAppContext ]
37
32
38
- await landlubber < Context > ( commands , { middleware } )
39
- . describe ( 'api-key' , 'Seam API key' )
40
- . string ( 'api-key' )
41
- . default ( 'api-key' , env . SEAM_API_KEY , 'SEAM_API_KEY' )
42
- . demandOption ( 'api-key' )
43
- . parse ( )
33
+ await landlubber < Context > ( commands , { middleware } ) . parse ( )
You can’t perform that action at this time.
0 commit comments