Skip to content

Commit e01bb19

Browse files
committed
fix: bind bundle to RefParser
1 parent d5cde51 commit e01bb19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app-config-schema/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { join, relative, resolve } from 'path';
22
import Ajv, { ValidateFunction, _ as ajvTemplate } from 'ajv';
33
import standalone from 'ajv/dist/standalone';
44
import addFormats from 'ajv-formats';
5-
import RefParser, { JSONSchema, bundle } from 'json-schema-ref-parser';
5+
import RefParser, { bundle, JSONSchema } from 'json-schema-ref-parser';
66
import { isObject, isWindows, JsonObject } from '@app-config/utils';
77
import {
88
parseRawString,
@@ -278,7 +278,8 @@ async function normalizeSchema(schema: JsonObject, directory: string): Promise<J
278278
},
279279
};
280280

281-
const normalized = await bundle(schema, options);
281+
// @ts-ignore
282+
const normalized = await bundle.apply(RefParser, [schema, options]);
282283

283284
return normalized;
284285
}

0 commit comments

Comments
 (0)