@fluidframework/telemetry-utils
Advanced tools
Comparing version 0.33.3 to 0.34.0-14942
@@ -7,2 +7,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DebugLogger = void 0; | ||
const common_utils_1 = require("@fluidframework/common-utils"); | ||
@@ -9,0 +10,0 @@ const debug_1 = require("debug"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EventEmitterWithErrorHandling = void 0; | ||
const common_utils_1 = require("@fluidframework/common-utils"); | ||
@@ -4,0 +5,0 @@ /** |
@@ -7,4 +7,6 @@ /*! | ||
import { ITelemetryLogger } from "@fluidframework/common-definitions"; | ||
export declare const connectedEventName = "connected"; | ||
export declare const disconnectedEventName = "disconnected"; | ||
export declare function safeRaiseEvent(emitter: EventEmitter, logger: ITelemetryLogger, event: string, ...args: any[]): void; | ||
export declare function raiseConnectedEvent(logger: ITelemetryLogger, emitter: EventEmitter, connected: boolean, clientId?: string): void; | ||
//# sourceMappingURL=events.d.ts.map |
@@ -7,2 +7,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.raiseConnectedEvent = exports.safeRaiseEvent = exports.disconnectedEventName = exports.connectedEventName = void 0; | ||
exports.connectedEventName = "connected"; | ||
exports.disconnectedEventName = "disconnected"; | ||
function safeRaiseEvent(emitter, logger, event, ...args) { | ||
@@ -20,10 +23,10 @@ try { | ||
if (connected) { | ||
emitter.emit("connected", clientId); | ||
emitter.emit(exports.connectedEventName, clientId); | ||
} | ||
else { | ||
emitter.emit("disconnected"); | ||
emitter.emit(exports.disconnectedEventName); | ||
} | ||
} | ||
catch (error) { | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError", clientId }, error); | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError" }, error); | ||
} | ||
@@ -30,0 +33,0 @@ } |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -10,6 +17,6 @@ /*! | ||
*/ | ||
__export(require("./debugLogger")); | ||
__export(require("./eventEmitterWithErrorHandling")); | ||
__export(require("./events")); | ||
__export(require("./logger")); | ||
__exportStar(require("./debugLogger"), exports); | ||
__exportStar(require("./eventEmitterWithErrorHandling"), exports); | ||
__exportStar(require("./events"), exports); | ||
__exportStar(require("./logger"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -7,2 +7,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LoggingError = exports.PerformanceEvent = exports.MultiSinkLogger = exports.ChildLogger = exports.TelemetryLogger = void 0; | ||
const common_utils_1 = require("@fluidframework/common-utils"); | ||
@@ -9,0 +10,0 @@ /** |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/telemetry-utils"; | ||
export declare const pkgVersion = "0.33.3"; | ||
export declare const pkgVersion = "0.34.0-14942"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -9,4 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pkgVersion = exports.pkgName = void 0; | ||
exports.pkgName = "@fluidframework/telemetry-utils"; | ||
exports.pkgVersion = "0.33.3"; | ||
exports.pkgVersion = "0.34.0-14942"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -7,4 +7,6 @@ /*! | ||
import { ITelemetryLogger } from "@fluidframework/common-definitions"; | ||
export declare const connectedEventName = "connected"; | ||
export declare const disconnectedEventName = "disconnected"; | ||
export declare function safeRaiseEvent(emitter: EventEmitter, logger: ITelemetryLogger, event: string, ...args: any[]): void; | ||
export declare function raiseConnectedEvent(logger: ITelemetryLogger, emitter: EventEmitter, connected: boolean, clientId?: string): void; | ||
//# sourceMappingURL=events.d.ts.map |
@@ -5,2 +5,4 @@ /*! | ||
*/ | ||
export const connectedEventName = "connected"; | ||
export const disconnectedEventName = "disconnected"; | ||
export function safeRaiseEvent(emitter, logger, event, ...args) { | ||
@@ -17,12 +19,12 @@ try { | ||
if (connected) { | ||
emitter.emit("connected", clientId); | ||
emitter.emit(connectedEventName, clientId); | ||
} | ||
else { | ||
emitter.emit("disconnected"); | ||
emitter.emit(disconnectedEventName); | ||
} | ||
} | ||
catch (error) { | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError", clientId }, error); | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError" }, error); | ||
} | ||
} | ||
//# sourceMappingURL=events.js.map |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/telemetry-utils"; | ||
export declare const pkgVersion = "0.33.3"; | ||
export declare const pkgVersion = "0.34.0-14942"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/telemetry-utils"; | ||
export const pkgVersion = "0.33.3"; | ||
export const pkgVersion = "0.34.0-14942"; | ||
//# sourceMappingURL=packageVersion.js.map |
{ | ||
"name": "@fluidframework/telemetry-utils", | ||
"version": "0.33.3", | ||
"version": "0.34.0-14942", | ||
"description": "Collection of telemetry relates utilities for Fluid", | ||
@@ -18,3 +18,2 @@ "homepage": "https://fluidframework.com", | ||
"scripts": { | ||
"bench": "ts-node bench/src/index.ts", | ||
"build": "npm run build:genver && concurrently npm:build:compile npm:lint", | ||
@@ -69,5 +68,5 @@ "build:commonjs": "npm run tsc && npm run build:test", | ||
"devDependencies": { | ||
"@fluidframework/build-common": "^0.19.2", | ||
"@fluidframework/eslint-config-fluid": "^0.21.0", | ||
"@fluidframework/mocha-test-setup": "^0.33.3", | ||
"@fluidframework/build-common": "^0.20.0-0", | ||
"@fluidframework/eslint-config-fluid": "^0.22.1-0", | ||
"@fluidframework/mocha-test-setup": "0.34.0-14942", | ||
"@microsoft/api-extractor": "^7.7.2", | ||
@@ -77,15 +76,16 @@ "@types/debug": "^4.1.5", | ||
"@types/mocha": "^5.2.5", | ||
"@types/node": "^10.17.24", | ||
"@types/sinon": "^7.0.13", | ||
"@typescript-eslint/eslint-plugin": "~4.2.0", | ||
"@typescript-eslint/parser": "~4.2.0", | ||
"@typescript-eslint/eslint-plugin": "~4.14.0", | ||
"@typescript-eslint/parser": "~4.14.0", | ||
"concurrently": "^5.2.0", | ||
"copyfiles": "^2.1.0", | ||
"cross-env": "^7.0.2", | ||
"eslint": "~7.9.0", | ||
"eslint": "~7.18.0", | ||
"eslint-plugin-eslint-comments": "~3.2.0", | ||
"eslint-plugin-import": "~2.22.0", | ||
"eslint-plugin-import": "~2.22.1", | ||
"eslint-plugin-no-null": "~1.0.2", | ||
"eslint-plugin-prefer-arrow": "~1.2.2", | ||
"eslint-plugin-react": "~7.21.2", | ||
"eslint-plugin-unicorn": "~22.0.0", | ||
"eslint-plugin-react": "~7.22.0", | ||
"eslint-plugin-unicorn": "~26.0.1", | ||
"mocha": "^8.1.1", | ||
@@ -96,5 +96,4 @@ "mocha-junit-reporter": "^1.18.0", | ||
"sinon": "^7.4.2", | ||
"ts-node": "^7.0.1", | ||
"typescript": "~3.7.4" | ||
"typescript": "~4.1.3" | ||
} | ||
} |
@@ -11,2 +11,5 @@ /*! | ||
export const connectedEventName = "connected"; | ||
export const disconnectedEventName = "disconnected"; | ||
export function safeRaiseEvent( | ||
@@ -31,9 +34,9 @@ emitter: EventEmitter, | ||
if (connected) { | ||
emitter.emit("connected", clientId); | ||
emitter.emit(connectedEventName, clientId); | ||
} else { | ||
emitter.emit("disconnected"); | ||
emitter.emit(disconnectedEventName); | ||
} | ||
} catch (error) { | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError", clientId }, error); | ||
logger.sendErrorEvent({ eventName: "RaiseConnectedEventError" }, error); | ||
} | ||
} |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/telemetry-utils"; | ||
export const pkgVersion = "0.33.3"; | ||
export const pkgVersion = "0.34.0-14942"; |
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
185617
61
2266