Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fullstory/snippet

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullstory/snippet - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

6

dist/index.d.ts

@@ -82,3 +82,3 @@ // Generated by dts-bundle-generator v8.0.0

};
export type ObserveEventType = typeof ObserveEventName[keyof typeof ObserveEventName];
export type ObserveEventType = (typeof ObserveEventName)[keyof typeof ObserveEventName];
export type ObserveEventCallbacks<T extends ObserveEventType> = (op: ObserveCallbackParams[T]) => void;

@@ -130,3 +130,3 @@ export type ObserveEventOptions<T extends ObserveEventType = ObserveEventType> = {

};
export type V2Operation = typeof V2OperationName[keyof typeof V2OperationName];
export type V2Operation = (typeof V2OperationName)[keyof typeof V2OperationName];
export type CaptureSource = {

@@ -222,3 +222,5 @@ integration?: string;

export declare const generateSnippetTextV1: ({ orgId, namespace, host, script }: InitFSArgs) => string;
export declare const mockSnippetSrc: string;
export declare const mockSnippetSrcV1: string;
export {};
// @ts-nocheck
var SnippetSrcV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],k())}}return b(r(0),r(1)),{\nthen:function(b,h){return j((function(r,i){d.push([b,h,r,i]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,r){function i(i,c){\nh(b,d,k,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(i):j(i)):h(b,d,k,c,c,r)}\n;function h(h,d,k,r,i,c){return b._api?b._api(h,d,k,r,i,c):(b.q&&b.q.push([h,d,k,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){\n\"function\"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var k=0;k<d.length;k++)h(d[k]);d.length=0,d.push=h}},function(){\n(o=n.createElement(t)).async=!0,o.crossOrigin=\"anonymous\",o.src=\"https://\"+l,o.onerror=function(){y(\"Error loading \"+l)}\n;var b=n.getElementsByTagName(t)[0];b.parentNode.insertBefore(o,b)}(),function(){function b(){}function h(b,h,d){g(b,h,d,1)}function d(b,d,k){\nh(\"setProperties\",{type:b,properties:d},k)}function k(b,h){d(\"user\",b,h)}function r(b,h,d){k({uid:b},d),h&&k(h,d)}g.identify=r,g.setUserVars=k,\ng.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h(\"trackEvent\",{name:b,properties:d},k)},g.anonymize=function(){r(!1)\n},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},g.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){\nh(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",f=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){\nreturn g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")}(window,document,window._fs_namespace,\"script\",window._fs_script);";
var SnippetSrcV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function p(b){var h,d=[];function j(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],j())}}return b(r(0),r(1)),{\nthen:function(b,h){return p((function(r,i){d.push([b,h,r,i]),j()}))}}}a&&(g=m[e]=function(){var b=function(b,d,j,r){function i(i,c){\nh(b,d,j,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(i):p(i)):h(b,d,j,c,c,r)}\n;function h(h,d,j,r,i,c){return b._api?b._api(h,d,j,r,i,c):(b.q&&b.q.push([h,d,j,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){\n\"function\"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var j=0;j<d.length;j++)h(d[j]);d.length=0,d.push=h}},function(){\n(o=n.createElement(t)).async=!0,o.crossOrigin=\"anonymous\",o.src=\"https://\"+l,o.onerror=function(){y(\"Error loading \"+l)}\n;var b=n.getElementsByTagName(t)[0];b&&b.parentNode?b.parentNode.insertBefore(o,b):n.head.appendChild(o)}(),function(){function b(){}\nfunction h(b,h,d){g(b,h,d,1)}function d(b,d,j){h(\"setProperties\",{type:b,properties:d},j)}function j(b,h){d(\"user\",b,h)}function r(b,h,d){j({\nuid:b},d),h&&j(h,d)}g.identify=r,g.setUserVars=j,g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,j){h(\"trackEvent\",{\nname:b,properties:d},j)},g.anonymize=function(){r(!1)},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},\ng.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){h(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",\nf=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){return g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")\n}(window,document,window._fs_namespace,\"script\",window._fs_script);";
var mockSnippetV1 = "(function(m,n,e,t,l,o,g,y){\n if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].');} return;}\n g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];\n g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};\n g.anonymize=function(){g.identify(!!0)};\n g.shutdown=function(){g(\"rec\",!1)};g.restart=function(){g(\"rec\",!0)};\n g.log = function(a,b){g(\"log\",[a,b])};\n g.consent=function(a){g(\"consent\",!arguments.length||a)};\n g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};\n g.clearUserCookie=function(){};\n g.setVars=function(n, p){g('setVars',[n,p]);};\n g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];\n if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};\n g._v=\"1.3.0\";\n})(window,document,window['_fs_namespace'],'script','user');";
var mockSnippetV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function i(b){return function(d){h||(h=[b,d],k())}}return b(i(0),i(1)),{\nthen:function(b,h){return j((function(i,c){d.push([b,h,i,c]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,i){function c(c,r){\nh(b,d,k,c,r,i)}i=i||2;var r,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(c):j(c)):h(b,d,k,r,r,i)}\n;function h(h,d,k,i,c,r){return b._api?b._api(h,d,k,i,c,r):(b.q&&b.q.push([h,d,k,i,c,r]),null)}return b.q=[],b}(),function(){function b(){}\nfunction h(b,h,d){g(b,h,d,1)}function d(b,d,k){h(\"setProperties\",{type:b,properties:d},k)}function k(b,h){d(\"user\",b,h)}function i(b,h,d){k({\nuid:b},d),h&&k(h,d)}g.identify=i,g.setUserVars=k,g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h(\"trackEvent\",{\nname:b,properties:d},k)},g.anonymize=function(){i(!1)},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},\ng.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){h(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",\nf=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){return g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")\n}(window,document,window._fs_namespace,0,window._fs_script);";
var executeSnippet = function executeSnippet() {

@@ -124,3 +126,7 @@ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},

var firstScript = doc.getElementsByTagName(tagName)[0];
firstScript.parentNode.insertBefore(script, firstScript);
if (firstScript && firstScript.parentNode) {
firstScript.parentNode.insertBefore(script, firstScript);
} else {
doc.head.appendChild(script);
}
})();

@@ -343,2 +349,4 @@ (function translateV1API() {

};
export { SnippetSrc, SnippetSrcV1, generateSnippetText, generateSnippetTextV1, initFS, initFSV1 };
var mockSnippetSrc = mockSnippetV2;
var mockSnippetSrcV1 = mockSnippetV1;
export { SnippetSrc, SnippetSrcV1, generateSnippetText, generateSnippetTextV1, initFS, initFSV1, mockSnippetSrc, mockSnippetSrcV1 };
'use strict';
// @ts-nocheck
var SnippetSrcV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],k())}}return b(r(0),r(1)),{\nthen:function(b,h){return j((function(r,i){d.push([b,h,r,i]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,r){function i(i,c){\nh(b,d,k,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(i):j(i)):h(b,d,k,c,c,r)}\n;function h(h,d,k,r,i,c){return b._api?b._api(h,d,k,r,i,c):(b.q&&b.q.push([h,d,k,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){\n\"function\"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var k=0;k<d.length;k++)h(d[k]);d.length=0,d.push=h}},function(){\n(o=n.createElement(t)).async=!0,o.crossOrigin=\"anonymous\",o.src=\"https://\"+l,o.onerror=function(){y(\"Error loading \"+l)}\n;var b=n.getElementsByTagName(t)[0];b.parentNode.insertBefore(o,b)}(),function(){function b(){}function h(b,h,d){g(b,h,d,1)}function d(b,d,k){\nh(\"setProperties\",{type:b,properties:d},k)}function k(b,h){d(\"user\",b,h)}function r(b,h,d){k({uid:b},d),h&&k(h,d)}g.identify=r,g.setUserVars=k,\ng.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h(\"trackEvent\",{name:b,properties:d},k)},g.anonymize=function(){r(!1)\n},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},g.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){\nh(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",f=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){\nreturn g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")}(window,document,window._fs_namespace,\"script\",window._fs_script);";
var SnippetSrcV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function p(b){var h,d=[];function j(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],j())}}return b(r(0),r(1)),{\nthen:function(b,h){return p((function(r,i){d.push([b,h,r,i]),j()}))}}}a&&(g=m[e]=function(){var b=function(b,d,j,r){function i(i,c){\nh(b,d,j,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(i):p(i)):h(b,d,j,c,c,r)}\n;function h(h,d,j,r,i,c){return b._api?b._api(h,d,j,r,i,c):(b.q&&b.q.push([h,d,j,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){\n\"function\"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var j=0;j<d.length;j++)h(d[j]);d.length=0,d.push=h}},function(){\n(o=n.createElement(t)).async=!0,o.crossOrigin=\"anonymous\",o.src=\"https://\"+l,o.onerror=function(){y(\"Error loading \"+l)}\n;var b=n.getElementsByTagName(t)[0];b&&b.parentNode?b.parentNode.insertBefore(o,b):n.head.appendChild(o)}(),function(){function b(){}\nfunction h(b,h,d){g(b,h,d,1)}function d(b,d,j){h(\"setProperties\",{type:b,properties:d},j)}function j(b,h){d(\"user\",b,h)}function r(b,h,d){j({\nuid:b},d),h&&j(h,d)}g.identify=r,g.setUserVars=j,g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,j){h(\"trackEvent\",{\nname:b,properties:d},j)},g.anonymize=function(){r(!1)},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},\ng.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){h(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",\nf=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){return g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")\n}(window,document,window._fs_namespace,\"script\",window._fs_script);";
var mockSnippetV1 = "(function(m,n,e,t,l,o,g,y){\n if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].');} return;}\n g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];\n g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};\n g.anonymize=function(){g.identify(!!0)};\n g.shutdown=function(){g(\"rec\",!1)};g.restart=function(){g(\"rec\",!0)};\n g.log = function(a,b){g(\"log\",[a,b])};\n g.consent=function(a){g(\"consent\",!arguments.length||a)};\n g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};\n g.clearUserCookie=function(){};\n g.setVars=function(n, p){g('setVars',[n,p]);};\n g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];\n if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};\n g._v=\"1.3.0\";\n})(window,document,window['_fs_namespace'],'script','user');";
var mockSnippetV2 = "!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){\nreturn!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'),!1)}(e)\n;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}\nd&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function i(b){return function(d){h||(h=[b,d],k())}}return b(i(0),i(1)),{\nthen:function(b,h){return j((function(i,c){d.push([b,h,i,c]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,i){function c(c,r){\nh(b,d,k,c,r,i)}i=i||2;var r,u=/Async$/;return u.test(b)?(b=b.replace(u,\"\"),\"function\"==typeof Promise?new Promise(c):j(c)):h(b,d,k,r,r,i)}\n;function h(h,d,k,i,c,r){return b._api?b._api(h,d,k,i,c,r):(b.q&&b.q.push([h,d,k,i,c,r]),null)}return b.q=[],b}(),function(){function b(){}\nfunction h(b,h,d){g(b,h,d,1)}function d(b,d,k){h(\"setProperties\",{type:b,properties:d},k)}function k(b,h){d(\"user\",b,h)}function i(b,h,d){k({\nuid:b},d),h&&k(h,d)}g.identify=i,g.setUserVars=k,g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h(\"trackEvent\",{\nname:b,properties:d},k)},g.anonymize=function(){i(!1)},g.shutdown=function(){h(\"shutdown\")},g.restart=function(){h(\"restart\")},\ng.log=function(b,d){h(\"log\",{level:b,msg:d})},g.consent=function(b){h(\"setIdentity\",{consent:!arguments.length||b})}}(),s=\"fetch\",\nf=\"XMLHttpRequest\",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){return g._w[s].apply(this,arguments)}),g._v=\"2.0.0\")\n}(window,document,window._fs_namespace,0,window._fs_script);";
var executeSnippet = function executeSnippet() {

@@ -126,3 +128,7 @@ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},

var firstScript = doc.getElementsByTagName(tagName)[0];
firstScript.parentNode.insertBefore(script, firstScript);
if (firstScript && firstScript.parentNode) {
firstScript.parentNode.insertBefore(script, firstScript);
} else {
doc.head.appendChild(script);
}
})();

@@ -345,2 +351,4 @@ (function translateV1API() {

};
var mockSnippetSrc = mockSnippetV2;
var mockSnippetSrcV1 = mockSnippetV1;
exports.SnippetSrc = SnippetSrc;

@@ -351,2 +359,4 @@ exports.SnippetSrcV1 = SnippetSrcV1;

exports.initFS = initFS;
exports.initFSV1 = initFSV1;
exports.initFSV1 = initFSV1;
exports.mockSnippetSrc = mockSnippetSrc;
exports.mockSnippetSrcV1 = mockSnippetSrcV1;
{
"name": "@fullstory/snippet",
"version": "2.0.3",
"version": "2.0.4",
"description": "FullStory snippet source",

@@ -19,6 +19,6 @@ "main": "./dist/index.js",

"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.3.3",
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"dts-bundle-generator": "^8.0.0",

@@ -25,0 +25,0 @@ "rollup": "^3.0.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc