chore: fixing issues with the build

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-11-15 16:20:49 -07:00
parent 5f058e2f67
commit 677d0b7659
@@ -13,7 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import $RefParser from '@apidevtools/json-schema-ref-parser';
import {
$RefParser,
ParserOptions,
ResolverOptions,
} from '@apidevtools/json-schema-ref-parser';
import { parse, stringify } from 'yaml';
import * as path from 'path';
@@ -36,7 +40,7 @@ export async function bundleFileWithRefs(
read: BundlerRead,
resolveUrl: BundlerResolveUrl,
): Promise<string> {
const fileUrlReaderResolver: $RefParser.ResolverOptions = {
const fileUrlReaderResolver: ResolverOptions = {
canRead: file => {
const protocol = getProtocol(file.url);
return protocol === undefined || protocol === 'file';
@@ -47,7 +51,7 @@ export async function bundleFileWithRefs(
return await read(url);
},
};
const httpUrlReaderResolver: $RefParser.ResolverOptions = {
const httpUrlReaderResolver: ResolverOptions = {
canRead: ref => {
const protocol = getProtocol(ref.url);
return protocol === 'http' || protocol === 'https';
@@ -58,7 +62,7 @@ export async function bundleFileWithRefs(
},
};
const options: $RefParser.Options = {
const options: ParserOptions = {
resolve: {
file: fileUrlReaderResolver,
http: httpUrlReaderResolver,