@redocly/reference-docs 2.27.0 → 2.27.3
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 +4 -4
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +1 -1
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +210 -210
- package/lib/redoc-lib/src/components/SourceCode/SourceCode.d.ts +1 -1
- package/lib/redoc-lib/src/components/SourceCode/SourceCode.js +1 -1
- package/lib/redoc-lib/src/services/OpenAPIParser.js +1 -1
- package/lib/redoc-lib/src/services/SearchStore.js +1 -1
- package/lib/redoc-lib/src/utils/helpers.d.ts +1 -1
- package/lib/redoc-lib/src/utils/helpers.js +1 -1
- package/lib/redoc-lib/src/utils/openapi.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/utils.d.ts +2 -0
- package/lib/services/utils.js +1 -1
- package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.js +1 -1
- package/lib-esm/redoc-lib/src/services/OpenAPIParser.js +1 -1
- package/lib-esm/redoc-lib/src/services/SearchStore.js +1 -1
- package/lib-esm/redoc-lib/src/utils/helpers.d.ts +1 -1
- package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
- package/lib-esm/redoc-lib/src/utils/openapi.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/utils.d.ts +2 -0
- package/lib-esm/services/utils.js +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ export declare function normalizePath(path: string): string;
|
|
|
7
7
|
export declare function isSameMime(a?: string, b?: string): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Removes the mime-types params e.g. charset (application/json;charset=UTF-8))
|
|
10
|
+
* Removes any prefixes, e.g. application/hal+json => application/json
|
|
11
|
+
* Spec is type/subtype;param1=value or type/semantic+format;param1=value
|
|
10
12
|
* @param mimeType mime type string or undefined
|
|
11
13
|
*/
|
|
12
14
|
export declare function normalizeMimeType(mimeType?: string): string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign,__awaiter,__generator}from"tslib";import merge from"deepmerge";import{isMergeableObject,isObject}from"../redoc-lib/src/utils/helpers";export function normalizePath(
|
|
1
|
+
import{__assign,__awaiter,__generator}from"tslib";import merge from"deepmerge";import{isMergeableObject,isObject}from"../redoc-lib/src/utils/helpers";export function normalizePath(r){return r.startsWith("/")||(r="/"+r),r.endsWith("/")&&(r=r.slice(0,-1)),r}export function isSameMime(r,e){return!(!r||!e)&&normalizeMimeType(r)===normalizeMimeType(e)}export function normalizeMimeType(r){if(r){var e=r.split(";")[0].toLowerCase().split("/"),t=e[0],n=e[1];return void 0===n?t:t+"/"+n.split("+").pop()}}export function unescapeServerVariables(r){var e=new RegExp("%7B","g"),t=new RegExp("%7D","g");return r.replace(e,"{").replace(t,"}").replace("///","//")}export function arrayMergeStrategy(r,e){if(!r.length||!hasObjectOrArray(r))return e;var t=r.filter((function(r){return Object.keys(r).length>0}));return e.forEach((function(e,n){isMergeableObject(e)?t[n]=merge(r[n],e,{arrayMerge:arrayMergeStrategy}):Array.isArray(e)?t.push(e):t[n]=e})),t}var hasObjectOrArray=function(r){return r.some((function(r){return isObject(r)&&Object.keys(r).length>0}))};export function isEmptyObject(r){return!!r&&0===Object.keys(r).length}export var cryptoLib="undefined"!=typeof window&&(window.crypto||window.msCrypto)||void 0;export function randString(r){void 0===r&&(r=32);for(var e="";e.length<r;)e+=Math.random().toString(32).substring(2);return e.substring(0,r)}export function encodeState(r){var e=__assign({randomStr:randString()},r);return btoa(JSON.stringify(e))}export function sha256(r){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return e=(new TextEncoder).encode(r),[2,null==cryptoLib?void 0:cryptoLib.subtle.digest("SHA-256",e)]}))}))}export function base64UrlEncode(r){if(r)return btoa(String.fromCharCode.apply(null,new Uint8Array(r))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|