@qikdev/sdk 0.1.205 → 0.1.207

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/main.js CHANGED
@@ -1237,7 +1237,7 @@ function lt() {
1237
1237
  }, lr;
1238
1238
  }
1239
1239
  var ft = lt();
1240
- const dt = /* @__PURE__ */ mr(ft), vr = "0.1.205", pt = Ee.CancelToken;
1240
+ const dt = /* @__PURE__ */ mr(ft), vr = "0.1.207", pt = Ee.CancelToken;
1241
1241
  var mt = function(e) {
1242
1242
  var r;
1243
1243
  typeof window < "u" && (r = e.cache.get("api"));
@@ -3360,27 +3360,27 @@ function Ot(e) {
3360
3360
  }
3361
3361
  r.glossary = async function(i) {
3362
3362
  i = i || {};
3363
- let c = n.get("glossary");
3364
- var s = i.refresh || i.reload || !c;
3365
- if (s) {
3363
+ let c = n.get("glossary"), p = !!!i.uncompressed;
3364
+ var A = i.refresh || i.reload || !c;
3365
+ if (A) {
3366
3366
  if (!o) {
3367
- let S = function() {
3367
+ let C = function() {
3368
3368
  o = null, r.loadingGlossary = !1;
3369
3369
  };
3370
3370
  r.loadingGlossary = !0;
3371
- const l = i.compressed ? "/glossary/compressed" : "/glossary";
3372
- o = e.api.get(l, { cache: !1 }), o.then(S, S);
3371
+ const b = p ? "/glossary/compressed" : "/glossary";
3372
+ o = e.api.get(b, { cache: !1 }), o.then(C, C);
3373
3373
  }
3374
- const { data: A } = await o, y = A._s && A._k && A.types ? m(A) : A;
3375
- n.set("glossary", y), c = y, e.dispatch("glossary", y);
3374
+ const { data: l } = await o, S = l._s && l._k && l.types ? m(l) : l;
3375
+ n.set("glossary", S), c = S, e.dispatch("glossary", S);
3376
3376
  }
3377
3377
  if (i.hash) {
3378
- var p = e.utils.hash(c, "key");
3379
- return p;
3378
+ var y = e.utils.hash(c, "key");
3379
+ return y;
3380
3380
  }
3381
3381
  if (i.hex) {
3382
- var p = e.utils.hash(c, "hex");
3383
- return p;
3382
+ var y = e.utils.hash(c, "hex");
3383
+ return y;
3384
3384
  }
3385
3385
  return c;
3386
3386
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qikdev/sdk",
3
- "version": "0.1.205",
3
+ "version": "0.1.207",
4
4
  "type": "module",
5
5
  "description": "Promise based Javascript SDK",
6
6
  "main": "./dist/main.js",
@@ -99,7 +99,7 @@ export default function (qik) {
99
99
  allowing for fast selection of specific content types, by default will return as an array
100
100
  * @param {Boolean} options.reload Force glossary to reload and not be cached.
101
101
  If false will retrieve content type data from the in memory cache
102
- * @param {Boolean} options.compressed Use the compressed endpoint for ~42% smaller transfer size
102
+ * @param {Boolean} options.uncompressed Use the uncompressed endpoint
103
103
  * @example
104
104
  *
105
105
  * const { article, profile } = await sdk.content.glossary({hash:true});
@@ -111,6 +111,8 @@ export default function (qik) {
111
111
 
112
112
  // Check if we already have the glossary cached
113
113
  let cached = glossaryCache.get("glossary");
114
+ const uncompressed = !!options.uncompressed;
115
+ let compressed = !uncompressed;
114
116
  var reload = options.refresh || options.reload || !cached;
115
117
 
116
118
  // If we are forcing a reload
@@ -119,9 +121,7 @@ export default function (qik) {
119
121
  service.loadingGlossary = true;
120
122
 
121
123
  // Use compressed endpoint if requested
122
- const endpoint = options.compressed
123
- ? `/glossary/compressed`
124
- : `/glossary`;
124
+ const endpoint = compressed ? `/glossary/compressed` : `/glossary`;
125
125
  inflightGlossaryRequest = qik.api.get(endpoint, { cache: false });
126
126
  inflightGlossaryRequest.then(resolveRequest, resolveRequest);
127
127
  function resolveRequest() {
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export const version = "0.1.205";
1
+ export const version = "0.1.207";