Comparing version 1.6.0 to 1.6.1
{ | ||
"name": "hyparquet", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "parquet file parser for javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -76,3 +76,3 @@ # hyparquet | ||
await parquetRead({ | ||
file: await asyncBufferFromUrl(url), | ||
file: await asyncBufferFromUrl({url}), | ||
onComplete: data => console.log(data) | ||
@@ -82,2 +82,11 @@ }) | ||
Pass the `requestInit` option to authenticate, for example: | ||
```js | ||
await parquetRead({ | ||
file: await asyncBufferFromUrl({url, requestInit: {headers: {Authorization: 'Bearer my_token'}}}), | ||
onComplete: data => console.log(data) | ||
}) | ||
``` | ||
## Metadata | ||
@@ -84,0 +93,0 @@ |
@@ -120,4 +120,5 @@ import type { AsyncBuffer, CompressionCodec, Compressors, ConvertedType, FileMetaData, LogicalType, ParquetType, SchemaTree } from './types.d.ts' | ||
* If byteLength is not provided, will make a HEAD request to get the file size. | ||
* If requestInit is provided, it will be passed to fetch. | ||
*/ | ||
export function asyncBufferFromUrl(url: string, byteLength?: number): Promise<AsyncBuffer> | ||
export function asyncBufferFromUrl({url, byteLength, requestInit}: {url: string, byteLength?: number, requestInit?: RequestInit}): Promise<AsyncBuffer> | ||
@@ -131,4 +132,5 @@ /** | ||
* Get the byte length of a URL using a HEAD request. | ||
* If requestInit is provided, it will be passed to fetch. | ||
*/ | ||
export function byteLengthFromUrl(url: string): Promise<number> | ||
export function byteLengthFromUrl(url: string, requestInit?: RequestInit): Promise<number> | ||
@@ -135,0 +137,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
116999
3028
270
2