New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@taskbotjs/webapi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taskbotjs/webapi - npm Package Compare versions

Comparing version 0.1.0-alpha.5 to 0.9.0

31

dist/WebAPIApp/index.js

@@ -212,33 +212,2 @@ "use strict";

}));
app.get("/done", express_async_handler_1.default(async (req, res) => {
const resp = await this.clientPool.use((taskbot) => taskbot.doneSet.peek(req.query.limit, req.query.offset));
res.json(resp);
}));
app.post("/done/clean", express_async_handler_1.default(async (req, res) => {
const count = await this.clientPool.use((taskbot) => taskbot.doneSet.cleanAll());
res.json({ ok: true, count });
}));
app.get("/done/:jobId", express_async_handler_1.default(async (req, res) => {
const jobId = req.params.jobId;
const resp = await this.clientPool.use(async (taskbot) => {
if (await taskbot.doneSet.contains(jobId)) {
return taskbot.readJob(jobId);
}
return null;
});
if (!resp) {
throw new APIError_1.NotFoundError(`Job '${jobId}' not found.`);
}
else {
res.json(resp);
}
}));
app.delete("/done/:jobId", express_async_handler_1.default(async (req, res) => {
const jobId = req.params.jobId;
await this.clientPool.use(async (taskbot) => {
await taskbot.doneSet.remove(jobId);
await taskbot.unsafeDeleteJob(jobId);
});
res.json({ ok: true });
}));
if (logRequests) {

@@ -245,0 +214,0 @@ app.use(Middleware.buildErrorLoggingMiddleware(logger));

4

package.json

@@ -6,3 +6,3 @@ {

"repository": "github:eropple/taskbotjs",
"version": "0.1.0-alpha.5",
"version": "0.9.0",
"main": "dist",

@@ -21,3 +21,3 @@ "files": [

"dependencies": {
"@taskbotjs/client": "0.1.0-alpha.5",
"@taskbotjs/client": "0.9.0",
"async-lock": "1.1.3",

@@ -24,0 +24,0 @@ "bunyan": "1.8.12",

@@ -313,46 +313,2 @@ import { Server as HttpServer } from "http";

app.get("/done", asyncHandler(async (req, res) => {
const resp: Array<JobDescriptor> =
await this.clientPool.use(
(taskbot) => taskbot.doneSet.peek(req.query.limit, req.query.offset));
res.json(resp);
}));
app.post("/done/clean", asyncHandler(async (req, res) => {
const count = await this.clientPool.use((taskbot) => taskbot.doneSet.cleanAll());
res.json({ ok: true, count });
}));
app.get("/done/:jobId", asyncHandler(async (req, res) => {
const jobId = req.params.jobId;
const resp: JobDescriptor | null =
await this.clientPool.use(
async (taskbot) => {
if (await taskbot.doneSet.contains(jobId)) {
return taskbot.readJob(jobId);
}
return null;
});
if (!resp) {
throw new NotFoundError(`Job '${jobId}' not found.`);
} else {
res.json(resp);
}
}));
app.delete("/done/:jobId", asyncHandler(async (req, res) => {
const jobId = req.params.jobId;
await this.clientPool.use(
async (taskbot) => {
await taskbot.doneSet.remove(jobId);
await taskbot.unsafeDeleteJob(jobId);
});
res.json({ ok: true });
}));
if (logRequests) {

@@ -359,0 +315,0 @@ app.use(Middleware.buildErrorLoggingMiddleware(logger));

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