solid-logic 3.1.1-ecb4985 → 3.1.1-f7eee1f

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.
Files changed (56) hide show
  1. package/dist/841.solid-logic.js +136 -136
  2. package/dist/841.solid-logic.js.map +1 -1
  3. package/dist/841.solid-logic.min.js +4 -4
  4. package/dist/841.solid-logic.min.js.map +1 -1
  5. package/dist/acl/aclLogic.js +15 -11
  6. package/dist/acl/aclLogic.js.map +1 -1
  7. package/dist/authSession/authSession.js +5 -2
  8. package/dist/authSession/authSession.js.map +1 -1
  9. package/dist/authn/SolidAuthnLogic.js +49 -12
  10. package/dist/authn/SolidAuthnLogic.js.map +1 -1
  11. package/dist/authn/authUtil.js +44 -6
  12. package/dist/authn/authUtil.js.map +1 -1
  13. package/dist/chat/chatLogic.js +17 -14
  14. package/dist/chat/chatLogic.js.map +1 -1
  15. package/dist/inbox/inboxLogic.js +6 -3
  16. package/dist/inbox/inboxLogic.js.map +1 -1
  17. package/dist/index.js +28 -11
  18. package/dist/index.js.map +1 -1
  19. package/dist/issuer/issuerLogic.js +4 -1
  20. package/dist/issuer/issuerLogic.js.map +1 -1
  21. package/dist/logic/CustomError.js +17 -7
  22. package/dist/logic/CustomError.js.map +1 -1
  23. package/dist/logic/solidLogic.js +55 -19
  24. package/dist/logic/solidLogic.js.map +1 -1
  25. package/dist/logic/solidLogicSingleton.js +43 -7
  26. package/dist/logic/solidLogicSingleton.js.map +1 -1
  27. package/dist/profile/profileLogic.js +53 -17
  28. package/dist/profile/profileLogic.js.map +1 -1
  29. package/dist/solid-logic.esm.external.js +11657 -6277
  30. package/dist/solid-logic.esm.external.js.map +1 -1
  31. package/dist/solid-logic.esm.external.min.js +8 -8
  32. package/dist/solid-logic.esm.external.min.js.map +1 -1
  33. package/dist/solid-logic.external.js +11668 -6270
  34. package/dist/solid-logic.external.js.map +1 -1
  35. package/dist/solid-logic.external.min.js +8 -8
  36. package/dist/solid-logic.external.min.js.map +1 -1
  37. package/dist/solid-logic.js +38310 -27614
  38. package/dist/solid-logic.js.map +1 -1
  39. package/dist/solid-logic.min.js +12 -12
  40. package/dist/solid-logic.min.js.map +1 -1
  41. package/dist/typeIndex/typeIndexLogic.js +49 -13
  42. package/dist/typeIndex/typeIndexLogic.js.map +1 -1
  43. package/dist/types.js +2 -1
  44. package/dist/util/containerLogic.js +7 -4
  45. package/dist/util/containerLogic.js.map +1 -1
  46. package/dist/util/debug.js +10 -4
  47. package/dist/util/debug.js.map +1 -1
  48. package/dist/util/ns.js +42 -3
  49. package/dist/util/ns.js.map +1 -1
  50. package/dist/util/utilityLogic.js +51 -15
  51. package/dist/util/utilityLogic.js.map +1 -1
  52. package/dist/util/utils.js +19 -11
  53. package/dist/util/utils.js.map +1 -1
  54. package/dist/versionInfo.js +5 -3
  55. package/dist/versionInfo.js.map +1 -1
  56. package/package.json +9 -10
@@ -411,7 +411,7 @@ api.isRelative = v => types.isString(v);
411
411
  */
412
412
 
413
413
 
414
- const xhrLoader = __webpack_require__(6957);
414
+ const xhrLoader = __webpack_require__(9338);
415
415
 
416
416
  const api = {};
417
417
  module.exports = api;
@@ -5845,7 +5845,7 @@ const {
5845
5845
  XSD_DOUBLE,
5846
5846
  XSD_INTEGER,
5847
5847
  XSD_STRING,
5848
- } = __webpack_require__(9378);
5848
+ } = __webpack_require__(6997);
5849
5849
 
5850
5850
  const api = {};
5851
5851
  module.exports = api;
@@ -9440,8 +9440,8 @@ try {
9440
9440
 
9441
9441
  /***/ }),
9442
9442
 
