@growthbook/edge-lambda
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -8,3 +8,8 @@ "use strict"; | ||
const context = edge_utils_1.defaultContext; | ||
context.config = (0, edge_utils_1.getConfig)(env || {}); | ||
const configEnv = env || {}; | ||
if (configEnv.STALE_TTL === undefined) { | ||
// 10 minute in-mem TTL if not set | ||
configEnv.STALE_TTL = (10 * 1000 * 60) + ""; | ||
} | ||
context.config = (0, edge_utils_1.getConfig)(configEnv); | ||
// apply overrides | ||
@@ -18,3 +23,3 @@ if (config) { | ||
// config.helpers | ||
context.helpers.getRequestURL = (0, helpers_1.buildGetRequestURL)(env || {}); | ||
context.helpers.getRequestURL = (0, helpers_1.buildGetRequestURL)(configEnv); | ||
context.helpers.getRequestMethod = helpers_1.getRequestMethod; | ||
@@ -21,0 +26,0 @@ context.helpers.getRequestHeader = helpers_1.getRequestHeader; |
{ | ||
"name": "@growthbook/edge-lambda", | ||
"description": "GrowthBook edge app for Lambda@Edge", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "dist/index.js", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@growthbook/edge-utils": "^0.0.6", | ||
"@growthbook/edge-utils": "^0.0.7", | ||
"@growthbook/growthbook": "^1.0.0", | ||
@@ -22,0 +22,0 @@ "cookie": "^0.6.0" |
@@ -33,3 +33,8 @@ import { | ||
const context = defaultContext; | ||
context.config = getConfig(env || {}); | ||
const configEnv = env || {}; | ||
if (configEnv.STALE_TTL === undefined) { | ||
// 10 minute in-mem TTL if not set | ||
configEnv.STALE_TTL = (10 * 1000 * 60) + ""; | ||
} | ||
context.config = getConfig(configEnv); | ||
@@ -45,3 +50,3 @@ // apply overrides | ||
// config.helpers | ||
context.helpers.getRequestURL = buildGetRequestURL(env || {}); | ||
context.helpers.getRequestURL = buildGetRequestURL(configEnv); | ||
context.helpers.getRequestMethod = getRequestMethod; | ||
@@ -48,0 +53,0 @@ context.helpers.getRequestHeader = getRequestHeader; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21210
400
+ Added@growthbook/edge-utils@0.0.7(transitive)
- Removed@growthbook/edge-utils@0.0.6(transitive)