hypertune
Advanced tools
Comparing version 2.2.4 to 2.2.5
# Changelog | ||
## 2.2.5 | ||
- Remote logging improvements. | ||
## 2.2.4 | ||
@@ -4,0 +8,0 @@ |
@@ -18,6 +18,7 @@ "use strict"; | ||
let logger; | ||
const remoteLoggingMode = (_b = (_a = options.remoteLogging) === null || _a === void 0 ? void 0 : _a.mode) !== null && _b !== void 0 ? _b : (environment_1.isBrowser ? "session" : "normal"); | ||
try { | ||
logger = new Logger_1.default({ | ||
token, | ||
remoteLoggingMode: (_b = (_a = options.remoteLogging) === null || _a === void 0 ? void 0 : _a.mode) !== null && _b !== void 0 ? _b : (environment_1.isBrowser ? "session" : "normal"), | ||
remoteLoggingMode, | ||
remoteLoggingEndpointUrl: (_d = (_c = options.remoteLogging) === null || _c === void 0 ? void 0 : _c.endpointUrl) !== null && _d !== void 0 ? _d : shared_1.prodLogsEndpointUrl, | ||
@@ -70,10 +71,10 @@ localLogger: options.localLogger, | ||
// Use the provided option else use the default interval but disable | ||
// flushing by default for Next.js servers. | ||
((_h = options.remoteLogging) === null || _h === void 0 ? void 0 : _h.flushIntervalMs) !== undefined | ||
? options.remoteLogging.flushIntervalMs === null || | ||
options.remoteLogging.flushIntervalMs === 0 // TODO: Deprecate | ||
? null | ||
: clampInterval(options.remoteLogging.flushIntervalMs) | ||
: isNextJsBuildOrServer | ||
? null | ||
// flushing by default if remote logging mode is set to off. | ||
remoteLoggingMode === "off" | ||
? null | ||
: ((_h = options.remoteLogging) === null || _h === void 0 ? void 0 : _h.flushIntervalMs) !== undefined | ||
? options.remoteLogging.flushIntervalMs === null || | ||
options.remoteLogging.flushIntervalMs === 0 // TODO: Deprecate | ||
? null | ||
: clampInterval(options.remoteLogging.flushIntervalMs) | ||
: defaultIntervalMs, | ||
@@ -80,0 +81,0 @@ cacheSize: (_j = options.cacheSize) !== null && _j !== void 0 ? _j : shared_1.defaultCacheSize, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** Replaced by the value in package.json on build */ | ||
exports.default = "2.2.4"; | ||
exports.default = "2.2.5"; | ||
//# sourceMappingURL=sdkVersion.js.map |
@@ -675,3 +675,5 @@ import { isQueryVariableKey } from "./constants"; | ||
* | ||
* @default 2000 (null for Next.js servers) | ||
* When `mode` is set to "off" the SDK will never automatically flush logs. | ||
* | ||
* @default 2000 | ||
*/ | ||
@@ -678,0 +680,0 @@ flushIntervalMs?: number | null; |
{ | ||
"name": "hypertune", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -41,2 +41,4 @@ import { | ||
let logger: Logger; | ||
const remoteLoggingMode = | ||
options.remoteLogging?.mode ?? (isBrowser ? "session" : "normal"); | ||
@@ -46,4 +48,3 @@ try { | ||
token, | ||
remoteLoggingMode: | ||
options.remoteLogging?.mode ?? (isBrowser ? "session" : "normal"), | ||
remoteLoggingMode, | ||
remoteLoggingEndpointUrl: | ||
@@ -105,10 +106,10 @@ options.remoteLogging?.endpointUrl ?? prodLogsEndpointUrl, | ||
// Use the provided option else use the default interval but disable | ||
// flushing by default for Next.js servers. | ||
options.remoteLogging?.flushIntervalMs !== undefined | ||
? options.remoteLogging.flushIntervalMs === null || | ||
options.remoteLogging.flushIntervalMs === 0 // TODO: Deprecate | ||
? null | ||
: clampInterval(options.remoteLogging.flushIntervalMs) | ||
: isNextJsBuildOrServer | ||
? null | ||
// flushing by default if remote logging mode is set to off. | ||
remoteLoggingMode === "off" | ||
? null | ||
: options.remoteLogging?.flushIntervalMs !== undefined | ||
? options.remoteLogging.flushIntervalMs === null || | ||
options.remoteLogging.flushIntervalMs === 0 // TODO: Deprecate | ||
? null | ||
: clampInterval(options.remoteLogging.flushIntervalMs) | ||
: defaultIntervalMs, | ||
@@ -115,0 +116,0 @@ cacheSize: options.cacheSize ?? defaultCacheSize, |
@@ -907,3 +907,5 @@ /* eslint-disable capitalized-comments */ | ||
* | ||
* @default 2000 (null for Next.js servers) | ||
* When `mode` is set to "off" the SDK will never automatically flush logs. | ||
* | ||
* @default 2000 | ||
*/ | ||
@@ -910,0 +912,0 @@ flushIntervalMs?: number | null; |
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
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
705264
12873