solid-ui 2.4.26 → 2.4.27
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 +59 -85
- package/dist/main.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +11 -9
- package/lib/login/login.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +11 -11
package/dist/main.js
CHANGED
|
@@ -7155,7 +7155,7 @@ function renderSignInPopup(dom) {
|
|
|
7155
7155
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
7156
7156
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
7157
7157
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
7158
|
-
var preLoginRedirectHash;
|
|
7158
|
+
var preLoginRedirectHash, locationUrl;
|
|
7159
7159
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
7160
7160
|
while (1) switch (_context.prev = _context.next) {
|
|
7161
7161
|
case 0:
|
|
@@ -7167,23 +7167,25 @@ function renderSignInPopup(dom) {
|
|
|
7167
7167
|
}
|
|
7168
7168
|
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
7169
7169
|
// Login
|
|
7170
|
-
|
|
7170
|
+
locationUrl = new URL(window.location.href);
|
|
7171
|
+
locationUrl.hash = ''; // remove hash part
|
|
7172
|
+
_context.next = 8;
|
|
7171
7173
|
return _solidLogic.authSession.login({
|
|
7172
|
-
redirectUrl:
|
|
7174
|
+
redirectUrl: locationUrl.href,
|
|
7173
7175
|
oidcIssuer: issuerUri
|
|
7174
7176
|
});
|
|
7175
|
-
case 6:
|
|
7176
|
-
_context.next = 11;
|
|
7177
|
-
break;
|
|
7178
7177
|
case 8:
|
|
7179
|
-
_context.
|
|
7178
|
+
_context.next = 13;
|
|
7179
|
+
break;
|
|
7180
|
+
case 10:
|
|
7181
|
+
_context.prev = 10;
|
|
7180
7182
|
_context.t0 = _context["catch"](0);
|
|
7181
7183
|
(0, _log.alert)(_context.t0.message);
|
|
7182
|
-
case
|
|
7184
|
+
case 13:
|
|
7183
7185
|
case "end":
|
|
7184
7186
|
return _context.stop();
|
|
7185
7187
|
}
|
|
7186
|
-
}, _callee, null, [[0,
|
|
7188
|
+
}, _callee, null, [[0, 10]]);
|
|
7187
7189
|
}));
|
|
7188
7190
|
return function loginToIssuer(_x11) {
|
|
7189
7191
|
return _ref.apply(this, arguments);
|
|
@@ -13119,10 +13121,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
13119
13121
|
}));
|
|
13120
13122
|
exports.versionInfo = void 0;
|
|
13121
13123
|
var versionInfo = {
|
|
13122
|
-
buildTime: '2023-
|
|
13123
|
-
commit: '
|
|
13124
|
+
buildTime: '2023-03-17T10:43:05Z',
|
|
13125
|
+
commit: '5b3471ff0bc08942d334b9bc9a6992adcb5cdb6b',
|
|
13124
13126
|
npmInfo: {
|
|
13125
|
-
'solid-ui': '2.4.
|
|
13127
|
+
'solid-ui': '2.4.27',
|
|
13126
13128
|
npm: '8.19.4',
|
|
13127
13129
|
node: '16.19.1',
|
|
13128
13130
|
v8: '9.4.146.26-node.24',
|
|
@@ -25557,7 +25559,10 @@ function removeOidcQueryParam(redirectUrl) {
|
|
|
25557
25559
|
cleanedUrl.searchParams.delete("code");
|
|
25558
25560
|
cleanedUrl.searchParams.delete("state");
|
|
25559
25561
|
cleanedUrl.hash = "";
|
|
25560
|
-
|
|
25562
|
+
if (redirectUrl.includes(`${cleanedUrl.origin}/`)) {
|
|
25563
|
+
return cleanedUrl.href;
|
|
25564
|
+
}
|
|
25565
|
+
return `${cleanedUrl.origin}${cleanedUrl.href.substring(cleanedUrl.origin.length + 1)}`;
|
|
25561
25566
|
}
|
|
25562
25567
|
async function clearOidcPersistentStorage() {
|
|
25563
25568
|
const client = new _inrupt_oidc_client__WEBPACK_IMPORTED_MODULE_0__.OidcClient({
|
|
@@ -26225,7 +26230,7 @@ class IssuerConfigFetcher {
|
|
|
26225
26230
|
}
|
|
26226
26231
|
async fetchConfig(issuer) {
|
|
26227
26232
|
let issuerConfig;
|
|
26228
|
-
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer).href;
|
|
26233
|
+
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer.endsWith("/") ? issuer : `${issuer}/`).href;
|
|
26229
26234
|
const issuerConfigRequestBody = await window.fetch(openIdConfigUrl);
|
|
26230
26235
|
try {
|
|
26231
26236
|
issuerConfig = processConfig(await issuerConfigRequestBody.json());
|
|
@@ -26402,12 +26407,6 @@ class AuthCodeRedirectHandler {
|
|
|
26402
26407
|
webId: tokens.webId,
|
|
26403
26408
|
isLoggedIn: "true",
|
|
26404
26409
|
}, { secure: true });
|
|
26405
|
-
url.searchParams.delete("code");
|
|
26406
|
-
await this.storageUtility.setForUser(storedSessionId, {
|
|
26407
|
-
redirectUrl: url.toString(),
|
|
26408
|
-
}, {
|
|
26409
|
-
secure: false,
|
|
26410
|
-
});
|
|
26411
26410
|
const sessionInfo = await this.sessionInfoManager.get(storedSessionId);
|
|
26412
26411
|
if (!sessionInfo) {
|
|
26413
26412
|
throw new Error(`Could not retrieve session: [${storedSessionId}].`);
|
|
@@ -52249,7 +52248,6 @@ var BlankNode = /*#__PURE__*/function (_Node) {
|
|
|
52249
52248
|
function getId(id) {
|
|
52250
52249
|
if (id) {
|
|
52251
52250
|
if (typeof id !== 'string') {
|
|
52252
|
-
console.log('Bad blank id:', id);
|
|
52253
52251
|
throw new Error('Bad id argument to new blank node: ' + id);
|
|
52254
52252
|
}
|
|
52255
52253
|
if (id.includes('#')) {
|
|
@@ -53876,7 +53874,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
53876
53874
|
size: 0,
|
|
53877
53875
|
timeout: 0
|
|
53878
53876
|
};
|
|
53879
|
-
console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
53877
|
+
// console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
53880
53878
|
return _this5.handleError(dummyResponse, docuri, options); // possible credentials retry
|
|
53881
53879
|
// return this.failFetch(options, 'fetch failed: ' + error, 999, dummyResponse) // Fake status code: fetch exception
|
|
53882
53880
|
|
|
@@ -53937,25 +53935,21 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
53937
53935
|
if (fetchResponse.ok) {
|
|
53938
53936
|
userCallback(true, 'OK', fetchResponse);
|
|
53939
53937
|
} else {
|
|
53940
|
-
// console.log('@@@ fetcher.js Should not take this path !!!!!!!!!!!!')
|
|
53941
53938
|
var oops = 'HTTP error: Status ' + fetchResponse.status + ' (' + fetchResponse.statusText + ')';
|
|
53942
53939
|
if (fetchResponse.responseText) {
|
|
53943
53940
|
oops += ' ' + fetchResponse.responseText; // not in 404, dns error, nock failure
|
|
53944
53941
|
}
|
|
53945
53942
|
|
|
53946
|
-
console.log(oops + ' fetching ' + uri);
|
|
53947
53943
|
userCallback(false, oops, fetchResponse);
|
|
53948
53944
|
}
|
|
53949
53945
|
} else {
|
|
53950
53946
|
var _oops = '@@ nowOrWhenFetched: no response object!';
|
|
53951
|
-
console.log(_oops);
|
|
53952
53947
|
userCallback(false, _oops);
|
|
53953
53948
|
}
|
|
53954
53949
|
}
|
|
53955
53950
|
}, function (err) {
|
|
53956
53951
|
var message = err.message || err.statusText;
|
|
53957
53952
|
message = 'Failed to load <' + uri + '> ' + message;
|
|
53958
|
-
console.log(message);
|
|
53959
53953
|
if (err.response && err.response.status) {
|
|
53960
53954
|
message += ' status: ' + err.response.status;
|
|
53961
53955
|
}
|
|
@@ -54194,45 +54188,42 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54194
54188
|
return fetcher.load(doc);
|
|
54195
54189
|
case 6:
|
|
54196
54190
|
response = _context2.sent;
|
|
54197
|
-
_context2.next =
|
|
54191
|
+
_context2.next = 26;
|
|
54198
54192
|
break;
|
|
54199
54193
|
case 9:
|
|
54200
54194
|
_context2.prev = 9;
|
|
54201
54195
|
_context2.t0 = _context2["catch"](3);
|
|
54202
54196
|
if (!(_context2.t0.response.status === 404)) {
|
|
54203
|
-
_context2.next =
|
|
54197
|
+
_context2.next = 25;
|
|
54204
54198
|
break;
|
|
54205
54199
|
}
|
|
54206
|
-
|
|
54207
|
-
_context2.
|
|
54208
|
-
_context2.next = 16;
|
|
54200
|
+
_context2.prev = 12;
|
|
54201
|
+
_context2.next = 15;
|
|
54209
54202
|
return fetcher.webOperation('PUT', doc.value, {
|
|
54210
54203
|
data: data,
|
|
54211
54204
|
contentType: contentType
|
|
54212
54205
|
});
|
|
54213
|
-
case
|
|
54206
|
+
case 15:
|
|
54214
54207
|
response = _context2.sent;
|
|
54215
|
-
_context2.next =
|
|
54208
|
+
_context2.next = 21;
|
|
54216
54209
|
break;
|
|
54217
|
-
case
|
|
54218
|
-
_context2.prev =
|
|
54219
|
-
_context2.t1 = _context2["catch"](
|
|
54220
|
-
console.log('createIfNotExists doc FAILED: ' + doc + ': ' + _context2.t1);
|
|
54210
|
+
case 18:
|
|
54211
|
+
_context2.prev = 18;
|
|
54212
|
+
_context2.t1 = _context2["catch"](12);
|
|
54221
54213
|
throw _context2.t1;
|
|
54222
|
-
case
|
|
54214
|
+
case 21:
|
|
54223
54215
|
delete fetcher.requested[doc.value]; // delete cached 404 error
|
|
54224
54216
|
// console.log('createIfNotExists doc created ok ' + doc)
|
|
54225
54217
|
return _context2.abrupt("return", response);
|
|
54226
|
-
case
|
|
54227
|
-
console.log('createIfNotExists doc load error NOT 404: ' + doc + ': ' + _context2.t0);
|
|
54218
|
+
case 25:
|
|
54228
54219
|
throw _context2.t0;
|
|
54229
|
-
case
|
|
54220
|
+
case 26:
|
|
54230
54221
|
return _context2.abrupt("return", response);
|
|
54231
|
-
case
|
|
54222
|
+
case 27:
|
|
54232
54223
|
case "end":
|
|
54233
54224
|
return _context2.stop();
|
|
54234
54225
|
}
|
|
54235
|
-
}, _callee2, this, [[3, 9], [
|
|
54226
|
+
}, _callee2, this, [[3, 9], [12, 18]]);
|
|
54236
54227
|
}));
|
|
54237
54228
|
function createIfNotExists(_x4) {
|
|
54238
54229
|
return _createIfNotExists.apply(this, arguments);
|
|
@@ -54541,7 +54532,8 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54541
54532
|
}, {
|
|
54542
54533
|
key: "retryNoCredentials",
|
|
54543
54534
|
value: function retryNoCredentials(docuri, options) {
|
|
54544
|
-
console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
54535
|
+
// console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
54536
|
+
|
|
54545
54537
|
options.retriedWithNoCredentials = true; // protect against being called twice
|
|
54546
54538
|
|
|
54547
54539
|
delete this.requested[docuri]; // forget the original request happened
|
|
@@ -54586,7 +54578,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54586
54578
|
// Now attempt retry via proxy
|
|
54587
54579
|
var proxyUri = Fetcher.crossSiteProxy(docuri);
|
|
54588
54580
|
if (proxyUri && !options.proxyUsed) {
|
|
54589
|
-
console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
54581
|
+
// console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
54590
54582
|
return this.redirectToProxy(proxyUri, options);
|
|
54591
54583
|
}
|
|
54592
54584
|
}
|
|
@@ -54659,7 +54651,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
54659
54651
|
|
|
54660
54652
|
// Check for masked errors (CORS, etc)
|
|
54661
54653
|
if (response.status === 0) {
|
|
54662
|
-
console.log('Masked error - status 0 for ' + docuri)
|
|
54654
|
+
// console.log('Masked error - status 0 for ' + docuri)
|
|
54663
54655
|
return this.handleError(response, docuri, options);
|
|
54664
54656
|
}
|
|
54665
54657
|
if (response.status >= 400) {
|
|
@@ -55546,7 +55538,6 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
55546
55538
|
while (todo.length) {
|
|
55547
55539
|
follow(todo.shift());
|
|
55548
55540
|
}
|
|
55549
|
-
// console.log('' + result.length + ' statements about ' + subject)
|
|
55550
55541
|
return result;
|
|
55551
55542
|
}
|
|
55552
55543
|
|
|
@@ -55703,10 +55694,10 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
55703
55694
|
var statementsCopy = this.statements.map(function (ea) {
|
|
55704
55695
|
return ea.substitute(bindings);
|
|
55705
55696
|
});
|
|
55706
|
-
console.log('Formula subs statmnts:' + statementsCopy)
|
|
55697
|
+
// console.log('Formula subs statmnts:' + statementsCopy)
|
|
55707
55698
|
var y = new Formula();
|
|
55708
55699
|
y.addAll(statementsCopy);
|
|
55709
|
-
console.log('indexed-form subs formula:' + y)
|
|
55700
|
+
// console.log('indexed-form subs formula:' + y)
|
|
55710
55701
|
return y;
|
|
55711
55702
|
}
|
|
55712
55703
|
}, {
|
|
@@ -58518,7 +58509,6 @@ var Node = /*#__PURE__*/function () {
|
|
|
58518
58509
|
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Node, [{
|
|
58519
58510
|
key: "substitute",
|
|
58520
58511
|
value: function substitute(bindings) {
|
|
58521
|
-
console.log('@@@ node substitute' + this);
|
|
58522
58512
|
return this;
|
|
58523
58513
|
}
|
|
58524
58514
|
|
|
@@ -62929,7 +62919,7 @@ var Statement = /*#__PURE__*/function () {
|
|
|
62929
62919
|
key: "substitute",
|
|
62930
62920
|
value: function substitute(bindings) {
|
|
62931
62921
|
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)
|
|
62922
|
+
// console.log('@@@ statement substitute:' + y)
|
|
62933
62923
|
return y;
|
|
62934
62924
|
}
|
|
62935
62925
|
|
|
@@ -67054,7 +67044,7 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
67054
67044
|
*/
|
|
67055
67045
|
SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
|
|
67056
67046
|
return __awaiter(this, void 0, void 0, function () {
|
|
67057
|
-
var preLoginRedirectHash, postLoginRedirectHash, curUrl, me, webId;
|
|
67047
|
+
var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
|
|
67058
67048
|
return __generator(this, function (_a) {
|
|
67059
67049
|
switch (_a.label) {
|
|
67060
67050
|
case 0:
|
|
@@ -67066,20 +67056,16 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
67066
67056
|
if (document.location.toString() !== url)
|
|
67067
67057
|
history.replaceState(null, '', url);
|
|
67068
67058
|
});
|
|
67069
|
-
|
|
67070
|
-
|
|
67071
|
-
*/
|
|
67059
|
+
redirectUrl = new URL(window.location.href);
|
|
67060
|
+
redirectUrl.hash = '';
|
|
67072
67061
|
return [4 /*yield*/, this.session
|
|
67073
67062
|
.handleIncomingRedirect({
|
|
67074
67063
|
restorePreviousSession: true,
|
|
67075
|
-
url:
|
|
67064
|
+
url: redirectUrl.href
|
|
67076
67065
|
})
|
|
67077
67066
|
// Check to see if a hash was stored in local storage
|
|
67078
67067
|
];
|
|
67079
67068
|
case 1:
|
|
67080
|
-
/**
|
|
67081
|
-
* Handle a successful authentication redirect
|
|
67082
|
-
*/
|
|
67083
67069
|
_a.sent();
|
|
67084
67070
|
postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
|
|
67085
67071
|
if (postLoginRedirectHash) {
|
|
@@ -75179,33 +75165,21 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__.LocalJWKSet {
|
|
|
75179
75165
|
}
|
|
75180
75166
|
async reload() {
|
|
75181
75167
|
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
|
-
});
|
|
75168
|
+
this._pendingFetch = undefined;
|
|
75208
75169
|
}
|
|
75170
|
+
this._pendingFetch || (this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
75171
|
+
.then((json) => {
|
|
75172
|
+
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
75173
|
+
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
75174
|
+
}
|
|
75175
|
+
this._jwks = { keys: json.keys };
|
|
75176
|
+
this._jwksTimestamp = Date.now();
|
|
75177
|
+
this._pendingFetch = undefined;
|
|
75178
|
+
})
|
|
75179
|
+
.catch((err) => {
|
|
75180
|
+
this._pendingFetch = undefined;
|
|
75181
|
+
throw err;
|
|
75182
|
+
}));
|
|
75209
75183
|
await this._pendingFetch;
|
|
75210
75184
|
}
|
|
75211
75185
|
}
|