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 11#!/usr/bin/env tsx
22
3- import { env } from 'node:process'
4-
53import landlubber , {
64 type DefaultContext ,
75 defaultMiddleware ,
@@ -27,17 +25,9 @@ interface ClientContext {
2725const commands = [ locks , unlock , workspace ]
2826
2927const 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 ( )
3429}
3530
3631const middleware = [ ...defaultMiddleware , createAppContext ]
3732
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