@hatchet-dev/typescript-sdk 0.15.3 → 0.15.4

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.
@@ -79,7 +79,7 @@ class WebhookHandler {
79
79
  expressHandler({ secret }) {
80
80
  return (req, res) => {
81
81
  if (req.method === 'GET') {
82
- res.sendStatus(200).send(okMessage);
82
+ res.status(200).send(okMessage);
83
83
  return;
84
84
  }
85
85
  if (req.method === 'PUT') {
@@ -89,16 +89,16 @@ class WebhookHandler {
89
89
  }
90
90
  this.getHealthcheckResponse(body, req.headers['x-hatchet-signature'], secret)
91
91
  .then((resp) => {
92
- res.sendStatus(200).json(resp);
92
+ res.status(200).json(resp);
93
93
  })
94
94
  .catch((err) => {
95
- res.sendStatus(500);
95
+ res.status(500);
96
96
  this.worker.logger.error(`Error handling request: ${err.message}`);
97
97
  });
98
98
  return;
99
99
  }
100
100
  if (req.method !== 'POST') {
101
- res.sendStatus(405).json({ error: 'Method not allowed' });
101
+ res.status(405).json({ error: 'Method not allowed' });
102
102
  return;
103
103
  }
104
104
  let action = req.body;
@@ -107,10 +107,10 @@ class WebhookHandler {
107
107
  }
108
108
  this.handle(action, req.headers['x-hatchet-signature'], secret)
109
109
  .then(() => {
110
- res.sendStatus(200);
110
+ res.status(200);
111
111
  })
112
112
  .catch((err) => {
113
- res.sendStatus(500);
113
+ res.status(500);
114
114
  this.worker.logger.error(`Error handling request: ${err.message}`);
115
115
  });
116
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const HATCHET_VERSION = "0.15.3";
1
+ export declare const HATCHET_VERSION = "0.15.4";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '0.15.3';
4
+ exports.HATCHET_VERSION = '0.15.4';