solid-ui 2.4.21-1139b6fe → 2.4.21-b23fa0bc

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
@@ -14234,94 +14234,115 @@ function getPodOwner(_x, _x2) {
14234
14234
 
14235
14235
  function _getPodOwner() {
14236
14236
  _getPodOwner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(pod, store) {
14237
- var podOwner, guess;
14237
+ var response, containerTurtle, podOwner, guess;
14238
14238
  return _regenerator["default"].wrap(function _callee$(_context) {
14239
14239
  while (1) {
14240
14240
  switch (_context.prev = _context.next) {
14241
14241
  case 0:
14242
14242
  _context.prev = 0;
14243
- // @ts-ignore LiveStore always has fetcher
14244
- store.fetcher.load(pod);
14245
- _context.next = 8;
14246
- break;
14243
+
14244
+ if (store.any(pod, null, _.ns.ldp('Container'), pod)) {
14245
+ _context.next = 7;
14246
+ break;
14247
+ }
14248
+
14249
+ _context.next = 4;
14250
+ return store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, {
14251
+ headers: {
14252
+ accept: 'text/turtle'
14253
+ }
14254
+ }));
14247
14255
 
14248
14256
  case 4:
14249
- _context.prev = 4;
14257
+ response = _context.sent;
14258
+ containerTurtle = response.responseText;
14259
+ (0, _rdflib.parse)(containerTurtle, store, pod.uri, 'text/turtle');
14260
+
14261
+ case 7:
14262
+ _context.next = 13;
14263
+ break;
14264
+
14265
+ case 9:
14266
+ _context.prev = 9;
14250
14267
  _context.t0 = _context["catch"](0);
14251
14268
  console.error('Error loading pod ' + pod + ': ' + _context.t0);
14252
14269
  return _context.abrupt("return", null);
14253
14270
 
14254
- case 8:
14271
+ case 13:
14255
14272
  if (store.holds(pod, _.ns.rdf('type'), _.ns.space('Storage'), pod)) {
14256
- _context.next = 11;
14273
+ _context.next = 16;
14257
14274
  break;
14258
14275
  }
14259
14276
 
14260
14277
  console.warn('Pod ' + pod + ' does not declare itself as a space:Storage');
14261
14278
  return _context.abrupt("return", null);
14262
14279
 
14263
- case 11:
14280
+ case 16:
14264
14281
  podOwner = store.any(pod, _.ns.solid('owner'), null, pod) || store.any(null, _.ns.space('storage'), pod, pod);
14265
14282
 
14266
14283
  if (!podOwner) {
14267
- _context.next = 25;
14284
+ _context.next = 31;
14268
14285
  break;
14269
14286
  }
14270
14287
 
14271
- _context.prev = 13;
14272
- // @ts-ignore LiveStore always has fetcher
14273
- store.fetcher.load(podOwner.doc());
14288
+ _context.prev = 18;
14274
14289
  _context.next = 21;
14290
+ return store.fetcher.load(podOwner.doc());
14291
+
14292
+ case 21:
14293
+ _context.next = 27;
14275
14294
  break;
14276
14295
 
14277
- case 17:
14278
- _context.prev = 17;
14279
- _context.t1 = _context["catch"](13);
14296
+ case 23:
14297
+ _context.prev = 23;
14298
+ _context.t1 = _context["catch"](18);
14280
14299
  console.warn('Unable to load profile of pod owner ' + podOwner);
14281
14300
  return _context.abrupt("return", null);
14282
14301
 
14283
- case 21:
14302
+ case 27:
14284
14303
  if (!store.holds(podOwner, _.ns.space('storage'), pod, podOwner.doc())) {
14285
14304
  console.warn("Pod owner ".concat(podOwner, " does NOT list pod ").concat(pod, " as their storage"));
14286
14305
  }
14287
14306
 
14288
14307
  return _context.abrupt("return", podOwner);
14289
14308
 
14290
- case 25:
14309
+ case 31:
14291
14310
  // pod owner not declared in pod
14292
14311
  // @@ TODO: This is given the structure that NSS provides
14293
14312
  // This is a massive guess. For old pods which don't have owner link
14294
14313
  guess = (0, _rdflib.sym)("".concat(pod.uri, "profile/card#me"));
14295
- _context.prev = 26;
14296
- // @ts-ignore LiveStore always has fetcher
14297
- store.fetcher.load(guess);
14298
- _context.next = 34;
14314
+ _context.prev = 32;
14315
+ _context.next = 35;
14316
+ return store.fetcher.load(guess);
14317
+
14318
+ case 35:
14319
+ _context.next = 41;
14299
14320
  break;
14300
14321
 
14301
- case 30:
14302
- _context.prev = 30;
14303
- _context.t2 = _context["catch"](26);
14322
+ case 37:
14323
+ _context.prev = 37;
14324
+ _context.t2 = _context["catch"](32);
14304
14325
  console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\'t load it.');
14305
14326
  return _context.abrupt("return", null);
14306
14327
 
14307
- case 34:
14328
+ case 41:
14308
14329
  if (!store.holds(guess, _.ns.space('storage'), pod, guess.doc())) {
14309
- _context.next = 37;
14330
+ _context.next = 44;
14310
14331
  break;
14311
14332
  }
14312
14333
 
14313
14334
  console.warn('Using guessed pod owner webid but it links back.');
14314
14335
  return _context.abrupt("return", guess);
14315
14336
 
14316
- case 37:
14337
+ case 44:
14317
14338
  return _context.abrupt("return", null);
14318
14339
 
14319
- case 38:
14340
+ case 45:
14320
14341
  case "end":
14321
14342
  return _context.stop();
14322
14343
  }
14323
14344
  }
14324
- }, _callee, null, [[0, 4], [13, 17], [26, 30]]);
14345
+ }, _callee, null, [[0, 9], [18, 23], [32, 37]]);
14325
14346
  }));
14326
14347
  return _getPodOwner.apply(this, arguments);
14327
14348
  }
@@ -15167,8 +15188,8 @@ Object.defineProperty(exports, "__esModule", ({
15167
15188
  }));
15168
15189
  exports.versionInfo = void 0;
15169
15190
  var versionInfo = {
15170
- buildTime: '2022-03-31T15:35:44Z',
15171
- commit: '1139b6fe47f5ffb28b7ce042030d53ebe7323c77',
15191
+ buildTime: '2022-04-10T21:05:30Z',
15192
+ commit: 'b23fa0bcbfa4d5869465787adf7d1b8e761fb753',
15172
15193
  npmInfo: {
15173
15194
  'solid-ui': '2.4.21',
15174
15195
  npm: '6.14.16',
@@ -15180,8 +15201,8 @@ var versionInfo = {
15180
15201
  modules: '83',
15181
15202
  napi: '8',
15182
15203
  nghttp2: '1.42.0',
15183
- node: '14.19.0',
15184
- openssl: '1.1.1m',
15204
+ node: '14.19.1',
15205
+ openssl: '1.1.1n',
15185
15206
  tz: '2021a3',
15186
15207
  unicode: '14.0',
15187
15208
  uv: '1.42.0',