@redocly/openapi-docs 3.5.12 → 3.5.13
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,s)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTTPSnippet=void 0;const url=__importStar(require("url")),utils_1=require("../../utils"),constants_1=require("../../../constants"),targets_1=__importDefault(require("./targets")),reducer_1=__importDefault(require("./helpers/reducer")),utils_2=require("../../../utils");class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},t),{httpVersion:t.httpVersion||"HTTP/1.1",queryString:t.queryString||[],headers:t.headers||[],cookies:t.cookies||[],postData:t.postData?Object.assign(Object.assign({},t.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:t.pathParameters||{},serverVariables:t.serverVariables||{}}))}prepare(e){var t;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer_1.default,{})),e.headers&&e.headers.length){const t=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(r,a){let s=a.name;return e.httpVersion.match(t)&&(s=s.toLowerCase()),r[s]=a.value,r}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,t){return e[t.name]=t.value,e}),{}));const r=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(r.length&&(e.allHeaders.cookie=r.join("; ")),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case constants_1.MediaTypes.MULTIPART:case"multipart/alternative":break;case constants_1.MediaTypes.URL_ENCODED:(null===(t=e.postData)||void 0===t?void 0:t.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer_1.default,{}),e.postData.text=utils_2.queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case constants_1.MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=(0,utils_1.unescapeServerVariables)(e.uriObj.pathname),e.url=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=utils_2.queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e}convert(e,t,r){!r&&t&&(r=t);const a=this._matchTarget(e,t);if(a){const s=a(this.request,r,{target:e,client:t});return 1===s.length?s[0]:s}throw new Error("
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,s)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTTPSnippet=void 0;const url=__importStar(require("url")),utils_1=require("../../utils"),constants_1=require("../../../constants"),targets_1=__importDefault(require("./targets")),reducer_1=__importDefault(require("./helpers/reducer")),utils_2=require("../../../utils");class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},t),{httpVersion:t.httpVersion||"HTTP/1.1",queryString:t.queryString||[],headers:t.headers||[],cookies:t.cookies||[],postData:t.postData?Object.assign(Object.assign({},t.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:t.pathParameters||{},serverVariables:t.serverVariables||{}}))}prepare(e){var t;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer_1.default,{})),e.headers&&e.headers.length){const t=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(r,a){let s=a.name;return e.httpVersion.match(t)&&(s=s.toLowerCase()),r[s]=a.value,r}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,t){return e[t.name]=t.value,e}),{}));const r=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(r.length&&(e.allHeaders.cookie=r.join("; ")),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case constants_1.MediaTypes.MULTIPART:case"multipart/alternative":break;case constants_1.MediaTypes.URL_ENCODED:(null===(t=e.postData)||void 0===t?void 0:t.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer_1.default,{}),e.postData.text=utils_2.queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case constants_1.MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=(0,utils_1.unescapeServerVariables)(e.uriObj.pathname),e.url=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=utils_2.queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e}convert(e,t,r){!r&&t&&(r=t);const a=this._matchTarget(e,t);if(a){const s=a(this.request,r,{target:e,client:t});return 1===s.length?s[0]:s}throw new Error("Cannot match target")}_matchTarget(e,t){return!!Object.prototype.hasOwnProperty.call(targets_1.default,e)&&("string"==typeof t&&"function"==typeof targets_1.default[e][t]?targets_1.default[e][t]:targets_1.default[e][targets_1.default[e].info.default])}}exports.HTTPSnippet=HTTPSnippet;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as url from"url";import{normalizeMimeType,unescapeServerVariables}from"../../utils";import{MediaTypes}from"../../../constants";import targets from"./targets";import reducer from"./helpers/reducer";import{queryString}from"../../../utils";export class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},r),{httpVersion:r.httpVersion||"HTTP/1.1",queryString:r.queryString||[],headers:r.headers||[],cookies:r.cookies||[],postData:r.postData?Object.assign(Object.assign({},r.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:r.pathParameters||{},serverVariables:r.serverVariables||{}}))}prepare(e){var r;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer,{})),e.headers&&e.headers.length){const r=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(t,a){let s=a.name;return e.httpVersion.match(r)&&(s=s.toLowerCase()),t[s]=a.value,t}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,r){return e[r.name]=r.value,e}),{}));const t=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(t.length&&(e.allHeaders.cookie=t.join("; ")),e.postData)switch(normalizeMimeType(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case MediaTypes.MULTIPART:case"multipart/alternative":break;case MediaTypes.URL_ENCODED:(null===(r=e.postData)||void 0===r?void 0:r.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer,{}),e.postData.text=queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(r){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=unescapeServerVariables(e.uriObj.pathname),e.url=unescapeServerVariables(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=unescapeServerVariables(url.format(e.uriObj)),e}convert(e,r,t){!t&&r&&(t=r);const a=this._matchTarget(e,r);if(a){const s=a(this.request,t,{target:e,client:r});return 1===s.length?s[0]:s}throw new Error("
|
|
1
|
+
import*as url from"url";import{normalizeMimeType,unescapeServerVariables}from"../../utils";import{MediaTypes}from"../../../constants";import targets from"./targets";import reducer from"./helpers/reducer";import{queryString}from"../../../utils";export class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},r),{httpVersion:r.httpVersion||"HTTP/1.1",queryString:r.queryString||[],headers:r.headers||[],cookies:r.cookies||[],postData:r.postData?Object.assign(Object.assign({},r.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:r.pathParameters||{},serverVariables:r.serverVariables||{}}))}prepare(e){var r;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer,{})),e.headers&&e.headers.length){const r=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(t,a){let s=a.name;return e.httpVersion.match(r)&&(s=s.toLowerCase()),t[s]=a.value,t}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,r){return e[r.name]=r.value,e}),{}));const t=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(t.length&&(e.allHeaders.cookie=t.join("; ")),e.postData)switch(normalizeMimeType(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case MediaTypes.MULTIPART:case"multipart/alternative":break;case MediaTypes.URL_ENCODED:(null===(r=e.postData)||void 0===r?void 0:r.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer,{}),e.postData.text=queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(r){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=unescapeServerVariables(e.uriObj.pathname),e.url=unescapeServerVariables(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=unescapeServerVariables(url.format(e.uriObj)),e}convert(e,r,t){!t&&r&&(t=r);const a=this._matchTarget(e,r);if(a){const s=a(this.request,t,{target:e,client:r});return 1===s.length?s[0]:s}throw new Error("Cannot match target")}_matchTarget(e,r){return!!Object.prototype.hasOwnProperty.call(targets,e)&&("string"==typeof r&&"function"==typeof targets[e][r]?targets[e][r]:targets[e][targets[e].info.default])}}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.13",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@markdoc/markdoc": "0.4.0",
|
|
27
|
-
"@redocly/openapi-core": "1.26.
|
|
27
|
+
"@redocly/openapi-core": "1.26.1",
|
|
28
28
|
"deepmerge": "^4.2.2",
|
|
29
29
|
"dompurify": "2.5.4",
|
|
30
30
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "~0.11.0",
|
|
45
45
|
"url-template": "^2.0.8",
|
|
46
46
|
"util": "~0.12.5",
|
|
47
|
-
"@redocly/config": "0.19.
|
|
48
|
-
"@redocly/replay": "0.8.
|
|
47
|
+
"@redocly/config": "0.19.4",
|
|
48
|
+
"@redocly/replay": "0.8.11"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@shikijs/transformers": "^1.22.2",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"js-yaml": "4.1.0",
|
|
79
79
|
"json-schema": "0.4.0",
|
|
80
80
|
"outdent": "0.8.0",
|
|
81
|
-
"prettier-2": "npm:prettier
|
|
81
|
+
"prettier-2": "npm:prettier@2.8.8",
|
|
82
82
|
"react": "18.2.0",
|
|
83
83
|
"react-dom": "18.2.0",
|
|
84
84
|
"react-is": "18.2.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"webpack": "5.94.0",
|
|
97
97
|
"webpack-cli": "5.1.4",
|
|
98
98
|
"webpack-dev-server": "5.1.0",
|
|
99
|
-
"@redocly/theme": "0.
|
|
99
|
+
"@redocly/theme": "0.47.0"
|
|
100
100
|
},
|
|
101
101
|
"scripts": {
|
|
102
102
|
"start": "npm run copy-highlight-hook && webpack serve --mode=development --hot",
|