@redocly/reference-docs 2.24.0 → 2.25.2
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/bin/cli/commands/redocly-docs-cli.min.js +89 -74
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +121 -121
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +866 -851
- package/lib/components/common/ClearButton/ClearButton.d.ts +3 -0
- package/lib/components/common/ClearButton/ClearButton.js +2 -0
- package/lib/components/common/ClearButton/index.d.ts +2 -0
- package/lib/components/common/ClearButton/index.js +2 -0
- package/lib/components/common/ClearButton/styled.d.ts +2 -0
- package/lib/components/common/ClearButton/styled.js +2 -0
- package/lib/components/common/ClearButton/types.d.ts +6 -0
- package/lib/components/common/ClearButton/types.js +2 -0
- package/lib/components/common/Dropdown/Dropdown.js +1 -1
- package/lib/components/common/Dropdown/styled.js +1 -1
- package/lib/components/common/Dropdown/types.d.ts +2 -0
- package/lib/components/console/CodemirrorInput.js +1 -1
- package/lib/components/console/Console.js +1 -1
- package/lib/components/console/ParameterDropdown.js +1 -1
- package/lib/components/console/RequestBody.js +1 -1
- package/lib/components/console/RequestBodyForm.js +1 -1
- package/lib/components/console/utils.d.ts +1 -1
- package/lib/components/console/utils.js +1 -1
- package/lib/components/pluggable/PullRight.js +1 -1
- package/lib/models/file-upload.d.ts +0 -5
- package/lib/models/file-upload.js +1 -1
- package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +1 -1
- package/lib/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
- package/lib/redoc-lib/src/services/models/ApiInfo.js +1 -1
- package/lib/redoc-lib/src/services/models/Field.js +1 -1
- package/lib/redoc-lib/src/services/models/Schema.js +1 -1
- package/lib/redoc-lib/src/utils/openapi.js +1 -1
- package/lib/services/ProStore.js +1 -1
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/index.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/go/native.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/php/curl.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/r/httr.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +1 -1
- package/lib/types.d.ts +14 -0
- package/lib/types.js +2 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +1 -1
- package/lib-esm/components/common/ClearButton/ClearButton.d.ts +3 -0
- package/lib-esm/components/common/ClearButton/ClearButton.js +2 -0
- package/lib-esm/components/common/ClearButton/index.d.ts +2 -0
- package/lib-esm/components/common/ClearButton/index.js +2 -0
- package/lib-esm/components/common/ClearButton/styled.d.ts +2 -0
- package/lib-esm/components/common/ClearButton/styled.js +2 -0
- package/lib-esm/components/common/ClearButton/types.d.ts +6 -0
- package/lib-esm/components/common/ClearButton/types.js +2 -0
- package/lib-esm/components/common/Dropdown/Dropdown.js +1 -1
- package/lib-esm/components/common/Dropdown/styled.js +1 -1
- package/lib-esm/components/common/Dropdown/types.d.ts +2 -0
- package/lib-esm/components/console/CodemirrorInput.js +1 -1
- package/lib-esm/components/console/Console.js +1 -1
- package/lib-esm/components/console/ParameterDropdown.js +1 -1
- package/lib-esm/components/console/RequestBody.js +1 -1
- package/lib-esm/components/console/RequestBodyForm.js +1 -1
- package/lib-esm/components/console/utils.d.ts +1 -1
- package/lib-esm/components/console/utils.js +1 -1
- package/lib-esm/components/pluggable/PullRight.js +1 -1
- package/lib-esm/models/file-upload.d.ts +0 -5
- package/lib-esm/models/file-upload.js +1 -1
- package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/ApiInfo.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/Field.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/Schema.js +1 -1
- package/lib-esm/redoc-lib/src/utils/openapi.js +1 -1
- package/lib-esm/services/ProStore.js +1 -1
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/index.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/go/native.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.js +1 -1
- package/lib-esm/types.d.ts +14 -0
- package/lib-esm/types.js +2 -0
- package/lib-esm/utils.d.ts +1 -0
- package/lib-esm/utils.js +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign}from"tslib";import{format}from"util";import{CodeBuilder}from"../../helpers/code-builder";import{normalizeMimeType}from"../../../../utils";import{addIndentation,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";var handler=function(e,t,a){var r,s,o,n=a.target,i=a.client,l=Object.assign({indent:" "},t),p=new CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,lang:Lang.PYTHON});l.withComments&&addComments(p),l.withImports&&p.push("import requests").blank();var u,d,h=!1,m=e.allHeaders;if(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){var
|
|
1
|
+
import{__assign}from"tslib";import{format}from"util";import{CodeBuilder}from"../../helpers/code-builder";import{normalizeMimeType}from"../../../../utils";import{addIndentation,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";import{MediaTypes}from"../../../../../types";var handler=function(e,t,a){var r,s,o,n=a.target,i=a.client,l=Object.assign({indent:" "},t),p=new CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,lang:Lang.PYTHON});l.withComments&&addComments(p),l.withImports&&p.push("import requests").blank();var u,d,h=!1,m=e.allHeaders;if(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){var b=new HTTPSnippet(null===(s=e.securityOAuth2ExtraCalls)||void 0===s?void 0:s[0]).convert(n,i,__assign(__assign({},l),{withImports:!1,withComments:!1,variablesPrefix:"oauth2_"}));p.push(b),p.blank(),(m=m||{}).Authorization='"Bearer " + oauth2_data["access_token"]',h=!0}(printUrlVariablesDeclarations(e,p),p.push(p.var("url").toLowerCase()+" = %s",buildUrlExpression(e,p)).blank(),Object.keys(e.queryObj||{}).length)&&(u="query = "+jsObjectToPythonDict(e.queryObj,l.indent),p.push(u).blank());var c,f=normalizeMimeType(null===(o=e.postData)||void 0===o?void 0:o.mimeType);if(e.postData)switch(f){case MediaTypes.URL_ENCODED:d=e.postData.paramsObj?""+addIndentation(jsObjectToPythonDict(e.postData.paramsObj,l.indent),{level:0,firstLine:!1}):e.postData.text;break;case MediaTypes.JSON:e.postData.jsonObj&&(d=addIndentation(jsObjectToPythonDict(e.postData.jsonObj,l.indent),{level:0,firstLine:!1}));break;case MediaTypes.MULTIPART:p.unshift("# multipart/form-data is not supported yet\n");break;default:e.postData.text&&(d="'''\n"+addIndentation(e.postData.text.trim(),{level:1,indent:l.indent,firstLine:!0})+"\n'''")}d&&p.push(p.var("payload").toLowerCase()+" = %s",d).blank();var v=Object.keys(m).length,_=function(e,t){return"Authorization"===e&&h?t:'"'+t+'"'};if(1===v)for(c in m)p.push(p.var("headers").toLowerCase()+' = {"'+c+'": '+_(c,m[c])+"}").blank();else if(v>1){var y=1;for(c in p.push(p.var("headers").toLowerCase()+" = {"),m)y++!==v?p.push(1,'"'+c+'": '+_(c,m[c])+","):p.push(1,'"'+c+'": '+_(c,m[c]));p.push(0,"}").blank()}var C=e.method.toLowerCase(),L=format(p.var("response").toLowerCase()+" = requests."+C+"("+p.var("url").toLowerCase());d&&(L+=", "+(f===MediaTypes.JSON?"json":"data")+"="+p.var("payload").toLowerCase());return v>0&&(L+=", headers="+p.var("headers").toLowerCase()),u&&(L+=", params="+p.var("query").toLowerCase()),e.basicAuth&&(L+=", auth=('"+e.basicAuth.username+"','"+e.basicAuth.password+"')"),L+=")",p.push(L).blank().push(p.var("data").toLowerCase()+" = "+p.var("response").toLowerCase()+".json()").push("print("+p.var("data").toLowerCase()+")"),p.join()};export default handler;function addComments(e){e.push('"""'),e.push("Requires python >= 3"),e.blank(),e.push('Requires module "requests" >= 2.25.1'),e.push("See here for installation details:"),e.push(" https://requests.readthedocs.io/"),e.push('"""'),e.blank()}function jsObjectToPythonDict(e,t){return JSON.stringify(e,(function(e,t){return e&&"boolean"==typeof t?t?"__REDOCLY_<True>__":"__REDOCLY_<False>__":null===t?"__REDOCLY_<None>__":t}),t).replace(/"__REDOCLY_<(\w+)>__"/g,"$1")}
|
|
2
2
|
//# sourceMappingURL=requests.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign}from"tslib";import{CodeBuilder}from"../../helpers/code-builder";import{buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{Lang}from"../../helpers/constants";import{HTTPSnippet}from"../..";import{normalizeMimeType}from"../../../../utils";import{postDataToRListBody,objectToRString}from"./utils";var indent=1,
|
|
1
|
+
import{__assign}from"tslib";import{CodeBuilder}from"../../helpers/code-builder";import{buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{Lang}from"../../helpers/constants";import{HTTPSnippet}from"../..";import{normalizeMimeType}from"../../../../utils";import{MediaTypes}from"../../../../../types";import{postDataToRListBody,objectToRString}from"./utils";var indent=1,handler=function(e,a,t){var r,s,i,o,n,l=t.target,p=t.client,d=Object.assign({indent:" ",showBoilerplate:!0,printBody:!0},a),u=new CodeBuilder({indentation:d.indent,variablesPrefix:d.variablesPrefix,lang:Lang.R}),h=e.method.toUpperCase(),b=null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0];if(d.showBoilerplate&&u.push("library(httr)").blank(),b){var c="oauth2_",m=new HTTPSnippet(b).convert(l,p,__assign(__assign({},d),{variablesPrefix:c,showBoilerplate:!1}));u.push(m).push('access_token = content(oauth2_data_req, "parsed")$access_token').blank(),e.allHeaders.Authorization='paste("Bearer", access_token)'}var v="";if(null==e?void 0:e.postData)switch(normalizeMimeType(null===(s=null==e?void 0:e.postData)||void 0===s?void 0:s.mimeType)){case MediaTypes.URL_ENCODED:n="form",v=u.var("body");var y=postDataToRListBody(e.postData.params,d);u.push(v+" <- list("+y+")").blank();break;case MediaTypes.JSON:n="json",v=u.var("body");y=objectToRString(e.postData.jsonObj,d);u.push(v+" = '"+y+"'").blank();break;case MediaTypes.MULTIPART:n="multipart",v=u.var("body");y=postDataToRListBody(e.postData.params,d);u.push(v+" <- list("+y+")").blank();break;default:(null===(i=e.postData)||void 0===i?void 0:i.text)&&(v=u.var("body"),n="raw",u.push(v+" = "+objectToRString(null===(o=e.postData)||void 0===o?void 0:o.text)).blank())}printUrlVariablesDeclarations(e,u),Object.keys(__assign(__assign({},e.pathParameters),e.serverVariables)).length&&u.blank().push("# create you own operator").push('"%&%" <- function(x, y)paste0(x,y)').blank();var f=buildUrlExpression(e,u);u.push("url = "+f).blank();var k=u.var("data_req");if(u.push(k+" <- "+h+"("),u.push(indent,"url,"),e.basicAuth){var T=e.basicAuth,_=T.username,g=T.password;u.push(indent,'authenticate("'+_+'", "'+g+'")')}if(Object.keys(e.allHeaders).length){var D=""+Object.keys(e.allHeaders).map((function(a){return'"'+a+'" = '+(e.allHeaders[a].startsWith("paste")?e.allHeaders[a]:'"'+e.allHeaders[a]+'"')})).join(", ");D&&u.push(indent,"add_headers("+D+"),")}return v&&(u.push(indent,"body = "+v+","),u.push(indent,'encode = "'+n+'",')),u.push(indent,"verbose()"),u.push(")"),d.printBody&&u.blank().push("content("+k+("raw"===n?', "text"':"")+")"),u.join()};export default handler;
|
|
2
2
|
//# sourceMappingURL=httr.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign}from"tslib";import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";import{buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";var indent=1
|
|
1
|
+
import{__assign}from"tslib";import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";import{buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";import{MediaTypes}from"../../../../../types";var indent=1;function hasMimeType(e,a){return void 0===e&&(e={}),normalizeMimeType(e.mimeType)===a}var handler=function(e,a,r){var t,s,i,n,o,p=r.target,l=r.client,u=e.method.toUpperCase(),d=null===(t=e.securityOAuth2ExtraCalls)||void 0===t?void 0:t[0],h=__assign({capitalize:!0,showBoilerplate:!0,indent:" "},a),c=new CodeBuilder({indentation:h.indent,variablesPrefix:h.variablesPrefix,capitalize:h.capitalize,lang:Lang.RUBY});h.showBoilerplate&&(c.push("require 'uri'").push("require 'net/http'"),"https:"===e.uriObj.protocol&&c.push("require 'openssl'"),(hasMimeType(e.postData,MediaTypes.JSON)||d)&&c.unshift("require 'json'"),c.blank()),Object.keys(e.allHeaders).length&&Object.keys(e.allHeaders).forEach((function(a){e.allHeaders[a]="'"+e.allHeaders[a]+"'"}));var v=u.charAt(0)+u.substring(1).toLowerCase();if(["GET","POST","HEAD","DELETE","PATCH","PUT","OPTIONS","COPY","LOCK","UNLOCK","MOVE","TRACE"].indexOf(u)<0&&c.push("class Net::HTTP::%s < Net::HTTPRequest",v).push(" METHOD = '%s'",u.toUpperCase()).push(" REQUEST_HAS_BODY = '%s'",(null===(s=e.postData)||void 0===s?void 0:s.text)?"true":"false").push(" RESPONSE_HAS_BODY = true").push("end").blank(),d){var b="oAuth2",m=new HTTPSnippet(d).convert(p,l,__assign(__assign({},h),{variablesPrefix:b,showBoilerplate:!1})),T="oAuth2"+(h.capitalize?"Response":"response");c.push(m).push("access_token = JSON.parse("+T+".body)['access_token']").blank(),e.allHeaders.Authorization='"Bearer " + access_token'}if(printUrlVariablesDeclarations(e,c),c.push(c.var("url")+" = URI("+buildUrlExpression(e,c)+")"),Object.getOwnPropertyNames(e.queryObj).length&&(c.push(c.var("params")+" = "+stringifyObject(e.queryObj,{indent:h.indent,inlineCharacterLimit:25})),c.push(c.var("url")+".query = URI.encode_www_form("+c.var("params")+")")),c.blank().push(c.var("http")+" = Net::HTTP.new("+c.var("url")+".host, "+c.var("url")+".port)"),"https:"===e.uriObj.protocol&&c.push(c.var("http")+".use_ssl = true"),c.blank().push(c.var("request")+" = Net::HTTP::%s.new("+c.var("url")+")",v),Object.keys(e.allHeaders).length&&Object.keys(e.allHeaders).forEach((function(a){e.allHeaders[a]!=="'"+MediaTypes.MULTIPART+"'"&&c.push(c.var("request")+"['%s'] = %s",a,e.allHeaders[a])})),null==e?void 0:e.postData){var f={};switch(normalizeMimeType(null===(i=null==e?void 0:e.postData)||void 0===i?void 0:i.mimeType)){case MediaTypes.URL_ENCODED:e.postData.params.forEach((function(e){f[e.name]=e.value})),c.push(c.var("request")+".body = URI.encode_www_form("+stringifyObject(f,{indent:h.indent,inlineCharacterLimit:25})+")");break;case MediaTypes.JSON:c.push(c.var("request")+".body = "+stringifyObject(e.postData.jsonObj,{indent:h.indent,inlineCharacterLimit:25}).replace(/null/g,"nil")+".to_json");break;case MediaTypes.MULTIPART:e.postData.params&&(c.push(c.var("form_data")+" = ["),e.postData.params.forEach((function(e){c.push(indent,"['"+e.name+"', '"+e.value+"'],")})),c.push("]")),c.push(c.var("request")+".set_form("+c.var("form_data")+", '"+MediaTypes.MULTIPART+"')");break;default:(null===(n=e.postData)||void 0===n?void 0:n.text)&&c.push(c.var("request")+".body = "+JSON.stringify(null===(o=e.postData)||void 0===o?void 0:o.text))}}if(e.basicAuth){var y=e.basicAuth,O=y.username,_=y.password;c.push(c.var("request")+".basic_auth('"+O+"', '"+_+"')")}return c.blank().push(c.var("response")+" = "+c.var("http")+".request("+c.var("request")+")").push("puts "+c.var("response")+".read_body").blank(),c.join()};export var info={key:"native",title:"net::http",link:"http://ruby-doc.org/stdlib-2.2.1/libdoc/net/http/rdoc/Net/HTTP.html",description:"Ruby HTTP client"};export default handler;
|
|
2
2
|
//# sourceMappingURL=native.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign}from"tslib";import{format}from"util";import{CodeBuilder}from"../../helpers/code-builder";import shellHelpers from"../../helpers/shell";import{addIndentation,buildUrlExpression}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";var handler=function(e,t,s){var a,r,
|
|
1
|
+
import{__assign}from"tslib";import{format}from"util";import{CodeBuilder}from"../../helpers/code-builder";import shellHelpers from"../../helpers/shell";import{addIndentation,buildUrlExpression}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";import{MediaTypes}from"../../../../../types";var handler=function(e,t,s){var a,r,i=s.target,o=s.client,n=Object.assign({indent:" ",short:!1,binary:!1},t),l=new CodeBuilder({indentation:n.indent,lineJoin:n.indent?" \\\n"+n.indent:" "}),p=(null===(a=e.securityOAuth2ExtraCalls)||void 0===a?void 0:a.length)?new HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(i,o,__assign(__assign({},n),{withComments:!1})):"";l.push(0,"curl -i %s %s",n.short?"-X":"--request",e.method.toUpperCase()),e.basicAuth&&l.push(format("-u %s:%s",e.basicAuth.username,e.basicAuth.password));var d=buildUrlExpression(e,l);if(l.push(format("%s%s",n.short?"":"--url ",shellHelpers.quote(d))),"HTTP/1.0"===e.httpVersion&&l.push(n.short?"-0":"--http1.0"),Object.keys(e.headersObj).sort().forEach((function(t){var s=format("%s: %s",t,e.headersObj[t]);l.push("%s %s",n.short?"-H":"--header",shellHelpers.quote(s))})),e.allHeaders.cookie&&l.push("%s %s",n.short?"-b":"--cookie",shellHelpers.quote(e.allHeaders.cookie)),e.postData)switch(normalizeMimeType(e.postData.mimeType)){case MediaTypes.MULTIPART:e.postData.params.map((function(e){var t;t=e.fileName?format("%s=@%s",e.name,e.fileName):format("%s=%s",e.name,e.value),l.push("%s %s",n.short?"-F":"--form",shellHelpers.quote(t))}));break;case MediaTypes.URL_ENCODED:e.postData.params?e.postData.params.map((function(e){l.push("%s %s",n.binary?"--data-binary":n.short?"-d":"--data",shellHelpers.quote(format("%s=%s",e.name,e.value)))})):l.push("%s %s",n.binary?"--data-binary":n.short?"-d":"--data",shellHelpers.quote(e.postData.text));break;case MediaTypes.JSON:e.postData.jsonObj&&l.push("%s %s",n.binary?"--data-binary":n.short?"-d":"--data",addIndentation(shellHelpers.quote(JSON.stringify(e.postData.jsonObj,null,n.indent)),{level:1,indent:n.indent,firstLine:!1}));break;default:e.postData.text&&l.push("%s %s",n.binary?"--data-binary":n.short?"-d":"--data",addIndentation(shellHelpers.quote(e.postData.text),{level:1,indent:n.indent,firstLine:!1}))}return(n.withComments?"# Requires curl >= 7.2\n\n":"")+(p?p+"\n\n"+l.join():l.join())};export var info={key:"curl",title:"curl",link:"http://curl.haxx.se/",description:"cURL is a command line tool and library for transferring data with URL syntax"};export default handler;
|
|
2
2
|
//# sourceMappingURL=curl.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum WindowReferenceOptions {
|
|
2
|
+
LINK_FOR_ID = "linkForId",
|
|
3
|
+
GENERATE_DEEP_LINK = "generateDeepLink",
|
|
4
|
+
ON_DEEP_LINK_CLICK = "onDeepLinkClick",
|
|
5
|
+
REQUEST_INTERCEPTOR = "requestInterceptor",
|
|
6
|
+
HOOKS = "hooks"
|
|
7
|
+
}
|
|
8
|
+
export declare enum MediaTypes {
|
|
9
|
+
OCTET_STREAM = "application/octet-stream",
|
|
10
|
+
MULTIPART = "multipart/form-data",
|
|
11
|
+
URL_ENCODED = "application/x-www-form-urlencoded",
|
|
12
|
+
JSON = "application/json",
|
|
13
|
+
XML = "application/xml"
|
|
14
|
+
}
|
package/lib-esm/types.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export var WindowReferenceOptions;!function(e){e.LINK_FOR_ID="linkForId",e.GENERATE_DEEP_LINK="generateDeepLink",e.ON_DEEP_LINK_CLICK="onDeepLinkClick",e.REQUEST_INTERCEPTOR="requestInterceptor",e.HOOKS="hooks"}(WindowReferenceOptions||(WindowReferenceOptions={}));export var MediaTypes;!function(e){e.OCTET_STREAM="application/octet-stream",e.MULTIPART="multipart/form-data",e.URL_ENCODED="application/x-www-form-urlencoded",e.JSON="application/json",e.XML="application/xml"}(MediaTypes||(MediaTypes={}));
|
|
2
|
+
//# sourceMappingURL=types.js.map
|
package/lib-esm/utils.d.ts
CHANGED
|
@@ -37,3 +37,4 @@ export declare function getSecurityDetailsOptions(name: string, fieldName: strin
|
|
|
37
37
|
export declare function get<T>(object: GenericObject, path: string | Array<string>, defval?: T): GenericObject;
|
|
38
38
|
export declare function joinStringFactory(separator: string): (...args: (string | undefined)[]) => string;
|
|
39
39
|
export declare const dottedString: (...args: (string | undefined)[]) => string;
|
|
40
|
+
export declare function getWindowReferenceOptions<T>(option: string): T | null;
|
package/lib-esm/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as React from"react";import{IS_BROWSER}from"./redoc-lib";var _store;export var getGlobalStore=function(){return _store};export var setGlobalStore=function(e){return _store=e};export function debounce(e,t,
|
|
1
|
+
import*as React from"react";import{IS_BROWSER}from"./redoc-lib/src/utils/";var _store;export var getGlobalStore=function(){return _store};export var setGlobalStore=function(e){return _store=e};export function debounce(e,t,o){var r,n=0;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];function s(){n>1&&e.apply(void 0,i),n=0,r=null}n++,r?clearTimeout(r):o&&e.apply(void 0,i),r=setTimeout(s,t)}}export function toSessionStorage(e,t){IS_BROWSER&&window.sessionStorage.setItem("redoc."+e,t)}export function fromSessionStorage(e){return IS_BROWSER&&window.sessionStorage.getItem("redoc."+e)||""}export function setParameterValue(e,t,o){toSessionStorage(e+"."+t,JSON.stringify(o))}export function getParameterValue(e,t){try{return JSON.parse(fromSessionStorage(e+"."+t))}catch(e){return null}}export function toLocalStorage(e,t){window.localStorage.setItem("redoc."+e,t)}export function fromLocalStorage(e){return IS_BROWSER&&window.localStorage.getItem("redoc."+e)||""}export function useDimensions(e){var t=React.useState(null),o=t[0],r=t[1];return React.useLayoutEffect((function(){if(e){var t=function(){return window.requestAnimationFrame((function(){return r(e.getBoundingClientRect())}))};return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]),[o]}export function escapeFormId(e){return e.replace(/[.[\]]/g,(function(e){return{".":"%2e","[":"%5b","]":"%5d"}[e]||""}))}export function unescapeFormId(e){return e.replace(/%2e|%5b|%5d/g,(function(e){return{"%2e":".","%5b":"[","%5d":"]"}[e]||""}))}export function setSecurityDetails(e,t){e=escapeFormId(e),"string"==typeof t?toSessionStorage("auth."+e,t):t&&(toSessionStorage("auth."+e+".password",t.password||""),toSessionStorage("auth."+e+".username",t.username||""),toSessionStorage("auth."+e+".token",t.token&&JSON.stringify(t.token)||""),toSessionStorage("auth."+e+".client_id",t.client_id||""),toSessionStorage("auth."+e+".client_secret",t.client_secret||""),toSessionStorage("auth."+e+".scopes",t.scopes&&JSON.stringify(t.scopes)||""))}export function setSecurityDetailsVariants(e,t){toSessionStorage("auth."+(e=escapeFormId(e))+".variants",JSON.stringify(t))}export function getSecurityDetails(e){var t=fromSessionStorage("auth."+(e=escapeFormId(e))),o=fromSessionStorage("auth."+e+".token");return{raw:t,password:fromSessionStorage("auth."+e+".password"),username:fromSessionStorage("auth."+e+".username"),token:o&&JSON.parse(o)||null,client_id:fromSessionStorage("auth."+e+".client_id"),client_secret:fromSessionStorage("auth."+e+".client_secret"),scopes:fromSessionStorage("auth."+e+".scopes")}}export function getSecurityDetailsOptions(e,t){var o=fromSessionStorage("auth."+(e=escapeFormId(e))+".variants");if(!o)return null;var r=JSON.parse(o);return r&&Array.isArray(r)?r.map((function(e){return e.details?""===t&&e.details&&"string"==typeof e.details?{label:e.label,value:e.details}:"object"==typeof e.details?{label:e.label,value:e.details[t]}:null:null})).filter(notNull):null}function notNull(e){return null!==e}export function get(e,t,o){return"string"==typeof t&&(t=t.split(".")),t.reduce((function(e,t){return e&&e[t]?e[t]:o}),e)}export function joinStringFactory(e){return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return t.filter(Boolean).join(e)}}export var dottedString=joinStringFactory(".");export function getWindowReferenceOptions(e){var t;return IS_BROWSER?null===(t=null===window||void 0===window?void 0:window.REFERENCE_DOCS_OPTIONS)||void 0===t?void 0:t[e]:null}
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/reference-docs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.2",
|
|
4
4
|
"description": "Redocly Reference Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"test:unit": "jest",
|
|
80
80
|
"test:unit:watch": "jest --watch",
|
|
81
81
|
"test:update-snapshot": "jest --updateSnapshot",
|
|
82
|
-
"test:e2e": "percy exec -- cypress run",
|
|
82
|
+
"test:e2e": "npm run bundle && percy exec -- cypress run",
|
|
83
83
|
"cypress": "cypress open",
|
|
84
84
|
"list-licenses": "node ./scripts/list-licenses.js",
|
|
85
85
|
"license-check": "license-checker --production --onlyAllow 'MIT;ISC;Apache-2.0;Apache;CC0-1.0;BSD;BSD-2-Clause;BSD-3-Clause;UNKNOWN' --summary",
|