@hey-api/json-schema-ref-parser 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import $Refs from "./refs.js";
2
2
  import type { JSONSchema } from "./types/index.js";
3
3
  interface ResolvedInput {
4
4
  path: string;
5
- schema: string | JSONSchema | Buffer<ArrayBufferLike> | Awaited<JSONSchema> | undefined;
5
+ schema: string | JSONSchema | Buffer | Awaited<JSONSchema> | undefined;
6
6
  type: 'file' | 'json' | 'url';
7
7
  }
8
8
  export declare const getResolvedInput: ({ pathOrUrlOrSchema, }: {
package/lib/index.ts CHANGED
@@ -13,7 +13,7 @@ import { fileResolver } from "./resolvers/file.js";
13
13
 
14
14
  interface ResolvedInput {
15
15
  path: string;
16
- schema: string | JSONSchema | Buffer<ArrayBufferLike> | Awaited<JSONSchema> | undefined;
16
+ schema: string | JSONSchema | Buffer | Awaited<JSONSchema> | undefined;
17
17
  type: 'file' | 'json' | 'url';
18
18
  }
19
19
 
@@ -5,7 +5,7 @@ const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i;
5
5
 
6
6
  export const binaryParser: Plugin = {
7
7
  canHandle: (file: FileInfo) => Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url),
8
- handler: (file: FileInfo): Buffer<ArrayBufferLike> => Buffer.isBuffer(file.data)
8
+ handler: (file: FileInfo): Buffer => Buffer.isBuffer(file.data)
9
9
  ? file.data
10
10
  // This will reject if data is anything other than a string or typed array
11
11
  : Buffer.from(file.data),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hey-api/json-schema-ref-parser",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
5
5
  "homepage": "https://heyapi.dev/",
6
6
  "repository": {