@microsoft/applicationinsights-shims
Advanced tools
Comparing version 2.0.0 to 2.0.1
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -9,3 +9,3 @@ */ | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Microsoft = global.Microsoft || {}, global.Microsoft.ApplicationInsights = global.Microsoft.ApplicationInsights || {}, global.Microsoft.ApplicationInsights.Shims = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
})(this, (function (exports) { 'use strict'; | ||
@@ -25,2 +25,3 @@ var strShimFunction = "function"; | ||
var _cachedGlobal = null; | ||
/** | ||
@@ -38,16 +39,19 @@ * Returns the current global scope object, for a normal web page this will be the current | ||
*/ | ||
function getGlobal() { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
return globalThis; | ||
function getGlobal(useCached) { | ||
if (useCached === void 0) { useCached = true; } | ||
if (!_cachedGlobal || !useCached) { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
_cachedGlobal = globalThis; | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
_cachedGlobal = self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
_cachedGlobal = window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
_cachedGlobal = global; | ||
} | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
return self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
return window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
return global; | ||
} | ||
return null; | ||
return _cachedGlobal; | ||
} | ||
@@ -75,3 +79,3 @@ function throwTypeError(message) { | ||
if (type !== strShimObject && type !== strShimFunction) { | ||
throwTypeError('Object prototype may only be an Object:' + obj); | ||
throwTypeError("Object prototype may only be an Object:" + obj); | ||
} | ||
@@ -155,3 +159,3 @@ function tmpFunc() { } | ||
for (var i = decorators.length - 1; i >= 0; i--) { | ||
// tslint:disable-next-line:no-conditional-assignment | ||
// eslint-disable-next-line no-cond-assign | ||
if (d = decorators[i]) { | ||
@@ -240,3 +244,3 @@ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
if (e) { | ||
// tslint:disable-next-line:no-unsafe-finally | ||
// eslint-disable-next-line no-unsafe-finally | ||
throw e.error; | ||
@@ -365,2 +369,2 @@ } | ||
}))); | ||
})); |
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,n=function(e){"use strict";var f="function",r="object",n="undefined",o="prototype",i="hasOwnProperty",a="default",u=Object,l=u[o],s=u.assign,c=u.create,_=u.defineProperty,p=l[i];function d(){return typeof globalThis!=n&&globalThis?globalThis:typeof self!=n&&self?self:typeof window!=n&&window?window:typeof global!=n&&global?global:null}function y(e){throw new TypeError(e)}function g(e){if(c)return c(e);if(null==e)return{};var n=typeof e;function t(){}return n!==r&&n!==f&&y("Object prototype may only be an Object:"+e),t[o]=e,new t}var b=(d()||{}).Symbol,h=(d()||{}).Reflect,v=!!h,m="decorate",t="metadata",O="getOwnPropertySymbols",w="iterator",j=s||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])l[i].call(n,o)&&(e[o]=n[o]);return e},F=function(e,n){return(F=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[i](t)&&(e[t]=n[t])})(e,n)};function x(e,n){function t(){this.constructor=e}typeof n!==f&&null!==n&&y("Class extends value "+n+" is not a constructor or null"),F(e,n),e[o]=null===n?g(n):(t[o]=n[o],new t)}function P(e,n,t,r){r===undefined&&(r=t),c?_(e,r,{enumerable:!0,get:function(){return n[t]}}):e[r]=n[t]}e.ObjAssign=s,e.ObjClass=u,e.ObjCreate=c,e.ObjDefineProperty=_,e.ObjHasOwnProperty=p,e.ObjProto=l,e.__assignFn=j,e.__createBindingFn=P,e.__decorateFn=function(e,n,t,r){var o,i=arguments.length,a=i<3?n:null===r?r=u.getOwnPropertyDescriptor(n,t):r;if(v&&typeof h[m]===f)a=h[m](e,n,t,r);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(a=(i<3?o(a):3<i?o(n,t,a):o(n,t))||a);return 3<i&&a&&_(n,t,a),a},e.__exportStarFn=function(e,n){for(var t in e)t===a||p.call(n,t)||P(n,e,t)},e.__exposeGlobalTsLib=function(){var e,n=d()||{},t=x,r=P;(e=n).__assign||(e.__assign=s||j),e.__extends||(e.__extends=t),e.__createBinding||(e.__createBinding=r),__assign=__assign||n.__assign,__extends=__extends||n.__extends,__createBinding=__createBinding||n.__createBinding},e.__extendsFn=x,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)t!==a&&Object.prototype.hasOwnProperty.call(e,t)&&P(n,e,t);return c?_(n,a,{enumerable:!0,value:e}):n[a]=e,n},e.__makeTemplateObjectFn=function(e,n){return _?_(e,"raw",{value:n}):e.raw=n,e},e.__metadataFn=function(e,n){if(v&&h[t]===f)return h[t](e,n)},e.__paramFn=function(t,r){return function(e,n){r(e,n,t)}},e.__readFn=function(e,n){var t=typeof b===f&&e[b[w]];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(t=i["return"])&&t.call(i)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var t,r={};for(t in e)p.call(e,t)&&!~n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&typeof u[O]===f)for(var o=0,i=u[O](e);o<i.length;o++)!~n.indexOf(i[o])&&l.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r},e.__spreadArrayFn=function(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e},e.__spreadArraysFn=function(){for(var e=arguments,n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(var o=Array(n),i=0,t=0;t<r;t++)for(var a=e[t],l=0,f=a.length;l<f;l++,i++)o[i]=a[l];return o},e.__valuesFn=function(e){var n=typeof b===f&&b[w],t=n&&e[n],r=0;return t?t.call(e):e&&"number"==typeof e.length?{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}:void y(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=d,e.objCreateFn=g,e.strDefault=a,e.strShimFunction=f,e.strShimHasOwnProperty=i,e.strShimObject=r,e.strShimPrototype=o,e.strShimUndefined=n,e.throwTypeError=y,function(e,n,t){var r=Object.defineProperty;if(r)try{return r(e,n,t)}catch(o){}typeof t.value!==undefined&&(e[n]=t.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{},e.Microsoft.ApplicationInsights.Shims={})); | ||
var e=this,n=function(e){"use strict";var f="function",a="object",n="undefined",r="prototype",l="hasOwnProperty",o="default",u=Object,_=u[r],d=u.assign,i=u.create,s=u.defineProperty,p=_[l],t=null;function y(e){return void 0===e&&(e=!0),t&&e||(typeof globalThis!=n&&globalThis&&(t=globalThis),typeof self!=n&&self&&(t=self),typeof window!=n&&window&&(t=window),typeof global!=n&&global&&(t=global)),t}function g(e){throw new TypeError(e)}function b(e){if(i)return i(e);if(null==e)return{};var n=typeof e;function t(){}return n!==a&&n!==f&&g("Object prototype may only be an Object:"+e),t[r]=e,new t}var v=(y()||{}).Symbol,c=(y()||{}).Reflect,h=!!c,m="decorate",O="metadata",w="getOwnPropertySymbols",j="iterator",F=d||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])_[l].call(n,o)&&(e[o]=n[o]);return e},x=function(e,n){return(x=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[l](t)&&(e[t]=n[t])})(e,n)};function P(e,n){function t(){this.constructor=e}typeof n!==f&&null!==n&&g("Class extends value "+n+" is not a constructor or null"),x(e,n),e[r]=null===n?b(n):(t[r]=n[r],new t)}function S(e,n,t,r){r===undefined&&(r=t),i?s(e,r,{enumerable:!0,get:function(){return n[t]}}):e[r]=n[t]}e.ObjAssign=d,e.ObjClass=u,e.ObjCreate=i,e.ObjDefineProperty=s,e.ObjHasOwnProperty=p,e.ObjProto=_,e.__assignFn=F,e.__createBindingFn=S,e.__decorateFn=function(e,n,t,r){var o,i=arguments.length,a=i<3?n:null===r?r=u.getOwnPropertyDescriptor(n,t):r;if(h&&typeof c[m]===f)a=c[m](e,n,t,r);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(a=(i<3?o(a):3<i?o(n,t,a):o(n,t))||a);return 3<i&&a&&s(n,t,a),a},e.__exportStarFn=function(e,n){for(var t in e)t===o||p.call(n,t)||S(n,e,t)},e.__exposeGlobalTsLib=function(){var e,n=y()||{},t=P,r=S;(e=n).__assign||(e.__assign=d||F),e.__extends||(e.__extends=t),e.__createBinding||(e.__createBinding=r),__assign=__assign||n.__assign,__extends=__extends||n.__extends,__createBinding=__createBinding||n.__createBinding},e.__extendsFn=P,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)t!==o&&Object.prototype.hasOwnProperty.call(e,t)&&S(n,e,t);return i?s(n,o,{enumerable:!0,value:e}):n[o]=e,n},e.__makeTemplateObjectFn=function(e,n){return s?s(e,"raw",{value:n}):e.raw=n,e},e.__metadataFn=function(e,n){if(h&&c[O]===f)return c[O](e,n)},e.__paramFn=function(t,r){return function(e,n){r(e,n,t)}},e.__readFn=function(e,n){var t=typeof v===f&&e[v[j]];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(t=i["return"])&&t.call(i)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var t,r={};for(t in e)p.call(e,t)&&!~n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&typeof u[w]===f)for(var o=0,i=u[w](e);o<i.length;o++)!~n.indexOf(i[o])&&_.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r},e.__spreadArrayFn=function(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e},e.__spreadArraysFn=function(){for(var e=arguments,n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(var o=Array(n),i=0,t=0;t<r;t++)for(var a=e[t],l=0,f=a.length;l<f;l++,i++)o[i]=a[l];return o},e.__valuesFn=function(e){var n=typeof v===f&&v[j],t=n&&e[n],r=0;return t?t.call(e):e&&"number"==typeof e.length?{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}:void g(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=y,e.objCreateFn=b,e.strDefault=o,e.strShimFunction=f,e.strShimHasOwnProperty=l,e.strShimObject=a,e.strShimPrototype=r,e.strShimUndefined=n,e.throwTypeError=g;var T="__esModule",A={value:!0},M=Object.defineProperty;if(M)try{return void M(e,T,A)}catch(B){}typeof A.value!==undefined&&(e[T]=A.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{},e.Microsoft.ApplicationInsights.Shims={})); |
@@ -5,4 +5,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
export { throwTypeError, objCreateFn, getGlobal } from "./Helpers"; | ||
export { __assignFn, __extendsFn, __restFn, __spreadArrayFn, __spreadArraysFn, __decorateFn, __paramFn, __metadataFn, __createBindingFn, __valuesFn, __readFn, __makeTemplateObjectFn, __importDefaultFn, __importStarFn, __exportStarFn, } from "./TsLibShims"; | ||
export { __assignFn, __extendsFn, __restFn, __spreadArrayFn, __spreadArraysFn, __decorateFn, __paramFn, __metadataFn, __createBindingFn, __valuesFn, __readFn, __makeTemplateObjectFn, __importDefaultFn, __importStarFn, __exportStarFn } from "./TsLibShims"; | ||
export { __exposeGlobalTsLib } from "./TsLibGlobals"; | ||
//# sourceMappingURL=applicationinsights-shims.js.map |
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
import { ObjCreate, strShimFunction, strShimObject, strShimPrototype, strShimUndefined } from "./Constants"; | ||
var _cachedGlobal = null; | ||
/** | ||
@@ -16,16 +17,19 @@ * Returns the current global scope object, for a normal web page this will be the current | ||
*/ | ||
export function getGlobal() { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
return globalThis; | ||
export function getGlobal(useCached) { | ||
if (useCached === void 0) { useCached = true; } | ||
if (!_cachedGlobal || !useCached) { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
_cachedGlobal = globalThis; | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
_cachedGlobal = self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
_cachedGlobal = window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
_cachedGlobal = global; | ||
} | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
return self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
return window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
return global; | ||
} | ||
return null; | ||
return _cachedGlobal; | ||
} | ||
@@ -53,3 +57,3 @@ export function throwTypeError(message) { | ||
if (type !== strShimObject && type !== strShimFunction) { | ||
throwTypeError('Object prototype may only be an Object:' + obj); | ||
throwTypeError("Object prototype may only be an Object:" + obj); | ||
} | ||
@@ -56,0 +60,0 @@ function tmpFunc() { } |
@@ -78,3 +78,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
for (var i = decorators.length - 1; i >= 0; i--) { | ||
// tslint:disable-next-line:no-conditional-assignment | ||
// eslint-disable-next-line no-cond-assign | ||
if (d = decorators[i]) { | ||
@@ -163,3 +163,3 @@ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
if (e) { | ||
// tslint:disable-next-line:no-unsafe-finally | ||
// eslint-disable-next-line no-unsafe-finally | ||
throw e.error; | ||
@@ -201,3 +201,2 @@ } | ||
} | ||
; | ||
export function __importStarFn(mod) { | ||
@@ -224,3 +223,2 @@ if (mod && mod.__esModule) { | ||
} | ||
; | ||
export function __importDefaultFn(mod) { | ||
@@ -227,0 +225,0 @@ return (mod && mod.__esModule) ? mod : { strDefault: mod }; |
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -18,2 +18,3 @@ */ | ||
var _cachedGlobal = null; | ||
/** | ||
@@ -31,16 +32,19 @@ * Returns the current global scope object, for a normal web page this will be the current | ||
*/ | ||
function getGlobal() { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
return globalThis; | ||
function getGlobal(useCached) { | ||
if (useCached === void 0) { useCached = true; } | ||
if (!_cachedGlobal || !useCached) { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
_cachedGlobal = globalThis; | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
_cachedGlobal = self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
_cachedGlobal = window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
_cachedGlobal = global; | ||
} | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
return self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
return window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
return global; | ||
} | ||
return null; | ||
return _cachedGlobal; | ||
} | ||
@@ -68,3 +72,3 @@ function throwTypeError(message) { | ||
if (type !== strShimObject && type !== strShimFunction) { | ||
throwTypeError('Object prototype may only be an Object:' + obj); | ||
throwTypeError("Object prototype may only be an Object:" + obj); | ||
} | ||
@@ -148,3 +152,3 @@ function tmpFunc() { } | ||
for (var i = decorators.length - 1; i >= 0; i--) { | ||
// tslint:disable-next-line:no-conditional-assignment | ||
// eslint-disable-next-line no-cond-assign | ||
if (d = decorators[i]) { | ||
@@ -233,3 +237,3 @@ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
if (e) { | ||
// tslint:disable-next-line:no-unsafe-finally | ||
// eslint-disable-next-line no-unsafe-finally | ||
throw e.error; | ||
@@ -236,0 +240,0 @@ } |
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -18,2 +18,3 @@ */ | ||
var _cachedGlobal = null; | ||
/** | ||
@@ -31,16 +32,19 @@ * Returns the current global scope object, for a normal web page this will be the current | ||
*/ | ||
function getGlobal() { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
return globalThis; | ||
function getGlobal(useCached) { | ||
if (useCached === void 0) { useCached = true; } | ||
if (!_cachedGlobal || !useCached) { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
_cachedGlobal = globalThis; | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
_cachedGlobal = self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
_cachedGlobal = window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
_cachedGlobal = global; | ||
} | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
return self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
return window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
return global; | ||
} | ||
return null; | ||
return _cachedGlobal; | ||
} | ||
@@ -68,3 +72,3 @@ function throwTypeError(message) { | ||
if (type !== strShimObject && type !== strShimFunction) { | ||
throwTypeError('Object prototype may only be an Object:' + obj); | ||
throwTypeError("Object prototype may only be an Object:" + obj); | ||
} | ||
@@ -148,3 +152,3 @@ function tmpFunc() { } | ||
for (var i = decorators.length - 1; i >= 0; i--) { | ||
// tslint:disable-next-line:no-conditional-assignment | ||
// eslint-disable-next-line no-cond-assign | ||
if (d = decorators[i]) { | ||
@@ -233,3 +237,3 @@ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
if (e) { | ||
// tslint:disable-next-line:no-unsafe-finally | ||
// eslint-disable-next-line no-unsafe-finally | ||
throw e.error; | ||
@@ -236,0 +240,0 @@ } |
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -9,3 +9,3 @@ */ | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Microsoft = global.Microsoft || {}, global.Microsoft.ApplicationInsights = global.Microsoft.ApplicationInsights || {}, global.Microsoft.ApplicationInsights.Shims = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
})(this, (function (exports) { 'use strict'; | ||
@@ -25,2 +25,3 @@ var strShimFunction = "function"; | ||
var _cachedGlobal = null; | ||
/** | ||
@@ -38,16 +39,19 @@ * Returns the current global scope object, for a normal web page this will be the current | ||
*/ | ||
function getGlobal() { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
return globalThis; | ||
function getGlobal(useCached) { | ||
if (useCached === void 0) { useCached = true; } | ||
if (!_cachedGlobal || !useCached) { | ||
if (typeof globalThis !== strShimUndefined && globalThis) { | ||
_cachedGlobal = globalThis; | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
_cachedGlobal = self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
_cachedGlobal = window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
_cachedGlobal = global; | ||
} | ||
} | ||
if (typeof self !== strShimUndefined && self) { | ||
return self; | ||
} | ||
if (typeof window !== strShimUndefined && window) { | ||
return window; | ||
} | ||
if (typeof global !== strShimUndefined && global) { | ||
return global; | ||
} | ||
return null; | ||
return _cachedGlobal; | ||
} | ||
@@ -75,3 +79,3 @@ function throwTypeError(message) { | ||
if (type !== strShimObject && type !== strShimFunction) { | ||
throwTypeError('Object prototype may only be an Object:' + obj); | ||
throwTypeError("Object prototype may only be an Object:" + obj); | ||
} | ||
@@ -155,3 +159,3 @@ function tmpFunc() { } | ||
for (var i = decorators.length - 1; i >= 0; i--) { | ||
// tslint:disable-next-line:no-conditional-assignment | ||
// eslint-disable-next-line no-cond-assign | ||
if (d = decorators[i]) { | ||
@@ -240,3 +244,3 @@ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
if (e) { | ||
// tslint:disable-next-line:no-unsafe-finally | ||
// eslint-disable-next-line no-unsafe-finally | ||
throw e.error; | ||
@@ -365,2 +369,2 @@ } | ||
}))); | ||
})); |
/*! | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.0 | ||
* Microsoft Application Insights JavaScript SDK - Shim functions, 2.0.1 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,n=function(e){"use strict";var f="function",r="object",n="undefined",o="prototype",i="hasOwnProperty",a="default",u=Object,l=u[o],s=u.assign,c=u.create,_=u.defineProperty,p=l[i];function d(){return typeof globalThis!=n&&globalThis?globalThis:typeof self!=n&&self?self:typeof window!=n&&window?window:typeof global!=n&&global?global:null}function y(e){throw new TypeError(e)}function g(e){if(c)return c(e);if(null==e)return{};var n=typeof e;function t(){}return n!==r&&n!==f&&y("Object prototype may only be an Object:"+e),t[o]=e,new t}var b=(d()||{}).Symbol,h=(d()||{}).Reflect,v=!!h,m="decorate",t="metadata",O="getOwnPropertySymbols",w="iterator",j=s||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])l[i].call(n,o)&&(e[o]=n[o]);return e},F=function(e,n){return(F=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[i](t)&&(e[t]=n[t])})(e,n)};function x(e,n){function t(){this.constructor=e}typeof n!==f&&null!==n&&y("Class extends value "+n+" is not a constructor or null"),F(e,n),e[o]=null===n?g(n):(t[o]=n[o],new t)}function P(e,n,t,r){r===undefined&&(r=t),c?_(e,r,{enumerable:!0,get:function(){return n[t]}}):e[r]=n[t]}e.ObjAssign=s,e.ObjClass=u,e.ObjCreate=c,e.ObjDefineProperty=_,e.ObjHasOwnProperty=p,e.ObjProto=l,e.__assignFn=j,e.__createBindingFn=P,e.__decorateFn=function(e,n,t,r){var o,i=arguments.length,a=i<3?n:null===r?r=u.getOwnPropertyDescriptor(n,t):r;if(v&&typeof h[m]===f)a=h[m](e,n,t,r);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(a=(i<3?o(a):3<i?o(n,t,a):o(n,t))||a);return 3<i&&a&&_(n,t,a),a},e.__exportStarFn=function(e,n){for(var t in e)t===a||p.call(n,t)||P(n,e,t)},e.__exposeGlobalTsLib=function(){var e,n=d()||{},t=x,r=P;(e=n).__assign||(e.__assign=s||j),e.__extends||(e.__extends=t),e.__createBinding||(e.__createBinding=r),__assign=__assign||n.__assign,__extends=__extends||n.__extends,__createBinding=__createBinding||n.__createBinding},e.__extendsFn=x,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)t!==a&&Object.prototype.hasOwnProperty.call(e,t)&&P(n,e,t);return c?_(n,a,{enumerable:!0,value:e}):n[a]=e,n},e.__makeTemplateObjectFn=function(e,n){return _?_(e,"raw",{value:n}):e.raw=n,e},e.__metadataFn=function(e,n){if(v&&h[t]===f)return h[t](e,n)},e.__paramFn=function(t,r){return function(e,n){r(e,n,t)}},e.__readFn=function(e,n){var t=typeof b===f&&e[b[w]];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(t=i["return"])&&t.call(i)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var t,r={};for(t in e)p.call(e,t)&&!~n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&typeof u[O]===f)for(var o=0,i=u[O](e);o<i.length;o++)!~n.indexOf(i[o])&&l.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r},e.__spreadArrayFn=function(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e},e.__spreadArraysFn=function(){for(var e=arguments,n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(var o=Array(n),i=0,t=0;t<r;t++)for(var a=e[t],l=0,f=a.length;l<f;l++,i++)o[i]=a[l];return o},e.__valuesFn=function(e){var n=typeof b===f&&b[w],t=n&&e[n],r=0;return t?t.call(e):e&&"number"==typeof e.length?{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}:void y(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=d,e.objCreateFn=g,e.strDefault=a,e.strShimFunction=f,e.strShimHasOwnProperty=i,e.strShimObject=r,e.strShimPrototype=o,e.strShimUndefined=n,e.throwTypeError=y,function(e,n,t){var r=Object.defineProperty;if(r)try{return r(e,n,t)}catch(o){}typeof t.value!==undefined&&(e[n]=t.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{},e.Microsoft.ApplicationInsights.Shims={})); | ||
var e=this,n=function(e){"use strict";var f="function",a="object",n="undefined",r="prototype",l="hasOwnProperty",o="default",u=Object,_=u[r],d=u.assign,i=u.create,s=u.defineProperty,p=_[l],t=null;function y(e){return void 0===e&&(e=!0),t&&e||(typeof globalThis!=n&&globalThis&&(t=globalThis),typeof self!=n&&self&&(t=self),typeof window!=n&&window&&(t=window),typeof global!=n&&global&&(t=global)),t}function g(e){throw new TypeError(e)}function b(e){if(i)return i(e);if(null==e)return{};var n=typeof e;function t(){}return n!==a&&n!==f&&g("Object prototype may only be an Object:"+e),t[r]=e,new t}var v=(y()||{}).Symbol,c=(y()||{}).Reflect,h=!!c,m="decorate",O="metadata",w="getOwnPropertySymbols",j="iterator",F=d||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])_[l].call(n,o)&&(e[o]=n[o]);return e},x=function(e,n){return(x=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[l](t)&&(e[t]=n[t])})(e,n)};function P(e,n){function t(){this.constructor=e}typeof n!==f&&null!==n&&g("Class extends value "+n+" is not a constructor or null"),x(e,n),e[r]=null===n?b(n):(t[r]=n[r],new t)}function S(e,n,t,r){r===undefined&&(r=t),i?s(e,r,{enumerable:!0,get:function(){return n[t]}}):e[r]=n[t]}e.ObjAssign=d,e.ObjClass=u,e.ObjCreate=i,e.ObjDefineProperty=s,e.ObjHasOwnProperty=p,e.ObjProto=_,e.__assignFn=F,e.__createBindingFn=S,e.__decorateFn=function(e,n,t,r){var o,i=arguments.length,a=i<3?n:null===r?r=u.getOwnPropertyDescriptor(n,t):r;if(h&&typeof c[m]===f)a=c[m](e,n,t,r);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(a=(i<3?o(a):3<i?o(n,t,a):o(n,t))||a);return 3<i&&a&&s(n,t,a),a},e.__exportStarFn=function(e,n){for(var t in e)t===o||p.call(n,t)||S(n,e,t)},e.__exposeGlobalTsLib=function(){var e,n=y()||{},t=P,r=S;(e=n).__assign||(e.__assign=d||F),e.__extends||(e.__extends=t),e.__createBinding||(e.__createBinding=r),__assign=__assign||n.__assign,__extends=__extends||n.__extends,__createBinding=__createBinding||n.__createBinding},e.__extendsFn=P,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)t!==o&&Object.prototype.hasOwnProperty.call(e,t)&&S(n,e,t);return i?s(n,o,{enumerable:!0,value:e}):n[o]=e,n},e.__makeTemplateObjectFn=function(e,n){return s?s(e,"raw",{value:n}):e.raw=n,e},e.__metadataFn=function(e,n){if(h&&c[O]===f)return c[O](e,n)},e.__paramFn=function(t,r){return function(e,n){r(e,n,t)}},e.__readFn=function(e,n){var t=typeof v===f&&e[v[j]];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(t=i["return"])&&t.call(i)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var t,r={};for(t in e)p.call(e,t)&&!~n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&typeof u[w]===f)for(var o=0,i=u[w](e);o<i.length;o++)!~n.indexOf(i[o])&&_.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r},e.__spreadArrayFn=function(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e},e.__spreadArraysFn=function(){for(var e=arguments,n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(var o=Array(n),i=0,t=0;t<r;t++)for(var a=e[t],l=0,f=a.length;l<f;l++,i++)o[i]=a[l];return o},e.__valuesFn=function(e){var n=typeof v===f&&v[j],t=n&&e[n],r=0;return t?t.call(e):e&&"number"==typeof e.length?{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}:void g(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=y,e.objCreateFn=b,e.strDefault=o,e.strShimFunction=f,e.strShimHasOwnProperty=l,e.strShimObject=a,e.strShimPrototype=r,e.strShimUndefined=n,e.throwTypeError=g;var T="__esModule",A={value:!0},M=Object.defineProperty;if(M)try{return void M(e,T,A)}catch(B){}typeof A.value!==undefined&&(e[T]=A.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{},e.Microsoft.ApplicationInsights.Shims={})); |
{ | ||
"name": "@microsoft/applicationinsights-shims", | ||
"author": "Microsoft Application Insights Team", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Microsoft Application Insights JavaScript SDK - Shim functions", | ||
@@ -23,2 +23,3 @@ "homepage": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/tools/shims", | ||
"build:bundle": "rollup -c rollup.config.js", | ||
"rebuild": "npm run build", | ||
"test": "grunt shimstest", | ||
@@ -37,16 +38,16 @@ "lint": "tslint -p tsconfig.json" | ||
"devDependencies": { | ||
"@microsoft/ai-test-framework": "0.0.1", | ||
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0", | ||
"@microsoft/applicationinsights-rollup-es3" : "1.1.3", | ||
"grunt": "^1.3.0", | ||
"grunt-contrib-qunit": "^3.1.0", | ||
"grunt-ts": "^6.0.0-beta.22", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"grunt": "^1.4.1", | ||
"grunt-cli": "^1.4.3", | ||
"grunt-contrib-qunit": "^5.0.1", | ||
"@nevware21/grunt-ts-plugin": "^0.4.3", | ||
"@nevware21/grunt-eslint-ts": "^0.2.2", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"rollup-plugin-minify-es": "^1.1.1", | ||
"rollup": "^2.32.0", | ||
"tslint": "^5.19.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-microsoft-contrib": "^5.2.1", | ||
"typescript": "2.5.3" | ||
"typescript": "^4.3.4" | ||
}, | ||
@@ -53,0 +54,0 @@ "dependencies": { |
@@ -15,3 +15,3 @@ # Microsoft Application Insights JavaScript SDK - Shims | ||
## Global _extends() and __assign() changes - v2.0.0 or greater | ||
## Global __extends() and __assign() changes - v2.0.0 or greater | ||
@@ -18,0 +18,0 @@ From v2.0.0 or greater the globally defined ```__extends()``` and ```__assign()``` methods are no longer exposed as global by default. |
@@ -9,3 +9,8 @@ export declare const strShimFunction = "function"; | ||
export declare const ObjProto: Object; | ||
export declare const ObjAssign: any; | ||
export declare const ObjAssign: { | ||
<T, U>(target: T, source: U): T & U; | ||
<T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; | ||
<T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; | ||
(target: object, ...sources: any[]): any; | ||
}; | ||
export declare const ObjCreate: { | ||
@@ -15,3 +20,3 @@ (o: object): any; | ||
}; | ||
export declare const ObjDefineProperty: (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any; | ||
export declare const ObjHasOwnProperty: (v: string) => boolean; | ||
export declare const ObjDefineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T; | ||
export declare const ObjHasOwnProperty: (v: PropertyKey) => boolean; |
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
export declare function getGlobal(): Window; | ||
export declare function getGlobal(useCached?: boolean): Window; | ||
export declare function throwTypeError(message: string): never; | ||
@@ -16,0 +16,0 @@ /** |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
112299
1820
0