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';
4
4
import execa from 'execa' ;
5
5
import clipboardy from 'clipboardy' ;
6
6
import { outputFile , readFile } from 'fs-extra' ;
7
- import { resolve } from 'json-schema-ref-parser' ;
7
+ import RefParser , { resolve } from 'json-schema-ref-parser' ;
8
8
import { stripIndents } from 'common-tags' ;
9
9
import { Json , JsonObject } from '@app-config/utils' ;
10
10
import {
@@ -257,7 +257,8 @@ async function loadConfigWithOptions({
257
257
}
258
258
259
259
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 ;
261
262
262
263
if ( jsonConfig === undefined ) {
263
264
throw new FailedToSelectSubObject ( `Failed to select property ${ select } ` ) ;
@@ -474,7 +475,8 @@ export const cli = yargs
474
475
let toPrint : Json ;
475
476
476
477
if ( opts . select ) {
477
- const refs = await resolve ( schema ) ;
478
+ // @ts -ignore
479
+ const refs = await resolve . apply ( RefParser , [ schema ] ) ;
478
480
479
481
toPrint = refs . get ( opts . select ) ;
480
482
You can’t perform that action at this time.
0 commit comments