solid-ui 2.4.19-alpha → 2.4.19-alpha-26c62441
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/LICENSE.md +0 -0
- package/README.md +0 -0
- package/dist/index.html +0 -0
- package/dist/main.js +100 -411
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.d.ts +0 -0
- package/lib/acl/access-controller.d.ts.map +0 -0
- package/lib/acl/access-controller.js +0 -0
- package/lib/acl/access-controller.js.map +0 -0
- package/lib/acl/access-groups.d.ts +0 -0
- package/lib/acl/access-groups.d.ts.map +0 -0
- package/lib/acl/access-groups.js +0 -0
- package/lib/acl/access-groups.js.map +0 -0
- package/lib/acl/acl-control.d.ts +0 -0
- package/lib/acl/acl-control.d.ts.map +0 -0
- package/lib/acl/acl-control.js +0 -0
- package/lib/acl/acl-control.js.map +0 -0
- package/lib/acl/acl.d.ts +0 -0
- package/lib/acl/acl.d.ts.map +0 -0
- package/lib/acl/acl.js +0 -0
- package/lib/acl/acl.js.map +0 -0
- package/lib/acl/add-agent-buttons.d.ts +0 -0
- package/lib/acl/add-agent-buttons.d.ts.map +0 -0
- package/lib/acl/add-agent-buttons.js +0 -0
- package/lib/acl/add-agent-buttons.js.map +0 -0
- package/lib/acl/index.d.ts +0 -0
- package/lib/acl/index.d.ts.map +0 -0
- package/lib/acl/index.js +0 -0
- package/lib/acl/index.js.map +0 -0
- package/lib/acl/styles.d.ts +0 -0
- package/lib/acl/styles.d.ts.map +0 -0
- package/lib/acl/styles.js +0 -0
- package/lib/acl/styles.js.map +0 -0
- package/lib/acl/types.d.ts +0 -0
- package/lib/acl/types.d.ts.map +0 -0
- package/lib/acl/types.js +0 -0
- package/lib/acl/types.js.map +0 -0
- package/lib/chat/bookmarks.js +0 -0
- package/lib/chat/bookmarks.js.map +0 -0
- package/lib/chat/chatLogic.js +0 -0
- package/lib/chat/chatLogic.js.map +0 -0
- package/lib/chat/dateFolder.js +0 -0
- package/lib/chat/dateFolder.js.map +0 -0
- package/lib/chat/infinite.js +0 -0
- package/lib/chat/infinite.js.map +0 -0
- package/lib/chat/message.js +0 -0
- package/lib/chat/message.js.map +0 -0
- package/lib/chat/messageTools.js +0 -0
- package/lib/chat/messageTools.js.map +0 -0
- package/lib/chat/thread.js +0 -0
- package/lib/chat/thread.js.map +0 -0
- package/lib/create/create.d.ts +0 -0
- package/lib/create/create.d.ts.map +0 -0
- package/lib/create/create.js +0 -0
- package/lib/create/create.js.map +0 -0
- package/lib/create/index.d.ts +0 -0
- package/lib/create/index.d.ts.map +0 -0
- package/lib/create/index.js +0 -0
- package/lib/create/index.js.map +0 -0
- package/lib/create/types.d.ts +0 -0
- package/lib/create/types.d.ts.map +0 -0
- package/lib/create/types.js +0 -0
- package/lib/create/types.js.map +0 -0
- package/lib/debug.d.ts +0 -0
- package/lib/debug.d.ts.map +0 -0
- package/lib/debug.js +0 -0
- package/lib/debug.js.map +0 -0
- package/lib/folders.js +0 -0
- package/lib/folders.js.map +0 -0
- package/lib/footer/index.d.ts +0 -0
- package/lib/footer/index.d.ts.map +0 -0
- package/lib/footer/index.js +0 -0
- package/lib/footer/index.js.map +0 -0
- package/lib/footer/styleMap.d.ts +0 -0
- package/lib/footer/styleMap.d.ts.map +0 -0
- package/lib/footer/styleMap.js +0 -0
- package/lib/footer/styleMap.js.map +0 -0
- package/lib/header/empty-profile.d.ts +0 -0
- package/lib/header/empty-profile.d.ts.map +0 -0
- package/lib/header/empty-profile.js +0 -0
- package/lib/header/empty-profile.js.map +0 -0
- package/lib/header/index.d.ts +0 -0
- package/lib/header/index.d.ts.map +0 -0
- package/lib/header/index.js +0 -0
- package/lib/header/index.js.map +0 -0
- package/lib/header/styleMap.d.ts +0 -0
- package/lib/header/styleMap.d.ts.map +0 -0
- package/lib/header/styleMap.js +0 -0
- package/lib/header/styleMap.js.map +0 -0
- package/lib/iconBase.d.ts +0 -0
- package/lib/iconBase.d.ts.map +0 -0
- package/lib/iconBase.js +0 -0
- package/lib/iconBase.js.map +0 -0
- package/lib/icons/solid_logo.d.ts +0 -0
- package/lib/icons/solid_logo.d.ts.map +0 -0
- package/lib/icons/solid_logo.js +0 -0
- package/lib/icons/solid_logo.js.map +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/lib/jss/index.d.ts +0 -0
- package/lib/jss/index.d.ts.map +0 -0
- package/lib/jss/index.js +0 -0
- package/lib/jss/index.js.map +0 -0
- package/lib/log.d.ts +0 -0
- package/lib/log.d.ts.map +0 -0
- package/lib/log.js +0 -0
- package/lib/log.js.map +0 -0
- package/lib/login/login.d.ts +0 -0
- package/lib/login/login.d.ts.map +0 -0
- package/lib/login/login.js +0 -0
- package/lib/login/login.js.map +0 -0
- package/lib/matrix/index.d.ts +0 -0
- package/lib/matrix/index.d.ts.map +0 -0
- package/lib/matrix/index.js +0 -0
- package/lib/matrix/index.js.map +0 -0
- package/lib/matrix/matrix.d.ts +0 -0
- package/lib/matrix/matrix.d.ts.map +0 -0
- package/lib/matrix/matrix.js +0 -0
- package/lib/matrix/matrix.js.map +0 -0
- package/lib/matrix/types.d.ts +0 -0
- package/lib/matrix/types.d.ts.map +0 -0
- package/lib/matrix/types.js +0 -0
- package/lib/matrix/types.js.map +0 -0
- package/lib/media/index.d.ts +0 -0
- package/lib/media/index.d.ts.map +0 -0
- package/lib/media/index.js +0 -0
- package/lib/media/index.js.map +0 -0
- package/lib/media/media-capture.d.ts +0 -0
- package/lib/media/media-capture.d.ts.map +0 -0
- package/lib/media/media-capture.js +0 -0
- package/lib/media/media-capture.js.map +0 -0
- package/lib/messageArea.js +0 -0
- package/lib/messageArea.js.map +0 -0
- package/lib/noun_Camera_1618446_000000.js +0 -0
- package/lib/noun_Camera_1618446_000000.js.map +0 -0
- package/lib/ns.js +0 -0
- package/lib/ns.js.map +0 -0
- package/lib/pad.d.ts +0 -0
- package/lib/pad.d.ts.map +0 -0
- package/lib/pad.js +0 -0
- package/lib/pad.js.map +0 -0
- package/lib/participation.d.ts +0 -0
- package/lib/participation.d.ts.map +0 -0
- package/lib/participation.js +0 -0
- package/lib/participation.js.map +0 -0
- package/lib/preferences.js +0 -0
- package/lib/preferences.js.map +0 -0
- package/lib/signup/config-default.js +0 -0
- package/lib/signup/config-default.js.map +0 -0
- package/lib/signup/signup.js +0 -0
- package/lib/signup/signup.js.map +0 -0
- package/lib/stories/decorators.js +0 -0
- package/lib/stories/decorators.js.map +0 -0
- package/lib/style.js +0 -0
- package/lib/style.js.map +0 -0
- package/lib/table.js +0 -0
- package/lib/table.js.map +0 -0
- package/lib/tabs.d.ts +0 -0
- package/lib/tabs.d.ts.map +0 -0
- package/lib/tabs.js +0 -0
- package/lib/tabs.js.map +0 -0
- package/lib/typings.d.js +0 -0
- package/lib/typings.d.js.map +0 -0
- package/lib/utils/headerFooterHelpers.d.ts +0 -0
- package/lib/utils/headerFooterHelpers.d.ts.map +0 -0
- package/lib/utils/headerFooterHelpers.js +0 -0
- package/lib/utils/headerFooterHelpers.js.map +0 -0
- package/lib/utils/index.js +0 -0
- package/lib/utils/index.js.map +0 -0
- package/lib/utils/label.d.ts +0 -0
- package/lib/utils/label.d.ts.map +0 -0
- package/lib/utils/label.js +0 -0
- package/lib/utils/label.js.map +0 -0
- package/lib/versionInfo.d.ts +9 -11
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +13 -15
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.d.ts +0 -0
- package/lib/widgets/buttons/iconLinks.d.ts.map +0 -0
- package/lib/widgets/buttons/iconLinks.js +0 -0
- package/lib/widgets/buttons/iconLinks.js.map +0 -0
- package/lib/widgets/buttons.d.ts +0 -0
- package/lib/widgets/buttons.d.ts.map +0 -0
- package/lib/widgets/buttons.js +0 -0
- package/lib/widgets/buttons.js.map +0 -0
- package/lib/widgets/dragAndDrop.js +1 -1
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.d.ts +0 -0
- package/lib/widgets/error.d.ts.map +0 -0
- package/lib/widgets/error.js +0 -0
- package/lib/widgets/error.js.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.js +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +0 -0
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +0 -0
- package/lib/widgets/forms/autocomplete/language.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/language.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/language.js +0 -0
- package/lib/widgets/forms/autocomplete/language.js.map +0 -0
- package/lib/widgets/forms/autocomplete/publicData.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/publicData.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/publicData.js +0 -0
- package/lib/widgets/forms/autocomplete/publicData.js.map +0 -0
- package/lib/widgets/forms/basic.d.ts +0 -0
- package/lib/widgets/forms/basic.d.ts.map +0 -0
- package/lib/widgets/forms/basic.js +0 -0
- package/lib/widgets/forms/basic.js.map +0 -0
- package/lib/widgets/forms/comment.d.ts +0 -0
- package/lib/widgets/forms/comment.d.ts.map +0 -0
- package/lib/widgets/forms/comment.js +0 -0
- package/lib/widgets/forms/comment.js.map +0 -0
- package/lib/widgets/forms/fieldFunction.d.ts +0 -0
- package/lib/widgets/forms/fieldFunction.d.ts.map +0 -0
- package/lib/widgets/forms/fieldFunction.js +0 -0
- package/lib/widgets/forms/fieldFunction.js.map +0 -0
- package/lib/widgets/forms/fieldParams.d.ts +0 -0
- package/lib/widgets/forms/fieldParams.d.ts.map +0 -0
- package/lib/widgets/forms/fieldParams.js +0 -0
- package/lib/widgets/forms/fieldParams.js.map +0 -0
- package/lib/widgets/forms/formStyle.d.ts +0 -0
- package/lib/widgets/forms/formStyle.d.ts.map +0 -0
- package/lib/widgets/forms/formStyle.js +0 -0
- package/lib/widgets/forms/formStyle.js.map +0 -0
- package/lib/widgets/forms.js +0 -0
- package/lib/widgets/forms.js.map +0 -0
- package/lib/widgets/index.js +0 -0
- package/lib/widgets/index.js.map +0 -0
- package/lib/widgets/peoplePicker.js +0 -0
- package/lib/widgets/peoplePicker.js.map +0 -0
- package/lib/widgets/widgetHelpers.d.ts +0 -0
- package/lib/widgets/widgetHelpers.d.ts.map +0 -0
- package/lib/widgets/widgetHelpers.js +0 -0
- package/lib/widgets/widgetHelpers.js.map +0 -0
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -15167,28 +15167,26 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
15167
15167
|
}));
|
|
15168
15168
|
exports.versionInfo = void 0;
|
|
15169
15169
|
var versionInfo = {
|
|
15170
|
-
buildTime: '2022-03-
|
|
15171
|
-
commit: '
|
|
15170
|
+
buildTime: '2022-03-29T14:22:09Z',
|
|
15171
|
+
commit: '26c6244198f7f4694aa056aab5bdfab5002a7a21',
|
|
15172
15172
|
npmInfo: {
|
|
15173
15173
|
'solid-ui': '2.4.19-alpha',
|
|
15174
|
-
npm: '
|
|
15175
|
-
node: '16.14.0',
|
|
15176
|
-
v8: '9.4.146.24-node.20',
|
|
15177
|
-
uv: '1.43.0',
|
|
15178
|
-
zlib: '1.2.11',
|
|
15179
|
-
brotli: '1.0.9',
|
|
15174
|
+
npm: '6.14.16',
|
|
15180
15175
|
ares: '1.18.1',
|
|
15181
|
-
|
|
15182
|
-
nghttp2: '1.45.1',
|
|
15183
|
-
napi: '8',
|
|
15184
|
-
llhttp: '6.0.4',
|
|
15185
|
-
openssl: '1.1.1m+quic',
|
|
15176
|
+
brotli: '1.0.9',
|
|
15186
15177
|
cldr: '40.0',
|
|
15187
15178
|
icu: '70.1',
|
|
15179
|
+
llhttp: '2.1.4',
|
|
15180
|
+
modules: '83',
|
|
15181
|
+
napi: '8',
|
|
15182
|
+
nghttp2: '1.42.0',
|
|
15183
|
+
node: '14.19.0',
|
|
15184
|
+
openssl: '1.1.1m',
|
|
15188
15185
|
tz: '2021a3',
|
|
15189
15186
|
unicode: '14.0',
|
|
15190
|
-
|
|
15191
|
-
|
|
15187
|
+
uv: '1.42.0',
|
|
15188
|
+
v8: '8.4.371.23-node.85',
|
|
15189
|
+
zlib: '1.2.11'
|
|
15192
15190
|
}
|
|
15193
15191
|
};
|
|
15194
15192
|
exports.versionInfo = versionInfo;
|
|
@@ -16989,7 +16987,7 @@ function uploadFiles(fetcher, files, fileBase, imageBase, successHandler) {
|
|
|
16989
16987
|
} else {
|
|
16990
16988
|
var extension = mime.extension(theFile.type); // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3
|
|
16991
16989
|
|
|
16992
|
-
if (!theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...
|
|
16990
|
+
if (extension && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...
|
|
16993
16991
|
theFile.type !== mime.lookup(theFile.name)) {
|
|
16994
16992
|
// the mime type of this ext is not the right one?
|
|
16995
16993
|
suffix = '_.' + extension; // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)
|
|
@@ -65365,11 +65363,7 @@ try {
|
|
|
65365
65363
|
*/
|
|
65366
65364
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
65367
65365
|
if (k2 === undefined) k2 = k;
|
|
65368
|
-
|
|
65369
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
65370
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
65371
|
-
}
|
|
65372
|
-
Object.defineProperty(o, k2, desc);
|
|
65366
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
65373
65367
|
}) : (function(o, m, k, k2) {
|
|
65374
65368
|
if (k2 === undefined) k2 = k;
|
|
65375
65369
|
o[k2] = m[k];
|
|
@@ -65516,11 +65510,7 @@ exports.authSession = new solid_client_authn_browser_1.Session({
|
|
|
65516
65510
|
|
|
65517
65511
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
65518
65512
|
if (k2 === undefined) k2 = k;
|
|
65519
|
-
|
|
65520
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
65521
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
65522
|
-
}
|
|
65523
|
-
Object.defineProperty(o, k2, desc);
|
|
65513
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
65524
65514
|
}) : (function(o, m, k, k2) {
|
|
65525
65515
|
if (k2 === undefined) k2 = k;
|
|
65526
65516
|
o[k2] = m[k];
|
|
@@ -65711,11 +65701,7 @@ exports.SolidAuthnLogic = SolidAuthnLogic;
|
|
|
65711
65701
|
|
|
65712
65702
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
65713
65703
|
if (k2 === undefined) k2 = k;
|
|
65714
|
-
|
|
65715
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
65716
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
65717
|
-
}
|
|
65718
|
-
Object.defineProperty(o, k2, desc);
|
|
65704
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
65719
65705
|
}) : (function(o, m, k, k2) {
|
|
65720
65706
|
if (k2 === undefined) k2 = k;
|
|
65721
65707
|
o[k2] = m[k];
|
|
@@ -66112,219 +66098,6 @@ exports.determineChatContainer = determineChatContainer;
|
|
|
66112
66098
|
|
|
66113
66099
|
/***/ }),
|
|
66114
66100
|
|
|
66115
|
-
/***/ "./node_modules/solid-logic/lib/discovery/discoveryLogic.js":
|
|
66116
|
-
/*!******************************************************************!*\
|
|
66117
|
-
!*** ./node_modules/solid-logic/lib/discovery/discoveryLogic.js ***!
|
|
66118
|
-
\******************************************************************/
|
|
66119
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
66120
|
-
|
|
66121
|
-
"use strict";
|
|
66122
|
-
|
|
66123
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
66124
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
66125
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
66126
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
66127
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
66128
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
66129
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
66130
|
-
});
|
|
66131
|
-
};
|
|
66132
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
66133
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
66134
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
66135
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
66136
|
-
function step(op) {
|
|
66137
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
66138
|
-
while (_) try {
|
|
66139
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
66140
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
66141
|
-
switch (op[0]) {
|
|
66142
|
-
case 0: case 1: t = op; break;
|
|
66143
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
66144
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
66145
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
66146
|
-
default:
|
|
66147
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66148
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
66149
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66150
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
66151
|
-
if (t[2]) _.ops.pop();
|
|
66152
|
-
_.trys.pop(); continue;
|
|
66153
|
-
}
|
|
66154
|
-
op = body.call(thisArg, _);
|
|
66155
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
66156
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66157
|
-
}
|
|
66158
|
-
};
|
|
66159
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
66160
|
-
exports.loadAllTypeIndexes = exports.loadCommunityTypeIndexes = exports.loadTypeIndexesFor = exports.loadPreferences = exports.loadProfile = void 0;
|
|
66161
|
-
var rdflib_1 = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
|
|
66162
|
-
var ns = {
|
|
66163
|
-
solid: (0, rdflib_1.Namespace)('http://www.w3.org/ns/solid/terms#'),
|
|
66164
|
-
space: (0, rdflib_1.Namespace)('http://www.w3.org/ns/pim/space#')
|
|
66165
|
-
};
|
|
66166
|
-
function loadProfile(store, user) {
|
|
66167
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66168
|
-
var err_1;
|
|
66169
|
-
return __generator(this, function (_a) {
|
|
66170
|
-
switch (_a.label) {
|
|
66171
|
-
case 0:
|
|
66172
|
-
if (!user) {
|
|
66173
|
-
throw new Error("loadProfile: no user given.");
|
|
66174
|
-
}
|
|
66175
|
-
_a.label = 1;
|
|
66176
|
-
case 1:
|
|
66177
|
-
_a.trys.push([1, 3, , 4]);
|
|
66178
|
-
return [4 /*yield*/, store.fetcher.load(user.doc())];
|
|
66179
|
-
case 2:
|
|
66180
|
-
_a.sent();
|
|
66181
|
-
return [3 /*break*/, 4];
|
|
66182
|
-
case 3:
|
|
66183
|
-
err_1 = _a.sent();
|
|
66184
|
-
throw new Error("Unable to load profile of user <".concat(user, ">: ").concat(err_1));
|
|
66185
|
-
case 4: return [2 /*return*/, user.doc()];
|
|
66186
|
-
}
|
|
66187
|
-
});
|
|
66188
|
-
});
|
|
66189
|
-
}
|
|
66190
|
-
exports.loadProfile = loadProfile;
|
|
66191
|
-
function loadPreferences(store, user) {
|
|
66192
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66193
|
-
var profile, preferencesFile;
|
|
66194
|
-
return __generator(this, function (_a) {
|
|
66195
|
-
switch (_a.label) {
|
|
66196
|
-
case 0: return [4 /*yield*/, loadProfile(store, user)];
|
|
66197
|
-
case 1:
|
|
66198
|
-
profile = _a.sent();
|
|
66199
|
-
preferencesFile = store.any(user, ns.space('preferencesFile'), undefined, profile);
|
|
66200
|
-
if (!preferencesFile) {
|
|
66201
|
-
// throw new Error(`USer ${user} has no pointer in profile to preferences file.`)
|
|
66202
|
-
return [2 /*return*/, undefined];
|
|
66203
|
-
}
|
|
66204
|
-
try {
|
|
66205
|
-
store.fetcher.load(preferencesFile);
|
|
66206
|
-
}
|
|
66207
|
-
catch (err) { // Mabeb a permission propblem or origin problem
|
|
66208
|
-
return [2 /*return*/, undefined
|
|
66209
|
-
// throw new Error(`Unable to load preferences file ${preferencesFile} of user <${user}>: ${err}`)
|
|
66210
|
-
];
|
|
66211
|
-
// throw new Error(`Unable to load preferences file ${preferencesFile} of user <${user}>: ${err}`)
|
|
66212
|
-
}
|
|
66213
|
-
return [2 /*return*/, preferencesFile];
|
|
66214
|
-
}
|
|
66215
|
-
});
|
|
66216
|
-
});
|
|
66217
|
-
}
|
|
66218
|
-
exports.loadPreferences = loadPreferences;
|
|
66219
|
-
function loadTypeIndexesFor(store, user) {
|
|
66220
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66221
|
-
var profile, publicTypeIndex, _a, pub, preferencesFile, privateTypeIndexes, priv;
|
|
66222
|
-
return __generator(this, function (_b) {
|
|
66223
|
-
switch (_b.label) {
|
|
66224
|
-
case 0:
|
|
66225
|
-
if (!user)
|
|
66226
|
-
throw new Error("loadTypeIndexesFor: No user given");
|
|
66227
|
-
return [4 /*yield*/, loadProfile(store, user)];
|
|
66228
|
-
case 1:
|
|
66229
|
-
profile = _b.sent();
|
|
66230
|
-
publicTypeIndex = store.any(user, ns.solid('publicTypeIndex'), undefined, profile);
|
|
66231
|
-
if (!publicTypeIndex) return [3 /*break*/, 5];
|
|
66232
|
-
_b.label = 2;
|
|
66233
|
-
case 2:
|
|
66234
|
-
_b.trys.push([2, 4, , 5]);
|
|
66235
|
-
return [4 /*yield*/, store.fetcher.load(publicTypeIndex)];
|
|
66236
|
-
case 3:
|
|
66237
|
-
_b.sent();
|
|
66238
|
-
return [3 /*break*/, 5];
|
|
66239
|
-
case 4:
|
|
66240
|
-
_a = _b.sent();
|
|
66241
|
-
return [3 /*break*/, 5];
|
|
66242
|
-
case 5:
|
|
66243
|
-
pub = publicTypeIndex ? [{ label: 'public', index: publicTypeIndex, agent: user }] : [];
|
|
66244
|
-
return [4 /*yield*/, loadPreferences(store, user)];
|
|
66245
|
-
case 6:
|
|
66246
|
-
preferencesFile = _b.sent();
|
|
66247
|
-
if (preferencesFile) { // watch out - can be in either as spec was not clear
|
|
66248
|
-
privateTypeIndexes = store.each(user, ns.solid('privateTypeIndex'), undefined, preferencesFile)
|
|
66249
|
-
.concat(store.each(user, ns.solid('privateTypeIndex'), undefined, profile));
|
|
66250
|
-
priv = privateTypeIndexes.length > 0 ? [{ label: 'priSo @@@@@vate', index: privateTypeIndexes[0], agent: user }] : [];
|
|
66251
|
-
return [2 /*return*/, pub.concat(priv)];
|
|
66252
|
-
}
|
|
66253
|
-
return [2 /*return*/, pub];
|
|
66254
|
-
}
|
|
66255
|
-
});
|
|
66256
|
-
});
|
|
66257
|
-
}
|
|
66258
|
-
exports.loadTypeIndexesFor = loadTypeIndexesFor;
|
|
66259
|
-
function loadCommunityTypeIndexes(store, user) {
|
|
66260
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66261
|
-
var preferencesFile, communities, communityTypeIndexesPromise, result1;
|
|
66262
|
-
var _this = this;
|
|
66263
|
-
return __generator(this, function (_a) {
|
|
66264
|
-
switch (_a.label) {
|
|
66265
|
-
case 0: return [4 /*yield*/, loadPreferences(store, user)];
|
|
66266
|
-
case 1:
|
|
66267
|
-
preferencesFile = _a.sent();
|
|
66268
|
-
if (preferencesFile) {
|
|
66269
|
-
communities = store.each(user, ns.solid('community'), undefined, preferencesFile);
|
|
66270
|
-
communityTypeIndexesPromise = communities.map(function (community) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
66271
|
-
switch (_a.label) {
|
|
66272
|
-
case 0: return [4 /*yield*/, loadTypeIndexesFor(store, community)];
|
|
66273
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
66274
|
-
}
|
|
66275
|
-
}); }); });
|
|
66276
|
-
result1 = Promise.all(communityTypeIndexesPromise);
|
|
66277
|
-
// const result2 = Promise.all(result1)
|
|
66278
|
-
// const flat = result2.flat()
|
|
66279
|
-
return [2 /*return*/, result1
|
|
66280
|
-
// const communityTypeIndexes = await Promise.all(communityTypeIndexesPromise)
|
|
66281
|
-
/*
|
|
66282
|
-
let result = [] as TypeIndex[]
|
|
66283
|
-
for(const community of communities) {
|
|
66284
|
-
result = result.concat(await loadTypeIndexesFor(store, community as NamedNode)) as TypeIndex[] // @@ how oto make functional with async?
|
|
66285
|
-
}
|
|
66286
|
-
*/
|
|
66287
|
-
// return communityTypeIndexesPromise.resolve()
|
|
66288
|
-
];
|
|
66289
|
-
// const communityTypeIndexes = await Promise.all(communityTypeIndexesPromise)
|
|
66290
|
-
/*
|
|
66291
|
-
let result = [] as TypeIndex[]
|
|
66292
|
-
for(const community of communities) {
|
|
66293
|
-
result = result.concat(await loadTypeIndexesFor(store, community as NamedNode)) as TypeIndex[] // @@ how oto make functional with async?
|
|
66294
|
-
}
|
|
66295
|
-
*/
|
|
66296
|
-
// return communityTypeIndexesPromise.resolve()
|
|
66297
|
-
}
|
|
66298
|
-
return [2 /*return*/, []];
|
|
66299
|
-
}
|
|
66300
|
-
});
|
|
66301
|
-
});
|
|
66302
|
-
}
|
|
66303
|
-
exports.loadCommunityTypeIndexes = loadCommunityTypeIndexes;
|
|
66304
|
-
function loadAllTypeIndexes(store, user) {
|
|
66305
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66306
|
-
var _a, _b;
|
|
66307
|
-
return __generator(this, function (_c) {
|
|
66308
|
-
switch (_c.label) {
|
|
66309
|
-
case 0: return [4 /*yield*/, loadTypeIndexesFor(store, user)];
|
|
66310
|
-
case 1:
|
|
66311
|
-
_b = (_a = (_c.sent())).concat;
|
|
66312
|
-
return [4 /*yield*/, loadCommunityTypeIndexes(store, user)];
|
|
66313
|
-
case 2: return [2 /*return*/, _b.apply(_a, [(_c.sent()).flat()])];
|
|
66314
|
-
}
|
|
66315
|
-
});
|
|
66316
|
-
});
|
|
66317
|
-
}
|
|
66318
|
-
exports.loadAllTypeIndexes = loadAllTypeIndexes;
|
|
66319
|
-
/*
|
|
66320
|
-
export async function getAppInstances (store:LiveStore, klass: NamedNode) {
|
|
66321
|
-
|
|
66322
|
-
}
|
|
66323
|
-
*/
|
|
66324
|
-
//# sourceMappingURL=discoveryLogic.js.map
|
|
66325
|
-
|
|
66326
|
-
/***/ }),
|
|
66327
|
-
|
|
66328
66101
|
/***/ "./node_modules/solid-logic/lib/index.js":
|
|
66329
66102
|
/*!***********************************************!*\
|
|
66330
66103
|
!*** ./node_modules/solid-logic/lib/index.js ***!
|
|
@@ -66334,7 +66107,7 @@ export async function getAppInstances (store:LiveStore, klass: NamedNode) {
|
|
|
66334
66107
|
"use strict";
|
|
66335
66108
|
|
|
66336
66109
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
66337
|
-
exports.profile = exports.chat = exports.store = exports.authSession = exports.authn = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.solidLogicSingleton = exports.getSuggestedIssuers = exports.ACL_LINK = exports.appContext = exports.offlineTestID = exports.SolidLogic = exports.
|
|
66110
|
+
exports.profile = exports.chat = exports.store = exports.authSession = exports.authn = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.solidLogicSingleton = exports.getSuggestedIssuers = exports.ACL_LINK = exports.appContext = exports.offlineTestID = exports.SolidLogic = exports.loadIndex = exports.registerInTypeIndex = exports.loadTypeIndexes = exports.ensureTypeIndexes = exports.genACLText = exports.setACLUserPublic = void 0;
|
|
66338
66111
|
// Make these variables directly accessible as it is what you need most of the time
|
|
66339
66112
|
// This also makes these variable globaly accesible in mashlib
|
|
66340
66113
|
var solidLogicSingleton_1 = __webpack_require__(/*! ./logic/solidLogicSingleton */ "./node_modules/solid-logic/lib/logic/solidLogicSingleton.js");
|
|
@@ -66356,12 +66129,6 @@ Object.defineProperty(exports, "ensureTypeIndexes", ({ enumerable: true, get: fu
|
|
|
66356
66129
|
Object.defineProperty(exports, "loadTypeIndexes", ({ enumerable: true, get: function () { return typeIndexLogic_1.loadTypeIndexes; } }));
|
|
66357
66130
|
Object.defineProperty(exports, "registerInTypeIndex", ({ enumerable: true, get: function () { return typeIndexLogic_1.registerInTypeIndex; } }));
|
|
66358
66131
|
Object.defineProperty(exports, "loadIndex", ({ enumerable: true, get: function () { return typeIndexLogic_1.loadIndex; } }));
|
|
66359
|
-
var discoveryLogic_1 = __webpack_require__(/*! ./discovery/discoveryLogic */ "./node_modules/solid-logic/lib/discovery/discoveryLogic.js");
|
|
66360
|
-
Object.defineProperty(exports, "loadProfile", ({ enumerable: true, get: function () { return discoveryLogic_1.loadProfile; } }));
|
|
66361
|
-
Object.defineProperty(exports, "loadPreferences", ({ enumerable: true, get: function () { return discoveryLogic_1.loadPreferences; } }));
|
|
66362
|
-
Object.defineProperty(exports, "loadTypeIndexesFor", ({ enumerable: true, get: function () { return discoveryLogic_1.loadTypeIndexesFor; } }));
|
|
66363
|
-
Object.defineProperty(exports, "loadCommunityTypeIndexes", ({ enumerable: true, get: function () { return discoveryLogic_1.loadCommunityTypeIndexes; } }));
|
|
66364
|
-
Object.defineProperty(exports, "loadAllTypeIndexes", ({ enumerable: true, get: function () { return discoveryLogic_1.loadAllTypeIndexes; } }));
|
|
66365
66132
|
var SolidLogic_1 = __webpack_require__(/*! ./logic/SolidLogic */ "./node_modules/solid-logic/lib/logic/SolidLogic.js");
|
|
66366
66133
|
Object.defineProperty(exports, "SolidLogic", ({ enumerable: true, get: function () { return SolidLogic_1.SolidLogic; } }));
|
|
66367
66134
|
var authUtil_1 = __webpack_require__(/*! ./authn/authUtil */ "./node_modules/solid-logic/lib/authn/authUtil.js");
|
|
@@ -66540,11 +66307,7 @@ exports.FetchError = FetchError;
|
|
|
66540
66307
|
|
|
66541
66308
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
66542
66309
|
if (k2 === undefined) k2 = k;
|
|
66543
|
-
|
|
66544
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
66545
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
66546
|
-
}
|
|
66547
|
-
Object.defineProperty(o, k2, desc);
|
|
66310
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
66548
66311
|
}) : (function(o, m, k, k2) {
|
|
66549
66312
|
if (k2 === undefined) k2 = k;
|
|
66550
66313
|
o[k2] = m[k];
|
|
@@ -66610,62 +66373,51 @@ var ProfileLogic_1 = __webpack_require__(/*! ../profile/ProfileLogic */ "./node_
|
|
|
66610
66373
|
var debug = __importStar(__webpack_require__(/*! ../util/debug */ "./node_modules/solid-logic/lib/util/debug.js"));
|
|
66611
66374
|
var UtilityLogic_1 = __webpack_require__(/*! ../util/UtilityLogic */ "./node_modules/solid-logic/lib/util/UtilityLogic.js");
|
|
66612
66375
|
var CustomError_1 = __webpack_require__(/*! ./CustomError */ "./node_modules/solid-logic/lib/logic/CustomError.js");
|
|
66613
|
-
var solidLogicSingleton_1 = __webpack_require__(/*! ../logic/solidLogicSingleton */ "./node_modules/solid-logic/lib/logic/solidLogicSingleton.js");
|
|
66614
|
-
/*
|
|
66615
|
-
** It is important to distinquish `fetch`, a function provided by the browser
|
|
66616
|
-
** and `Fetcher`, a helper object for the rdflib Store which turns it
|
|
66617
|
-
** into a `ConnectedStore` or a `LiveStore`. A Fetcher object is
|
|
66618
|
-
** available at store.fetcher, and `fetch` function at `store.fetcher._fetch`,
|
|
66619
|
-
*/
|
|
66620
66376
|
var ns = (0, solid_namespace_1.default)(rdf);
|
|
66621
66377
|
var SolidLogic = /** @class */ (function () {
|
|
66622
|
-
function SolidLogic(
|
|
66623
|
-
// would xpect to be able to do it this way: but get TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation status: 999
|
|
66624
|
-
// this.store = new rdf.LiveStore({})
|
|
66625
|
-
// this.store.fetcher._fetch = fetch
|
|
66626
|
-
console.log("SolidLogic: Unique instance created. There should only be one of these.");
|
|
66378
|
+
function SolidLogic(fetcher, session) {
|
|
66627
66379
|
this.store = rdf.graph(); // Make a Quad store
|
|
66628
|
-
rdf.fetcher(this.store,
|
|
66380
|
+
rdf.fetcher(this.store, fetcher); // Attach a web I/O module, store.fetcher
|
|
66629
66381
|
this.store.updater = new rdf.UpdateManager(this.store); // Add real-time live updates store.updater
|
|
66630
66382
|
this.store.features = []; // disable automatic node merging on store load
|
|
66631
66383
|
this.cache = {
|
|
66632
66384
|
profileDocument: {},
|
|
66633
66385
|
preferencesFile: {},
|
|
66634
66386
|
};
|
|
66635
|
-
this.
|
|
66387
|
+
this.fetcher = fetcher;
|
|
66636
66388
|
this.authn = new SolidAuthnLogic_1.SolidAuthnLogic(session);
|
|
66637
66389
|
debug.log('SolidAuthnLogic initialized');
|
|
66638
66390
|
this.profile = new ProfileLogic_1.ProfileLogic(this.store, ns, this.authn);
|
|
66639
66391
|
this.chat = new ChatLogic_1.ChatLogic(this.store, ns, this.profile);
|
|
66640
|
-
this.util = new UtilityLogic_1.UtilityLogic(this.store, ns, this.
|
|
66392
|
+
this.util = new UtilityLogic_1.UtilityLogic(this.store, ns, this.fetcher);
|
|
66641
66393
|
}
|
|
66642
66394
|
SolidLogic.prototype.findAclDocUrl = function (url) {
|
|
66643
66395
|
return this.util.findAclDocUrl(url);
|
|
66644
66396
|
};
|
|
66397
|
+
SolidLogic.prototype.loadDoc = function (doc) {
|
|
66398
|
+
return this.util.loadDoc(doc);
|
|
66399
|
+
};
|
|
66645
66400
|
SolidLogic.prototype.loadProfile = function (me) {
|
|
66646
66401
|
return __awaiter(this, void 0, void 0, function () {
|
|
66647
66402
|
var profileDocument, err_1, message;
|
|
66648
66403
|
return __generator(this, function (_a) {
|
|
66649
66404
|
switch (_a.label) {
|
|
66650
66405
|
case 0:
|
|
66651
|
-
|
|
66652
|
-
// console.log('loadProfile cache ', this.cache)
|
|
66406
|
+
// console.log('loadProfile', me)
|
|
66653
66407
|
if (this.cache.profileDocument[me.value]) {
|
|
66654
|
-
|
|
66655
|
-
|
|
66656
|
-
*/
|
|
66657
|
-
console.log('loadProfile me ', me);
|
|
66658
|
-
profileDocument = me.doc();
|
|
66408
|
+
return [2 /*return*/, this.cache.profileDocument[me.value]];
|
|
66409
|
+
}
|
|
66659
66410
|
_a.label = 1;
|
|
66660
66411
|
case 1:
|
|
66661
66412
|
_a.trys.push([1, 3, , 4]);
|
|
66662
|
-
|
|
66413
|
+
profileDocument = me.doc();
|
|
66414
|
+
return [4 /*yield*/, this.loadDoc(profileDocument)];
|
|
66663
66415
|
case 2:
|
|
66664
66416
|
_a.sent();
|
|
66665
66417
|
return [2 /*return*/, profileDocument];
|
|
66666
66418
|
case 3:
|
|
66667
66419
|
err_1 = _a.sent();
|
|
66668
|
-
message = "
|
|
66420
|
+
message = "Logged in but cannot load profile ".concat(profileDocument, " : ").concat(err_1);
|
|
66669
66421
|
throw new Error(message);
|
|
66670
66422
|
case 4: return [2 /*return*/];
|
|
66671
66423
|
}
|
|
@@ -66689,27 +66441,27 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66689
66441
|
return __generator(this, function (_a) {
|
|
66690
66442
|
switch (_a.label) {
|
|
66691
66443
|
case 0:
|
|
66692
|
-
console.log('loadPreferences
|
|
66444
|
+
// console.log('loadPreferences', me)
|
|
66693
66445
|
if (this.cache.preferencesFile[me.value]) {
|
|
66694
66446
|
return [2 /*return*/, this.cache.preferencesFile[me.value]];
|
|
66695
66447
|
}
|
|
66696
|
-
|
|
66697
|
-
case 1:
|
|
66698
|
-
_a.sent(); // Load pointer to pref file
|
|
66699
|
-
preferencesFile = this.store.any(me, ns.space('preferencesFile'), null, me.doc());
|
|
66448
|
+
preferencesFile = this.store.any(me, ns.space("preferencesFile"));
|
|
66700
66449
|
if (!preferencesFile) {
|
|
66701
66450
|
throw new Error("Can't find a preference file pointer in profile ".concat(me.doc()));
|
|
66702
66451
|
}
|
|
66703
|
-
|
|
66704
|
-
|
|
66705
|
-
|
|
66706
|
-
|
|
66452
|
+
if (!this.store.fetcher) {
|
|
66453
|
+
throw new Error("Cannot load doc, have no fetcher");
|
|
66454
|
+
}
|
|
66455
|
+
_a.label = 1;
|
|
66456
|
+
case 1:
|
|
66457
|
+
_a.trys.push([1, 3, , 4]);
|
|
66458
|
+
return [4 /*yield*/, this.store.fetcher.load(preferencesFile, {
|
|
66707
66459
|
withCredentials: true,
|
|
66708
66460
|
})];
|
|
66709
|
-
case
|
|
66461
|
+
case 2:
|
|
66710
66462
|
_a.sent();
|
|
66711
|
-
return [3 /*break*/,
|
|
66712
|
-
case
|
|
66463
|
+
return [3 /*break*/, 4];
|
|
66464
|
+
case 3:
|
|
66713
66465
|
err_2 = _a.sent();
|
|
66714
66466
|
status_1 = err_2.status;
|
|
66715
66467
|
debug.log("HTTP status ".concat(status_1, " for preference file ").concat(preferencesFile));
|
|
@@ -66726,7 +66478,7 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66726
66478
|
throw new CustomError_1.NotFoundError(preferencesFile.value);
|
|
66727
66479
|
}
|
|
66728
66480
|
throw new CustomError_1.FetchError(err_2.status, err_2.message);
|
|
66729
|
-
case
|
|
66481
|
+
case 4: return [2 /*return*/, preferencesFile];
|
|
66730
66482
|
}
|
|
66731
66483
|
});
|
|
66732
66484
|
});
|
|
@@ -66744,6 +66496,9 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66744
66496
|
});
|
|
66745
66497
|
};
|
|
66746
66498
|
SolidLogic.prototype.load = function (doc) {
|
|
66499
|
+
if (!this.store.fetcher) {
|
|
66500
|
+
throw new Error("Cannot load doc(s), have no fetcher");
|
|
66501
|
+
}
|
|
66747
66502
|
return this.store.fetcher.load(doc);
|
|
66748
66503
|
};
|
|
66749
66504
|
SolidLogic.prototype.loadIndexes = function (me, publicProfile, preferencesFile, onWarning) {
|
|
@@ -66803,10 +66558,14 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66803
66558
|
return __awaiter(this, void 0, void 0, function () {
|
|
66804
66559
|
return __generator(this, function (_a) {
|
|
66805
66560
|
switch (_a.label) {
|
|
66806
|
-
case 0:
|
|
66807
|
-
|
|
66808
|
-
|
|
66809
|
-
}
|
|
66561
|
+
case 0:
|
|
66562
|
+
if (!this.store.fetcher) {
|
|
66563
|
+
throw new Error("Cannot create empty rdf doc, have no fetcher");
|
|
66564
|
+
}
|
|
66565
|
+
return [4 /*yield*/, this.store.fetcher.webOperation("PUT", doc.uri, {
|
|
66566
|
+
data: "# ".concat(new Date(), " ").concat(comment, "\n "),
|
|
66567
|
+
contentType: "text/turtle",
|
|
66568
|
+
})];
|
|
66810
66569
|
case 1:
|
|
66811
66570
|
_a.sent();
|
|
66812
66571
|
return [2 /*return*/];
|
|
@@ -66819,6 +66578,9 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66819
66578
|
var _this = this;
|
|
66820
66579
|
if (ins === void 0) { ins = []; }
|
|
66821
66580
|
return new Promise(function (resolve, reject) {
|
|
66581
|
+
if (!_this.store.updater) {
|
|
66582
|
+
throw new Error("Cannot updatePromise, have no updater");
|
|
66583
|
+
}
|
|
66822
66584
|
_this.store.updater.update(del, ins, function (_uri, ok, errorBody) {
|
|
66823
66585
|
if (!ok) {
|
|
66824
66586
|
reject(new Error(errorBody));
|
|
@@ -66851,7 +66613,7 @@ var SolidLogic = /** @class */ (function () {
|
|
|
66851
66613
|
SolidLogic.prototype.fetch = function (url, options) {
|
|
66852
66614
|
return __awaiter(this, void 0, void 0, function () {
|
|
66853
66615
|
return __generator(this, function (_a) {
|
|
66854
|
-
return [2 /*return*/, this.
|
|
66616
|
+
return [2 /*return*/, this.fetcher.fetch(url, options)];
|
|
66855
66617
|
});
|
|
66856
66618
|
});
|
|
66857
66619
|
};
|
|
@@ -66872,11 +66634,7 @@ exports.SolidLogic = SolidLogic;
|
|
|
66872
66634
|
|
|
66873
66635
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
66874
66636
|
if (k2 === undefined) k2 = k;
|
|
66875
|
-
|
|
66876
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
66877
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
66878
|
-
}
|
|
66879
|
-
Object.defineProperty(o, k2, desc);
|
|
66637
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
66880
66638
|
}) : (function(o, m, k, k2) {
|
|
66881
66639
|
if (k2 === undefined) k2 = k;
|
|
66882
66640
|
o[k2] = m[k];
|
|
@@ -66935,11 +66693,8 @@ var debug = __importStar(__webpack_require__(/*! ../util/debug */ "./node_module
|
|
|
66935
66693
|
var authSession_1 = __webpack_require__(/*! ../authSession/authSession */ "./node_modules/solid-logic/lib/authSession/authSession.js");
|
|
66936
66694
|
var SolidLogic_1 = __webpack_require__(/*! ./SolidLogic */ "./node_modules/solid-logic/lib/logic/SolidLogic.js");
|
|
66937
66695
|
var _fetch = function (url, requestInit) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66938
|
-
var omitCreds;
|
|
66939
66696
|
return __generator(this, function (_a) {
|
|
66940
|
-
|
|
66941
|
-
if (authSession_1.authSession.info.webId && !omitCreds) { // see https://github.com/solid/solidos/issues/114
|
|
66942
|
-
// In fact ftech should respect crentials omit itself
|
|
66697
|
+
if (authSession_1.authSession.info.webId) {
|
|
66943
66698
|
return [2 /*return*/, authSession_1.authSession.fetch(url, requestInit)];
|
|
66944
66699
|
}
|
|
66945
66700
|
else {
|
|
@@ -67072,11 +66827,7 @@ exports.ProfileLogic = ProfileLogic;
|
|
|
67072
66827
|
|
|
67073
66828
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
67074
66829
|
if (k2 === undefined) k2 = k;
|
|
67075
|
-
|
|
67076
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
67077
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
67078
|
-
}
|
|
67079
|
-
Object.defineProperty(o, k2, desc);
|
|
66830
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
67080
66831
|
}) : (function(o, m, k, k2) {
|
|
67081
66832
|
if (k2 === undefined) k2 = k;
|
|
67082
66833
|
o[k2] = m[k];
|
|
@@ -67140,35 +66891,11 @@ var solid_namespace_1 = __importDefault(__webpack_require__(/*! solid-namespace
|
|
|
67140
66891
|
var $rdf = __importStar(__webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js"));
|
|
67141
66892
|
var uri_1 = __webpack_require__(/*! ../util/uri */ "./node_modules/solid-logic/lib/util/uri.js");
|
|
67142
66893
|
var solidLogicSingleton_1 = __webpack_require__(/*! ../logic/solidLogicSingleton */ "./node_modules/solid-logic/lib/logic/solidLogicSingleton.js");
|
|
67143
|
-
// import { ensureLoadedPreferences } from '../logic/logic'
|
|
67144
|
-
var discoveryLogic_1 = __webpack_require__(/*! ../discovery/discoveryLogic */ "./node_modules/solid-logic/lib/discovery/discoveryLogic.js");
|
|
67145
66894
|
exports.ns = (0, solid_namespace_1.default)($rdf);
|
|
67146
|
-
var store = solidLogicSingleton_1.solidLogicSingleton.store;
|
|
67147
|
-
function ensureLoadedPreferences(context) {
|
|
67148
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67149
|
-
var _a, _b;
|
|
67150
|
-
return __generator(this, function (_c) {
|
|
67151
|
-
switch (_c.label) {
|
|
67152
|
-
case 0:
|
|
67153
|
-
if (!context.me)
|
|
67154
|
-
throw new Error('@@ ensureLoadedPreferences: no user specified');
|
|
67155
|
-
_a = context;
|
|
67156
|
-
return [4 /*yield*/, (0, discoveryLogic_1.loadProfile)(store, context.me)];
|
|
67157
|
-
case 1:
|
|
67158
|
-
_a.publicProfile = _c.sent();
|
|
67159
|
-
_b = context;
|
|
67160
|
-
return [4 /*yield*/, (0, discoveryLogic_1.loadPreferences)(store, context.me)];
|
|
67161
|
-
case 2:
|
|
67162
|
-
_b.preferencesFile = _c.sent();
|
|
67163
|
-
return [2 /*return*/, context];
|
|
67164
|
-
}
|
|
67165
|
-
});
|
|
67166
|
-
});
|
|
67167
|
-
}
|
|
67168
66895
|
/**
|
|
67169
66896
|
* Resolves with the same context, outputting
|
|
67170
66897
|
* output: index.public, index.private
|
|
67171
|
-
*
|
|
66898
|
+
*
|
|
67172
66899
|
* @see https://github.com/solid/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67173
66900
|
*/
|
|
67174
66901
|
function loadIndex(context, isPublic) {
|
|
@@ -67185,8 +66912,8 @@ function loadIndex(context, isPublic) {
|
|
|
67185
66912
|
case 1:
|
|
67186
66913
|
indexes = _a.sent();
|
|
67187
66914
|
context.index = context.index || {};
|
|
67188
|
-
context.index.private = indexes.private
|
|
67189
|
-
context.index.public = indexes.public
|
|
66915
|
+
context.index.private = indexes.private || context.index.private;
|
|
66916
|
+
context.index.public = indexes.public || context.index.public;
|
|
67190
66917
|
return [2 /*return*/, context];
|
|
67191
66918
|
}
|
|
67192
66919
|
});
|
|
@@ -67195,36 +66922,21 @@ function loadIndex(context, isPublic) {
|
|
|
67195
66922
|
exports.loadIndex = loadIndex;
|
|
67196
66923
|
function loadTypeIndexes(context) {
|
|
67197
66924
|
return __awaiter(this, void 0, void 0, function () {
|
|
67198
|
-
var
|
|
66925
|
+
var indexes;
|
|
67199
66926
|
var _this = this;
|
|
67200
66927
|
return __generator(this, function (_a) {
|
|
67201
66928
|
switch (_a.label) {
|
|
67202
|
-
case 0:
|
|
67203
|
-
|
|
67204
|
-
return
|
|
66929
|
+
case 0: return [4 /*yield*/, solidLogicSingleton_1.solidLogicSingleton.loadIndexes(context.me, context.publicProfile || null, context.preferencesFile || null,
|
|
66930
|
+
// async (err: Error) => widgets.complain(context, err.message)
|
|
66931
|
+
function (err) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
66932
|
+
return [2 /*return*/, debug.warn(err.message)];
|
|
66933
|
+
}); }); })];
|
|
67205
66934
|
case 1:
|
|
67206
|
-
_a.sent();
|
|
67207
|
-
return [3 /*break*/, 3];
|
|
67208
|
-
case 2:
|
|
67209
|
-
error_1 = _a.sent();
|
|
67210
|
-
debug.warn(error_1.message);
|
|
67211
|
-
return [3 /*break*/, 3];
|
|
67212
|
-
case 3:
|
|
67213
|
-
_a.trys.push([3, 5, , 6]);
|
|
67214
|
-
return [4 /*yield*/, solidLogicSingleton_1.solidLogicSingleton.loadIndexes(context.me, context.publicProfile || null, context.preferencesFile || null)];
|
|
67215
|
-
case 4:
|
|
67216
66935
|
indexes = _a.sent();
|
|
67217
66936
|
context.index = context.index || {};
|
|
67218
66937
|
context.index.private = indexes.private || context.index.private;
|
|
67219
66938
|
context.index.public = indexes.public || context.index.public;
|
|
67220
66939
|
return [2 /*return*/, context];
|
|
67221
|
-
case 5:
|
|
67222
|
-
error_2 = _a.sent();
|
|
67223
|
-
(function (error) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
67224
|
-
return [2 /*return*/, debug.warn(error.message)];
|
|
67225
|
-
}); }); });
|
|
67226
|
-
return [3 /*break*/, 6];
|
|
67227
|
-
case 6: return [2 /*return*/];
|
|
67228
66940
|
}
|
|
67229
66941
|
});
|
|
67230
66942
|
});
|
|
@@ -67234,18 +66946,14 @@ exports.loadTypeIndexes = loadTypeIndexes;
|
|
|
67234
66946
|
* Resolves with the same context, outputting
|
|
67235
66947
|
* @see https://github.com/solid/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67236
66948
|
*/
|
|
67237
|
-
function ensureTypeIndexes(context
|
|
66949
|
+
function ensureTypeIndexes(context) {
|
|
67238
66950
|
return __awaiter(this, void 0, void 0, function () {
|
|
67239
66951
|
return __generator(this, function (_a) {
|
|
67240
66952
|
switch (_a.label) {
|
|
67241
|
-
case 0:
|
|
67242
|
-
if (!context.me) {
|
|
67243
|
-
throw new Error("ensureTypeIndexes: @@ no user");
|
|
67244
|
-
}
|
|
67245
|
-
return [4 /*yield*/, ensureOneTypeIndex(context, true, agent)];
|
|
66953
|
+
case 0: return [4 /*yield*/, ensureOneTypeIndex(context, true)];
|
|
67246
66954
|
case 1:
|
|
67247
66955
|
_a.sent();
|
|
67248
|
-
return [4 /*yield*/, ensureOneTypeIndex(context, false
|
|
66956
|
+
return [4 /*yield*/, ensureOneTypeIndex(context, false)];
|
|
67249
66957
|
case 2:
|
|
67250
66958
|
_a.sent();
|
|
67251
66959
|
return [2 /*return*/, context];
|
|
@@ -67262,7 +66970,7 @@ exports.ensureTypeIndexes = ensureTypeIndexes;
|
|
|
67262
66970
|
* Adds its output to the context
|
|
67263
66971
|
* @see https://github.com/solid/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67264
66972
|
*/
|
|
67265
|
-
function ensureOneTypeIndex(context, isPublic
|
|
66973
|
+
function ensureOneTypeIndex(context, isPublic) {
|
|
67266
66974
|
return __awaiter(this, void 0, void 0, function () {
|
|
67267
66975
|
function makeIndexIfNecessary(context, isPublic) {
|
|
67268
66976
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -67293,16 +67001,10 @@ function ensureOneTypeIndex(context, isPublic, agent) {
|
|
|
67293
67001
|
switch (_a.label) {
|
|
67294
67002
|
case 0:
|
|
67295
67003
|
relevant = isPublic ? context.publicProfile : context.preferencesFile;
|
|
67296
|
-
if (!relevant)
|
|
67297
|
-
alert('@@@@ relevent null');
|
|
67298
67004
|
visibility = isPublic ? 'public' : 'private';
|
|
67299
67005
|
context.index = context.index || {};
|
|
67300
67006
|
context.index[visibility] = context.index[visibility] || [];
|
|
67301
67007
|
if (!(context.index[visibility].length === 0)) return [3 /*break*/, 6];
|
|
67302
|
-
if (!store.updater.editable(relevant)) {
|
|
67303
|
-
debug.log("Not adding new type index as ".concat(relevant, " is not editable"));
|
|
67304
|
-
return [2 /*return*/];
|
|
67305
|
-
}
|
|
67306
67008
|
newIndex = (0, rdflib_1.sym)("".concat(relevant.dir().uri + visibility, "TypeIndex.ttl"));
|
|
67307
67009
|
debug.log("Linking to new fresh type index ".concat(newIndex));
|
|
67308
67010
|
if (!confirm("OK to create a new empty index file at ".concat(newIndex, ", overwriting anything that is now there?"))) {
|
|
@@ -67351,41 +67053,29 @@ function ensureOneTypeIndex(context, isPublic, agent) {
|
|
|
67351
67053
|
});
|
|
67352
67054
|
});
|
|
67353
67055
|
} // makeIndexIfNecessary
|
|
67354
|
-
var
|
|
67056
|
+
var error_1;
|
|
67355
67057
|
return __generator(this, function (_a) {
|
|
67356
67058
|
switch (_a.label) {
|
|
67357
|
-
case 0:
|
|
67059
|
+
case 0:
|
|
67060
|
+
_a.trys.push([0, 2, , 4]);
|
|
67061
|
+
return [4 /*yield*/, loadIndex(context, isPublic)];
|
|
67358
67062
|
case 1:
|
|
67359
|
-
context2 = _a.sent();
|
|
67360
|
-
if (!context2.publicProfile)
|
|
67361
|
-
throw new Error("@@ type index: no publicProfile");
|
|
67362
|
-
if (!context2.preferencesFile)
|
|
67363
|
-
throw new Error("@@ type index: no preferencesFile for profile ".concat(context2.publicProfile));
|
|
67364
|
-
relevant = isPublic ? context2.publicProfile : context2.preferencesFile;
|
|
67365
|
-
_a.label = 2;
|
|
67366
|
-
case 2:
|
|
67367
|
-
_a.trys.push([2, 5, , 7]);
|
|
67368
|
-
return [4 /*yield*/, loadIndex(context2, isPublic)];
|
|
67369
|
-
case 3:
|
|
67370
67063
|
_a.sent();
|
|
67371
|
-
|
|
67372
|
-
|
|
67373
|
-
|
|
67374
|
-
|
|
67064
|
+
if (context.index) {
|
|
67065
|
+
debug.log("ensureOneTypeIndex: Type index exists already ".concat(isPublic
|
|
67066
|
+
? context.index.public[0]
|
|
67067
|
+
: context.index.private[0]));
|
|
67375
67068
|
}
|
|
67376
|
-
return [
|
|
67377
|
-
case
|
|
67378
|
-
_a.sent();
|
|
67379
|
-
return [
|
|
67380
|
-
|
|
67381
|
-
error_3 = _a.sent();
|
|
67382
|
-
return [4 /*yield*/, makeIndexIfNecessary(context2, isPublic)
|
|
67383
|
-
// widgets.complain(context2, 'calling loadIndex:' + error)
|
|
67069
|
+
return [2 /*return*/, context];
|
|
67070
|
+
case 2:
|
|
67071
|
+
error_1 = _a.sent();
|
|
67072
|
+
return [4 /*yield*/, makeIndexIfNecessary(context, isPublic)
|
|
67073
|
+
// widgets.complain(context, 'calling loadIndex:' + error)
|
|
67384
67074
|
];
|
|
67385
|
-
case
|
|
67075
|
+
case 3:
|
|
67386
67076
|
_a.sent();
|
|
67387
|
-
return [3 /*break*/,
|
|
67388
|
-
case
|
|
67077
|
+
return [3 /*break*/, 4];
|
|
67078
|
+
case 4: return [2 /*return*/];
|
|
67389
67079
|
}
|
|
67390
67080
|
});
|
|
67391
67081
|
});
|
|
@@ -67394,13 +67084,12 @@ function ensureOneTypeIndex(context, isPublic, agent) {
|
|
|
67394
67084
|
* Register a new app in a type index
|
|
67395
67085
|
* used in chat in bookmark.js (solid-ui)
|
|
67396
67086
|
*/
|
|
67397
|
-
function registerInTypeIndex(context, instance, theClass, isPublic
|
|
67398
|
-
) {
|
|
67087
|
+
function registerInTypeIndex(context, instance, theClass, isPublic) {
|
|
67399
67088
|
return __awaiter(this, void 0, void 0, function () {
|
|
67400
67089
|
var indexes, index, registration, ins, e_2;
|
|
67401
67090
|
return __generator(this, function (_a) {
|
|
67402
67091
|
switch (_a.label) {
|
|
67403
|
-
case 0: return [4 /*yield*/, ensureOneTypeIndex(context, isPublic
|
|
67092
|
+
case 0: return [4 /*yield*/, ensureOneTypeIndex(context, isPublic)];
|
|
67404
67093
|
case 1:
|
|
67405
67094
|
_a.sent();
|
|
67406
67095
|
if (!context.index) {
|
|
@@ -67492,10 +67181,10 @@ exports.ACL_LINK = (0, rdflib_1.sym)("http://www.iana.org/assignments/link-relat
|
|
|
67492
67181
|
* Utility-related logic
|
|
67493
67182
|
*/
|
|
67494
67183
|
var UtilityLogic = /** @class */ (function () {
|
|
67495
|
-
function UtilityLogic(store, ns,
|
|
67184
|
+
function UtilityLogic(store, ns, fetcher) {
|
|
67496
67185
|
this.store = store;
|
|
67497
67186
|
this.ns = ns;
|
|
67498
|
-
this.
|
|
67187
|
+
this.fetcher = fetcher;
|
|
67499
67188
|
}
|
|
67500
67189
|
UtilityLogic.prototype.findAclDocUrl = function (url) {
|
|
67501
67190
|
var _a;
|
|
@@ -67554,7 +67243,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67554
67243
|
return [4 /*yield*/, this.findAclDocUrl(options.target)];
|
|
67555
67244
|
case 1:
|
|
67556
67245
|
aclDocUrl = _a.sent();
|
|
67557
|
-
return [2 /*return*/, this.
|
|
67246
|
+
return [2 /*return*/, this.fetcher.fetch(aclDocUrl, {
|
|
67558
67247
|
method: 'PUT',
|
|
67559
67248
|
body: str,
|
|
67560
67249
|
headers: [
|
|
@@ -67600,7 +67289,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67600
67289
|
if (!this.isContainer(url)) {
|
|
67601
67290
|
throw new Error("Not a container URL ".concat(url));
|
|
67602
67291
|
}
|
|
67603
|
-
return [4 /*yield*/, this.
|
|
67292
|
+
return [4 /*yield*/, this.fetcher.fetch(url, {
|
|
67604
67293
|
method: "PUT",
|
|
67605
67294
|
headers: {
|
|
67606
67295
|
"Content-Type": "text/turtle",
|
|
@@ -67653,7 +67342,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67653
67342
|
return [4 /*yield*/, this.findAclDocUrl(url)];
|
|
67654
67343
|
case 1:
|
|
67655
67344
|
aclDocUrl = _a.sent();
|
|
67656
|
-
return [4 /*yield*/, this.
|
|
67345
|
+
return [4 /*yield*/, this.fetcher.fetch(aclDocUrl, { method: "DELETE" })];
|
|
67657
67346
|
case 2:
|
|
67658
67347
|
_a.sent();
|
|
67659
67348
|
return [4 /*yield*/, this.getContainerMembers(url)];
|
|
@@ -67663,7 +67352,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67663
67352
|
case 4:
|
|
67664
67353
|
_a.sent();
|
|
67665
67354
|
_a.label = 5;
|
|
67666
|
-
case 5: return [2 /*return*/, this.
|
|
67355
|
+
case 5: return [2 /*return*/, this.fetcher.fetch(url, { method: "DELETE" })];
|
|
67667
67356
|
case 6:
|
|
67668
67357
|
e_1 = _a.sent();
|
|
67669
67358
|
return [3 /*break*/, 7];
|