@eppo/js-client-sdk-common
Advanced tools
Comparing version 4.6.2 to 4.6.3
@@ -10,3 +10,3 @@ "use strict"; | ||
try { | ||
application_logger_1.logger.info(`[EventDispatcher] Delivering batch of ${batch.length} events...`); | ||
application_logger_1.logger.info(`[EventDispatcher] Delivering batch of ${batch.length} events to ${this.ingestionUrl}...`); | ||
const response = await fetch(this.ingestionUrl, { | ||
@@ -13,0 +13,0 @@ method: 'POST', |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const js_base64_1 = require("js-base64"); | ||
const PATH = 'v0/i'; | ||
class SdkKeyDecoder { | ||
@@ -18,8 +19,9 @@ /** | ||
return null; | ||
if (!hostname.startsWith('http://') && !hostname.startsWith('https://')) { | ||
const hostAndPath = hostname.endsWith('/') ? `${hostname}${PATH}` : `${hostname}/${PATH}`; | ||
if (!hostAndPath.startsWith('http://') && !hostAndPath.startsWith('https://')) { | ||
// prefix hostname with https scheme if none present | ||
return `https://${hostname}`; | ||
return `https://${hostAndPath}`; | ||
} | ||
else { | ||
return hostname; | ||
return hostAndPath; | ||
} | ||
@@ -26,0 +28,0 @@ } |
{ | ||
"name": "@eppo/js-client-sdk-common", | ||
"version": "4.6.2", | ||
"version": "4.6.3", | ||
"description": "Common library for Eppo JavaScript SDKs (web, react native, and node)", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -10,3 +10,5 @@ import { logger } from '../application-logger'; | ||
try { | ||
logger.info(`[EventDispatcher] Delivering batch of ${batch.length} events...`); | ||
logger.info( | ||
`[EventDispatcher] Delivering batch of ${batch.length} events to ${this.ingestionUrl}...`, | ||
); | ||
const response = await fetch(this.ingestionUrl, { | ||
@@ -13,0 +15,0 @@ method: 'POST', |
import { Base64 } from 'js-base64'; | ||
const PATH = 'v0/i'; | ||
export default class SdkKeyDecoder { | ||
@@ -17,9 +19,10 @@ /** | ||
if (!hostname.startsWith('http://') && !hostname.startsWith('https://')) { | ||
const hostAndPath = hostname.endsWith('/') ? `${hostname}${PATH}` : `${hostname}/${PATH}`; | ||
if (!hostAndPath.startsWith('http://') && !hostAndPath.startsWith('https://')) { | ||
// prefix hostname with https scheme if none present | ||
return `https://${hostname}`; | ||
return `https://${hostAndPath}`; | ||
} else { | ||
return hostname; | ||
return hostAndPath; | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1074156
9391