9443
- /***/ 6957:
9444
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9443
+ /***/ 6997:
9444
+ /***/ ((module) => {
9445
9445
 
9446
9446
  "use strict";
9447
9447
  /*
@@ -9449,119 +9449,34 @@ try {
9449
9449
  */
9450
9450
 
9451
9451
 
9452
- const {parseLinkHeader, buildHeaders} = __webpack_require__(9263);
9453
- const {LINK_HEADER_CONTEXT} = __webpack_require__(9378);
9454
- const JsonLdError = __webpack_require__(2207);
9455
- const RequestQueue = __webpack_require__(3743);
9456
- const {prependBase} = __webpack_require__(470);
9457
-
9458
- const REGEX_LINK_HEADER = /(^|(\r\n))link:/i;
9459
-
9460
- /**
9461
- * Creates a built-in XMLHttpRequest document loader.
9462
- *
9463
- * @param options the options to use:
9464
- * secure: require all URLs to use HTTPS.
9465
- * headers: an object (map) of headers which will be passed as request
9466
- * headers for the requested document. Accept is not allowed.
9467
- * [xhr]: the XMLHttpRequest API to use.
9468
- *
9469
- * @return the XMLHttpRequest document loader.
9470
- */
9471
- module.exports = ({
9472
- secure,
9473
- headers = {},
9474
- xhr
9475
- } = {headers: {}}) => {
9476
- headers = buildHeaders(headers);
9477
- const queue = new RequestQueue();
9478
- return queue.wrapLoader(loader);
9479
-
9480
- async function loader(url) {
9481
- if(url.indexOf('http:') !== 0 && url.indexOf('https:') !== 0) {
9482
- throw new JsonLdError(
9483
- 'URL could not be dereferenced; only "http" and "https" URLs are ' +
9484
- 'supported.',
9485
- 'jsonld.InvalidUrl', {code: 'loading document failed', url});
9486
- }
9487
- if(secure && url.indexOf('https') !== 0) {
9488
- throw new JsonLdError(
9489
- 'URL could not be dereferenced; secure mode is enabled and ' +
9490
- 'the URL\'s scheme is not "https".',
9491
- 'jsonld.InvalidUrl', {code: 'loading document failed', url});
9492
- }
9493
-
9494
- let req;
9495
- try {
9496
- req = await _get(xhr, url, headers);
9497
- } catch(e) {
9498
- throw new JsonLdError(
9499
- 'URL could not be dereferenced, an error occurred.',
9500
- 'jsonld.LoadDocumentError',
9501
- {code: 'loading document failed', url, cause: e});
9502
- }
9503
-
9504
- if(req.status >= 400) {
9505
- throw new JsonLdError(
9506
- 'URL could not be dereferenced: ' + req.statusText,
9507
- 'jsonld.LoadDocumentError', {
9508
- code: 'loading document failed',
9509
- url,
9510
- httpStatusCode: req.status
9511
- });
9512
- }
9452
+ const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
9453
+ const XSD = 'http://www.w3.org/2001/XMLSchema#';
9513
9454
 
9514
- let doc = {contextUrl: null, documentUrl: url, document: req.response};
9515
- let alternate = null;
9455
+ module.exports = {
9456
+ // TODO: Deprecated and will be removed later. Use LINK_HEADER_CONTEXT.
9457
+ LINK_HEADER_REL: 'http://www.w3.org/ns/json-ld#context',
9516
9458
 
9517
- // handle Link Header (avoid unsafe header warning by existence testing)
9518
- const contentType = req.getResponseHeader('Content-Type');
9519
- let linkHeader;
9520
- if(REGEX_LINK_HEADER.test(req.getAllResponseHeaders())) {
9521
- linkHeader = req.getResponseHeader('Link');
9522
- }
9523
- if(linkHeader && contentType !== 'application/ld+json') {
9524
- // only 1 related link header permitted
9525
- const linkHeaders = parseLinkHeader(linkHeader);
9526
- const linkedContext = linkHeaders[LINK_HEADER_CONTEXT];
9527
- if(Array.isArray(linkedContext)) {
9528
- throw new JsonLdError(
9529
- 'URL could not be dereferenced, it has more than one ' +
9530
- 'associated HTTP Link Header.',
9531
- 'jsonld.InvalidUrl',
9532
- {code: 'multiple context link headers', url});
9533
- }
9534
- if(linkedContext) {
9535
- doc.contextUrl = linkedContext.target;
9536
- }
9459
+ LINK_HEADER_CONTEXT: 'http://www.w3.org/ns/json-ld#context',
9537
9460
 
9538
- // "alternate" link header is a redirect
9539
- alternate = linkHeaders.alternate;
9540
- if(alternate &&
9541
- alternate.type == 'application/ld+json' &&
9542
- !(contentType || '').match(/^application\/(\w*\+)?json$/)) {
9543
- doc = await loader(prependBase(url, alternate.target));
9544
- }
9545
- }
9461
+ RDF,
9462
+ RDF_LIST: RDF + 'List',
9463
+ RDF_FIRST: RDF + 'first',
9464
+ RDF_REST: RDF + 'rest',
9465
+ RDF_NIL: RDF + 'nil',
9466
+ RDF_TYPE: RDF + 'type',
9467
+ RDF_PLAIN_LITERAL: RDF + 'PlainLiteral',
9468
+ RDF_XML_LITERAL: RDF + 'XMLLiteral',
9469
+ RDF_JSON_LITERAL: RDF + 'JSON',
9470
+ RDF_OBJECT: RDF + 'object',
9471
+ RDF_LANGSTRING: RDF + 'langString',
9546
9472
 
9547
- return doc;
9548
- }
9473
+ XSD,
9474
+ XSD_BOOLEAN: XSD + 'boolean',
9475
+ XSD_DOUBLE: XSD + 'double',
9476
+ XSD_INTEGER: XSD + 'integer',
9477
+ XSD_STRING: XSD + 'string',
9549
9478
  };
9550
9479
 
9551
- function _get(xhr, url, headers) {
9552
- xhr = xhr || XMLHttpRequest;
9553
- const req = new xhr();
9554
- return new Promise((resolve, reject) => {
9555
- req.onload = () => resolve(req);
9556
- req.onerror = err => reject(err);
9557
- req.open('GET', url, true);
9558
- for(const k in headers) {
9559
- req.setRequestHeader(k, headers[k]);
9560
- }
9561
- req.send();
9562
- });
9563
- }
9564
-
9565
9480
 
9566
9481
  /***/ }),
9567
9482
 
@@ -10862,7 +10777,7 @@ const {
10862
10777
  XSD_DOUBLE,
10863
10778
  XSD_INTEGER,
10864
10779
  XSD_STRING,
10865
- } = __webpack_require__(9378);
10780
+ } = __webpack_require__(6997);
10866
10781
 
