You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@upstash/qstash

Package Overview
Dependencies
Maintainers
5
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/qstash - npm Package Compare versions

Comparing version

to
2.1.3

23

./dist/index.js

@@ -181,7 +181,24 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

return _chunkEQTYEU4Ujs.__async.call(void 0, this, null, function* () {
const headers = new Headers(req.headers);
if (!headers.has("Content-Type")) {
headers.set("Content-Type", "application/json");
}
headers.set("Upstash-Cron", req.cron);
if (typeof req.method !== "undefined") {
headers.set("Upstash-Method", req.method);
}
if (typeof req.delay !== "undefined") {
headers.set("Upstash-Delay", `${req.delay.toFixed()}s`);
}
if (typeof req.retries !== "undefined") {
headers.set("Upstash-Retries", req.retries.toFixed());
}
if (typeof req.callback !== "undefined") {
headers.set("Upstash-Callback", req.callback);
}
return yield this.http.request({
method: "POST",
headers: { "Content-Type": "application/json" },
path: ["v2", "schedules"],
body: JSON.stringify(req)
headers,
path: ["v2", "schedules", req.destination],
body: req.body
});

@@ -188,0 +205,0 @@ });

4

dist/index.d.ts

@@ -297,5 +297,3 @@ /**

/**
* Optionally specify a cron expression to repeatedly send this message to the destination.
*
* @default undefined
* Specify a cron expression to repeatedly send this message to the destination.
*/

@@ -302,0 +300,0 @@ cron: string;

@@ -181,7 +181,24 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

return _chunkEQTYEU4Ujs.__async.call(void 0, this, null, function* () {
const headers = new Headers(req.headers);
if (!headers.has("Content-Type")) {
headers.set("Content-Type", "application/json");
}
headers.set("Upstash-Cron", req.cron);
if (typeof req.method !== "undefined") {
headers.set("Upstash-Method", req.method);
}
if (typeof req.delay !== "undefined") {
headers.set("Upstash-Delay", `${req.delay.toFixed()}s`);
}
if (typeof req.retries !== "undefined") {
headers.set("Upstash-Retries", req.retries.toFixed());
}
if (typeof req.callback !== "undefined") {
headers.set("Upstash-Callback", req.callback);
}
return yield this.http.request({
method: "POST",
headers: { "Content-Type": "application/json" },
path: ["v2", "schedules"],
body: JSON.stringify(req)
headers,
path: ["v2", "schedules", req.destination],
body: req.body
});

@@ -188,0 +205,0 @@ });

{
"name": "@upstash/qstash",
"version": "2.1.2",
"version": "2.1.3",
"description": "Official Typescript client for QStash",

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

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