@locker/instrumentation
Advanced tools
Comparing version 0.13.8 to 0.13.9
@@ -1,2 +0,2 @@ | ||
/** | ||
/*! | ||
* Copyright (C) 2021 salesforce.com, inc. | ||
@@ -6,4 +6,5 @@ */ | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
/*! ***************************************************************************** | ||
@@ -25,65 +26,82 @@ Copyright (c) Microsoft Corporation. | ||
function __classPrivateFieldGet(receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
} | ||
function __classPrivateFieldSet(receiver, state, value, kind, f) { | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; | ||
} | ||
var _startCallback, _stopCallback; | ||
// Locker Activity class | ||
var _startCallback, _stopCallback; // Locker Activity class | ||
class Activity { | ||
constructor(sandboxKey, nameOrDescription, startCallback, stopCallback) { | ||
/* | ||
private reference to external instrumentation service to start an activity | ||
*/ | ||
_startCallback.set(this, void 0); | ||
/* | ||
private reference to external instrumentation service to stop an activity | ||
*/ | ||
_stopCallback.set(this, void 0); | ||
__classPrivateFieldSet(this, _startCallback, startCallback); | ||
__classPrivateFieldSet(this, _stopCallback, stopCallback); | ||
this.nameOrDescription = nameOrDescription; | ||
this.sandboxKey = sandboxKey; | ||
constructor(sandboxKey, nameOrDescription, startCallback, stopCallback) { | ||
/* | ||
private reference to external instrumentation service to start an activity | ||
*/ | ||
_startCallback.set(this, void 0); | ||
/* | ||
private reference to external instrumentation service to stop an activity | ||
*/ | ||
_stopCallback.set(this, void 0); | ||
__classPrivateFieldSet(this, _startCallback, startCallback); | ||
__classPrivateFieldSet(this, _stopCallback, stopCallback); | ||
this.nameOrDescription = nameOrDescription; | ||
this.sandboxKey = sandboxKey; | ||
} | ||
/** | ||
* starts an activity | ||
*/ | ||
start() { | ||
if (typeof __classPrivateFieldGet(this, _startCallback) === 'function') { | ||
__classPrivateFieldGet(this, _startCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
/** | ||
* starts an activity | ||
*/ | ||
start() { | ||
if (typeof __classPrivateFieldGet(this, _startCallback) === 'function') { | ||
__classPrivateFieldGet(this, _startCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
return this; | ||
return this; | ||
} | ||
/* | ||
* stops the current activity | ||
*/ | ||
stop() { | ||
if (typeof __classPrivateFieldGet(this, _stopCallback) === 'function') { | ||
__classPrivateFieldGet(this, _stopCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
/* | ||
* stops the current activity | ||
*/ | ||
stop() { | ||
if (typeof __classPrivateFieldGet(this, _stopCallback) === 'function') { | ||
__classPrivateFieldGet(this, _stopCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
return this; | ||
} | ||
return this; | ||
} | ||
} | ||
_startCallback = new WeakMap(), _stopCallback = new WeakMap(); | ||
// creates a new LockerInstrumentation instance with beacons mapped to InstrumentationService | ||
_startCallback = new WeakMap(), _stopCallback = new WeakMap(); // creates a new LockerInstrumentation instance with beacons mapped to InstrumentationService | ||
class Instrumentation { | ||
activityBeacon(sandboxKey, activityNameOrDescription) { | ||
return new Activity(sandboxKey, activityNameOrDescription); | ||
} | ||
errorBeacon(_sandboxKey, _e) { } | ||
logBeacon(_sandboxKey, _message) { } | ||
} | ||
// default instrumentation instance with no-op operations | ||
activityBeacon(sandboxKey, activityNameOrDescription) { | ||
return new Activity(sandboxKey, activityNameOrDescription); | ||
} | ||
errorBeacon(_sandboxKey, _e) {} | ||
logBeacon(_sandboxKey, _message) {} | ||
} // default instrumentation instance with no-op operations | ||
const defaultInstrumentation = new Instrumentation(); | ||
exports.Activity = Activity; | ||
exports.Instrumentation = Instrumentation; | ||
exports.defaultInstrumentation = defaultInstrumentation; | ||
/** version: 0.13.8 */ | ||
/*! version: 0.13.9 */ |
@@ -1,2 +0,2 @@ | ||
/** | ||
/*! | ||
* Copyright (C) 2021 salesforce.com, inc. | ||
@@ -18,65 +18,81 @@ */ | ||
***************************************************************************** */ | ||
function __classPrivateFieldGet(receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
} | ||
function __classPrivateFieldSet(receiver, state, value, kind, f) { | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; | ||
} | ||
var _startCallback, _stopCallback; | ||
// Locker Activity class | ||
var _startCallback, _stopCallback; // Locker Activity class | ||
class Activity { | ||
constructor(sandboxKey, nameOrDescription, startCallback, stopCallback) { | ||
/* | ||
private reference to external instrumentation service to start an activity | ||
*/ | ||
_startCallback.set(this, void 0); | ||
/* | ||
private reference to external instrumentation service to stop an activity | ||
*/ | ||
_stopCallback.set(this, void 0); | ||
__classPrivateFieldSet(this, _startCallback, startCallback); | ||
__classPrivateFieldSet(this, _stopCallback, stopCallback); | ||
this.nameOrDescription = nameOrDescription; | ||
this.sandboxKey = sandboxKey; | ||
constructor(sandboxKey, nameOrDescription, startCallback, stopCallback) { | ||
/* | ||
private reference to external instrumentation service to start an activity | ||
*/ | ||
_startCallback.set(this, void 0); | ||
/* | ||
private reference to external instrumentation service to stop an activity | ||
*/ | ||
_stopCallback.set(this, void 0); | ||
__classPrivateFieldSet(this, _startCallback, startCallback); | ||
__classPrivateFieldSet(this, _stopCallback, stopCallback); | ||
this.nameOrDescription = nameOrDescription; | ||
this.sandboxKey = sandboxKey; | ||
} | ||
/** | ||
* starts an activity | ||
*/ | ||
start() { | ||
if (typeof __classPrivateFieldGet(this, _startCallback) === 'function') { | ||
__classPrivateFieldGet(this, _startCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
/** | ||
* starts an activity | ||
*/ | ||
start() { | ||
if (typeof __classPrivateFieldGet(this, _startCallback) === 'function') { | ||
__classPrivateFieldGet(this, _startCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
return this; | ||
return this; | ||
} | ||
/* | ||
* stops the current activity | ||
*/ | ||
stop() { | ||
if (typeof __classPrivateFieldGet(this, _stopCallback) === 'function') { | ||
__classPrivateFieldGet(this, _stopCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
/* | ||
* stops the current activity | ||
*/ | ||
stop() { | ||
if (typeof __classPrivateFieldGet(this, _stopCallback) === 'function') { | ||
__classPrivateFieldGet(this, _stopCallback).call(this, this.sandboxKey, this.nameOrDescription); | ||
} | ||
return this; | ||
} | ||
return this; | ||
} | ||
} | ||
_startCallback = new WeakMap(), _stopCallback = new WeakMap(); | ||
// creates a new LockerInstrumentation instance with beacons mapped to InstrumentationService | ||
_startCallback = new WeakMap(), _stopCallback = new WeakMap(); // creates a new LockerInstrumentation instance with beacons mapped to InstrumentationService | ||
class Instrumentation { | ||
activityBeacon(sandboxKey, activityNameOrDescription) { | ||
return new Activity(sandboxKey, activityNameOrDescription); | ||
} | ||
errorBeacon(_sandboxKey, _e) { } | ||
logBeacon(_sandboxKey, _message) { } | ||
} | ||
// default instrumentation instance with no-op operations | ||
activityBeacon(sandboxKey, activityNameOrDescription) { | ||
return new Activity(sandboxKey, activityNameOrDescription); | ||
} | ||
errorBeacon(_sandboxKey, _e) {} | ||
logBeacon(_sandboxKey, _message) {} | ||
} // default instrumentation instance with no-op operations | ||
const defaultInstrumentation = new Instrumentation(); | ||
export { Activity, Instrumentation, defaultInstrumentation }; | ||
/** version: 0.13.8 */ | ||
/*! version: 0.13.9 */ |
{ | ||
"name": "@locker/instrumentation", | ||
"version": "0.13.8", | ||
"version": "0.13.9", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -18,3 +18,3 @@ "author": "Salesforce UI Security Team", | ||
"dependencies": { | ||
"@locker/shared": "0.13.8" | ||
"@locker/shared": "0.13.9" | ||
}, | ||
@@ -25,3 +25,3 @@ "files": [ | ||
], | ||
"gitHead": "7ae9538a6db0e03856a2786175adab87f227853e" | ||
"gitHead": "73a9746ea42f15ee9c1f8c61c9a2135100c96b2c" | ||
} |
15150
178
+ Added@locker/shared@0.13.9(transitive)
- Removed@locker/shared@0.13.8(transitive)
Updated@locker/shared@0.13.9