@objectiv/transport-xhr
Advanced tools
Comparing version 0.0.26 to 0.0.27-experimental.0
@@ -1,2 +0,2 @@ | ||
var s={name:"@objectiv/transport-xhr",version:"0.0.26",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.26","@objectiv/testing-tools":"^0.0.26",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.26"}};import{makeTransportSendError as l}from"@objectiv/tracker-core";var n=({endpoint:i,events:o})=>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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let e=new XMLHttpRequest,c=!0;e.open("POST",i,c),e.setRequestHeader("Content-Type","text/plain"),e.withCredentials=!0,e.onload=()=>{e.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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),t(e.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(o),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${e}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r(l()))},e.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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),r(l())},e.send(JSON.stringify({events:o,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(o){this.endpoint=o.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(...o){let t=await Promise.all(o);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.0",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.0","@objectiv/testing-tools":"^0.0.27-experimental.0",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.0","@objectiv/tracker-core":"^0.0.27-experimental.0"}};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,o)=>{for(var s in o)r(t,s,{get:o[s],enumerable:!0})},u=(t,o,s,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of b(o))!v.call(t,e)&&e!==s&&r(t,e,{get:()=>o[e],enumerable:!(i=T(o,e))||i.enumerable});return t};var h=t=>u(r({},"__esModule",{value:!0}),t);var m={};g(m,{XHRTransport:()=>c,defaultXHRFunction:()=>a});module.exports=h(m);var l={name:"@objectiv/transport-xhr",version:"0.0.26",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.26","@objectiv/testing-tools":"^0.0.26",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.26"}};var n=require("@objectiv/tracker-core"),a=({endpoint:t,events:o})=>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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd());let e=new XMLHttpRequest,d=!0;e.open("POST",t,d),e.setRequestHeader("Content-Type","text/plain"),e.withCredentials=!0,e.onload=()=>{e.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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),s(e.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(o),globalThis.objectiv.devTools.TrackerConsole.log(`Response: ${e}`),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i((0,n.makeTransportSendError)()))},e.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(o),globalThis.objectiv.devTools.TrackerConsole.groupEnd()),i((0,n.makeTransportSendError)())},e.send(JSON.stringify({events:o,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(o){this.endpoint=o.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(...o){let s=await Promise.all(o);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.0",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.0","@objectiv/testing-tools":"^0.0.27-experimental.0",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.0","@objectiv/tracker-core":"^0.0.27-experimental.0"}};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.26", | ||
"version": "0.0.27-experimental.0", | ||
"description": "A TrackerTransport based on XMLHttpRequest API", | ||
@@ -54,4 +54,4 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@objectiv/developer-tools": "^0.0.26", | ||
"@objectiv/testing-tools": "^0.0.26", | ||
"@objectiv/developer-tools": "^0.0.27-experimental.0", | ||
"@objectiv/testing-tools": "^0.0.27-experimental.0", | ||
"jest": "^28.1.3", | ||
@@ -65,4 +65,5 @@ "prettier": "^2.7.1", | ||
"dependencies": { | ||
"@objectiv/tracker-core": "~0.0.26" | ||
"@objectiv/schema": "^0.0.27-experimental.0", | ||
"@objectiv/tracker-core": "^0.0.27-experimental.0" | ||
} | ||
} |
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
26133
64
2
+ Added@objectiv/developer-tools@0.0.27-experimental.6(transitive)
+ Added@objectiv/schema@0.0.27-experimental.6(transitive)
+ Added@objectiv/tracker-core@0.0.27-experimental.6(transitive)
- Removed@objectiv/developer-tools@0.0.26(transitive)
- Removed@objectiv/schema@0.0.26(transitive)
- Removed@objectiv/tracker-core@0.0.26(transitive)