solid-logic 1.3.17-615b75c1 → 1.3.17-6e0634d8
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/README.md +2 -2
- package/jest.config.js +1 -1
- package/lib/acl/aclLogic.d.ts +3 -30
- package/lib/acl/aclLogic.d.ts.map +1 -1
- package/lib/acl/aclLogic.js +150 -119
- package/lib/acl/aclLogic.js.map +1 -1
- package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/lib/authn/SolidAuthnLogic.js +2 -2
- package/lib/authn/SolidAuthnLogic.js.map +1 -1
- package/lib/chat/chatLogic.d.ts +3 -0
- package/lib/chat/chatLogic.d.ts.map +1 -0
- package/lib/chat/{ChatLogic.js → chatLogic.js} +82 -86
- package/lib/chat/chatLogic.js.map +1 -0
- package/lib/inbox/inboxLogic.d.ts +3 -0
- package/lib/inbox/inboxLogic.d.ts.map +1 -0
- package/lib/inbox/{InboxLogic.js → inboxLogic.js} +59 -64
- package/lib/inbox/inboxLogic.js.map +1 -0
- package/lib/index.d.ts +6 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -25
- package/lib/index.js.map +1 -1
- package/lib/issuer/issuerLogic.js +1 -1
- package/lib/issuer/issuerLogic.js.map +1 -1
- package/lib/logic/CustomError.d.ts +4 -0
- package/lib/logic/CustomError.d.ts.map +1 -1
- package/lib/logic/CustomError.js +17 -1
- package/lib/logic/CustomError.js.map +1 -1
- package/lib/logic/solidLogic.d.ts +6 -0
- package/lib/logic/solidLogic.d.ts.map +1 -0
- package/lib/logic/solidLogic.js +92 -0
- package/lib/logic/solidLogic.js.map +1 -0
- package/lib/logic/solidLogicSingleton.d.ts +1 -2
- package/lib/logic/solidLogicSingleton.d.ts.map +1 -1
- package/lib/logic/solidLogicSingleton.js +3 -3
- package/lib/logic/solidLogicSingleton.js.map +1 -1
- package/lib/profile/profileLogic.d.ts +3 -0
- package/lib/profile/profileLogic.d.ts.map +1 -0
- package/lib/profile/profileLogic.js +246 -0
- package/lib/profile/profileLogic.js.map +1 -0
- package/lib/typeIndex/typeIndexLogic.d.ts +2 -21
- package/lib/typeIndex/typeIndexLogic.d.ts.map +1 -1
- package/lib/typeIndex/typeIndexLogic.js +304 -296
- package/lib/typeIndex/typeIndexLogic.js.map +1 -1
- package/lib/types.d.ts +82 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/util/containerLogic.d.ts +11 -0
- package/lib/util/containerLogic.d.ts.map +1 -0
- package/lib/{profile/ProfileLogic.js → util/containerLogic.js} +51 -44
- package/lib/util/containerLogic.js.map +1 -0
- package/lib/util/ns.d.ts +2 -0
- package/lib/util/ns.d.ts.map +1 -0
- package/lib/util/ns.js +34 -0
- package/lib/util/ns.js.map +1 -0
- package/lib/util/utilityLogic.d.ts +15 -0
- package/lib/util/utilityLogic.d.ts.map +1 -0
- package/lib/util/utilityLogic.js +274 -0
- package/lib/util/utilityLogic.js.map +1 -0
- package/lib/util/utils.d.ts +8 -0
- package/lib/util/utils.d.ts.map +1 -0
- package/lib/util/utils.js +48 -0
- package/lib/util/utils.js.map +1 -0
- package/package.json +5 -1
- package/src/acl/aclLogic.ts +136 -118
- package/src/authn/SolidAuthnLogic.ts +3 -2
- package/src/chat/chatLogic.ts +225 -0
- package/src/inbox/inboxLogic.ts +58 -0
- package/src/index.ts +11 -29
- package/src/issuer/issuerLogic.ts +1 -1
- package/src/logic/CustomError.ts +5 -1
- package/src/logic/solidLogic.ts +75 -0
- package/src/logic/solidLogicSingleton.ts +3 -3
- package/src/profile/profileLogic.ts +126 -0
- package/src/typeIndex/typeIndexLogic.ts +175 -182
- package/src/types.ts +83 -4
- package/src/util/containerLogic.ts +53 -0
- package/src/util/ns.ts +5 -0
- package/src/util/utilityLogic.ts +156 -0
- package/src/util/utils.ts +52 -0
- package/test/aclLogic.test.ts +13 -4
- package/test/chatLogic.test.ts +70 -71
- package/test/container.test.ts +57 -0
- package/test/helpers/dataSetup.ts +134 -0
- package/test/helpers/setup.ts +1 -0
- package/test/inboxLogic.test.ts +40 -38
- package/test/logic.test.ts +10 -9
- package/test/profileLogic.test.ts +246 -0
- package/test/typeIndexLogic.test.ts +487 -30
- package/test/utilityLogic.test.ts +172 -126
- package/test/utils.test.ts +32 -0
- package/lib/chat/ChatLogic.d.ts +0 -26
- package/lib/chat/ChatLogic.d.ts.map +0 -1
- package/lib/chat/ChatLogic.js.map +0 -1
- package/lib/chat/determineChatContainer.d.ts +0 -3
- package/lib/chat/determineChatContainer.d.ts.map +0 -1
- package/lib/chat/determineChatContainer.js +0 -12
- package/lib/chat/determineChatContainer.js.map +0 -1
- package/lib/discovery/discoveryLogic.d.ts +0 -40
- package/lib/discovery/discoveryLogic.d.ts.map +0 -1
- package/lib/discovery/discoveryLogic.js +0 -494
- package/lib/discovery/discoveryLogic.js.map +0 -1
- package/lib/inbox/InboxLogic.d.ts +0 -18
- package/lib/inbox/InboxLogic.d.ts.map +0 -1
- package/lib/inbox/InboxLogic.js.map +0 -1
- package/lib/logic/SolidLogic.d.ts +0 -48
- package/lib/logic/SolidLogic.d.ts.map +0 -1
- package/lib/logic/SolidLogic.js +0 -321
- package/lib/logic/SolidLogic.js.map +0 -1
- package/lib/profile/ProfileLogic.d.ts +0 -13
- package/lib/profile/ProfileLogic.d.ts.map +0 -1
- package/lib/profile/ProfileLogic.js.map +0 -1
- package/lib/util/UtilityLogic.d.ts +0 -33
- package/lib/util/UtilityLogic.d.ts.map +0 -1
- package/lib/util/UtilityLogic.js +0 -240
- package/lib/util/UtilityLogic.js.map +0 -1
- package/lib/util/uri.d.ts +0 -3
- package/lib/util/uri.d.ts.map +0 -1
- package/lib/util/uri.js +0 -9
- package/lib/util/uri.js.map +0 -1
- package/src/chat/ChatLogic.ts +0 -244
- package/src/chat/determineChatContainer.ts +0 -14
- package/src/discovery/discoveryLogic.ts +0 -311
- package/src/inbox/InboxLogic.ts +0 -66
- package/src/logic/SolidLogic.ts +0 -262
- package/src/profile/ProfileLogic.ts +0 -44
- package/src/util/UtilityLogic.ts +0 -161
- package/src/util/uri.ts +0 -5
- package/test/discoveryLogic.test.ts +0 -740
|
@@ -1,494 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.registerInstanceInTypeIndex = exports.getAppInstances = exports.getScopedAppInstances = exports.getScopedAppsfromIndex = exports.uniqueNodes = exports.loadAllTypeIndexes = exports.loadCommunityTypeIndexes = exports.loadTypeIndexesFor = exports.loadPreferences = exports.loadProfile = exports.followOrCreateLink = exports.suggestPrivateTypeIndex = exports.suggestPublicTypeIndex = exports.suggestPreferencesFile = exports.loadOrCreateIfNotExists = void 0;
|
|
40
|
-
var rdflib_1 = require("rdflib");
|
|
41
|
-
// import * as debug from '../util/debug'
|
|
42
|
-
// import { getContainerMembers } from '../util/UtilityLogic'
|
|
43
|
-
var solidLogicSingleton_1 = require("../logic/solidLogicSingleton");
|
|
44
|
-
var uri_1 = require("../util/uri");
|
|
45
|
-
var authn = solidLogicSingleton_1.solidLogicSingleton.authn;
|
|
46
|
-
var currentUser = authn.currentUser;
|
|
47
|
-
var ns = {
|
|
48
|
-
dct: (0, rdflib_1.Namespace)('http://purl.org/dc/terms/'),
|
|
49
|
-
ldp: (0, rdflib_1.Namespace)('http://www.w3.org/ns/ldp#'),
|
|
50
|
-
meeting: (0, rdflib_1.Namespace)('http://www.w3.org/ns/pim/meeting#'),
|
|
51
|
-
rdf: (0, rdflib_1.Namespace)('http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
|
|
52
|
-
schema: (0, rdflib_1.Namespace)('http://schema.org/'),
|
|
53
|
-
solid: (0, rdflib_1.Namespace)('http://www.w3.org/ns/solid/terms#'),
|
|
54
|
-
space: (0, rdflib_1.Namespace)('http://www.w3.org/ns/pim/space#'),
|
|
55
|
-
stat: (0, rdflib_1.Namespace)('http://www.w3.org/ns/posix/stat#'),
|
|
56
|
-
vcard: (0, rdflib_1.Namespace)('http://www.w3.org/2006/vcard/ns#'),
|
|
57
|
-
wf: (0, rdflib_1.Namespace)('http://www.w3.org/2005/01/wf/flow#'),
|
|
58
|
-
xsd: (0, rdflib_1.Namespace)('http://www.w3.org/2001/XMLSchema#')
|
|
59
|
-
};
|
|
60
|
-
/** Create a resource if it really does not exist
|
|
61
|
-
* Be absolutely sure something does not exist before creating a new empty file
|
|
62
|
-
* as otherwise existing could be deleted.
|
|
63
|
-
* @param doc {NamedNode} - The resource
|
|
64
|
-
*/
|
|
65
|
-
function loadOrCreateIfNotExists(store, doc) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
var response, err_1, msg, msg;
|
|
68
|
-
return __generator(this, function (_a) {
|
|
69
|
-
switch (_a.label) {
|
|
70
|
-
case 0:
|
|
71
|
-
_a.trys.push([0, 2, , 3]);
|
|
72
|
-
return [4 /*yield*/, store.fetcher.load(doc)];
|
|
73
|
-
case 1:
|
|
74
|
-
response = _a.sent();
|
|
75
|
-
return [3 /*break*/, 3];
|
|
76
|
-
case 2:
|
|
77
|
-
err_1 = _a.sent();
|
|
78
|
-
if (err_1.response.status === 404) {
|
|
79
|
-
// console.log('createIfNotExists doc does NOT exist, will create: ' + doc)
|
|
80
|
-
try {
|
|
81
|
-
store.fetcher.webOperation('PUT', doc, { data: '', contentType: 'text/turtle' });
|
|
82
|
-
}
|
|
83
|
-
catch (err) {
|
|
84
|
-
msg = 'createIfNotExists: PUT FAILED: ' + doc + ': ' + err;
|
|
85
|
-
// console.log(msg)
|
|
86
|
-
throw new Error(msg);
|
|
87
|
-
}
|
|
88
|
-
delete store.fetcher.requested[doc.uri]; // delete cached 404 error
|
|
89
|
-
// console.log('createIfNotExists doc created ok ' + doc)
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
msg = 'createIfNotExists doc load error NOT 404: ' + doc + ': ' + err_1;
|
|
93
|
-
// console.log(msg)
|
|
94
|
-
throw new Error(msg); // @@ add nested errors
|
|
95
|
-
}
|
|
96
|
-
return [3 /*break*/, 3];
|
|
97
|
-
case 3:
|
|
98
|
-
// console.log('createIfNotExists doc exists, all good ' + doc)
|
|
99
|
-
return [2 /*return*/, response];
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
exports.loadOrCreateIfNotExists = loadOrCreateIfNotExists;
|
|
105
|
-
function suggestPreferencesFile(me) {
|
|
106
|
-
var stripped = me.uri.replace('/profile/', '/').replace('/public/', '/');
|
|
107
|
-
// const stripped = me.uri.replace(\/[p|P]rofile/\g, '/').replace(\/[p|P]ublic/\g, '/')
|
|
108
|
-
var folderURI = stripped.split('/').slice(0, -1).join('/') + '/Settings/';
|
|
109
|
-
var fileURI = folderURI + 'Preferences.ttl';
|
|
110
|
-
return (0, rdflib_1.sym)(fileURI);
|
|
111
|
-
}
|
|
112
|
-
exports.suggestPreferencesFile = suggestPreferencesFile;
|
|
113
|
-
function suggestPublicTypeIndex(me) {
|
|
114
|
-
var _a;
|
|
115
|
-
return (0, rdflib_1.sym)(((_a = me.doc().dir()) === null || _a === void 0 ? void 0 : _a.uri) + 'publicTypeIndex.ttl');
|
|
116
|
-
}
|
|
117
|
-
exports.suggestPublicTypeIndex = suggestPublicTypeIndex;
|
|
118
|
-
// Note this one is based off the pref file not the profile
|
|
119
|
-
function suggestPrivateTypeIndex(preferencesFile) {
|
|
120
|
-
var _a;
|
|
121
|
-
return (0, rdflib_1.sym)(((_a = preferencesFile.doc().dir()) === null || _a === void 0 ? void 0 : _a.uri) + 'privateTypeIndex.ttl');
|
|
122
|
-
}
|
|
123
|
-
exports.suggestPrivateTypeIndex = suggestPrivateTypeIndex;
|
|
124
|
-
/* Follow link from this doc to another thing, or else make a new link
|
|
125
|
-
**
|
|
126
|
-
** return: null no ld one and failed to make a new one
|
|
127
|
-
*/
|
|
128
|
-
function followOrCreateLink(store, subject, predicate, object, doc) {
|
|
129
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
-
var result, err_2, err_3;
|
|
131
|
-
return __generator(this, function (_a) {
|
|
132
|
-
switch (_a.label) {
|
|
133
|
-
case 0: return [4 /*yield*/, store.fetcher.load(doc)];
|
|
134
|
-
case 1:
|
|
135
|
-
_a.sent();
|
|
136
|
-
result = store.any(subject, predicate, null, doc);
|
|
137
|
-
// console.log('@@ followOrCreateLink result ', result)
|
|
138
|
-
if (result)
|
|
139
|
-
return [2 /*return*/, result];
|
|
140
|
-
if (!store.updater.editable(doc)) {
|
|
141
|
-
// console.log(`followOrCreateLink: Can't modify ${doc} so can't make new link to ${object}.`)
|
|
142
|
-
// console.log('followOrCreateLink @@ connectedStatements', store.connectedStatements(subject))
|
|
143
|
-
return [2 /*return*/, null];
|
|
144
|
-
}
|
|
145
|
-
_a.label = 2;
|
|
146
|
-
case 2:
|
|
147
|
-
_a.trys.push([2, 4, , 5]);
|
|
148
|
-
return [4 /*yield*/, store.updater.update([], [(0, rdflib_1.st)(subject, predicate, object, doc)])];
|
|
149
|
-
case 3:
|
|
150
|
-
_a.sent();
|
|
151
|
-
return [3 /*break*/, 5];
|
|
152
|
-
case 4:
|
|
153
|
-
err_2 = _a.sent();
|
|
154
|
-
console.warn("followOrCreateLink: Error making link in ".concat(doc, " to ").concat(object, ": ").concat(err_2));
|
|
155
|
-
return [2 /*return*/, null];
|
|
156
|
-
case 5:
|
|
157
|
-
_a.trys.push([5, 7, , 8]);
|
|
158
|
-
return [4 /*yield*/, loadOrCreateIfNotExists(store, object)
|
|
159
|
-
// store.fetcher.webOperation('PUT', object, { data: '', contentType: 'text/turtle'})
|
|
160
|
-
];
|
|
161
|
-
case 6:
|
|
162
|
-
_a.sent();
|
|
163
|
-
return [3 /*break*/, 8];
|
|
164
|
-
case 7:
|
|
165
|
-
err_3 = _a.sent();
|
|
166
|
-
console.warn("followOrCreateLink: Error loading or saving new linked document: ".concat(object, ": ").concat(err_3));
|
|
167
|
-
return [3 /*break*/, 8];
|
|
168
|
-
case 8:
|
|
169
|
-
// console.log(`followOrCreateLink: Success loading or saving new linked document: ${object}.`)
|
|
170
|
-
return [2 /*return*/, object];
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
exports.followOrCreateLink = followOrCreateLink;
|
|
176
|
-
function loadProfile(store, user) {
|
|
177
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
178
|
-
return __generator(this, function (_a) {
|
|
179
|
-
switch (_a.label) {
|
|
180
|
-
case 0:
|
|
181
|
-
// console.log(' @@ loadProfile: user', user)
|
|
182
|
-
if (!user) {
|
|
183
|
-
throw new Error("loadProfile: no user given.");
|
|
184
|
-
}
|
|
185
|
-
// try {
|
|
186
|
-
return [4 /*yield*/, store.fetcher.load(user.doc())
|
|
187
|
-
// } catch (err) {
|
|
188
|
-
// throw new Error(`Unable to load profile of user ${user}: ${err}`)
|
|
189
|
-
//}
|
|
190
|
-
];
|
|
191
|
-
case 1:
|
|
192
|
-
// try {
|
|
193
|
-
_a.sent();
|
|
194
|
-
// } catch (err) {
|
|
195
|
-
// throw new Error(`Unable to load profile of user ${user}: ${err}`)
|
|
196
|
-
//}
|
|
197
|
-
return [2 /*return*/, user.doc()];
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
exports.loadProfile = loadProfile;
|
|
203
|
-
function loadPreferences(store, user) {
|
|
204
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
-
var possiblePreferencesFile, preferencesFile, message, err_4;
|
|
206
|
-
return __generator(this, function (_a) {
|
|
207
|
-
switch (_a.label) {
|
|
208
|
-
case 0:
|
|
209
|
-
// console.log('loadPreferences @@ user', user)
|
|
210
|
-
return [4 /*yield*/, loadProfile(store, user)];
|
|
211
|
-
case 1:
|
|
212
|
-
// console.log('loadPreferences @@ user', user)
|
|
213
|
-
_a.sent();
|
|
214
|
-
possiblePreferencesFile = suggestPreferencesFile(user);
|
|
215
|
-
return [4 /*yield*/, followOrCreateLink(store, user, ns.space('preferencesFile'), possiblePreferencesFile, user.doc())
|
|
216
|
-
// const preferencesFile = store.any(user, ns.space('preferencesFile'), undefined, profile)
|
|
217
|
-
// console.log('loadPreferences @@ pref file', preferencesFile)
|
|
218
|
-
];
|
|
219
|
-
case 2:
|
|
220
|
-
preferencesFile = _a.sent();
|
|
221
|
-
// const preferencesFile = store.any(user, ns.space('preferencesFile'), undefined, profile)
|
|
222
|
-
// console.log('loadPreferences @@ pref file', preferencesFile)
|
|
223
|
-
if (!preferencesFile) {
|
|
224
|
-
message = "User ".concat(user, " has no pointer in profile to preferences file.");
|
|
225
|
-
console.warn(message);
|
|
226
|
-
// throw new Error()
|
|
227
|
-
return [2 /*return*/, undefined];
|
|
228
|
-
}
|
|
229
|
-
_a.label = 3;
|
|
230
|
-
case 3:
|
|
231
|
-
_a.trys.push([3, 5, , 6]);
|
|
232
|
-
return [4 /*yield*/, store.fetcher.load(preferencesFile)];
|
|
233
|
-
case 4:
|
|
234
|
-
_a.sent();
|
|
235
|
-
return [3 /*break*/, 6];
|
|
236
|
-
case 5:
|
|
237
|
-
err_4 = _a.sent();
|
|
238
|
-
return [2 /*return*/, undefined
|
|
239
|
-
// throw new Error(`Unable to load preferences file ${preferencesFile} of user <${user}>: ${err}`)
|
|
240
|
-
];
|
|
241
|
-
case 6: return [2 /*return*/, preferencesFile];
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
exports.loadPreferences = loadPreferences;
|
|
247
|
-
function loadTypeIndexesFor(store, user) {
|
|
248
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
249
|
-
var profile, suggestion, publicTypeIndex, publicScopes, preferencesFile, err_5, privateScopes, suggestedPrivateTypeIndex, privateTypeIndex, _a, scopes, files, err_6;
|
|
250
|
-
return __generator(this, function (_b) {
|
|
251
|
-
switch (_b.label) {
|
|
252
|
-
case 0:
|
|
253
|
-
// console.log('@@ loadTypeIndexesFor user', user)
|
|
254
|
-
if (!user)
|
|
255
|
-
throw new Error("loadTypeIndexesFor: No user given");
|
|
256
|
-
return [4 /*yield*/, loadProfile(store, user)];
|
|
257
|
-
case 1:
|
|
258
|
-
profile = _b.sent();
|
|
259
|
-
suggestion = suggestPublicTypeIndex(user);
|
|
260
|
-
return [4 /*yield*/, followOrCreateLink(store, user, ns.solid('publicTypeIndex'), suggestion, profile)
|
|
261
|
-
// const publicTypeIndex = store.any(user, ns.solid('publicTypeIndex'), undefined, profile)
|
|
262
|
-
// console.log('@@ loadTypeIndexesFor publicTypeIndex', publicTypeIndex)
|
|
263
|
-
];
|
|
264
|
-
case 2:
|
|
265
|
-
publicTypeIndex = _b.sent();
|
|
266
|
-
publicScopes = publicTypeIndex ? [{ label: 'public', index: publicTypeIndex, agent: user }] : [];
|
|
267
|
-
_b.label = 3;
|
|
268
|
-
case 3:
|
|
269
|
-
_b.trys.push([3, 5, , 6]);
|
|
270
|
-
return [4 /*yield*/, loadPreferences(store, user)];
|
|
271
|
-
case 4:
|
|
272
|
-
preferencesFile = _b.sent();
|
|
273
|
-
return [3 /*break*/, 6];
|
|
274
|
-
case 5:
|
|
275
|
-
err_5 = _b.sent();
|
|
276
|
-
preferencesFile = null;
|
|
277
|
-
return [3 /*break*/, 6];
|
|
278
|
-
case 6:
|
|
279
|
-
if (!preferencesFile) return [3 /*break*/, 9];
|
|
280
|
-
suggestedPrivateTypeIndex = suggestPrivateTypeIndex(preferencesFile);
|
|
281
|
-
_a = store.any(user, ns.solid('privateTypeIndex'), undefined, profile);
|
|
282
|
-
if (_a) return [3 /*break*/, 8];
|
|
283
|
-
return [4 /*yield*/, followOrCreateLink(store, user, ns.solid('privateTypeIndex'), suggestedPrivateTypeIndex, preferencesFile)];
|
|
284
|
-
case 7:
|
|
285
|
-
_a = (_b.sent());
|
|
286
|
-
_b.label = 8;
|
|
287
|
-
case 8:
|
|
288
|
-
privateTypeIndex = _a;
|
|
289
|
-
privateScopes = privateTypeIndex ? [{ label: 'private', index: privateTypeIndex, agent: user }] : [];
|
|
290
|
-
return [3 /*break*/, 10];
|
|
291
|
-
case 9:
|
|
292
|
-
privateScopes = [];
|
|
293
|
-
_b.label = 10;
|
|
294
|
-
case 10:
|
|
295
|
-
scopes = publicScopes.concat(privateScopes);
|
|
296
|
-
if (scopes.length === 0)
|
|
297
|
-
return [2 /*return*/, scopes];
|
|
298
|
-
files = scopes.map(function (scope) { return scope.index; });
|
|
299
|
-
_b.label = 11;
|
|
300
|
-
case 11:
|
|
301
|
-
_b.trys.push([11, 13, , 14]);
|
|
302
|
-
return [4 /*yield*/, store.fetcher.load(files)];
|
|
303
|
-
case 12:
|
|
304
|
-
_b.sent();
|
|
305
|
-
return [3 /*break*/, 14];
|
|
306
|
-
case 13:
|
|
307
|
-
err_6 = _b.sent();
|
|
308
|
-
console.warn('Problems loading type index: ', err_6);
|
|
309
|
-
return [3 /*break*/, 14];
|
|
310
|
-
case 14: return [2 /*return*/, scopes];
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
exports.loadTypeIndexesFor = loadTypeIndexesFor;
|
|
316
|
-
function loadCommunityTypeIndexes(store, user) {
|
|
317
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
318
|
-
var preferencesFile, communities, result, _i, communities_1, org, _a, _b;
|
|
319
|
-
return __generator(this, function (_c) {
|
|
320
|
-
switch (_c.label) {
|
|
321
|
-
case 0: return [4 /*yield*/, loadPreferences(store, user)];
|
|
322
|
-
case 1:
|
|
323
|
-
preferencesFile = _c.sent();
|
|
324
|
-
if (!preferencesFile) return [3 /*break*/, 6];
|
|
325
|
-
communities = store.each(user, ns.solid('community'), undefined, preferencesFile);
|
|
326
|
-
result = [];
|
|
327
|
-
_i = 0, communities_1 = communities;
|
|
328
|
-
_c.label = 2;
|
|
329
|
-
case 2:
|
|
330
|
-
if (!(_i < communities_1.length)) return [3 /*break*/, 5];
|
|
331
|
-
org = communities_1[_i];
|
|
332
|
-
_b = (_a = result).concat;
|
|
333
|
-
return [4 /*yield*/, loadTypeIndexesFor(store, org)];
|
|
334
|
-
case 3:
|
|
335
|
-
result = _b.apply(_a, [_c.sent()]);
|
|
336
|
-
_c.label = 4;
|
|
337
|
-
case 4:
|
|
338
|
-
_i++;
|
|
339
|
-
return [3 /*break*/, 2];
|
|
340
|
-
case 5:
|
|
341
|
-
// const communityTypeIndexesPromises = communities.map(async community => await loadTypeIndexesFor(store, community as NamedNode))
|
|
342
|
-
// const result1 = Promise.all(communityTypeIndexesPromises)
|
|
343
|
-
return [2 /*return*/, result];
|
|
344
|
-
case 6: return [2 /*return*/, []]; // No communities
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
exports.loadCommunityTypeIndexes = loadCommunityTypeIndexes;
|
|
350
|
-
function loadAllTypeIndexes(store, user) {
|
|
351
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
352
|
-
var _a, _b;
|
|
353
|
-
return __generator(this, function (_c) {
|
|
354
|
-
switch (_c.label) {
|
|
355
|
-
case 0: return [4 /*yield*/, loadTypeIndexesFor(store, user)];
|
|
356
|
-
case 1:
|
|
357
|
-
_b = (_a = (_c.sent())).concat;
|
|
358
|
-
return [4 /*yield*/, loadCommunityTypeIndexes(store, user)];
|
|
359
|
-
case 2: return [2 /*return*/, _b.apply(_a, [(_c.sent()).flat()])];
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
exports.loadAllTypeIndexes = loadAllTypeIndexes;
|
|
365
|
-
// Utility: remove duplicates from Array of NamedNodes
|
|
366
|
-
function uniqueNodes(arr) {
|
|
367
|
-
var uris = arr.map(function (x) { return x.uri; });
|
|
368
|
-
var set = new Set(uris);
|
|
369
|
-
var uris2 = Array.from(set);
|
|
370
|
-
var arr2 = uris2.map(function (u) { return new rdflib_1.NamedNode(u); });
|
|
371
|
-
return arr2; // Array.from(new Set(arr.map(x => x.uri))).map(u => sym(u))
|
|
372
|
-
}
|
|
373
|
-
exports.uniqueNodes = uniqueNodes;
|
|
374
|
-
function getScopedAppsfromIndex(store, scope, theClass) {
|
|
375
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
376
|
-
var index, registrations, directInstances, instances, instanceContainers, containers, i, cont, contents;
|
|
377
|
-
return __generator(this, function (_a) {
|
|
378
|
-
switch (_a.label) {
|
|
379
|
-
case 0:
|
|
380
|
-
index = scope.index;
|
|
381
|
-
registrations = store.each(undefined, ns.solid('forClass'), theClass, index);
|
|
382
|
-
directInstances = registrations.map(function (reg) { return store.each(reg, ns.solid('instance'), null, index); }).flat();
|
|
383
|
-
instances = uniqueNodes(directInstances);
|
|
384
|
-
instanceContainers = registrations.map(function (reg) { return store.each(reg, ns.solid('instanceContainer'), null, index); }).flat();
|
|
385
|
-
containers = uniqueNodes(instanceContainers);
|
|
386
|
-
i = 0;
|
|
387
|
-
_a.label = 1;
|
|
388
|
-
case 1:
|
|
389
|
-
if (!(i < containers.length)) return [3 /*break*/, 4];
|
|
390
|
-
cont = containers[i];
|
|
391
|
-
return [4 /*yield*/, store.fetcher.load(cont)];
|
|
392
|
-
case 2:
|
|
393
|
-
_a.sent();
|
|
394
|
-
contents = store.each(cont, ns.ldp('contains'), null, cont);
|
|
395
|
-
// if (contents.length) console.log('getScopedAppsfromIndex @@ instanceContainer contents:', contents)
|
|
396
|
-
instances = instances.concat(contents);
|
|
397
|
-
_a.label = 3;
|
|
398
|
-
case 3:
|
|
399
|
-
i++;
|
|
400
|
-
return [3 /*break*/, 1];
|
|
401
|
-
case 4: return [2 /*return*/, instances.map(function (instance) { return { instance: instance, scope: scope }; })];
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
exports.getScopedAppsfromIndex = getScopedAppsfromIndex;
|
|
407
|
-
function getScopedAppInstances(store, klass, user) {
|
|
408
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
409
|
-
var scopes, scopedApps, _i, scopes_1, scope, scopedApps0;
|
|
410
|
-
return __generator(this, function (_a) {
|
|
411
|
-
switch (_a.label) {
|
|
412
|
-
case 0: return [4 /*yield*/, loadAllTypeIndexes(store, user)];
|
|
413
|
-
case 1:
|
|
414
|
-
scopes = _a.sent();
|
|
415
|
-
scopedApps = [];
|
|
416
|
-
_i = 0, scopes_1 = scopes;
|
|
417
|
-
_a.label = 2;
|
|
418
|
-
case 2:
|
|
419
|
-
if (!(_i < scopes_1.length)) return [3 /*break*/, 5];
|
|
420
|
-
scope = scopes_1[_i];
|
|
421
|
-
return [4 /*yield*/, getScopedAppsfromIndex(store, scope, klass)];
|
|
422
|
-
case 3:
|
|
423
|
-
scopedApps0 = _a.sent();
|
|
424
|
-
scopedApps = scopedApps.concat(scopedApps0);
|
|
425
|
-
_a.label = 4;
|
|
426
|
-
case 4:
|
|
427
|
-
_i++;
|
|
428
|
-
return [3 /*break*/, 2];
|
|
429
|
-
case 5: return [2 /*return*/, scopedApps];
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
exports.getScopedAppInstances = getScopedAppInstances;
|
|
435
|
-
// This is the function signature which used to be in solid-ui/logic
|
|
436
|
-
// Recommended to use getScopedAppInstances instead as it provides more information.
|
|
437
|
-
//
|
|
438
|
-
function getAppInstances(store, klass) {
|
|
439
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
440
|
-
var user, scopedAppInstances;
|
|
441
|
-
return __generator(this, function (_a) {
|
|
442
|
-
switch (_a.label) {
|
|
443
|
-
case 0:
|
|
444
|
-
user = currentUser();
|
|
445
|
-
if (!user)
|
|
446
|
-
throw new Error('getAppInstances: Must be logged in to find apps.');
|
|
447
|
-
return [4 /*yield*/, getScopedAppInstances(store, klass, user)];
|
|
448
|
-
case 1:
|
|
449
|
-
scopedAppInstances = _a.sent();
|
|
450
|
-
return [2 /*return*/, scopedAppInstances.map(function (scoped) { return scoped.instance; })];
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
exports.getAppInstances = getAppInstances;
|
|
456
|
-
/**
|
|
457
|
-
* Register a new app in a type index
|
|
458
|
-
* used in chat in bookmark.js (solid-ui)
|
|
459
|
-
* Returns the registration object if successful else null
|
|
460
|
-
*/
|
|
461
|
-
function registerInstanceInTypeIndex(store, instance, index, theClass) {
|
|
462
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
463
|
-
var registration, ins, err_7, msg;
|
|
464
|
-
return __generator(this, function (_a) {
|
|
465
|
-
switch (_a.label) {
|
|
466
|
-
case 0:
|
|
467
|
-
registration = (0, uri_1.newThing)(index);
|
|
468
|
-
ins = [
|
|
469
|
-
// See https://github.com/solid/solid/blob/main/proposals/data-discovery.md
|
|
470
|
-
(0, rdflib_1.st)(registration, ns.rdf('type'), ns.solid('TypeRegistration'), index),
|
|
471
|
-
(0, rdflib_1.st)(registration, ns.solid('forClass'), theClass, index),
|
|
472
|
-
(0, rdflib_1.st)(registration, ns.solid('instance'), instance, index)
|
|
473
|
-
];
|
|
474
|
-
_a.label = 1;
|
|
475
|
-
case 1:
|
|
476
|
-
_a.trys.push([1, 3, , 4]);
|
|
477
|
-
console.log('patching index', ins);
|
|
478
|
-
return [4 /*yield*/, store.updater.update([], ins)];
|
|
479
|
-
case 2:
|
|
480
|
-
_a.sent();
|
|
481
|
-
return [3 /*break*/, 4];
|
|
482
|
-
case 3:
|
|
483
|
-
err_7 = _a.sent();
|
|
484
|
-
msg = "Unable to register ".concat(instance, " in index ").concat(index, ": ").concat(err_7);
|
|
485
|
-
console.warn(msg);
|
|
486
|
-
return [2 /*return*/, null];
|
|
487
|
-
case 4: return [2 /*return*/, registration];
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
exports.registerInstanceInTypeIndex = registerInstanceInTypeIndex;
|
|
493
|
-
// ENDS
|
|
494
|
-
//# sourceMappingURL=discoveryLogic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discoveryLogic.js","sourceRoot":"","sources":["../../src/discovery/discoveryLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAkE;AAClE,yCAAyC;AACzC,6DAA6D;AAC7D,oEAAkE;AAClE,mCAAsC;AAE7B,IAAA,KAAK,GAAK,yCAAmB,MAAxB,CAAwB;AAC9B,IAAA,WAAW,GAAK,KAAK,YAAV,CAAU;AAK7B,IAAM,EAAE,GAAG;IACT,GAAG,EAAM,IAAA,kBAAS,EAAC,2BAA2B,CAAC;IAC/C,GAAG,EAAM,IAAA,kBAAS,EAAC,2BAA2B,CAAC;IAC/C,OAAO,EAAE,IAAA,kBAAS,EAAC,mCAAmC,CAAC;IACvD,GAAG,EAAM,IAAA,kBAAS,EAAC,6CAA6C,CAAC;IACjE,MAAM,EAAG,IAAA,kBAAS,EAAC,oBAAoB,CAAC;IACxC,KAAK,EAAI,IAAA,kBAAS,EAAC,mCAAmC,CAAC;IACvD,KAAK,EAAI,IAAA,kBAAS,EAAC,iCAAiC,CAAC;IACrD,IAAI,EAAK,IAAA,kBAAS,EAAC,kCAAkC,CAAC;IACtD,KAAK,EAAI,IAAA,kBAAS,EAAC,kCAAkC,CAAC;IACtD,EAAE,EAAO,IAAA,kBAAS,EAAC,oCAAoC,CA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AACD;;;;GAIG;AACH,SAAsB,2BAA2B,CAC/C,KAAe,EACf,QAAmB,EACnB,KAAgB,EAChB,QAAmB;;;;;;oBAGX,YAAY,GAAG,IAAA,cAAQ,EAAC,KAAK,CAAC,CAAA;oBAC9B,GAAG,GAAG;wBACR,2EAA2E;wBAC3E,IAAA,WAAE,EAAC,YAAY,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC;wBACrE,IAAA,WAAE,EAAC,YAAY,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC;wBACvD,IAAA,WAAE,EAAC,YAAY,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC;qBAC1D,CAAA;;;;oBAEC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAA;oBAChC,qBAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,EAAA;;oBAAnC,SAAmC,CAAA;;;;oBAE7B,GAAG,GAAG,6BAAsB,QAAQ,uBAAa,KAAK,eAAK,KAAG,CAAE,CAAA;oBACtE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;oBACjB,sBAAO,IAAI,EAAA;wBAEf,sBAAO,YAAY,EAAA;;;;CACtB;AAvBD,kEAuBC;AACD,OAAO"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NamedNode, LiveStore } from "rdflib";
|
|
2
|
-
import { ProfileLogic } from "../profile/ProfileLogic";
|
|
3
|
-
import { SolidNamespace } from "../types";
|
|
4
|
-
import { UtilityLogic } from "../util/UtilityLogic";
|
|
5
|
-
/**
|
|
6
|
-
* Inbox-related logic
|
|
7
|
-
*/
|
|
8
|
-
export declare class InboxLogic {
|
|
9
|
-
store: LiveStore;
|
|
10
|
-
ns: SolidNamespace;
|
|
11
|
-
profile: ProfileLogic;
|
|
12
|
-
util: UtilityLogic;
|
|
13
|
-
constructor(store: LiveStore, ns: SolidNamespace, profile: ProfileLogic, util: UtilityLogic);
|
|
14
|
-
getNewMessages(user?: NamedNode): Promise<string[]>;
|
|
15
|
-
createInboxFor(peerWebId: string, nick: string): Promise<string>;
|
|
16
|
-
markAsRead(url: string, date: Date): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=InboxLogic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InboxLogic.d.ts","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;GAEG;AACH,qBAAa,UAAU;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,cAAc,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,YAAY,CAAC;gBAEP,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY;IAOrF,cAAc,CAClB,IAAI,CAAC,EAAE,SAAS,GACf,OAAO,CAAC,MAAM,EAAE,CAAC;IAQd,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAc9C,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI;CAoBzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InboxLogic.js","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;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0CAAE,MAAM,CAAC,GAAG,EAAE;gCACpC,MAAM,EAAE,QAAQ;6BACjB,CAAC,CAAA,EAAA;;wBAFF,SAEE,CAAC;;;;;;KAEN;IACH,iBAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDY,gCAAU"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Session } from "@inrupt/solid-client-authn-browser";
|
|
2
|
-
import * as rdf from "rdflib";
|
|
3
|
-
import { NamedNode, Statement, LiveStore } from "rdflib";
|
|
4
|
-
import { ChatLogic } from "../chat/ChatLogic";
|
|
5
|
-
import { ProfileLogic } from "../profile/ProfileLogic";
|
|
6
|
-
import { AuthnLogic } from "../types";
|
|
7
|
-
import { UtilityLogic } from "../util/UtilityLogic";
|
|
8
|
-
export declare class SolidLogic {
|
|
9
|
-
cache: {
|
|
10
|
-
profileDocument: {
|
|
11
|
-
[WebID: string]: NamedNode;
|
|
12
|
-
};
|
|
13
|
-
preferencesFile: {
|
|
14
|
-
[WebID: string]: NamedNode;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
store: LiveStore;
|
|
18
|
-
me: string | undefined;
|
|
19
|
-
underlyingFetch: {
|
|
20
|
-
fetch: (url: string, options?: any) => any;
|
|
21
|
-
};
|
|
22
|
-
chat: ChatLogic;
|
|
23
|
-
profile: ProfileLogic;
|
|
24
|
-
authn: AuthnLogic;
|
|
25
|
-
util: UtilityLogic;
|
|
26
|
-
constructor(specialFetch: {
|
|
27
|
-
fetch: (url: any, requestInit: any) => any;
|
|
28
|
-
}, session: Session);
|
|
29
|
-
findAclDocUrl(url: string): Promise<string>;
|
|
30
|
-
loadProfile(me: NamedNode): Promise<NamedNode>;
|
|
31
|
-
loadPreferences(me: NamedNode): Promise<NamedNode>;
|
|
32
|
-
getTypeIndex(me: NamedNode | string, preferencesFile: NamedNode | string, isPublic: boolean): NamedNode[];
|
|
33
|
-
getRegistrations(instance: any, theClass: any): rdf.Node[];
|
|
34
|
-
load(doc: NamedNode | NamedNode[] | string): Promise<Response> | Promise<Response[]>;
|
|
35
|
-
loadIndexes(me: NamedNode | string, publicProfile: NamedNode | string | null, preferencesFile: NamedNode | string | null, onWarning?: (_err: Error) => Promise<undefined>): Promise<{
|
|
36
|
-
private: any;
|
|
37
|
-
public: any;
|
|
38
|
-
}>;
|
|
39
|
-
createEmptyRdfDoc(doc: NamedNode, comment: string): Promise<void>;
|
|
40
|
-
updatePromise(del: Array<Statement>, ins?: Array<Statement>): Promise<void>;
|
|
41
|
-
isContainer(url: string): boolean;
|
|
42
|
-
getContainerElements(containerNode: NamedNode): NamedNode[];
|
|
43
|
-
getContainerMembers(containerUrl: string): Promise<string[]>;
|
|
44
|
-
recursiveDelete(url: string): Promise<any>;
|
|
45
|
-
clearStore(): void;
|
|
46
|
-
fetch(url: string, options?: any): Promise<any>;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=SolidLogic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidLogic.d.ts","sourceRoot":"","sources":["../../src/logic/SolidLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWpD,qBAAa,UAAU;IACnB,KAAK,EAAE;QACH,eAAe,EAAE;YACjB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;SAC1B,CAAC;QACF,eAAe,EAAE;YACjB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS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