@objectiv/transport-xhr
Advanced tools
Comparing version 0.0.27-experimental.2 to 0.0.27-experimental.3
@@ -1,2 +0,2 @@ | ||
var s={name:"@objectiv/transport-xhr",version:"0.0.27-experimental.2",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.27-experimental.2","@objectiv/testing-tools":"^0.0.27-experimental.2",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/schema":"^0.0.27-experimental.2","@objectiv/tracker-core":"^0.0.27-experimental.2"}};import{makeTransportSendError as l}from"@objectiv/tracker-core";var n=({endpoint:i,events:e})=>new Promise(function(t,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,c=!0;o.open("POST",i,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()),r(l()))},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(l())},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(){this.transportName="XHRTransport";this.xmlHttpRequestFunction=n}initialize(e){this.endpoint=e.endpoint,globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed(`\uFF62objectiv:${this.transportName}\uFF63 Initialized`),globalThis.objectiv.devTools.TrackerConsole.log(`Endpoint: ${this.endpoint}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd())}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,n as defaultXHRFunction}; | ||
var s={name:"@objectiv/transport-xhr",version:"0.0.27-experimental.3",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.27-experimental.3","@objectiv/testing-tools":"^0.0.27-experimental.3",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/schema":"^0.0.27-experimental.3","@objectiv/tracker-core":"^0.0.27-experimental.3"}};import{makeTransportSendError as l}from"@objectiv/tracker-core";var n=({endpoint:i,events:e})=>new Promise(function(t,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,c=!0;o.open("POST",i,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()),r(l()))},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(l())},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(){this.transportName="XHRTransport";this.xmlHttpRequestFunction=n}initialize(e){this.endpoint=e.endpoint,globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed(`\uFF62objectiv:${this.transportName}\uFF63 Initialized`),globalThis.objectiv.devTools.TrackerConsole.log(`Endpoint: ${this.endpoint}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd())}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,n as defaultXHRFunction}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var r=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})},h=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!v.call(t,o)&&o!==s&&r(t,o,{get:()=>e[o],enumerable:!(i=T(e,o))||i.enumerable});return t};var u=t=>h(r({},"__esModule",{value:!0}),t);var m={};g(m,{XHRTransport:()=>c,defaultXHRFunction:()=>a});module.exports=u(m);var l={name:"@objectiv/transport-xhr",version:"0.0.27-experimental.2",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.27-experimental.2","@objectiv/testing-tools":"^0.0.27-experimental.2",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/schema":"^0.0.27-experimental.2","@objectiv/tracker-core":"^0.0.27-experimental.2"}};var n=require("@objectiv/tracker-core"),a=({endpoint:t,events:e})=>new Promise(function(s,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,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()),i((0,n.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()),i((0,n.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(){this.transportName="XHRTransport";this.xmlHttpRequestFunction=a}initialize(e){this.endpoint=e.endpoint,globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed(`\uFF62objectiv:${this.transportName}\uFF63 Initialized`),globalThis.objectiv.devTools.TrackerConsole.log(`Endpoint: ${this.endpoint}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd())}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(l.name,l.version);0&&(module.exports={XHRTransport,defaultXHRFunction}); | ||
"use strict";var r=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})},h=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!v.call(t,o)&&o!==s&&r(t,o,{get:()=>e[o],enumerable:!(i=T(e,o))||i.enumerable});return t};var u=t=>h(r({},"__esModule",{value:!0}),t);var m={};g(m,{XHRTransport:()=>c,defaultXHRFunction:()=>a});module.exports=u(m);var l={name:"@objectiv/transport-xhr",version:"0.0.27-experimental.3",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.27-experimental.3","@objectiv/testing-tools":"^0.0.27-experimental.3",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/schema":"^0.0.27-experimental.3","@objectiv/tracker-core":"^0.0.27-experimental.3"}};var n=require("@objectiv/tracker-core"),a=({endpoint:t,events:e})=>new Promise(function(s,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,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()),i((0,n.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()),i((0,n.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(){this.transportName="XHRTransport";this.xmlHttpRequestFunction=a}initialize(e){this.endpoint=e.endpoint,globalThis.objectiv.devTools&&(globalThis.objectiv.devTools.TrackerConsole.groupCollapsed(`\uFF62objectiv:${this.transportName}\uFF63 Initialized`),globalThis.objectiv.devTools.TrackerConsole.log(`Endpoint: ${this.endpoint}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd())}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(l.name,l.version);0&&(module.exports={XHRTransport,defaultXHRFunction}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@objectiv/transport-xhr", | ||
"version": "0.0.27-experimental.2", | ||
"version": "0.0.27-experimental.3", | ||
"description": "A TrackerTransport based on XMLHttpRequest API", | ||
@@ -54,4 +54,4 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@objectiv/developer-tools": "^0.0.27-experimental.2", | ||
"@objectiv/testing-tools": "^0.0.27-experimental.2", | ||
"@objectiv/developer-tools": "^0.0.27-experimental.3", | ||
"@objectiv/testing-tools": "^0.0.27-experimental.3", | ||
"jest": "^28.1.3", | ||
@@ -65,5 +65,5 @@ "prettier": "^2.7.1", | ||
"dependencies": { | ||
"@objectiv/schema": "^0.0.27-experimental.2", | ||
"@objectiv/tracker-core": "^0.0.27-experimental.2" | ||
"@objectiv/schema": "^0.0.27-experimental.3", | ||
"@objectiv/tracker-core": "^0.0.27-experimental.3" | ||
} | ||
} |
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