@objectiv/transport-xhr
Advanced tools
Comparing version 0.0.24-next.5 to 0.0.24-next.6
@@ -1,2 +0,2 @@ | ||
var s={name:"@objectiv/transport-xhr",version:"0.0.24-next.5",description:"A TrackerTransport based on XMLHttpRequest API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","transport","xmlhttprequest","xhr"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/transports/xhr"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.24-next.5","@objectiv/testing-tools":"^0.0.24-next.5",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4","xhr-mock":"^2.5.1"},dependencies:{"@objectiv/tracker-core":"~0.0.24-next.5"}};import{makeTransportSendError as n}from"@objectiv/tracker-core";var l=({endpoint:r,events:e})=>new Promise(function(t,i){globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Sending"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let o=new XMLHttpRequest,c=!0;o.open("POST",r,c),o.setRequestHeader("Content-Type","text/plain"),o.withCredentials=!0,o.onload=()=>{o.status===200?(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Succeeded"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),t(o.response)):(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Failed","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${o}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i(n()))},o.onerror=()=>{globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Error","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i(n())},o.send(JSON.stringify({events:e,client_session_id:globalThis.objectiv.clientSessionId,transport_time:Date.now()}))});import{isNonEmptyArray as d}from"@objectiv/tracker-core";var a=class{constructor(e){this.transportName="XHRTransport";this.endpoint=e.endpoint,this.xmlHttpRequestFunction=e.xmlHttpRequestFunction??l}async handle(...e){let t=await Promise.all(e);if(this.endpoint&&d(t))return this.xmlHttpRequestFunction({endpoint:this.endpoint,events:t})}isUsable(){return typeof XMLHttpRequest<"u"}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(s.name,s.version);export{a as XHRTransport,l as defaultXHRFunction}; | ||
var s={name:"@objectiv/transport-xhr",version:"0.0.24-next.6",description:"A TrackerTransport based on XMLHttpRequest API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","transport","xmlhttprequest","xhr"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/transports/xhr"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.24-next.6","@objectiv/testing-tools":"^0.0.24-next.6",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4","xhr-mock":"^2.5.1"},dependencies:{"@objectiv/tracker-core":"~0.0.24-next.6"}};import{makeTransportSendError as n}from"@objectiv/tracker-core";var l=({endpoint:r,events:e})=>new Promise(function(t,i){globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Sending"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let o=new XMLHttpRequest,c=!0;o.open("POST",r,c),o.setRequestHeader("Content-Type","text/plain"),o.withCredentials=!0,o.onload=()=>{o.status===200?(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Succeeded"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),t(o.response)):(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Failed","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${o}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i(n()))},o.onerror=()=>{globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Error","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i(n())},o.send(JSON.stringify({events:e,client_session_id:globalThis.objectiv.clientSessionId,transport_time:Date.now()}))});import{isNonEmptyArray as d}from"@objectiv/tracker-core";var a=class{constructor(e){this.transportName="XHRTransport";this.endpoint=e.endpoint,this.xmlHttpRequestFunction=e.xmlHttpRequestFunction??l}async handle(...e){let t=await Promise.all(e);if(this.endpoint&&d(t))return this.xmlHttpRequestFunction({endpoint:this.endpoint,events:t})}isUsable(){return typeof XMLHttpRequest<"u"}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(s.name,s.version);export{a as XHRTransport,l as defaultXHRFunction}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var i=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},u=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!v.call(t,o)&&o!==s&&i(t,o,{get:()=>e[o],enumerable:!(r=T(e,o))||r.enumerable});return t};var h=t=>u(i({},"__esModule",{value:!0}),t);var j={};g(j,{XHRTransport:()=>c,defaultXHRFunction:()=>a});module.exports=h(j);var n={name:"@objectiv/transport-xhr",version:"0.0.24-next.5",description:"A TrackerTransport based on XMLHttpRequest API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","transport","xmlhttprequest","xhr"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/transports/xhr"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.24-next.5","@objectiv/testing-tools":"^0.0.24-next.5",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4","xhr-mock":"^2.5.1"},dependencies:{"@objectiv/tracker-core":"~0.0.24-next.5"}};var l=require("@objectiv/tracker-core"),a=({endpoint:t,events:e})=>new Promise(function(s,r){globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Sending"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let o=new XMLHttpRequest,d=!0;o.open("POST",t,d),o.setRequestHeader("Content-Type","text/plain"),o.withCredentials=!0,o.onload=()=>{o.status===200?(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Succeeded"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),s(o.response)):(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Failed","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${o}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r((0,l.makeTransportSendError)()))},o.onerror=()=>{globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Error","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r((0,l.makeTransportSendError)())},o.send(JSON.stringify({events:e,client_session_id:globalThis.objectiv.clientSessionId,transport_time:Date.now()}))});var p=require("@objectiv/tracker-core");var c=class{constructor(e){this.transportName="XHRTransport";this.endpoint=e.endpoint,this.xmlHttpRequestFunction=e.xmlHttpRequestFunction??a}async handle(...e){let s=await Promise.all(e);if(this.endpoint&&(0,p.isNonEmptyArray)(s))return this.xmlHttpRequestFunction({endpoint:this.endpoint,events:s})}isUsable(){return typeof XMLHttpRequest<"u"}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(n.name,n.version);0&&(module.exports={XHRTransport,defaultXHRFunction}); | ||
"use strict";var i=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},u=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!v.call(t,o)&&o!==s&&i(t,o,{get:()=>e[o],enumerable:!(r=T(e,o))||r.enumerable});return t};var h=t=>u(i({},"__esModule",{value:!0}),t);var j={};g(j,{XHRTransport:()=>c,defaultXHRFunction:()=>a});module.exports=h(j);var n={name:"@objectiv/transport-xhr",version:"0.0.24-next.6",description:"A TrackerTransport based on XMLHttpRequest API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","transport","xmlhttprequest","xhr"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/transports/xhr"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.24-next.6","@objectiv/testing-tools":"^0.0.24-next.6",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4","xhr-mock":"^2.5.1"},dependencies:{"@objectiv/tracker-core":"~0.0.24-next.6"}};var l=require("@objectiv/tracker-core"),a=({endpoint:t,events:e})=>new Promise(function(s,r){globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Sending"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let o=new XMLHttpRequest,d=!0;o.open("POST",t,d),o.setRequestHeader("Content-Type","text/plain"),o.withCredentials=!0,o.onload=()=>{o.status===200?(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("\uFF62objectiv:XHRTransport\uFF63 Succeeded"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),s(o.response)):(globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Failed","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${o}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r((0,l.makeTransportSendError)()))},o.onerror=()=>{globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed("%c\uFF62objectiv:XHRTransport\uFF63 Error","color:red"),globalThis.objectiv.devTools.TrackerConsole.log("Events:"),globalThis.objectiv.devTools.TrackerConsole.log(e),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r((0,l.makeTransportSendError)())},o.send(JSON.stringify({events:e,client_session_id:globalThis.objectiv.clientSessionId,transport_time:Date.now()}))});var p=require("@objectiv/tracker-core");var c=class{constructor(e){this.transportName="XHRTransport";this.endpoint=e.endpoint,this.xmlHttpRequestFunction=e.xmlHttpRequestFunction??a}async handle(...e){let s=await Promise.all(e);if(this.endpoint&&(0,p.isNonEmptyArray)(s))return this.xmlHttpRequestFunction({endpoint:this.endpoint,events:s})}isUsable(){return typeof XMLHttpRequest<"u"}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(n.name,n.version);0&&(module.exports={XHRTransport,defaultXHRFunction}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@objectiv/transport-xhr", | ||
"version": "0.0.24-next.5", | ||
"version": "0.0.24-next.6", | ||
"description": "A TrackerTransport based on XMLHttpRequest API", | ||
@@ -54,4 +54,4 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@objectiv/developer-tools": "^0.0.24-next.5", | ||
"@objectiv/testing-tools": "^0.0.24-next.5", | ||
"@objectiv/developer-tools": "^0.0.24-next.6", | ||
"@objectiv/testing-tools": "^0.0.24-next.6", | ||
"jest": "^28.1.3", | ||
@@ -65,4 +65,4 @@ "prettier": "^2.7.1", | ||
"dependencies": { | ||
"@objectiv/tracker-core": "~0.0.24-next.5" | ||
"@objectiv/tracker-core": "~0.0.24-next.6" | ||
} | ||
} |
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