solid-ui 2.4.26-ce13e442 → 2.4.27-00ab6c96
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.html +1 -9
- package/dist/{main.js → solid-ui.js} +242 -162
- package/dist/solid-ui.js.map +1 -0
- package/dist/solid-ui.min.js +3 -0
- package/dist/solid-ui.min.js.LICENSE.txt +117 -0
- package/dist/solid-ui.min.js.map +1 -0
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +30 -24
- package/lib/login/login.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +15 -14
- package/dist/main.js.map +0 -1
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define([], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["solid-ui"] = factory();
|
|
8
|
+
else
|
|
9
|
+
root["solid-ui"] = factory();
|
|
10
|
+
})(self, () => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
2
12
|
/******/ var __webpack_modules__ = ({
|
|
3
13
|
|
|
4
14
|
/***/ "./lib/acl/access-controller.js":
|
|
@@ -7155,11 +7165,13 @@ function renderSignInPopup(dom) {
|
|
|
7155
7165
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
7156
7166
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
7157
7167
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
7158
|
-
var preLoginRedirectHash;
|
|
7168
|
+
var preLoginRedirectHash, locationUrl;
|
|
7159
7169
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
7160
7170
|
while (1) switch (_context.prev = _context.next) {
|
|
7161
7171
|
case 0:
|
|
7162
7172
|
_context.prev = 0;
|
|
7173
|
+
// clear authorization metadata from store
|
|
7174
|
+
_solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
|
|
7163
7175
|
// Save hash
|
|
7164
7176
|
preLoginRedirectHash = new URL(window.location.href).hash;
|
|
7165
7177
|
if (preLoginRedirectHash) {
|
|
@@ -7167,23 +7179,25 @@ function renderSignInPopup(dom) {
|
|
|
7167
7179
|
}
|
|
7168
7180
|
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
7169
7181
|
// Login
|
|
7170
|
-
|
|
7182
|
+
locationUrl = new URL(window.location.href);
|
|
7183
|
+
locationUrl.hash = ''; // remove hash part
|
|
7184
|
+
_context.next = 9;
|
|
7171
7185
|
return _solidLogic.authSession.login({
|
|
7172
|
-
redirectUrl:
|
|
7186
|
+
redirectUrl: locationUrl.href,
|
|
7173
7187
|
oidcIssuer: issuerUri
|
|
7174
7188
|
});
|
|
7175
|
-
case
|
|
7176
|
-
_context.next =
|
|
7189
|
+
case 9:
|
|
7190
|
+
_context.next = 14;
|
|
7177
7191
|
break;
|
|
7178
|
-
case
|
|
7179
|
-
_context.prev =
|
|
7192
|
+
case 11:
|
|
7193
|
+
_context.prev = 11;
|
|
7180
7194
|
_context.t0 = _context["catch"](0);
|
|
7181
7195
|
(0, _log.alert)(_context.t0.message);
|
|
7182
|
-
case
|
|
7196
|
+
case 14:
|
|
7183
7197
|
case "end":
|
|
7184
7198
|
return _context.stop();
|
|
7185
7199
|
}
|
|
7186
|
-
}, _callee, null, [[0,
|
|
7200
|
+
}, _callee, null, [[0, 11]]);
|
|
7187
7201
|
}));
|
|
7188
7202
|
return function loginToIssuer(_x11) {
|
|
7189
7203
|
return _ref.apply(this, arguments);
|
|
@@ -7335,45 +7349,47 @@ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"]
|
|
|
7335
7349
|
case 0:
|
|
7336
7350
|
issuer = window.localStorage.getItem('loginIssuer');
|
|
7337
7351
|
if (!issuer) {
|
|
7338
|
-
_context2.next =
|
|
7352
|
+
_context2.next = 20;
|
|
7339
7353
|
break;
|
|
7340
7354
|
}
|
|
7341
7355
|
_context2.prev = 2;
|
|
7356
|
+
// clear authorization metadata from store
|
|
7357
|
+
_solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
|
|
7342
7358
|
wellKnownUri = new URL(issuer);
|
|
7343
7359
|
wellKnownUri.pathname = '/.well-known/openid-configuration';
|
|
7344
|
-
_context2.next =
|
|
7360
|
+
_context2.next = 8;
|
|
7345
7361
|
return fetch(wellKnownUri.toString());
|
|
7346
|
-
case
|
|
7362
|
+
case 8:
|
|
7347
7363
|
wellKnownResult = _context2.sent;
|
|
7348
7364
|
if (!(wellKnownResult.status === 200)) {
|
|
7349
|
-
_context2.next =
|
|
7365
|
+
_context2.next = 16;
|
|
7350
7366
|
break;
|
|
7351
7367
|
}
|
|
7352
|
-
_context2.next =
|
|
7368
|
+
_context2.next = 12;
|
|
7353
7369
|
return wellKnownResult.json();
|
|
7354
|
-
case
|
|
7370
|
+
case 12:
|
|
7355
7371
|
openidConfiguration = _context2.sent;
|
|
7356
7372
|
if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
|
|
7357
|
-
_context2.next =
|
|
7373
|
+
_context2.next = 16;
|
|
7358
7374
|
break;
|
|
7359
7375
|
}
|
|
7360
|
-
_context2.next =
|
|
7376
|
+
_context2.next = 16;
|
|
7361
7377
|
return fetch(openidConfiguration.end_session_endpoint, {
|
|
7362
7378
|
credentials: 'include'
|
|
7363
7379
|
});
|
|
7364
|
-
case
|
|
7365
|
-
_context2.next =
|
|
7380
|
+
case 16:
|
|
7381
|
+
_context2.next = 20;
|
|
7366
7382
|
break;
|
|
7367
|
-
case
|
|
7368
|
-
_context2.prev =
|
|
7383
|
+
case 18:
|
|
7384
|
+
_context2.prev = 18;
|
|
7369
7385
|
_context2.t0 = _context2["catch"](2);
|
|
7370
|
-
case 19:
|
|
7371
|
-
window.location.reload();
|
|
7372
7386
|
case 20:
|
|
7387
|
+
window.location.reload();
|
|
7388
|
+
case 21:
|
|
7373
7389
|
case "end":
|
|
7374
7390
|
return _context2.stop();
|
|
7375
7391
|
}
|
|
7376
|
-
}, _callee2, null, [[2,
|
|
7392
|
+
}, _callee2, null, [[2, 18]]);
|
|
7377
7393
|
})));
|
|
7378
7394
|
|
|
7379
7395
|
/**
|
|
@@ -13119,10 +13135,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
13119
13135
|
}));
|
|
13120
13136
|
exports.versionInfo = void 0;
|
|
13121
13137
|
var versionInfo = {
|
|
13122
|
-
buildTime: '2023-
|
|
13123
|
-
commit: '
|
|
13138
|
+
buildTime: '2023-04-05T16:11:15Z',
|
|
13139
|
+
commit: '00ab6c9664d4624d74c0fcc5b2655f9109fac1d3',
|
|
13124
13140
|
npmInfo: {
|
|
13125
|
-
'solid-ui': '2.4.
|
|
13141
|
+
'solid-ui': '2.4.27',
|
|
13126
13142
|
npm: '8.19.4',
|
|
13127
13143
|
node: '16.19.1',
|
|
13128
13144
|
v8: '9.4.146.26-node.24',
|
|
@@ -25557,7 +25573,10 @@ function removeOidcQueryParam(redirectUrl) {
|
|
|
25557
25573
|
cleanedUrl.searchParams.delete("code");
|
|
25558
25574
|
cleanedUrl.searchParams.delete("state");
|
|
25559
25575
|
cleanedUrl.hash = "";
|
|
25560
|
-
|
|
25576
|
+
if (redirectUrl.includes(`${cleanedUrl.origin}/`)) {
|
|
25577
|
+
return cleanedUrl.href;
|
|
25578
|
+
}
|
|
25579
|
+
return `${cleanedUrl.origin}${cleanedUrl.href.substring(cleanedUrl.origin.length + 1)}`;
|
|
25561
25580
|
}
|
|
25562
25581
|
async function clearOidcPersistentStorage() {
|
|
25563
25582
|
const client = new _inrupt_oidc_client__WEBPACK_IMPORTED_MODULE_0__.OidcClient({
|
|
@@ -26225,7 +26244,7 @@ class IssuerConfigFetcher {
|
|
|
26225
26244
|
}
|
|
26226
26245
|
async fetchConfig(issuer) {
|
|
26227
26246
|
let issuerConfig;
|
|
26228
|
-
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer).href;
|
|
26247
|
+
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer.endsWith("/") ? issuer : `${issuer}/`).href;
|
|
26229
26248
|
const issuerConfigRequestBody = await window.fetch(openIdConfigUrl);
|
|
26230
26249
|
try {
|
|
26231
26250
|
issuerConfig = processConfig(await issuerConfigRequestBody.json());
|
|
@@ -26402,12 +26421,6 @@ class AuthCodeRedirectHandler {
|
|
|
26402
26421
|
webId: tokens.webId,
|
|
26403
26422
|
isLoggedIn: "true",
|
|
26404
26423
|
}, { secure: true });
|
|
26405
|
-
url.searchParams.delete("code");
|
|
26406
|
-
await this.storageUtility.setForUser(storedSessionId, {
|
|
26407
|
-
redirectUrl: url.toString(),
|
|
26408
|
-
}, {
|
|
26409
|
-
secure: false,
|
|
26410
|
-
});
|
|
26411
26424
|
const sessionInfo = await this.sessionInfoManager.get(storedSessionId);
|
|
26412
26425
|
if (!sessionInfo) {
|
|
26413
26426
|
throw new Error(`Could not retrieve session: [${storedSessionId}].`);
|
|
@@ -52249,7 +52262,6 @@ var BlankNode = /*#__PURE__*/function (_Node) {
|
|
|
52249
52262
|
function getId(id) {
|
|
52250
52263
|
if (id) {
|
|
52251
52264
|
if (typeof id !== 'string') {
|
|
52252
|
-
console.log('Bad blank id:', id);
|
|
52253
52265
|
throw new Error('Bad id argument to new blank node: ' + id);
|
|
52254
52266
|
}
|
|
52255
52267
|
if (id.includes('#')) {
|
|
@@ -53596,7 +53608,9 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
53596
53608
|
if (!this._fetch) {
|
|
53597
53609
|
throw new Error('No _fetch function available for Fetcher');
|
|
53598
53610
|
}
|
|
53599
|
-
|
|
53611
|
+
// This is the name of the graph we store all the HTTP metadata in
|
|
53612
|
+
this.appNode = this.store.sym('chrome://TheCurrentSession');
|
|
53613
|
+
// this.appNode = this.store.rdfFactory.blankNode() // Needs to have a URI in tests
|
|
53600
53614
|
this.store.fetcher = this; // Bi-linked
|
|
53601
53615
|
this.requested = {};
|
|
53602
53616
|
this.timeouts = {};
|
|
@@ -53876,7 +53890,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
53876
53890
|
size: 0,
|
|
53877
53891
|
timeout: 0
|
|
53878
53892
|
};
|
|
53879
|
-
console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
53893
|
+
// console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
53880
53894
|
return _this5.handleError(dummyResponse, docuri, options); // possible credentials retry
|
|
53881
53895
|
// return this.failFetch(options, 'fetch failed: ' + error, 999, dummyResponse) // Fake status code: fetch exception
|
|
53882
53896
|
|
|
@@ -53937,25 +53951,21 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
53937
53951
|
if (fetchResponse.ok) {
|
|
53938
53952
|
userCallback(true, 'OK', fetchResponse);
|
|
53939
53953
|
} else {
|
|
53940
|
-
// console.log('@@@ fetcher.js Should not take this path !!!!!!!!!!!!')
|
|
53941
53954
|
var oops = 'HTTP error: Status ' + fetchResponse.status + ' (' + fetchResponse.statusText + ')';
|
|
53942
53955
|
if (fetchResponse.responseText) {
|
|
53943
53956
|
oops += ' ' + fetchResponse.responseText; // not in 404, dns error, nock failure
|
|
53944
53957
|
}
|
|
53945
53958
|
|
|
53946
|
-
console.log(oops + ' fetching ' + uri);
|
|
53947
53959
|
userCallback(false, oops, fetchResponse);
|
|
53948
53960
|
}
|
|
53949
53961
|
} else {
|
|
53950
53962
|
var _oops = '@@ nowOrWhenFetched: no response object!';
|
|
53951
|
-
console.log(_oops);
|
|
53952
53963
|
userCallback(false, _oops);
|
|
53953
53964
|
}
|
|
53954
53965
|
}
|
|
53955
53966
|
}, function (err) {
|
|
53956
53967
|
var message = err.message || err.statusText;
|
|
53957
53968
|
message = 'Failed to load <' + uri + '> ' + message;
|
|
53958
|
-
console.log(message);
|
|
53959
53969
|
if (err.response && err.response.status) {
|
|
53960
53970
|
message += ' status: ' + err.response.status;
|
|
53961
53971
|
}
|
|
@@ -54194,45 +54204,42 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54194
54204
|
return fetcher.load(doc);
|
|
54195
54205
|
case 6:
|
|
54196
54206
|
response = _context2.sent;
|
|
54197
|
-
_context2.next =
|
|
54207
|
+
_context2.next = 26;
|
|
54198
54208
|
break;
|
|
54199
54209
|
case 9:
|
|
54200
54210
|
_context2.prev = 9;
|
|
54201
54211
|
_context2.t0 = _context2["catch"](3);
|
|
54202
54212
|
if (!(_context2.t0.response.status === 404)) {
|
|
54203
|
-
_context2.next =
|
|
54213
|
+
_context2.next = 25;
|
|
54204
54214
|
break;
|
|
54205
54215
|
}
|
|
54206
|
-
|
|
54207
|
-
_context2.
|
|
54208
|
-
_context2.next = 16;
|
|
54216
|
+
_context2.prev = 12;
|
|
54217
|
+
_context2.next = 15;
|
|
54209
54218
|
return fetcher.webOperation('PUT', doc.value, {
|
|
54210
54219
|
data: data,
|
|
54211
54220
|
contentType: contentType
|
|
54212
54221
|
});
|
|
54213
|
-
case
|
|
54222
|
+
case 15:
|
|
54214
54223
|
response = _context2.sent;
|
|
54215
|
-
_context2.next =
|
|
54224
|
+
_context2.next = 21;
|
|
54216
54225
|
break;
|
|
54217
|
-
case
|
|
54218
|
-
_context2.prev =
|
|
54219
|
-
_context2.t1 = _context2["catch"](
|
|
54220
|
-
console.log('createIfNotExists doc FAILED: ' + doc + ': ' + _context2.t1);
|
|
54226
|
+
case 18:
|
|
54227
|
+
_context2.prev = 18;
|
|
54228
|
+
_context2.t1 = _context2["catch"](12);
|
|
54221
54229
|
throw _context2.t1;
|
|
54222
|
-
case
|
|
54230
|
+
case 21:
|
|
54223
54231
|
delete fetcher.requested[doc.value]; // delete cached 404 error
|
|
54224
54232
|
// console.log('createIfNotExists doc created ok ' + doc)
|
|
54225
54233
|
return _context2.abrupt("return", response);
|
|
54226
|
-
case
|
|
54227
|
-
console.log('createIfNotExists doc load error NOT 404: ' + doc + ': ' + _context2.t0);
|
|
54234
|
+
case 25:
|
|
54228
54235
|
throw _context2.t0;
|
|
54229
|
-
case
|
|
54236
|
+
case 26:
|
|
54230
54237
|
return _context2.abrupt("return", response);
|
|
54231
|
-
case
|
|
54238
|
+
case 27:
|
|
54232
54239
|
case "end":
|
|
54233
54240
|
return _context2.stop();
|
|
54234
54241
|
}
|
|
54235
|
-
}, _callee2, this, [[3, 9], [
|
|
54242
|
+
}, _callee2, this, [[3, 9], [12, 18]]);
|
|
54236
54243
|
}));
|
|
54237
54244
|
function createIfNotExists(_x4) {
|
|
54238
54245
|
return _createIfNotExists.apply(this, arguments);
|
|
@@ -54435,17 +54442,19 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54435
54442
|
var _this10 = this;
|
|
54436
54443
|
var kb = this.store;
|
|
54437
54444
|
var responseNode = kb.bnode();
|
|
54438
|
-
kb.add(options.req, this.ns.link('response'), responseNode,
|
|
54439
|
-
kb.add(responseNode, this.ns.http('status'), kb.rdfFactory.literal(response.status),
|
|
54440
|
-
kb.add(responseNode, this.ns.http('statusText'), kb.rdfFactory.literal(response.statusText),
|
|
54445
|
+
kb.add(options.req, this.ns.link('response'), responseNode, this.appNode);
|
|
54446
|
+
kb.add(responseNode, this.ns.http('status'), kb.rdfFactory.literal(response.status), this.appNode);
|
|
54447
|
+
kb.add(responseNode, this.ns.http('statusText'), kb.rdfFactory.literal(response.statusText), this.appNode);
|
|
54441
54448
|
|
|
54442
54449
|
// Save the response headers
|
|
54443
54450
|
response.headers.forEach(function (value, header) {
|
|
54444
|
-
kb.add(responseNode, _this10.ns.httph(header), _this10.store.rdfFactory.literal(value),
|
|
54451
|
+
kb.add(responseNode, _this10.ns.httph(header), _this10.store.rdfFactory.literal(value), _this10.appNode);
|
|
54445
54452
|
if (header === 'content-type') {
|
|
54446
|
-
kb.add(options.resource, _this10.ns.rdf('type'), kb.rdfFactory.namedNode(_utils_js__WEBPACK_IMPORTED_MODULE_11__.mediaTypeClass(value).value), responseNode
|
|
54453
|
+
kb.add(options.resource, _this10.ns.rdf('type'), kb.rdfFactory.namedNode(_utils_js__WEBPACK_IMPORTED_MODULE_11__.mediaTypeClass(value).value), _this10.appNode // responseNode
|
|
54454
|
+
);
|
|
54447
54455
|
}
|
|
54448
54456
|
});
|
|
54457
|
+
|
|
54449
54458
|
return responseNode;
|
|
54450
54459
|
}
|
|
54451
54460
|
}, {
|
|
@@ -54541,7 +54550,8 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54541
54550
|
}, {
|
|
54542
54551
|
key: "retryNoCredentials",
|
|
54543
54552
|
value: function retryNoCredentials(docuri, options) {
|
|
54544
|
-
console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
54553
|
+
// console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
54554
|
+
|
|
54545
54555
|
options.retriedWithNoCredentials = true; // protect against being called twice
|
|
54546
54556
|
|
|
54547
54557
|
delete this.requested[docuri]; // forget the original request happened
|
|
@@ -54586,7 +54596,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54586
54596
|
// Now attempt retry via proxy
|
|
54587
54597
|
var proxyUri = Fetcher.crossSiteProxy(docuri);
|
|
54588
54598
|
if (proxyUri && !options.proxyUsed) {
|
|
54589
|
-
console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
54599
|
+
// console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
54590
54600
|
return this.redirectToProxy(proxyUri, options);
|
|
54591
54601
|
}
|
|
54592
54602
|
}
|
|
@@ -54659,7 +54669,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54659
54669
|
|
|
54660
54670
|
// Check for masked errors (CORS, etc)
|
|
54661
54671
|
if (response.status === 0) {
|
|
54662
|
-
console.log('Masked error - status 0 for ' + docuri)
|
|
54672
|
+
// console.log('Masked error - status 0 for ' + docuri)
|
|
54663
54673
|
return this.handleError(response, docuri, options);
|
|
54664
54674
|
}
|
|
54665
54675
|
if (response.status >= 400) {
|
|
@@ -55546,7 +55556,6 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
55546
55556
|
while (todo.length) {
|
|
55547
55557
|
follow(todo.shift());
|
|
55548
55558
|
}
|
|
55549
|
-
// console.log('' + result.length + ' statements about ' + subject)
|
|
55550
55559
|
return result;
|
|
55551
55560
|
}
|
|
55552
55561
|
|
|
@@ -55703,10 +55712,10 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
55703
55712
|
var statementsCopy = this.statements.map(function (ea) {
|
|
55704
55713
|
return ea.substitute(bindings);
|
|
55705
55714
|
});
|
|
55706
|
-
console.log('Formula subs statmnts:' + statementsCopy)
|
|
55715
|
+
// console.log('Formula subs statmnts:' + statementsCopy)
|
|
55707
55716
|
var y = new Formula();
|
|
55708
55717
|
y.addAll(statementsCopy);
|
|
55709
|
-
console.log('indexed-form subs formula:' + y)
|
|
55718
|
+
// console.log('indexed-form subs formula:' + y)
|
|
55710
55719
|
return y;
|
|
55711
55720
|
}
|
|
55712
55721
|
}, {
|
|
@@ -58518,7 +58527,6 @@ var Node = /*#__PURE__*/function () {
|
|
|
58518
58527
|
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Node, [{
|
|
58519
58528
|
key: "substitute",
|
|
58520
58529
|
value: function substitute(bindings) {
|
|
58521
|
-
console.log('@@@ node substitute' + this);
|
|
58522
58530
|
return this;
|
|
58523
58531
|
}
|
|
58524
58532
|
|
|
@@ -62929,7 +62937,7 @@ var Statement = /*#__PURE__*/function () {
|
|
|
62929
62937
|
key: "substitute",
|
|
62930
62938
|
value: function substitute(bindings) {
|
|
62931
62939
|
var y = new Statement(this.subject.substitute(bindings), this.predicate.substitute(bindings), this.object.substitute(bindings), (0,_default_graph__WEBPACK_IMPORTED_MODULE_3__.isDefaultGraph)(this.graph) ? this.graph : this.graph.substitute(bindings)); // 2016
|
|
62932
|
-
console.log('@@@ statement substitute:' + y)
|
|
62940
|
+
// console.log('@@@ statement substitute:' + y)
|
|
62933
62941
|
return y;
|
|
62934
62942
|
}
|
|
62935
62943
|
|
|
@@ -64245,17 +64253,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64245
64253
|
/* harmony export */ "default": () => (/* binding */ UpdateManager)
|
|
64246
64254
|
/* harmony export */ });
|
|
64247
64255
|
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
64248
|
-
/* harmony import */ var
|
|
64249
|
-
/* harmony import */ var
|
|
64250
|
-
/* harmony import */ var
|
|
64251
|
-
/* harmony import */ var
|
|
64252
|
-
/* harmony import */ var
|
|
64253
|
-
/* harmony import */ var
|
|
64254
|
-
/* harmony import */ var
|
|
64255
|
-
/* harmony import */ var
|
|
64256
|
-
/* harmony import */ var
|
|
64257
|
-
/* harmony import */ var
|
|
64258
|
-
/* harmony import */ var
|
|
64256
|
+
/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
|
|
64257
|
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
64258
|
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
64259
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
64260
|
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
|
|
64261
|
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);
|
|
64262
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./store */ "./node_modules/rdflib/esm/store.js");
|
|
64263
|
+
/* harmony import */ var _uri__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./uri */ "./node_modules/rdflib/esm/uri.js");
|
|
64264
|
+
/* harmony import */ var _fetcher__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fetcher */ "./node_modules/rdflib/esm/fetcher.js");
|
|
64265
|
+
/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./namespace */ "./node_modules/rdflib/esm/namespace.js");
|
|
64266
|
+
/* harmony import */ var _serializer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./serializer */ "./node_modules/rdflib/esm/serializer.js");
|
|
64267
|
+
/* harmony import */ var _utils_terms__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/terms */ "./node_modules/rdflib/esm/utils/terms.js");
|
|
64268
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils-js */ "./node_modules/rdflib/esm/utils-js.js");
|
|
64269
|
+
/* harmony import */ var _utils_termValue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/termValue */ "./node_modules/rdflib/esm/utils/termValue.js");
|
|
64270
|
+
|
|
64271
|
+
|
|
64259
64272
|
|
|
64260
64273
|
|
|
64261
64274
|
|
|
@@ -64292,35 +64305,35 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64292
64305
|
* @param store - The quadstore to store data and metadata. Created if not passed.
|
|
64293
64306
|
*/
|
|
64294
64307
|
function UpdateManager(store) {
|
|
64295
|
-
(0,
|
|
64296
|
-
(0,
|
|
64297
|
-
(0,
|
|
64298
|
-
(0,
|
|
64299
|
-
(0,
|
|
64300
|
-
(0,
|
|
64301
|
-
store = store || new
|
|
64308
|
+
(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, UpdateManager);
|
|
64309
|
+
(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "store", void 0);
|
|
64310
|
+
(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "ifps", void 0);
|
|
64311
|
+
(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "fps", void 0);
|
|
64312
|
+
(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "patchControl", void 0);
|
|
64313
|
+
(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "ns", void 0);
|
|
64314
|
+
store = store || new _store__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
64302
64315
|
if (store.updater) {
|
|
64303
64316
|
throw new Error("You can't have two UpdateManagers for the same store");
|
|
64304
64317
|
}
|
|
64305
64318
|
if (!store.fetcher) {
|
|
64306
|
-
store.fetcher = new
|
|
64319
|
+
store.fetcher = new _fetcher__WEBPACK_IMPORTED_MODULE_7__["default"](store);
|
|
64307
64320
|
}
|
|
64308
64321
|
this.store = store;
|
|
64309
64322
|
store.updater = this;
|
|
64310
64323
|
this.ifps = {};
|
|
64311
64324
|
this.fps = {};
|
|
64312
64325
|
this.ns = {};
|
|
64313
|
-
this.ns.link = (0,
|
|
64314
|
-
this.ns.http = (0,
|
|
64315
|
-
this.ns.httph = (0,
|
|
64316
|
-
this.ns.ldp = (0,
|
|
64317
|
-
this.ns.rdf = (0,
|
|
64318
|
-
this.ns.rdfs = (0,
|
|
64319
|
-
this.ns.rdf = (0,
|
|
64320
|
-
this.ns.owl = (0,
|
|
64326
|
+
this.ns.link = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/2007/ont/link#');
|
|
64327
|
+
this.ns.http = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/2007/ont/http#');
|
|
64328
|
+
this.ns.httph = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/2007/ont/httph#');
|
|
64329
|
+
this.ns.ldp = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/ns/ldp#');
|
|
64330
|
+
this.ns.rdf = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/1999/02/22-rdf-syntax-ns#');
|
|
64331
|
+
this.ns.rdfs = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/2000/01/rdf-schema#');
|
|
64332
|
+
this.ns.rdf = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/1999/02/22-rdf-syntax-ns#');
|
|
64333
|
+
this.ns.owl = (0,_namespace__WEBPACK_IMPORTED_MODULE_8__["default"])('http://www.w3.org/2002/07/owl#');
|
|
64321
64334
|
this.patchControl = [];
|
|
64322
64335
|
}
|
|
64323
|
-
(0,
|
|
64336
|
+
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(UpdateManager, [{
|
|
64324
64337
|
key: "patchControlFor",
|
|
64325
64338
|
value: function patchControlFor(doc) {
|
|
64326
64339
|
if (!this.patchControl[doc.value]) {
|
|
@@ -64334,13 +64347,87 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64334
64347
|
return uri.slice(0, 4) === 'http';
|
|
64335
64348
|
}
|
|
64336
64349
|
|
|
64350
|
+
/** Remove from the store HTTP authorization metadata
|
|
64351
|
+
* The editble function below relies on copies we have in the store
|
|
64352
|
+
* of the results of previous HTTP transactions. Howver, when
|
|
64353
|
+
* the user logs in, then that data misrepresents what would happen
|
|
64354
|
+
* if the user tried again.
|
|
64355
|
+
*/
|
|
64356
|
+
}, {
|
|
64357
|
+
key: "flagAuthorizationMetadata",
|
|
64358
|
+
value: function flagAuthorizationMetadata() {
|
|
64359
|
+
var kb = this.store;
|
|
64360
|
+
var meta = kb.fetcher.appNode;
|
|
64361
|
+
var requests = kb.statementsMatching(undefined, this.ns.link('requestedURI'), undefined, meta).map(function (st) {
|
|
64362
|
+
return st.subject;
|
|
64363
|
+
});
|
|
64364
|
+
var _iterator = _createForOfIteratorHelper(requests),
|
|
64365
|
+
_step;
|
|
64366
|
+
try {
|
|
64367
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
64368
|
+
var request = _step.value;
|
|
64369
|
+
var _response = kb.any(request, this.ns.link('response'), null, meta);
|
|
64370
|
+
if (_response !== undefined) {
|
|
64371
|
+
// ts
|
|
64372
|
+
this.store.add(_response, this.ns.link('outOfDate'), true, meta); // @@ Boolean is fine - fix types
|
|
64373
|
+
}
|
|
64374
|
+
}
|
|
64375
|
+
} catch (err) {
|
|
64376
|
+
_iterator.e(err);
|
|
64377
|
+
} finally {
|
|
64378
|
+
_iterator.f();
|
|
64379
|
+
}
|
|
64380
|
+
}
|
|
64381
|
+
|
|
64382
|
+
/**
|
|
64383
|
+
* Tests whether a file is editable.
|
|
64384
|
+
* If the file has a specific annotation that it is machine written,
|
|
64385
|
+
* for safety, it is editable (this doesn't actually check for write access)
|
|
64386
|
+
* If the file has wac-allow and accept patch headers, those are respected.
|
|
64387
|
+
* and local write access is determined by those headers.
|
|
64388
|
+
* This async version not only looks at past HTTP requests, it also makes new ones if necessary.
|
|
64389
|
+
*
|
|
64390
|
+
* @returns The method string SPARQL or DAV or
|
|
64391
|
+
* LOCALFILE or false if known, undefined if not known.
|
|
64392
|
+
*/
|
|
64393
|
+
}, {
|
|
64394
|
+
key: "checkEditable",
|
|
64395
|
+
value: function () {
|
|
64396
|
+
var _checkEditable = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee(uri, kb) {
|
|
64397
|
+
var initial, final;
|
|
64398
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee$(_context) {
|
|
64399
|
+
while (1) switch (_context.prev = _context.next) {
|
|
64400
|
+
case 0:
|
|
64401
|
+
initial = this.editable(uri, kb);
|
|
64402
|
+
if (!(initial !== undefined)) {
|
|
64403
|
+
_context.next = 3;
|
|
64404
|
+
break;
|
|
64405
|
+
}
|
|
64406
|
+
return _context.abrupt("return", initial);
|
|
64407
|
+
case 3:
|
|
64408
|
+
_context.next = 5;
|
|
64409
|
+
return this.store.fetcher.load(uri);
|
|
64410
|
+
case 5:
|
|
64411
|
+
final = this.editable(uri, kb); // console.log(`Loaded ${uri} just to check editable, result: ${final}.`)
|
|
64412
|
+
return _context.abrupt("return", final);
|
|
64413
|
+
case 7:
|
|
64414
|
+
case "end":
|
|
64415
|
+
return _context.stop();
|
|
64416
|
+
}
|
|
64417
|
+
}, _callee, this);
|
|
64418
|
+
}));
|
|
64419
|
+
function checkEditable(_x, _x2) {
|
|
64420
|
+
return _checkEditable.apply(this, arguments);
|
|
64421
|
+
}
|
|
64422
|
+
return checkEditable;
|
|
64423
|
+
}()
|
|
64337
64424
|
/**
|
|
64338
64425
|
* Tests whether a file is editable.
|
|
64339
64426
|
* If the file has a specific annotation that it is machine written,
|
|
64340
64427
|
* for safety, it is editable (this doesn't actually check for write access)
|
|
64341
64428
|
* If the file has wac-allow and accept patch headers, those are respected.
|
|
64342
64429
|
* and local write access is determined by those headers.
|
|
64343
|
-
* This version only looks at past HTTP requests, does not make new ones.
|
|
64430
|
+
* This synchronous version only looks at past HTTP requests, does not make new ones.
|
|
64344
64431
|
*
|
|
64345
64432
|
* @returns The method string SPARQL or DAV or
|
|
64346
64433
|
* LOCALFILE or false if known, undefined if not known.
|
|
@@ -64355,29 +64442,36 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64355
64442
|
if (!kb) {
|
|
64356
64443
|
kb = this.store;
|
|
64357
64444
|
}
|
|
64358
|
-
uri = (0,
|
|
64445
|
+
uri = (0,_utils_termValue__WEBPACK_IMPORTED_MODULE_9__.termValue)(uri);
|
|
64359
64446
|
if (!this.isHttpUri(uri)) {
|
|
64360
|
-
if (
|
|
64447
|
+
if (this.store.holds(this.store.rdfFactory.namedNode(uri), this.store.rdfFactory.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), this.store.rdfFactory.namedNode('http://www.w3.org/2007/ont/link#MachineEditableDocument'))) {
|
|
64361
64448
|
return 'LOCALFILE';
|
|
64362
64449
|
}
|
|
64363
64450
|
}
|
|
64364
64451
|
var request;
|
|
64365
64452
|
var definitive = false;
|
|
64453
|
+
var meta = this.store.fetcher.appNode;
|
|
64454
|
+
// const kb = s
|
|
64455
|
+
|
|
64366
64456
|
// @ts-ignore passes a string to kb.each, which expects a term. Should this work?
|
|
64367
|
-
var requests = kb.each(undefined, this.ns.link('requestedURI'), (0,
|
|
64457
|
+
var requests = kb.each(undefined, this.ns.link('requestedURI'), (0,_uri__WEBPACK_IMPORTED_MODULE_10__.docpart)(uri), meta);
|
|
64368
64458
|
var method;
|
|
64369
64459
|
for (var r = 0; r < requests.length; r++) {
|
|
64370
64460
|
request = requests[r];
|
|
64371
64461
|
if (request !== undefined) {
|
|
64372
|
-
var
|
|
64373
|
-
if (
|
|
64374
|
-
|
|
64462
|
+
var _response2 = kb.any(request, this.ns.link('response'), null, meta);
|
|
64463
|
+
if (_response2 !== undefined) {
|
|
64464
|
+
// ts
|
|
64465
|
+
|
|
64466
|
+
var outOfDate = kb.anyJS(_response2, this.ns.link('outOfDate'), null, meta);
|
|
64467
|
+
if (outOfDate) continue;
|
|
64468
|
+
var wacAllow = kb.anyValue(_response2, this.ns.httph('wac-allow'));
|
|
64375
64469
|
if (wacAllow) {
|
|
64376
|
-
var
|
|
64377
|
-
|
|
64470
|
+
var _iterator2 = _createForOfIteratorHelper(wacAllow.split(',')),
|
|
64471
|
+
_step2;
|
|
64378
64472
|
try {
|
|
64379
|
-
for (
|
|
64380
|
-
var bit =
|
|
64473
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
64474
|
+
var bit = _step2.value;
|
|
64381
64475
|
var lr = bit.split('=');
|
|
64382
64476
|
if (lr[0].includes('user') && !lr[1].includes('write') && !lr[1].includes('append')) {
|
|
64383
64477
|
// console.log(' editable? excluded by WAC-Allow: ', wacAllow)
|
|
@@ -64385,12 +64479,12 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64385
64479
|
}
|
|
64386
64480
|
}
|
|
64387
64481
|
} catch (err) {
|
|
64388
|
-
|
|
64482
|
+
_iterator2.e(err);
|
|
64389
64483
|
} finally {
|
|
64390
|
-
|
|
64484
|
+
_iterator2.f();
|
|
64391
64485
|
}
|
|
64392
64486
|
}
|
|
64393
|
-
var acceptPatch = kb.each(
|
|
64487
|
+
var acceptPatch = kb.each(_response2, this.ns.httph('accept-patch'));
|
|
64394
64488
|
if (acceptPatch.length) {
|
|
64395
64489
|
for (var i = 0; i < acceptPatch.length; i++) {
|
|
64396
64490
|
method = acceptPatch[i].value.trim();
|
|
@@ -64398,7 +64492,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64398
64492
|
if (method.indexOf('application/sparql-update-single-match') >= 0) return 'SPARQL';
|
|
64399
64493
|
}
|
|
64400
64494
|
}
|
|
64401
|
-
var authorVia = kb.each(
|
|
64495
|
+
var authorVia = kb.each(_response2, this.ns.httph('ms-author-via'));
|
|
64402
64496
|
if (authorVia.length) {
|
|
64403
64497
|
for (var _i = 0; _i < authorVia.length; _i++) {
|
|
64404
64498
|
method = authorVia[_i].value.trim();
|
|
@@ -64413,7 +64507,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64413
64507
|
if (!this.isHttpUri(uri)) {
|
|
64414
64508
|
if (!wacAllow) return false;else return 'LOCALFILE';
|
|
64415
64509
|
}
|
|
64416
|
-
var status = kb.each(
|
|
64510
|
+
var status = kb.each(_response2, this.ns.http('status'));
|
|
64417
64511
|
if (status.length) {
|
|
64418
64512
|
for (var _i2 = 0; _i2 < status.length; _i2++) {
|
|
64419
64513
|
// @ts-ignore since statuses should be TFTerms, this should always be false
|
|
@@ -64462,7 +64556,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64462
64556
|
key: "statementBnodes",
|
|
64463
64557
|
value: function statementBnodes(st) {
|
|
64464
64558
|
return [st.subject, st.predicate, st.object].filter(function (x) {
|
|
64465
|
-
return (0,
|
|
64559
|
+
return (0,_utils_terms__WEBPACK_IMPORTED_MODULE_11__.isBlankNode)(x);
|
|
64466
64560
|
});
|
|
64467
64561
|
}
|
|
64468
64562
|
|
|
@@ -64857,7 +64951,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64857
64951
|
// console.log('Server does not support live updates through Updates-Via :-(')
|
|
64858
64952
|
return false;
|
|
64859
64953
|
}
|
|
64860
|
-
wssURI = (0,
|
|
64954
|
+
wssURI = (0,_uri__WEBPACK_IMPORTED_MODULE_10__.join)(wssURI, doc.value);
|
|
64861
64955
|
var validWssURI = wssURI.replace(/^http:/, 'ws:').replace(/^https:/, 'wss:');
|
|
64862
64956
|
// console.log('Web socket URI ' + wssURI)
|
|
64863
64957
|
|
|
@@ -64997,8 +65091,8 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
64997
65091
|
|
|
64998
65092
|
try {
|
|
64999
65093
|
var kb = this.store;
|
|
65000
|
-
var ds = !deletions ? [] : (0,
|
|
65001
|
-
var is = !insertions ? [] : (0,
|
|
65094
|
+
var ds = !deletions ? [] : (0,_utils_terms__WEBPACK_IMPORTED_MODULE_11__.isStore)(deletions) ? deletions.statements : deletions instanceof Array ? deletions : [deletions];
|
|
65095
|
+
var is = !insertions ? [] : (0,_utils_terms__WEBPACK_IMPORTED_MODULE_11__.isStore)(insertions) ? insertions.statements : insertions instanceof Array ? insertions : [insertions];
|
|
65002
65096
|
if (!(ds instanceof Array)) {
|
|
65003
65097
|
throw new Error('Type Error ' + (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(ds) + ': ' + ds);
|
|
65004
65098
|
}
|
|
@@ -65155,7 +65249,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65155
65249
|
}
|
|
65156
65250
|
}
|
|
65157
65251
|
} catch (e) {
|
|
65158
|
-
callback(undefined, false, 'Exception in update: ' + e + '\n' +
|
|
65252
|
+
callback(undefined, false, 'Exception in update: ' + e + '\n' + _utils_js__WEBPACK_IMPORTED_MODULE_12__.stackString(e));
|
|
65159
65253
|
}
|
|
65160
65254
|
}
|
|
65161
65255
|
}, {
|
|
@@ -65178,7 +65272,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65178
65272
|
// prepare contents of revised document
|
|
65179
65273
|
var newSts = kb.statementsMatching(undefined, undefined, undefined, doc).slice(); // copy!
|
|
65180
65274
|
for (var i = 0; i < ds.length; i++) {
|
|
65181
|
-
|
|
65275
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_12__.RDFArrayRemove(newSts, ds[i]);
|
|
65182
65276
|
}
|
|
65183
65277
|
for (var _i9 = 0; _i9 < is.length; _i9++) {
|
|
65184
65278
|
newSts.push(is[_i9]);
|
|
@@ -65189,7 +65283,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65189
65283
|
var candidateTarget = kb.the(response, this.ns.httph('content-location'));
|
|
65190
65284
|
var targetURI;
|
|
65191
65285
|
if (candidateTarget) {
|
|
65192
|
-
targetURI = (0,
|
|
65286
|
+
targetURI = (0,_uri__WEBPACK_IMPORTED_MODULE_10__.join)(candidateTarget.value, targetURI);
|
|
65193
65287
|
}
|
|
65194
65288
|
options.contentType = contentType;
|
|
65195
65289
|
options.noMeta = true;
|
|
@@ -65230,7 +65324,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65230
65324
|
var newSts = kb.statementsMatching(undefined, undefined, undefined, doc).slice(); // copy!
|
|
65231
65325
|
|
|
65232
65326
|
for (var i = 0; i < ds.length; i++) {
|
|
65233
|
-
|
|
65327
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_12__.RDFArrayRemove(newSts, ds[i]);
|
|
65234
65328
|
}
|
|
65235
65329
|
for (var _i12 = 0; _i12 < is.length; _i12++) {
|
|
65236
65330
|
newSts.push(is[_i12]);
|
|
@@ -65241,7 +65335,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65241
65335
|
throw new Error('Rewriting file: No filename extension: ' + doc.value);
|
|
65242
65336
|
}
|
|
65243
65337
|
var ext = doc.value.slice(dot + 1);
|
|
65244
|
-
var contentType =
|
|
65338
|
+
var contentType = _fetcher__WEBPACK_IMPORTED_MODULE_7__["default"].CONTENT_TYPE_BY_EXT[ext];
|
|
65245
65339
|
if (!contentType) {
|
|
65246
65340
|
throw new Error('File extension .' + ext + ' not supported for data write');
|
|
65247
65341
|
}
|
|
@@ -65274,7 +65368,7 @@ var UpdateManager = /*#__PURE__*/function () {
|
|
|
65274
65368
|
}
|
|
65275
65369
|
|
|
65276
65370
|
// serialize to the appropriate format
|
|
65277
|
-
var sz = (0,
|
|
65371
|
+
var sz = (0,_serializer__WEBPACK_IMPORTED_MODULE_13__["default"])(kb);
|
|
65278
65372
|
sz.suggestNamespaces(kb.namespaces);
|
|
65279
65373
|
sz.setBase(uri);
|
|
65280
65374
|
switch (contentType) {
|
|
@@ -67054,7 +67148,7 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
67054
67148
|
*/
|
|
67055
67149
|
SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
|
|
67056
67150
|
return __awaiter(this, void 0, void 0, function () {
|
|
67057
|
-
var preLoginRedirectHash, postLoginRedirectHash, curUrl, me, webId;
|
|
67151
|
+
var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
|
|
67058
67152
|
return __generator(this, function (_a) {
|
|
67059
67153
|
switch (_a.label) {
|
|
67060
67154
|
case 0:
|
|
@@ -67066,20 +67160,16 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
67066
67160
|
if (document.location.toString() !== url)
|
|
67067
67161
|
history.replaceState(null, '', url);
|
|
67068
67162
|
});
|
|
67069
|
-
|
|
67070
|
-
|
|
67071
|
-
*/
|
|
67163
|
+
redirectUrl = new URL(window.location.href);
|
|
67164
|
+
redirectUrl.hash = '';
|
|
67072
67165
|
return [4 /*yield*/, this.session
|
|
67073
67166
|
.handleIncomingRedirect({
|
|
67074
67167
|
restorePreviousSession: true,
|
|
67075
|
-
url:
|
|
67168
|
+
url: redirectUrl.href
|
|
67076
67169
|
})
|
|
67077
67170
|
// Check to see if a hash was stored in local storage
|
|
67078
67171
|
];
|
|
67079
67172
|
case 1:
|
|
67080
|
-
/**
|
|
67081
|
-
* Handle a successful authentication redirect
|
|
67082
|
-
*/
|
|
67083
67173
|
_a.sent();
|
|
67084
67174
|
postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
|
|
67085
67175
|
if (postLoginRedirectHash) {
|
|
@@ -75179,33 +75269,21 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__.LocalJWKSet {
|
|
|
75179
75269
|
}
|
|
75180
75270
|
async reload() {
|
|
75181
75271
|
if (this._pendingFetch && (0,_runtime_env_js__WEBPACK_IMPORTED_MODULE_1__.isCloudflareWorkers)()) {
|
|
75182
|
-
|
|
75183
|
-
const isDone = () => {
|
|
75184
|
-
if (this._pendingFetch === undefined) {
|
|
75185
|
-
resolve();
|
|
75186
|
-
}
|
|
75187
|
-
else {
|
|
75188
|
-
setTimeout(isDone, 5);
|
|
75189
|
-
}
|
|
75190
|
-
};
|
|
75191
|
-
isDone();
|
|
75192
|
-
});
|
|
75193
|
-
}
|
|
75194
|
-
if (!this._pendingFetch) {
|
|
75195
|
-
this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
75196
|
-
.then((json) => {
|
|
75197
|
-
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
75198
|
-
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
75199
|
-
}
|
|
75200
|
-
this._jwks = { keys: json.keys };
|
|
75201
|
-
this._jwksTimestamp = Date.now();
|
|
75202
|
-
this._pendingFetch = undefined;
|
|
75203
|
-
})
|
|
75204
|
-
.catch((err) => {
|
|
75205
|
-
this._pendingFetch = undefined;
|
|
75206
|
-
throw err;
|
|
75207
|
-
});
|
|
75272
|
+
this._pendingFetch = undefined;
|
|
75208
75273
|
}
|
|
75274
|
+
this._pendingFetch || (this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
75275
|
+
.then((json) => {
|
|
75276
|
+
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
75277
|
+
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
75278
|
+
}
|
|
75279
|
+
this._jwks = { keys: json.keys };
|
|
75280
|
+
this._jwksTimestamp = Date.now();
|
|
75281
|
+
this._pendingFetch = undefined;
|
|
75282
|
+
})
|
|
75283
|
+
.catch((err) => {
|
|
75284
|
+
this._pendingFetch = undefined;
|
|
75285
|
+
throw err;
|
|
75286
|
+
}));
|
|
75209
75287
|
await this._pendingFetch;
|
|
75210
75288
|
}
|
|
75211
75289
|
}
|
|
@@ -79232,6 +79310,8 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|
|
79232
79310
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
79233
79311
|
/******/ var __webpack_exports__ = __webpack_require__("./lib/index.js");
|
|
79234
79312
|
/******/
|
|
79313
|
+
/******/ return __webpack_exports__;
|
|
79235
79314
|
/******/ })()
|
|
79236
79315
|
;
|
|
79237
|
-
|
|
79316
|
+
});
|
|
79317
|
+
//# sourceMappingURL=solid-ui.js.map
|