File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as yargs from 'yargs';
44import execa from 'execa' ;
55import clipboardy from 'clipboardy' ;
66import { outputFile , readFile } from 'fs-extra' ;
7- import { resolve } from 'json-schema-ref-parser' ;
7+ import RefParser , { resolve } from 'json-schema-ref-parser' ;
88import { stripIndents } from 'common-tags' ;
99import { Json , JsonObject } from '@app-config/utils' ;
1010import {
@@ -257,7 +257,8 @@ async function loadConfigWithOptions({
257257 }
258258
259259 if (select) {
260- jsonConfig = ( await resolve ( jsonConfig ) ) . get ( select ) as JsonObject ;
260+ // @ts -ignore
261+ jsonConfig = ( await resolve . apply ( RefParser , [ jsonConfig ] ) ) . get ( select ) as JsonObject ;
261262
262263 if ( jsonConfig === undefined ) {
263264 throw new FailedToSelectSubObject ( `Failed to select property ${ select } ` ) ;
@@ -474,7 +475,8 @@ export const cli = yargs
474475 let toPrint : Json ;
475476
476477 if ( opts . select ) {
477- const refs = await resolve ( schema ) ;
478+ // @ts -ignore
479+ const refs = await resolve . apply ( RefParser , [ schema ] ) ;
478480
479481 toPrint = refs . get ( opts . select ) ;
480482
You can’t perform that action at this time.
0 commit comments