imean-service-engine 2.0.3 → 2.0.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.
- package/dist/index.js +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2199,13 +2199,16 @@ var RoutePlugin = class {
|
|
|
2199
2199
|
return result;
|
|
2200
2200
|
}
|
|
2201
2201
|
if (typeof result === "string") {
|
|
2202
|
-
return result;
|
|
2202
|
+
return ctx.text(result);
|
|
2203
2203
|
}
|
|
2204
2204
|
if (result === null) {
|
|
2205
|
-
return
|
|
2205
|
+
return new Response(null, { status: 204 });
|
|
2206
|
+
}
|
|
2207
|
+
if (typeof result === "object" && result !== null && (result.isEscaped === true || result.constructor?.name === "HtmlEscaped")) {
|
|
2208
|
+
return ctx.html(result);
|
|
2206
2209
|
}
|
|
2207
2210
|
if (typeof result === "object" && result !== null && "type" in result && (typeof result.type === "function" || typeof result.type === "string")) {
|
|
2208
|
-
return result;
|
|
2211
|
+
return ctx.html(result);
|
|
2209
2212
|
}
|
|
2210
2213
|
return ctx.json(result);
|
|
2211
2214
|
} catch (error) {
|
package/dist/index.mjs
CHANGED
|
@@ -2174,13 +2174,16 @@ var RoutePlugin = class {
|
|
|
2174
2174
|
return result;
|
|
2175
2175
|
}
|
|
2176
2176
|
if (typeof result === "string") {
|
|
2177
|
-
return result;
|
|
2177
|
+
return ctx.text(result);
|
|
2178
2178
|
}
|
|
2179
2179
|
if (result === null) {
|
|
2180
|
-
return
|
|
2180
|
+
return new Response(null, { status: 204 });
|
|
2181
|
+
}
|
|
2182
|
+
if (typeof result === "object" && result !== null && (result.isEscaped === true || result.constructor?.name === "HtmlEscaped")) {
|
|
2183
|
+
return ctx.html(result);
|
|
2181
2184
|
}
|
|
2182
2185
|
if (typeof result === "object" && result !== null && "type" in result && (typeof result.type === "function" || typeof result.type === "string")) {
|
|
2183
|
-
return result;
|
|
2186
|
+
return ctx.html(result);
|
|
2184
2187
|
}
|
|
2185
2188
|
return ctx.json(result);
|
|
2186
2189
|
} catch (error) {
|