Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turbopuffer/turbopuffer

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turbopuffer/turbopuffer - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

5

dist/httpClient.d.ts

@@ -10,5 +10,10 @@ /// <reference types="node" />

}
export type RequestTiming = {
response_time: number;
body_read_time: number;
};
export type RequestResponse<T> = Promise<{
body?: T;
headers: Headers;
request_timing: RequestTiming;
}>;

@@ -15,0 +20,0 @@ export interface HTTPClient {

15

dist/httpClient.js

@@ -74,4 +74,7 @@ "use strict";

let error = null;
let request_start;
let response_start;
for (let attempt = 0; attempt < maxAttempts; attempt++) {
error = null;
request_start = performance.now();
try {

@@ -105,2 +108,3 @@ response = await (0, undici_1.fetch)(url.toString(), {

}
response_start = performance.now();
if (!error && response.status >= 400) {

@@ -148,5 +152,6 @@ let message = undefined;

}
if (!response.body) {
if (method === "HEAD" || !response.body) {
return {
headers: response.headers,
request_timing: make_request_timing(request_start, response_start),
};

@@ -160,5 +165,7 @@ }

}
let response_end = performance.now();
return {
body: json,
headers: response.headers,
request_timing: make_request_timing(request_start, response_start, response_end),
};

@@ -184,2 +191,8 @@ }

}
function make_request_timing(request_start, response_start, response_end) {
return {
response_time: response_start - request_start,
body_read_time: response_end ? response_end - response_start : 0,
};
}
//# sourceMappingURL=httpClient.js.map

@@ -40,2 +40,4 @@ /**

exhaustive_search_count: number;
response_time: number;
body_read_time: number;
};

@@ -42,0 +44,0 @@ export interface NamespaceMetadata {

@@ -151,2 +151,4 @@ "use strict";

exhaustive_search_count: parseIntMetric(serverTiming["exhaustive_search.count"]),
response_time: response.request_timing.response_time,
body_read_time: response.request_timing.body_read_time,
},

@@ -153,0 +155,0 @@ };

2

package.json
{
"name": "@turbopuffer/turbopuffer",
"version": "0.5.1",
"version": "0.5.2",
"description": "Official Typescript API client library for turbopuffer.com",

@@ -5,0 +5,0 @@ "scripts": {

@@ -62,3 +62,4 @@ The **official TypeScript SDK** for Turbopuffer.

1. Bump version
2. Release it `npm publish --access public`
```bash
npm publish --access public
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc