strapi-sdk-js 2.3.1 → 2.3.2-rc.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/index.cjs CHANGED
@@ -6,6 +6,25 @@ var qs = require('qs');
6
6
  var Cookies = require('js-cookie');
7
7
  var ufo = require('ufo');
8
8
 
9
+ function _interopNamespaceDefault(e) {
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var ufo__namespace = /*#__PURE__*/_interopNamespaceDefault(ufo);
27
+
9
28
  function isBrowser() {
10
29
  return typeof window !== "undefined";
11
30
  }
@@ -43,11 +62,11 @@ class Strapi {
43
62
  const _options = defu(options || {}, defaults);
44
63
  this.options = {
45
64
  ..._options,
46
- url: ufo.cleanDoubleSlashes(_options == null ? void 0 : _options.url),
47
- prefix: ufo.cleanDoubleSlashes(_options == null ? void 0 : _options.prefix)
65
+ url: ufo__namespace.cleanDoubleSlashes(_options == null ? void 0 : _options.url),
66
+ prefix: ufo__namespace.cleanDoubleSlashes(_options == null ? void 0 : _options.prefix)
48
67
  };
49
68
  this.axios = axios.create({
50
- baseURL: ufo.joinURL(this.options.url, this.options.prefix),
69
+ baseURL: ufo__namespace.joinURL(this.options.url, this.options.prefix),
51
70
  paramsSerializer: qs.stringify,
52
71
  ...this.options.axiosOptions
53
72
  });
@@ -208,12 +227,7 @@ class Strapi {
208
227
  * @returns string
209
228
  */
210
229
  getProviderAuthenticationUrl(provider) {
211
- return ufo.joinURL(
212
- this.options.url,
213
- this.options.prefix,
214
- "connect",
215
- provider
216
- );
230
+ return ufo__namespace.joinURL(this.options.url, this.options.prefix, "connect", provider);
217
231
  }
218
232
  /**
219
233
  * Authenticate user with the token present on the URL or in `params`
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import axios from 'axios';
2
2
  import defu from 'defu';
3
3
  import qs from 'qs';
4
4
  import Cookies from 'js-cookie';
5
- import ufo from 'ufo';
5
+ import * as ufo from 'ufo';
6
6
 
7
7
  function isBrowser() {
8
8
  return typeof window !== "undefined";
@@ -206,12 +206,7 @@ class Strapi {
206
206
  * @returns string
207
207
  */
208
208
  getProviderAuthenticationUrl(provider) {
209
- return ufo.joinURL(
210
- this.options.url,
211
- this.options.prefix,
212
- "connect",
213
- provider
214
- );
209
+ return ufo.joinURL(this.options.url, this.options.prefix, "connect", provider);
215
210
  }
216
211
  /**
217
212
  * Authenticate user with the token present on the URL or in `params`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-sdk-js",
3
- "version": "2.3.1",
3
+ "version": "2.3.2-rc.0",
4
4
  "description": "📦 Javascript SDK for your Strapi API",
5
5
  "keywords": [
6
6
  "strapi",