File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ import * as describe from '@openfn/describe-package';
77import createCompletionProvider from './magic-completion' ;
88import { initiateSaveAndRun } from '../common' ;
99
10+ const LOCAL_ADAPTORS_ROOT = 'http://localhost:5000' ;
11+
1012async function * fetchDTSListing ( specifier : string ) {
1113 if ( specifier . endsWith ( '@local' ) ) {
1214 const lang = specifier
1315 . replace ( '@local' , '' )
1416 . replace ( '@openfn/language-' , '' ) ;
15- const url = `http://localhost:5000 /packages/${ lang } /types` ;
17+ const url = `${ LOCAL_ADAPTORS_ROOT } /packages/${ lang } /types` ;
1618 const r = await fetch ( url , { headers : { Accept : 'application/json' } } ) ;
1719 const json = await r . json ( ) ;
1820 for ( const f of json . files ) {
@@ -25,7 +27,7 @@ async function* fetchDTSListing(specifier: string) {
2527const fetchFile = async ( path : string ) => {
2628 if ( path . includes ( '@local' ) ) {
2729 path = path . replace ( '@openfn/language-' , '' ) . replace ( '@local' , '' ) ;
28- const url = `http://localhost:5000 /packages/${ path } ` ;
30+ const url = `${ LOCAL_ADAPTORS_ROOT } /packages/${ path } ` ;
2931 return fetch ( url , { headers : { Accept : 'text/plain' } } ) . then ( r =>
3032 r . text ( )
3133 ) ;
You can’t perform that action at this time.
0 commit comments