@honeybadger-io/cloudflare 0.2.0 → 0.3.1
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.
- package/README.md +36 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -196
- package/dist/index.js.map +1 -1
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -53,6 +53,42 @@ export default withHoneybadger(getConfig, {
|
|
|
53
53
|
|
|
54
54
|
`withHoneybadger` wraps all handlers present on your export: **fetch**, **scheduled**, **queue**, **email**, and **tail**. Errors in any handler are reported to Honeybadger and rethrown; reporting runs via `ctx.waitUntil()` so it does not block the response.
|
|
55
55
|
|
|
56
|
+
## TypeScript types
|
|
57
|
+
|
|
58
|
+
This package does not bundle Cloudflare Worker types. It relies on ambient types (`ExportedHandler`, `ExecutionContext`, `MessageBatch`, etc.) that your Worker project already provides. Either approach works:
|
|
59
|
+
|
|
60
|
+
- **Runtime types via Wrangler** (recommended for Wrangler v3.66+). Generate a `worker-configuration.d.ts` from your `wrangler.toml`/`wrangler.jsonc`:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx wrangler types
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then reference it from your `tsconfig.json`:
|
|
67
|
+
|
|
68
|
+
```jsonc
|
|
69
|
+
{
|
|
70
|
+
"compilerOptions": {
|
|
71
|
+
"types": ["./worker-configuration.d.ts"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- **`@cloudflare/workers-types`** (for older Wrangler or projects that prefer the published types):
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install --save-dev @cloudflare/workers-types
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```jsonc
|
|
83
|
+
{
|
|
84
|
+
"compilerOptions": {
|
|
85
|
+
"types": ["@cloudflare/workers-types"]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`@cloudflare/workers-types` is declared as an optional peer dependency, so it won't be installed automatically.
|
|
91
|
+
|
|
56
92
|
## License
|
|
57
93
|
|
|
58
94
|
This package is MIT licensed. See the [MIT-LICENSE](./MIT-LICENSE) file in this folder for details.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@honeybadger-io/core';
|
|
2
|
-
import type { ExportedHandler } from '@cloudflare/workers-types';
|
|
3
2
|
export declare function withHoneybadger<Env>(getConfig: (env: Env) => Partial<Types.Config>, handler: ExportedHandler<Env>): ExportedHandler<Env>;
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAoBjD,wBAAgB,eAAe,CAAC,GAAG,EACjC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAC9C,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,GAC5B,eAAe,CAAC,GAAG,CAAC,CAqHtB"}
|
package/dist/index.js
CHANGED
|
@@ -1,211 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
1
|
+
import Honeybadger from '@honeybadger-io/js';
|
|
2
|
+
const HANDLER_NAMES = ['fetch', 'scheduled', 'queue', 'email', 'tail'];
|
|
3
|
+
function isHbConfigured() {
|
|
4
|
+
if (Honeybadger.config.apiKey === null || Honeybadger.config.apiKey === undefined) {
|
|
5
|
+
return false;
|
|
36
6
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.withHoneybadger = withHoneybadger;
|
|
43
|
-
var js_1 = __importDefault(require("@honeybadger-io/js"));
|
|
44
|
-
var HANDLER_NAMES = ['fetch', 'scheduled', 'queue', 'email', 'tail'];
|
|
7
|
+
return Honeybadger.config.apiKey.length > 0;
|
|
8
|
+
}
|
|
45
9
|
function reportError(error) {
|
|
46
|
-
if (
|
|
10
|
+
if (!isHbConfigured()) {
|
|
47
11
|
return Promise.resolve();
|
|
48
12
|
}
|
|
49
|
-
|
|
50
|
-
return
|
|
13
|
+
const noticeable = error instanceof Error ? error : new Error(String(error));
|
|
14
|
+
return Honeybadger.notifyAsync(noticeable);
|
|
51
15
|
}
|
|
52
|
-
function withHoneybadger(getConfig, handler) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var fn = handler[name_1];
|
|
16
|
+
export function withHoneybadger(getConfig, handler) {
|
|
17
|
+
for (const name of HANDLER_NAMES) {
|
|
18
|
+
const fn = handler[name];
|
|
56
19
|
if (typeof fn !== 'function') {
|
|
57
|
-
|
|
20
|
+
continue;
|
|
58
21
|
}
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
handler.fetch =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
case 3:
|
|
77
|
-
error_1 = _a.sent();
|
|
78
|
-
ctx.waitUntil(reportError(error_1));
|
|
79
|
-
throw error_1;
|
|
80
|
-
case 4: return [2 /*return*/];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}); };
|
|
84
|
-
return "continue";
|
|
22
|
+
if (name === 'fetch') {
|
|
23
|
+
const fetchHandler = fn;
|
|
24
|
+
handler.fetch = async (request, env, ctx) => {
|
|
25
|
+
const config = getConfig(env);
|
|
26
|
+
if (config.apiKey && !isHbConfigured()) {
|
|
27
|
+
Honeybadger.configure(config);
|
|
28
|
+
Honeybadger.setContext({ url: request.url, method: request.method });
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
return await fetchHandler(request, env, ctx);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
ctx.waitUntil(reportError(error));
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
continue;
|
|
85
39
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
handler.scheduled = (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
_a.sent();
|
|
107
|
-
return [3 /*break*/, 4];
|
|
108
|
-
case 3:
|
|
109
|
-
error_2 = _a.sent();
|
|
110
|
-
ctx.waitUntil(reportError(error_2));
|
|
111
|
-
throw error_2;
|
|
112
|
-
case 4: return [2 /*return*/];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}); });
|
|
116
|
-
return "continue";
|
|
40
|
+
if (name === 'scheduled') {
|
|
41
|
+
const scheduledHandler = fn;
|
|
42
|
+
handler.scheduled = (async (controller, env, ctx) => {
|
|
43
|
+
const config = getConfig(env);
|
|
44
|
+
if (config.apiKey && !isHbConfigured()) {
|
|
45
|
+
Honeybadger.configure(config);
|
|
46
|
+
Honeybadger.setContext({
|
|
47
|
+
cron: controller.cron,
|
|
48
|
+
scheduledTime: controller.scheduledTime,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
await scheduledHandler(controller, env, ctx);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
ctx.waitUntil(reportError(error));
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
continue;
|
|
117
60
|
}
|
|
118
|
-
if (
|
|
119
|
-
|
|
120
|
-
handler.queue = (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
_a.sent();
|
|
139
|
-
return [3 /*break*/, 4];
|
|
140
|
-
case 3:
|
|
141
|
-
error_3 = _a.sent();
|
|
142
|
-
ctx.waitUntil(reportError(error_3));
|
|
143
|
-
throw error_3;
|
|
144
|
-
case 4: return [2 /*return*/];
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}); });
|
|
148
|
-
return "continue";
|
|
61
|
+
if (name === 'queue') {
|
|
62
|
+
const queueHandler = fn;
|
|
63
|
+
handler.queue = (async (batch, env, ctx) => {
|
|
64
|
+
const config = getConfig(env);
|
|
65
|
+
if (config.apiKey && !isHbConfigured()) {
|
|
66
|
+
Honeybadger.configure(config);
|
|
67
|
+
Honeybadger.setContext({
|
|
68
|
+
queue: batch.queue,
|
|
69
|
+
messageCount: batch.messages.length,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
await queueHandler(batch, env, ctx);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
ctx.waitUntil(reportError(error));
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
continue;
|
|
149
81
|
}
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
handler.email = (
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
_a.sent();
|
|
167
|
-
return [3 /*break*/, 4];
|
|
168
|
-
case 3:
|
|
169
|
-
error_4 = _a.sent();
|
|
170
|
-
ctx.waitUntil(reportError(error_4));
|
|
171
|
-
throw error_4;
|
|
172
|
-
case 4: return [2 /*return*/];
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
}); });
|
|
176
|
-
return "continue";
|
|
82
|
+
if (name === 'email') {
|
|
83
|
+
const emailHandler = fn;
|
|
84
|
+
handler.email = (async (message, env, ctx) => {
|
|
85
|
+
const config = getConfig(env);
|
|
86
|
+
if (config.apiKey && !isHbConfigured()) {
|
|
87
|
+
Honeybadger.configure(config);
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
await emailHandler(message, env, ctx);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
ctx.waitUntil(reportError(error));
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
177
98
|
}
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
handler.tail = (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
case 2:
|
|
194
|
-
_a.sent();
|
|
195
|
-
return [3 /*break*/, 4];
|
|
196
|
-
case 3:
|
|
197
|
-
error_5 = _a.sent();
|
|
198
|
-
ctx.waitUntil(reportError(error_5));
|
|
199
|
-
throw error_5;
|
|
200
|
-
case 4: return [2 /*return*/];
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}); });
|
|
99
|
+
if (name === 'tail') {
|
|
100
|
+
const tailHandler = fn;
|
|
101
|
+
handler.tail = (async (events, env, ctx) => {
|
|
102
|
+
const config = getConfig(env);
|
|
103
|
+
if (config.apiKey && !isHbConfigured()) {
|
|
104
|
+
Honeybadger.configure(config);
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
await tailHandler(events, env, ctx);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
ctx.waitUntil(reportError(error));
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
204
114
|
}
|
|
205
|
-
};
|
|
206
|
-
for (var _i = 0, HANDLER_NAMES_1 = HANDLER_NAMES; _i < HANDLER_NAMES_1.length; _i++) {
|
|
207
|
-
var name_1 = HANDLER_NAMES_1[_i];
|
|
208
|
-
_loop_1(name_1);
|
|
209
115
|
}
|
|
210
116
|
return handler;
|
|
211
117
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAG5C,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAU,CAAA;AAE/E,SAAS,cAAc;IACrB,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,KAAK,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;Q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E,OAAO,CAAC,IAAI,GAAG,CAAC,KAAK,EACnB,MAAmB,EACnB,GAAQ,EACR,GAAqB,EACrB,EAAE;gBACF,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;gBAC7B,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACvC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;gBAC/B,CAAC;gBACD,IAAI,CAAC;oBACH,MAAM,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;gBACrC,CAAC;gBAAC,OAAO,KAAc,EAAE,CAAC;oBACxB,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;oBACjC,MAAM,KAAK,CAAA;gBACb,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honeybadger-io/cloudflare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Cloudflare Workers integration for Honeybadger",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -13,13 +13,18 @@
|
|
|
13
13
|
"homepage": "https://github.com/honeybadger-io/honeybadger-js#readme",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
|
-
"module": "dist/index.js",
|
|
17
16
|
"types": "dist/index.d.ts",
|
|
18
17
|
"type": "module",
|
|
19
18
|
"repository": {
|
|
20
19
|
"type": "git",
|
|
21
20
|
"url": "git+https://github.com/honeybadger-io/honeybadger-js.git"
|
|
22
21
|
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
23
28
|
"scripts": {
|
|
24
29
|
"test": "jest --config jest.config.cjs",
|
|
25
30
|
"build": "tsc",
|
|
@@ -30,18 +35,26 @@
|
|
|
30
35
|
"url": "https://github.com/honeybadger-io/honeybadger-js/issues"
|
|
31
36
|
},
|
|
32
37
|
"dependencies": {
|
|
33
|
-
"@cloudflare/workers-types": "^4.20240208.0",
|
|
34
38
|
"@honeybadger-io/core": "^6.7.2",
|
|
35
39
|
"@honeybadger-io/js": "^6.12.3"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
42
|
+
"@cloudflare/workers-types": "^4.20240208.0",
|
|
38
43
|
"@types/jest": "^29.5.12",
|
|
39
44
|
"jest": "^29.7.0",
|
|
40
45
|
"ts-jest": "^29.1.2",
|
|
41
46
|
"typescript": "^5.3.3"
|
|
42
47
|
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@cloudflare/workers-types": "^4"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"@cloudflare/workers-types": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
43
56
|
"publishConfig": {
|
|
44
57
|
"access": "public"
|
|
45
58
|
},
|
|
46
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "8ba578a6a666a9346c27dba7f9360d3860bb975e"
|
|
47
60
|
}
|