@builder.io/sdk
Advanced tools
Comparing version 0.0.109 to 0.0.110
@@ -18,3 +18,3 @@ 'use strict'; | ||
var Cookies = _interopDefault(require('js-cookie')); | ||
var url = _interopDefault(require('url')); | ||
var url = require('url'); | ||
require('whatwg-fetch'); | ||
@@ -21,0 +21,0 @@ |
@@ -12,3 +12,3 @@ import uniqueSelector from 'unique-selector'; | ||
import Cookies from 'js-cookie'; | ||
import url from 'url'; | ||
import { parse } from 'url'; | ||
import 'whatwg-fetch'; | ||
@@ -602,5 +602,5 @@ | ||
console.info('Loading incremental DOM...'); | ||
var url$$1 = 'https://ajax.googleapis.com/ajax/libs/incrementaldom/0.5.1/incremental-dom-min.js'; | ||
var url = 'https://ajax.googleapis.com/ajax/libs/incrementaldom/0.5.1/incremental-dom-min.js'; | ||
var script = document.createElement('script'); | ||
script.src = url$$1; | ||
script.src = url; | ||
document.head.appendChild(script); | ||
@@ -818,5 +818,5 @@ this.incrementalDomLoaded = true; | ||
// } | ||
var url$$1 = new URL(event.origin); | ||
var url = new URL(event.origin); | ||
var allowedHosts = ['builder.io', 'localhost']; | ||
if (!includes(allowedHosts, url$$1.hostname)) { | ||
if (!includes(allowedHosts, url.hostname)) { | ||
return; | ||
@@ -915,3 +915,3 @@ } | ||
Builder.prototype.getLocation = function () { | ||
return (typeof location === 'object' && url.parse(location.href)) || {}; | ||
return (typeof location === 'object' && parse(location.href)) || {}; | ||
}; | ||
@@ -926,6 +926,6 @@ Builder.prototype.getUserAttributes = function (userAgent) { | ||
// FIXME | ||
var url$$1 = this.getLocation(); | ||
var url = this.getLocation(); | ||
var device = ua.getDevice(); | ||
// TODO: get these from exension as well | ||
return __assign({ queryString: url$$1.search, urlPath: url$$1.pathname, | ||
return __assign({ queryString: url.search, urlPath: url.pathname, | ||
// Removinf for now because of cache keys | ||
@@ -978,4 +978,4 @@ // referrer: document.referrer, | ||
}; | ||
Builder.prototype.requestUrl = function (url$$1) { | ||
return fetch(url$$1).then(function (res) { return res.json(); }); | ||
Builder.prototype.requestUrl = function (url) { | ||
return fetch(url).then(function (res) { return res.json(); }); | ||
}; | ||
@@ -982,0 +982,0 @@ Builder.prototype.flushGetContentQueue = function (usePastQueue) { |
{ | ||
"name": "@builder.io/sdk", | ||
"version": "0.0.109", | ||
"version": "0.0.110", | ||
"browser": "./dist/index.umd.min.js", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1041407
15940