@demoscript/cli 1.1.9 → 1.1.10
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/bundle.cjs +7 -1
- package/dist/ui-dist/assets/index.css +1 -1
- package/dist/ui-dist/assets/index.js +144 -144
- package/package.json +1 -1
package/dist/bundle.cjs
CHANGED
|
@@ -71088,6 +71088,12 @@ function processRestStepWithOpenApi(step, spec, baseUrl) {
|
|
|
71088
71088
|
};
|
|
71089
71089
|
}
|
|
71090
71090
|
|
|
71091
|
+
// ../shared/dist/variables/index.js
|
|
71092
|
+
var BODYLESS_METHODS = ["GET", "HEAD", "OPTIONS"];
|
|
71093
|
+
function methodSupportsBody(method) {
|
|
71094
|
+
return !BODYLESS_METHODS.includes(method.toUpperCase());
|
|
71095
|
+
}
|
|
71096
|
+
|
|
71091
71097
|
// src/server/rest-proxy.ts
|
|
71092
71098
|
function createRestProxy() {
|
|
71093
71099
|
return async (req, res) => {
|
|
@@ -71111,7 +71117,7 @@ function createRestProxy() {
|
|
|
71111
71117
|
method,
|
|
71112
71118
|
headers: fetchHeaders
|
|
71113
71119
|
};
|
|
71114
|
-
if (body && method
|
|
71120
|
+
if (body && methodSupportsBody(method)) {
|
|
71115
71121
|
fetchOptions.body = JSON.stringify(body);
|
|
71116
71122
|
}
|
|
71117
71123
|
const response = await fetch(absoluteUrl, fetchOptions);
|