@stoplight/elements-core 9.0.26-beta-0.0 → 9.0.27

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
@@ -39,7 +39,6 @@ import map from 'lodash/map.js';
39
39
  import mapValues from 'lodash/mapValues.js';
40
40
  import pickBy from 'lodash/pickBy.js';
41
41
  import { CodeEditor } from '@stoplight/mosaic-code-editor';
42
- import DOMPurify from 'dompurify';
43
42
  import compact from 'lodash/compact.js';
44
43
  import uniq from 'lodash/uniq.js';
45
44
  import orderBy from 'lodash/orderBy.js';
@@ -2162,15 +2161,14 @@ const getQueryParams = ({ httpOperation, parameterValues, }) => {
2162
2161
  function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, parameterValues, serverVariableValues, mockData, auth, chosenServer, credentials = 'omit', corsProxy, }) {
2163
2162
  var _a, _b, _c;
2164
2163
  return __awaiter(this, void 0, void 0, function* () {
2165
- const sanitizedParameterValues = Object.fromEntries(Object.entries(parameterValues).map(([key, value]) => [key, DOMPurify.sanitize(value)]));
2166
2164
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2167
2165
  const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2168
- const queryParams = getQueryParams({ httpOperation, parameterValues: sanitizedParameterValues });
2166
+ const queryParams = getQueryParams({ httpOperation, parameterValues });
2169
2167
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
2170
- .map(header => { var _a; return ({ name: header.name, value: (_a = sanitizedParameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2168
+ .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2171
2169
  .filter(({ value }) => value.length > 0);
2172
2170
  const [queryParamsWithAuth, headersWithAuth] = runAuthRequestEhancements(auth, queryParams, rawHeaders);
2173
- const expandedPath = uriExpand(httpOperation.path, sanitizedParameterValues);
2171
+ const expandedPath = uriExpand(httpOperation.path, parameterValues);
2174
2172
  const urlObject = new URL(serverUrl + expandedPath);
2175
2173
  urlObject.search = new URLSearchParams(queryParamsWithAuth.map(nameAndValueObjectToPair)).toString();
2176
2174
  const body = typeof bodyInput === 'object' && !(bodyInput instanceof File)
package/index.js CHANGED
@@ -39,7 +39,6 @@ var map = require('lodash/map.js');
39
39
  var mapValues = require('lodash/mapValues.js');
40
40
  var pickBy = require('lodash/pickBy.js');
41
41
  var mosaicCodeEditor = require('@stoplight/mosaic-code-editor');
42
- var DOMPurify = require('dompurify');
43
42
  var compact = require('lodash/compact.js');
44
43
  var uniq = require('lodash/uniq.js');
45
44
  var orderBy = require('lodash/orderBy.js');
@@ -2183,15 +2182,14 @@ const getQueryParams = ({ httpOperation, parameterValues, }) => {
2183
2182
  function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, parameterValues, serverVariableValues, mockData, auth, chosenServer, credentials = 'omit', corsProxy, }) {
2184
2183
  var _a, _b, _c;
2185
2184
  return tslib.__awaiter(this, void 0, void 0, function* () {
2186
- const sanitizedParameterValues = Object.fromEntries(Object.entries(parameterValues).map(([key, value]) => [key, DOMPurify.sanitize(value)]));
2187
2185
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2188
2186
  const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2189
- const queryParams = getQueryParams({ httpOperation, parameterValues: sanitizedParameterValues });
2187
+ const queryParams = getQueryParams({ httpOperation, parameterValues });
2190
2188
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
2191
- .map(header => { var _a; return ({ name: header.name, value: (_a = sanitizedParameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2189
+ .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2192
2190
  .filter(({ value }) => value.length > 0);
2193
2191
  const [queryParamsWithAuth, headersWithAuth] = runAuthRequestEhancements(auth, queryParams, rawHeaders);
2194
- const expandedPath = uriExpand(httpOperation.path, sanitizedParameterValues);
2192
+ const expandedPath = uriExpand(httpOperation.path, parameterValues);
2195
2193
  const urlObject = new URL(serverUrl + expandedPath);
2196
2194
  urlObject.search = new URLSearchParams(queryParamsWithAuth.map(nameAndValueObjectToPair)).toString();
2197
2195
  const body = typeof bodyInput === 'object' && !(bodyInput instanceof File)
package/index.mjs CHANGED
@@ -39,7 +39,6 @@ import map from 'lodash/map.js';
39
39
  import mapValues from 'lodash/mapValues.js';
40
40
  import pickBy from 'lodash/pickBy.js';
41
41
  import { CodeEditor } from '@stoplight/mosaic-code-editor';
42
- import DOMPurify from 'dompurify';
43
42
  import compact from 'lodash/compact.js';
44
43
  import uniq from 'lodash/uniq.js';
45
44
  import orderBy from 'lodash/orderBy.js';
@@ -2162,15 +2161,14 @@ const getQueryParams = ({ httpOperation, parameterValues, }) => {
2162
2161
  function buildFetchRequest({ httpOperation, mediaTypeContent, bodyInput, parameterValues, serverVariableValues, mockData, auth, chosenServer, credentials = 'omit', corsProxy, }) {
2163
2162
  var _a, _b, _c;
2164
2163
  return __awaiter(this, void 0, void 0, function* () {
2165
- const sanitizedParameterValues = Object.fromEntries(Object.entries(parameterValues).map(([key, value]) => [key, DOMPurify.sanitize(value)]));
2166
2164
  const serverUrl = getServerUrl({ httpOperation, mockData, chosenServer, corsProxy, serverVariableValues });
2167
2165
  const shouldIncludeBody = ['PUT', 'POST', 'PATCH', 'DELETE'].includes(httpOperation.method.toUpperCase()) && bodyInput !== undefined;
2168
- const queryParams = getQueryParams({ httpOperation, parameterValues: sanitizedParameterValues });
2166
+ const queryParams = getQueryParams({ httpOperation, parameterValues });
2169
2167
  const rawHeaders = filterOutAuthorizationParams((_b = (_a = httpOperation.request) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : [], httpOperation.security)
2170
- .map(header => { var _a; return ({ name: header.name, value: (_a = sanitizedParameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2168
+ .map(header => { var _a; return ({ name: header.name, value: (_a = parameterValues[header.name]) !== null && _a !== void 0 ? _a : '' }); })
2171
2169
  .filter(({ value }) => value.length > 0);
2172
2170
  const [queryParamsWithAuth, headersWithAuth] = runAuthRequestEhancements(auth, queryParams, rawHeaders);
2173
- const expandedPath = uriExpand(httpOperation.path, sanitizedParameterValues);
2171
+ const expandedPath = uriExpand(httpOperation.path, parameterValues);
2174
2172
  const urlObject = new URL(serverUrl + expandedPath);
2175
2173
  urlObject.search = new URLSearchParams(queryParamsWithAuth.map(nameAndValueObjectToPair)).toString();
2176
2174
  const body = typeof bodyInput === 'object' && !(bodyInput instanceof File)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "9.0.26-beta-0.0",
3
+ "version": "9.0.27",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",
@@ -40,7 +40,6 @@
40
40
  "@stoplight/types": "^14.1.1",
41
41
  "@stoplight/yaml": "^4.3.0",
42
42
  "classnames": "^2.2.6",
43
- "dompurify": "^3.4.15",
44
43
  "httpsnippet-lite": "^3.0.5",
45
44
  "jotai": "1.3.9",
46
45
  "json-schema": "^0.4.0",