10867
10782
  const {
10868
10783
  isAbsolute: _isAbsoluteIri
@@ -11998,8 +11913,8 @@ function _labelBlankNodes(issuer, element) {
11998
11913
 
11999
11914
  /***/ }),
12000
11915
 
12001
- /***/ 9378:
12002
- /***/ ((module) => {
11916
+ /***/ 9338:
11917
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12003
11918
 
12004
11919
  "use strict";
12005
11920
  /*
@@ -12007,34 +11922,119 @@ function _labelBlankNodes(issuer, element) {
12007
11922
  */
12008
11923
 
12009
11924
 
12010
- const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
12011
- const XSD = 'http://www.w3.org/2001/XMLSchema#';
11925
+ const {parseLinkHeader, buildHeaders} = __webpack_require__(9263);
11926
+ const {LINK_HEADER_CONTEXT} = __webpack_require__(6997);
11927
+ const JsonLdError = __webpack_require__(2207);
11928
+ const RequestQueue = __webpack_require__(3743);
11929
+ const {prependBase} = __webpack_require__(470);
12012
11930
 
12013
- module.exports = {
12014
- // TODO: Deprecated and will be removed later. Use LINK_HEADER_CONTEXT.
12015
- LINK_HEADER_REL: 'http://www.w3.org/ns/json-ld#context',
11931
+ const REGEX_LINK_HEADER = /(^|(\r\n))link:/i;
12016
11932
 
12017
- LINK_HEADER_CONTEXT: 'http://www.w3.org/ns/json-ld#context',
11933
+ /**
11934
+ * Creates a built-in XMLHttpRequest document loader.
11935
+ *
11936
+ * @param options the options to use:
11937
+ * secure: require all URLs to use HTTPS.
11938
+ * headers: an object (map) of headers which will be passed as request
11939
+ * headers for the requested document. Accept is not allowed.
11940
+ * [xhr]: the XMLHttpRequest API to use.
11941
+ *
11942
+ * @return the XMLHttpRequest document loader.
11943
+ */
11944
+ module.exports = ({
11945
+ secure,
11946
+ headers = {},
11947
+ xhr
11948
+ } = {headers: {}}) => {
11949
+ headers = buildHeaders(headers);
11950
+ const queue = new RequestQueue();
11951
+ return queue.wrapLoader(loader);
12018
11952
 
12019
- RDF,
12020
- RDF_LIST: RDF + 'List',
12021
- RDF_FIRST: RDF + 'first',
12022
- RDF_REST: RDF + 'rest',
12023
- RDF_NIL: RDF + 'nil',
12024
- RDF_TYPE: RDF + 'type',
12025
- RDF_PLAIN_LITERAL: RDF + 'PlainLiteral',
12026
- RDF_XML_LITERAL: RDF + 'XMLLiteral',
12027
- RDF_JSON_LITERAL: RDF + 'JSON',
12028
- RDF_OBJECT: RDF + 'object',
12029
- RDF_LANGSTRING: RDF + 'langString',
11953
+ async function loader(url) {
11954
+ if(url.indexOf('http:') !== 0 && url.indexOf('https:') !== 0) {
11955
+ throw new JsonLdError(
11956
+ 'URL could not be dereferenced; only "http" and "https" URLs are ' +
11957
+ 'supported.',
11958
+ 'jsonld.InvalidUrl', {code: 'loading document failed', url});
11959
+ }
11960
+ if(secure && url.indexOf('https') !== 0) {
11961
+ throw new JsonLdError(
11962
+ 'URL could not be dereferenced; secure mode is enabled and ' +
11963
+ 'the URL\'s scheme is not "https".',
11964
+ 'jsonld.InvalidUrl', {code: 'loading document failed', url});
11965
+ }
12030
11966
 
12031
- XSD,
12032
- XSD_BOOLEAN: XSD + 'boolean',
12033
- XSD_DOUBLE: XSD + 'double',
12034
- XSD_INTEGER: XSD + 'integer',
12035
- XSD_STRING: XSD + 'string',
11967
+ let req;
11968
+ try {
11969
+ req = await _get(xhr, url, headers);
11970
+ } catch(e) {
11971
+ throw new JsonLdError(
11972
+ 'URL could not be dereferenced, an error occurred.',
11973
+ 'jsonld.LoadDocumentError',
11974
+ {code: 'loading document failed', url, cause: e});
11975
+ }
11976
+
11977
+ if(req.status >= 400) {
11978
+ throw new JsonLdError(
11979
+ 'URL could not be dereferenced: ' + req.statusText,
11980
+ 'jsonld.LoadDocumentError', {
11981
+ code: 'loading document failed',
11982
+ url,
11983
+ httpStatusCode: req.status
11984
+ });
11985
+ }
11986
+
11987
+ let doc = {contextUrl: null, documentUrl: url, document: req.response};
11988
+ let alternate = null;
11989
+
11990
+ // handle Link Header (avoid unsafe header warning by existence testing)
11991
+ const contentType = req.getResponseHeader('Content-Type');
11992
+ let linkHeader;
11993
+ if(REGEX_LINK_HEADER.test(req.getAllResponseHeaders())) {
11994
+ linkHeader = req.getResponseHeader('Link');
11995
+ }
11996
+ if(linkHeader && contentType !== 'application/ld+json') {
11997
+ // only 1 related link header permitted
11998
+ const linkHeaders = parseLinkHeader(linkHeader);
11999
+ const linkedContext = linkHeaders[LINK_HEADER_CONTEXT];
12000
+ if(Array.isArray(linkedContext)) {
12001
+ throw new JsonLdError(
12002
+ 'URL could not be dereferenced, it has more than one ' +
12003
+ 'associated HTTP Link Header.',
12004
+ 'jsonld.InvalidUrl',
12005
+ {code: 'multiple context link headers', url});
12006
+ }
12007
+ if(linkedContext) {
12008
+ doc.contextUrl = linkedContext.target;
12009
+ }
12010
+
12011
+ // "alternate" link header is a redirect
12012
+ alternate = linkHeaders.alternate;
12013
+ if(alternate &&
12014
+ alternate.type == 'application/ld+json' &&
12015
+ !(contentType || '').match(/^application\/(\w*\+)?json$/)) {
12016
+ doc = await loader(prependBase(url, alternate.target));
12017
+ }
12018
+ }
12019
+
12020
+ return doc;
12021
+ }
12036
12022
  };
12037
12023
 
12024
+ function _get(xhr, url, headers) {
12025
+ xhr = xhr || XMLHttpRequest;
12026
+ const req = new xhr();
12027
+ return new Promise((resolve, reject) => {
12028
+ req.onload = () => resolve(req);
12029
+ req.onerror = err => reject(err);
12030
+ req.open('GET', url, true);
12031
+ for(const k in headers) {
12032
+ req.setRequestHeader(k, headers[k]);
12033
+ }
12034
+ req.send();
12035
+ });
12036
+ }
12037
+
12038
12038
 
12039
12039
  /***/ }),
12040
12040