From bd44e0be67255f378d239a2fdafffdc8097acfb3 Mon Sep 17 00:00:00 2001 From: Boyan Tabakov Date: Mon, 17 Apr 2023 09:09:54 +0300 Subject: [PATCH] Build --- build/sharetribe-flex-sdk-node.js | 22 ++++++++++++---------- build/sharetribe-flex-sdk-web.js | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/build/sharetribe-flex-sdk-node.js b/build/sharetribe-flex-sdk-node.js index 645b78b..dedfc8e 100644 --- a/build/sharetribe-flex-sdk-node.js +++ b/build/sharetribe-flex-sdk-node.js @@ -12664,22 +12664,22 @@ var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_) // CONCATENATED MODULE: ./src/version.js // Update this when updating package.json -var sdkVersion = '1.18.0'; +var sdkVersion = '1.18.1'; /* harmony default export */ var src_version = (sdkVersion); // CONCATENATED MODULE: ./src/runtime.js -/* global window, navigator, process */ +/* global window, process */ var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; -var navigatorUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : ''; var nodeVersion = typeof process !== 'undefined' && typeof process.versions !== 'undefined' ? process.versions.node : ''; // User-Agent string for the SDK -// For browsers, append to the browser's user agent string, +// Only server-side, as modifying browser UA string causes +// side effects. var userAgent = "sharetribe-flex-sdk-js/".concat(src_version); -if (isBrowser && navigatorUserAgent !== '') { - userAgent = "".concat(navigatorUserAgent, " ").concat(userAgent); -} else if (nodeVersion !== '') { +if (isBrowser) { + userAgent = null; +} else if (!isBrowser && nodeVersion !== '') { userAgent = "".concat(userAgent, " (node/").concat(nodeVersion, ")"); } @@ -12719,10 +12719,12 @@ var endpoint_request_doRequest = function doRequest(_ref) { query = params; // leave `data` null } + var headersWithUa = sdkUserAgentString ? endpoint_request_objectSpread({}, headers, { + 'User-Agent': sdkUserAgentString + }) : headers; + var req = endpoint_request_objectSpread({}, httpOpts, { - headers: endpoint_request_objectSpread({}, headers, { - 'User-Agent': sdkUserAgentString - }), + headers: headersWithUa, method: method, data: data, params: query diff --git a/build/sharetribe-flex-sdk-web.js b/build/sharetribe-flex-sdk-web.js index 352c8f0..e7fa3f7 100644 --- a/build/sharetribe-flex-sdk-web.js +++ b/build/sharetribe-flex-sdk-web.js @@ -1,8 +1,8 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sharetribeSdk=e():t.sharetribeSdk=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=212)}([function(t,e,r){var n=r(26);t.exports=function(t,e,r){var o=null==t?void 0:n(t,e);return void 0===o?r:o}},function(t,e,r){"use strict";var n=r(72),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function c(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function s(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===o.call(t)}function g(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var r=0,n=t.length;rt||1342177279>>=1)&&(e+=e);return r}}),"es6-impl","es3"),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype((function(){return e<\/script>')},goog.appendScriptSrcNode_=function(t){var e=goog.global.document,r=e.createElement("script");r.type="text/javascript",r.src=t,r.defer=!1,r.async=!1,e.head.appendChild(r)},goog.writeScriptTag_=function(t,e){if(goog.inHtmlDocument_()){var r=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==r.readyState){if(/\bdeps.js$/.test(t))return!1;throw Error('Cannot write "'+t+'" after document load')}if(void 0===e)if(goog.IS_OLD_IE_){goog.oldIeWaiting_=!0;var n=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ";r.write('