@prezly/sdk 15.15.0 → 15.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/http/lib.cjs +13 -1
- package/dist/http/lib.js +13 -1
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_USER_AGENT = void 0;
|
|
7
|
-
const VERSION = "15.
|
|
7
|
+
const VERSION = "15.15.1-0";
|
|
8
8
|
const URL = 'https://github.com/prezly/javascript-sdk';
|
|
9
9
|
const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
|
|
10
10
|
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
package/dist/api/constants.js
CHANGED
package/dist/http/lib.cjs
CHANGED
|
@@ -10,7 +10,19 @@ var nodeUrl = _interopRequireWildcard(require("url"));
|
|
|
10
10
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
11
11
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Choose which `URL` class to use based on the environment (Browser / Node.js / Edge)
|
|
15
|
+
*/
|
|
16
|
+
function getURLClass() {
|
|
17
|
+
if (typeof window !== 'undefined') {
|
|
18
|
+
return window.URL;
|
|
19
|
+
}
|
|
20
|
+
if (typeof globalThis.EdgeRuntime === 'string') {
|
|
21
|
+
return globalThis.URL;
|
|
22
|
+
}
|
|
23
|
+
return nodeUrl.URL;
|
|
24
|
+
}
|
|
25
|
+
const URL = getURLClass();
|
|
14
26
|
function parseUrlParams(query) {
|
|
15
27
|
return _queryString.default.parse(query, {
|
|
16
28
|
arrayFormat: 'bracket'
|
package/dist/http/lib.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import queryString from 'query-string';
|
|
2
2
|
import * as nodeUrl from 'url';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Choose which `URL` class to use based on the environment (Browser / Node.js / Edge)
|
|
5
|
+
*/
|
|
6
|
+
function getURLClass() {
|
|
7
|
+
if (typeof window !== 'undefined') {
|
|
8
|
+
return window.URL;
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis.EdgeRuntime === 'string') {
|
|
11
|
+
return globalThis.URL;
|
|
12
|
+
}
|
|
13
|
+
return nodeUrl.URL;
|
|
14
|
+
}
|
|
15
|
+
const URL = getURLClass();
|
|
4
16
|
function parseUrlParams(query) {
|
|
5
17
|
return queryString.parse(query, {
|
|
6
18
|
arrayFormat: 'bracket'
|