@lwrjs/shared-utils
Advanced tools
Comparing version 0.15.0-alpha.13 to 0.15.0-alpha.14
@@ -21,3 +21,3 @@ import type { EnvironmentContext, FeatureFlags, Headers, RuntimeParams } from '@lwrjs/types'; | ||
export declare const REQUEST_DEPTH_KEY: string; | ||
export declare function parseRequestDepthHeader(headers?: Headers): number; | ||
export declare function parseRequestDepth(headers?: Headers, query?: Record<string, string>): number; | ||
//# sourceMappingURL=env.d.ts.map |
@@ -88,3 +88,3 @@ if (getFeatureFlags().REEVALUATE_MODULES && !getFeatureFlags().LEGACY_LOADER) { | ||
export const REQUEST_DEPTH_KEY = REQUEST_DEPTH_HEADER.toLowerCase(); | ||
export function parseRequestDepthHeader(headers = {}) { | ||
export function parseRequestDepth(headers = {}, query = {}) { | ||
let maxDepth = 0; | ||
@@ -110,4 +110,10 @@ const value = headers && headers[REQUEST_DEPTH_KEY]; | ||
} | ||
if (query[REQUEST_DEPTH_KEY]) { | ||
const queryValue = parseInt(query[REQUEST_DEPTH_KEY], 10); | ||
if (!isNaN(queryValue) && queryValue > maxDepth) { | ||
maxDepth = queryValue; | ||
} | ||
} | ||
return maxDepth; | ||
} | ||
//# sourceMappingURL=env.js.map |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.15.0-alpha.13", | ||
"version": "0.15.0-alpha.14", | ||
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview", | ||
@@ -41,3 +41,3 @@ "repository": { | ||
"dependencies": { | ||
"@lwrjs/diagnostics": "0.15.0-alpha.13", | ||
"@lwrjs/diagnostics": "0.15.0-alpha.14", | ||
"es-module-lexer": "^1.5.4", | ||
@@ -55,3 +55,3 @@ "fast-json-stable-stringify": "^2.1.0", | ||
"devDependencies": { | ||
"@lwrjs/types": "0.15.0-alpha.13", | ||
"@lwrjs/types": "0.15.0-alpha.14", | ||
"@types/mime-types": "2.1.4", | ||
@@ -64,3 +64,3 @@ "@types/path-to-regexp": "^1.7.0", | ||
}, | ||
"gitHead": "687327a328b33a1abc3ac45e1406d72ebe7d37b4" | ||
"gitHead": "c34e441a349c30ed3b52459c64e92d8036013036" | ||
} |
Sorry, the diff of this file is not supported yet
190434
4414
+ Added@lwrjs/diagnostics@0.15.0-alpha.14(transitive)
- Removed@lwrjs/diagnostics@0.15.0-alpha.13(transitive)