@live-change/framework
Advanced tools
Comparing version 0.4.26 to 0.4.27
@@ -41,2 +41,3 @@ const ReactiveDao = require("@live-change/dao") | ||
constructor(env = process.env) { | ||
this.env = env | ||
this.splitEvents = false | ||
@@ -57,7 +58,7 @@ | ||
] | ||
if(process.env.SEARCH_INDEX_PREFIX) this.defaultProcessors.push(searchIndex) | ||
if(env.SEARCH_INDEX_PREFIX) this.defaultProcessors.push(searchIndex) | ||
this.defaultUpdaters = [ | ||
databaseUpdater | ||
] | ||
if(process.env.SEARCH_INDEX_PREFIX) this.defaultUpdaters.push(elasticSearchUpdater) | ||
if(env.SEARCH_INDEX_PREFIX) this.defaultUpdaters.push(elasticSearchUpdater) | ||
this.defaultClientSideFilters = [ | ||
@@ -79,3 +80,4 @@ accessControlFilter, | ||
autoReconnectDelay: 200, | ||
logLevel: 1 | ||
logLevel: 1, | ||
unobserveDebug: env.UNOBSERVE_DEBUG == "YES" | ||
}, | ||
@@ -98,6 +100,6 @@ database: { | ||
connectToSearch() { | ||
if(!process.env.SEARCH_INDEX_PREFIX) throw new Error("ElasticSearch not configured") | ||
if(!this.env.SEARCH_INDEX_PREFIX) throw new Error("ElasticSearch not configured") | ||
if(this.search) return this.search | ||
this.searchIndexPrefix = process.env.SEARCH_INDEX_PREFIX | ||
this.search = new ElasticSearch({ node: process.env.SEARCH_URL || 'http://localhost:9200' }) | ||
this.searchIndexPrefix = this.env.SEARCH_INDEX_PREFIX | ||
this.search = new ElasticSearch({ node: this.env.SEARCH_URL || 'http://localhost:9200' }) | ||
this.search.info(console.log) | ||
@@ -108,5 +110,5 @@ return this.search | ||
connectToAnalytics() { | ||
if(!process.env.ANALYTICS_INDEX_PREFIX) throw new Error("ElasticSearch analytics not configured") | ||
if(!this.env.ANALYTICS_INDEX_PREFIX) throw new Error("ElasticSearch analytics not configured") | ||
if(this.analytics) return this.analytics | ||
this.analytics = new AnalyticsWriter(process.env.ANALYTICS_INDEX_PREFIX) | ||
this.analytics = new AnalyticsWriter(this.env.ANALYTICS_INDEX_PREFIX) | ||
return this.analytics | ||
@@ -113,0 +115,0 @@ } |
{ | ||
"name": "@live-change/framework", | ||
"version": "0.4.26", | ||
"version": "0.4.27", | ||
"description": "Live Change Framework - ultimate solution for real time mobile/web apps", | ||
@@ -24,3 +24,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@live-change/dao": "^0.2.34", | ||
"@live-change/dao": "^0.2.35", | ||
"@live-change/dao-websocket": "^0.2.21", | ||
@@ -27,0 +27,0 @@ "@live-change/db": "^0.2.5", |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
160243
4403
8