@stoplight/elements-core 9.0.17 → 9.0.18

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/index.esm.js CHANGED
@@ -1936,7 +1936,7 @@ function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, paramet
1936
1936
  var _a, _b, _c;
1937
1937
  return __awaiter(this, void 0, void 0, function* () {
1938
1938
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
1939
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1939
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1940
1940
  const queryParams = getQueryParams({ httpOperation, parameterValues });
1941
1941
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
1942
1942
  .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
@@ -2017,7 +2017,7 @@ function buildHarRequest({ httpOperation, bodyInput, parameterValues, serverVari
2017
2017
  return __awaiter(this, void 0, void 0, function* () {
2018
2018
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2019
2019
  const mimeType = (_a = mediaTypeContent === null || mediaTypeContent === void 0 ? void 0 : mediaTypeContent.mediaType) !== null && _a !== void 0 ? _a : 'application/json';
2020
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2020
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2021
2021
  const queryParams = getQueryParams({ httpOperation, parameterValues });
2022
2022
  const headerParams = (_d = (_c = (_b = httpOperation.request) === null || _b === void 0 ? void 0 : _b.headers) === null || _c === void 0 ? void 0 : _c.map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })) !== null && _d !== void 0 ? _d : [];
2023
2023
  if (mockData === null || mockData === void 0 ? void 0 : mockData.header) {
package/index.js CHANGED
@@ -1957,7 +1957,7 @@ function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, paramet
1957
1957
  var _a, _b, _c;
1958
1958
  return tslib.__awaiter(this, void 0, void 0, function* () {
1959
1959
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
1960
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1960
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1961
1961
  const queryParams = getQueryParams({ httpOperation, parameterValues });
1962
1962
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
1963
1963
  .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
@@ -2038,7 +2038,7 @@ function buildHarRequest({ httpOperation, bodyInput, parameterValues, serverVari
2038
2038
  return tslib.__awaiter(this, void 0, void 0, function* () {
2039
2039
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2040
2040
  const mimeType = (_a = mediaTypeContent === null || mediaTypeContent === void 0 ? void 0 : mediaTypeContent.mediaType) !== null && _a !== void 0 ? _a : 'application/json';
2041
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2041
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2042
2042
  const queryParams = getQueryParams({ httpOperation, parameterValues });
2043
2043
  const headerParams = (_d = (_c = (_b = httpOperation.request) === null || _b === void 0 ? void 0 : _b.headers) === null || _c === void 0 ? void 0 : _c.map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })) !== null && _d !== void 0 ? _d : [];
2044
2044
  if (mockData === null || mockData === void 0 ? void 0 : mockData.header) {
package/index.mjs CHANGED
@@ -1936,7 +1936,7 @@ function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, paramet
1936
1936
  var _a, _b, _c;
1937
1937
  return __awaiter(this, void 0, void 0, function* () {
1938
1938
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
1939
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1939
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
1940
1940
  const queryParams = getQueryParams({ httpOperation, parameterValues });
1941
1941
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
1942
1942
  .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
@@ -2017,7 +2017,7 @@ function buildHarRequest({ httpOperation, bodyInput, parameterValues, serverVari
2017
2017
  return __awaiter(this, void 0, void 0, function* () {
2018
2018
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2019
2019
  const mimeType = (_a = mediaTypeContent === null || mediaTypeContent === void 0 ? void 0 : mediaTypeContent.mediaType) !== null && _a !== void 0 ? _a : 'application/json';
2020
- const shouldIncludeBody = ['PUT', 'POST', 'PATCH'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2020
+ const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2021
2021
  const queryParams = getQueryParams({ httpOperation, parameterValues });
2022
2022
  const headerParams = (_d = (_c = (_b = httpOperation.request) === null || _b === void 0 ? void 0 : _b.headers) === null || _c === void 0 ? void 0 : _c.map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })) !== null && _d !== void 0 ? _d : [];
2023
2023
  if (mockData === null || mockData === void 0 ? void 0 : mockData.header) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "9.0.17",
3
+ "version": "9.0.18",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",