Comparing version 2.2.1 to 2.3.0
# inngest | ||
## 2.3.0 | ||
### Minor Changes | ||
- 7792a62: Add support for streaming to `inngest/remix` | ||
## 2.2.1 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "inngest", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Official SDK for Inngest.com", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
41
remix.js
@@ -7,2 +7,22 @@ "use strict"; | ||
exports.name = "remix"; | ||
const createNewResponse = ({ body, status, headers, }) => { | ||
/** | ||
* If `Response` isn't included in this environment, it's probably a Node | ||
* env that isn't already polyfilling. In this case, we can polyfill it | ||
* here to be safe. | ||
*/ | ||
let Res; | ||
if (typeof Response === "undefined") { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-var-requires | ||
Res = require("cross-fetch").Response; | ||
} | ||
else { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
Res = Response; | ||
} | ||
return new Res(body, { | ||
status, | ||
headers, | ||
}); | ||
}; | ||
/** | ||
@@ -60,22 +80,3 @@ * In Remix, serve and register any declared functions with Inngest, making them | ||
}; | ||
}, ({ body, status, headers }) => { | ||
/** | ||
* If `Response` isn't included in this environment, it's probably a Node | ||
* env that isn't already polyfilling. In this case, we can polyfill it | ||
* here to be safe. | ||
*/ | ||
let Res; | ||
if (typeof Response === "undefined") { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-var-requires | ||
Res = require("cross-fetch").Response; | ||
} | ||
else { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
Res = Response; | ||
} | ||
return new Res(body, { | ||
status, | ||
headers, | ||
}); | ||
}); | ||
}, createNewResponse, createNewResponse); | ||
return handler.createHandler(); | ||
@@ -82,0 +83,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.2.1"; | ||
export declare const version = "2.3.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// Generated by genversion. | ||
exports.version = "2.2.1"; | ||
exports.version = "2.3.0"; | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
827151
8847