solid-logic 1.3.8 → 1.3.12
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 +7 -1
- package/lib/chat/ChatLogic.js +4 -4
- package/lib/chat/ChatLogic.js.map +1 -1
- package/lib/chat/determineChatContainer.js +1 -1
- package/lib/chat/determineChatContainer.js.map +1 -1
- package/lib/inbox/InboxLogic.js +2 -2
- package/lib/inbox/InboxLogic.js.map +1 -1
- package/lib/index-alain.d.ts +75 -0
- package/lib/index-alain.d.ts.map +1 -0
- package/lib/index-alain.js +398 -0
- package/lib/index-alain.js.map +1 -0
- package/lib/index.d.ts +3 -15
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -8
- package/lib/index.js.map +1 -1
- package/lib/util/UtilityLogic-alain.d.ts +32 -0
- package/lib/util/UtilityLogic-alain.d.ts.map +1 -0
- package/lib/util/UtilityLogic-alain.js +248 -0
- package/lib/util/UtilityLogic-alain.js.map +1 -0
- package/lib/util/UtilityLogic.d.ts +1 -1
- package/lib/util/UtilityLogic.js +13 -13
- package/lib/util/UtilityLogic.js.map +1 -1
- package/package.json +16 -16
- package/src/index-alain.txt +316 -0
- package/src/index.ts +0 -13
- package/src/util/UtilityLogic-alain.txt +181 -0
package/README.md
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
# solid-logic
|
|
2
|
-
Core business logic of
|
|
2
|
+
Core business logic of SolidOS
|
|
3
|
+
|
|
4
|
+
# Adendum
|
|
5
|
+
|
|
6
|
+
Solid-logic was a move to sparate business logic from UI functionality so that people using different UI frameworks could use logic code.
|
|
7
|
+
|
|
8
|
+
It was created when the "chat with me" feature was built. We needed shared logic between chat-pane and profile-pane (which was part of solid-panes back then I think) due to that feature. The whole idea of it is to separate core solid logic from UI components, to make logic reusable, e.g. by other UI libraries or even non web apps like CLI tools etc.
|
package/lib/chat/ChatLogic.js
CHANGED
|
@@ -80,7 +80,7 @@ var ChatLogic = /** @class */ (function () {
|
|
|
80
80
|
if (!chatAclDoc) {
|
|
81
81
|
throw new Error("Chat ACL doc not found!");
|
|
82
82
|
}
|
|
83
|
-
aclBody = "\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <"
|
|
83
|
+
aclBody = "\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <".concat(me.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <").concat(invitee.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n");
|
|
84
84
|
return [4 /*yield*/, this.store.fetcher.webOperation("PUT", chatAclDoc.value, {
|
|
85
85
|
data: aclBody,
|
|
86
86
|
contentType: "text/turtle",
|
|
@@ -248,9 +248,9 @@ var ChatLogic = /** @class */ (function () {
|
|
|
248
248
|
_a.sent();
|
|
249
249
|
inviteeInbox = this.store.any(invitee, this.ns.ldp("inbox"), undefined, invitee.doc());
|
|
250
250
|
if (!inviteeInbox) {
|
|
251
|
-
throw new Error("Invitee inbox not found! "
|
|
251
|
+
throw new Error("Invitee inbox not found! ".concat(invitee.value));
|
|
252
252
|
}
|
|
253
|
-
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n"
|
|
253
|
+
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(this.ns.rdf("seeAlso"), " <").concat(chatThing.value, "> . \n ");
|
|
254
254
|
return [4 /*yield*/, this.store.fetcher.webOperation("POST", inviteeInbox.value, {
|
|
255
255
|
data: inviteBody,
|
|
256
256
|
contentType: "text/turtle",
|
|
@@ -259,7 +259,7 @@ var ChatLogic = /** @class */ (function () {
|
|
|
259
259
|
inviteResponse = _a.sent();
|
|
260
260
|
locationStr = inviteResponse.headers.get("location");
|
|
261
261
|
if (!locationStr) {
|
|
262
|
-
throw new Error("Invite sending returned a "
|
|
262
|
+
throw new Error("Invite sending returned a ".concat(inviteResponse.status));
|
|
263
263
|
}
|
|
264
264
|
return [2 /*return*/];
|
|
265
265
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatLogic.js","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmD;AAGnD,8BAAkC;AAClC,mEAAkE;AAElE,IAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAYpD;;GAEG;AACH;IAKE,mBAAY,KAAgB,EAAE,EAAkB,EAAE,OAAqB;QACrE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEK,0BAAM,GAAZ,UACE,aAAwB,EACxB,EAAa,EACb,OAAkB;;;;;;oBAElB,yDAAyD;oBACzD,+DAA+D;oBAC/D,gCAAgC;oBAChC,qBAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAAA;;wBAH5C,yDAAyD;wBACzD,+DAA+D;wBAC/D,gCAAgC;wBAChC,SAA4C,CAAC;wBAGvC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAC/B,aAAa,EACb,IAAI,kBAAS,CAAC,oDAAoD,CAAC,CACpE,CAAC;wBACF,IAAI,CAAC,UAAU,EAAE;4BACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;yBAC5C;wBAEK,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"ChatLogic.js","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAm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UAAU,GAAG,sEAErB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,eAAK,SAAS,CAAC,KAAK,aACzC,CAAC;wBAEuB,qBAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAC1D,MAAM,EACN,YAAY,CAAC,KAAK,EAClB;gCACE,IAAI,EAAE,UAAU;gCAChB,WAAW,EAAE,aAAa;6BAC3B,CACF,EAAA;;wBAPK,cAAc,GAAG,SAOtB;wBACK,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;wBAC3D,IAAI,CAAC,WAAW,EAAE;4BAChB,MAAM,IAAI,KAAK,CAAC,oCAA6B,cAAc,CAAC,MAAM,CAAE,CAAC,CAAC;yBACvE;;;;;KACF;IACH,gBAAC;AAAD,CAAC,AA9ND,IA8NC;AA9NY,8BAAS"}
|
|
@@ -5,7 +5,7 @@ var rdflib_1 = require("rdflib");
|
|
|
5
5
|
function determineChatContainer(invitee, podRoot) {
|
|
6
6
|
// Create chat
|
|
7
7
|
// See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
|
|
8
|
-
var chatContainerStr = new URL("IndividualChats/"
|
|
8
|
+
var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
|
|
9
9
|
return new rdflib_1.NamedNode(chatContainerStr);
|
|
10
10
|
}
|
|
11
11
|
exports.determineChatContainer = determineChatContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineChatContainer.js","sourceRoot":"","sources":["../../src/chat/determineChatContainer.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,SAAgB,sBAAsB,CACpC,OAAkB,EAClB,OAAkB;IAElB,cAAc;IACd,mEAAmE;IACnE,IAAM,gBAAgB,GAAG,IAAI,GAAG,CAC9B,
|
|
1
|
+
{"version":3,"file":"determineChatContainer.js","sourceRoot":"","sources":["../../src/chat/determineChatContainer.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,SAAgB,sBAAsB,CACpC,OAAkB,EAClB,OAAkB;IAElB,cAAc;IACd,mEAAmE;IACnE,IAAM,gBAAgB,GAAG,IAAI,GAAG,CAC9B,0BAAmB,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,MAAG,EACjD,OAAO,CAAC,KAAK,CACd,CAAC,QAAQ,EAAE,CAAC;IACb,OAAO,IAAI,kBAAS,CAAC,gBAAgB,CAAC,CAAC;AACzC,CAAC;AAXD,wDAWC"}
|
package/lib/inbox/InboxLogic.js
CHANGED
|
@@ -81,7 +81,7 @@ var InboxLogic = /** @class */ (function () {
|
|
|
81
81
|
return [4 /*yield*/, this.profile.getPodRoot(myWebId)];
|
|
82
82
|
case 2:
|
|
83
83
|
podRoot = _a.sent();
|
|
84
|
-
ourInbox = podRoot.value
|
|
84
|
+
ourInbox = "".concat(podRoot.value, "p2p-inboxes/").concat(encodeURIComponent(nick), "/");
|
|
85
85
|
return [4 /*yield*/, this.util.createContainer(ourInbox)];
|
|
86
86
|
case 3:
|
|
87
87
|
_a.sent();
|
|
@@ -111,7 +111,7 @@ var InboxLogic = /** @class */ (function () {
|
|
|
111
111
|
case 1:
|
|
112
112
|
downloaded = _b.sent();
|
|
113
113
|
if (downloaded.status !== 200) {
|
|
114
|
-
throw new Error("Not OK! "
|
|
114
|
+
throw new Error("Not OK! ".concat(url));
|
|
115
115
|
}
|
|
116
116
|
archiveUrl = this.util.getArchiveUrl(url, date);
|
|
117
117
|
_a = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxLogic.js","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;;GAEG;AACH;IAME,oBAAY,KAAgB,EAAE,EAAkB,EAAE,OAAqB,EAAE,IAAkB;QACzF,IAAI,CAAC,KAAK,GAAG,K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+
import { Session } from "@inrupt/solid-client-authn-browser";
|
|
2
|
+
import * as rdf from "rdflib";
|
|
3
|
+
import { Fetcher, NamedNode, Statement, Store, UpdateManager } from "rdflib";
|
|
4
|
+
import { AuthnLogic } from "./authn";
|
|
5
|
+
import { ChatLogic } from "./chat/ChatLogic";
|
|
6
|
+
import { ProfileLogic } from "./profile/ProfileLogic";
|
|
7
|
+
import { UtilityLogic } from "./util/UtilityLogic";
|
|
8
|
+
export { ACL_LINK } from './util/UtilityLogic';
|
|
9
|
+
interface ConnectedStore extends Store {
|
|
10
|
+
fetcher: Fetcher;
|
|
11
|
+
}
|
|
12
|
+
export interface LiveStore extends ConnectedStore {
|
|
13
|
+
updater: UpdateManager;
|
|
14
|
+
}
|
|
15
|
+
export interface SolidNamespace {
|
|
16
|
+
[key: string]: (term: string) => NamedNode;
|
|
17
|
+
}
|
|
18
|
+
export declare class SolidLogic {
|
|
19
|
+
cache: {
|
|
20
|
+
profileDocument: {
|
|
21
|
+
[WebID: string]: NamedNode;
|
|
22
|
+
};
|
|
23
|
+
preferencesFile: {
|
|
24
|
+
[WebID: string]: NamedNode;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
store: LiveStore;
|
|
28
|
+
me: string | undefined;
|
|
29
|
+
fetcher: {
|
|
30
|
+
fetch: (url: string, options?: any) => any;
|
|
31
|
+
};
|
|
32
|
+
_fetch: Function;
|
|
33
|
+
chat: ChatLogic;
|
|
34
|
+
profile: ProfileLogic;
|
|
35
|
+
authn: AuthnLogic;
|
|
36
|
+
util: UtilityLogic;
|
|
37
|
+
constructor(fetcher: {
|
|
38
|
+
fetch: (url: any, requestInit: any) => any;
|
|
39
|
+
}, solidAuthSession: Session);
|
|
40
|
+
findAclDocUrl(url: string): Promise<string>;
|
|
41
|
+
loadDoc(doc: NamedNode): Promise<void>;
|
|
42
|
+
loadProfile(me: NamedNode): Promise<NamedNode>;
|
|
43
|
+
loadPreferences(me: NamedNode): Promise<NamedNode>;
|
|
44
|
+
getTypeIndex(me: NamedNode | string, preferencesFile: NamedNode | string, isPublic: boolean): NamedNode[];
|
|
45
|
+
getRegistrations(instance: any, theClass: any): rdf.Node[];
|
|
46
|
+
load(doc: NamedNode | NamedNode[] | string): Promise<Response> | Promise<Response[]>;
|
|
47
|
+
loadIndexes(me: NamedNode | string, publicProfile: NamedNode | string | null, preferencesFile: NamedNode | string | null, onWarning?: (_err: Error) => Promise<undefined>): Promise<{
|
|
48
|
+
private: any;
|
|
49
|
+
public: any;
|
|
50
|
+
}>;
|
|
51
|
+
createEmptyRdfDoc(doc: NamedNode, comment: string): Promise<void>;
|
|
52
|
+
updatePromise(del: Array<Statement>, ins?: Array<Statement>): Promise<void>;
|
|
53
|
+
isContainer(url: string): boolean;
|
|
54
|
+
getContainerElements(containerNode: NamedNode): NamedNode[];
|
|
55
|
+
getContainerMembers(containerUrl: string): Promise<string[]>;
|
|
56
|
+
recursiveDelete(url: string): Promise<any>;
|
|
57
|
+
clearStore(): void;
|
|
58
|
+
fetch(url: string, options?: any): Promise<any>;
|
|
59
|
+
}
|
|
60
|
+
declare class CustomError extends Error {
|
|
61
|
+
constructor(message?: string);
|
|
62
|
+
}
|
|
63
|
+
export declare class UnauthorizedError extends CustomError {
|
|
64
|
+
}
|
|
65
|
+
export declare class CrossOriginForbiddenError extends CustomError {
|
|
66
|
+
}
|
|
67
|
+
export declare class SameOriginForbiddenError extends CustomError {
|
|
68
|
+
}
|
|
69
|
+
export declare class NotFoundError extends CustomError {
|
|
70
|
+
}
|
|
71
|
+
export declare class FetchError extends CustomError {
|
|
72
|
+
status: number;
|
|
73
|
+
constructor(status: number, message?: string);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=index-alain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-alain.d.ts","sourceRoot":"","sources":["../src/index-alain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAA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AE,MAAM;IAIjC,UAAU;IAIJ,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;CAGvC;AAED,cAAM,WAAY,SAAQ,KAAK;gBACjB,OAAO,CAAC,EAAE,MAAM;CAM7B;AAED,qBAAa,iBAAkB,SAAQ,WAAW;CAAG;AAErD,qBAAa,yBAA0B,SAAQ,WAAW;CAAG;AAE7D,qBAAa,wBAAyB,SAAQ,WAAW;CAAG;AAE5D,qBAAa,aAAc,SAAQ,WAAW;CAAG;AAEjD,qBAAa,UAAW,SAAQ,WAAW;IACzC,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAI7C"}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (_) try {
|
|
52
|
+
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;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
73
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
+
exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.SolidLogic = exports.ACL_LINK = void 0;
|
|
77
|
+
var rdf = __importStar(require("rdflib"));
|
|
78
|
+
var solid_namespace_1 = __importDefault(require("solid-namespace"));
|
|
79
|
+
var NoAuthnLogic_1 = require("./authn/NoAuthnLogic");
|
|
80
|
+
var SolidAuthnLogic_1 = require("./authn/SolidAuthnLogic");
|
|
81
|
+
var ChatLogic_1 = require("./chat/ChatLogic");
|
|
82
|
+
var debug = __importStar(require("./debug"));
|
|
83
|
+
var ProfileLogic_1 = require("./profile/ProfileLogic");
|
|
84
|
+
var UtilityLogic_1 = require("./util/UtilityLogic");
|
|
85
|
+
var UtilityLogic_2 = require("./util/UtilityLogic");
|
|
86
|
+
Object.defineProperty(exports, "ACL_LINK", { enumerable: true, get: function () { return UtilityLogic_2.ACL_LINK; } });
|
|
87
|
+
var ns = (0, solid_namespace_1.default)(rdf);
|
|
88
|
+
var SolidLogic = /** @class */ (function () {
|
|
89
|
+
function SolidLogic(fetcher, solidAuthSession) {
|
|
90
|
+
this.store = rdf.graph(); // Make a Quad store
|
|
91
|
+
rdf.fetcher(this.store, fetcher); // Attach a web I/O module, store.fetcher
|
|
92
|
+
this.store.updater = new rdf.UpdateManager(this.store); // Add real-time live updates store.updater
|
|
93
|
+
this.cache = {
|
|
94
|
+
profileDocument: {},
|
|
95
|
+
preferencesFile: {},
|
|
96
|
+
};
|
|
97
|
+
this.fetcher = fetcher;
|
|
98
|
+
/*this._fetch = this.fetcher.fetch
|
|
99
|
+
|| typeof global !== 'undefined' && global.solidFetch
|
|
100
|
+
|| typeof window !== 'undefined' && window.solidFetch
|
|
101
|
+
|| crossFetch
|
|
102
|
+
if (!this._fetch) {
|
|
103
|
+
throw new Error('No _fetch function available for Fetcher')
|
|
104
|
+
} */
|
|
105
|
+
if (solidAuthSession) {
|
|
106
|
+
this.authn = new SolidAuthnLogic_1.SolidAuthnLogic(solidAuthSession);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
this.authn = new NoAuthnLogic_1.NoAuthnLogic();
|
|
110
|
+
}
|
|
111
|
+
this.profile = new ProfileLogic_1.ProfileLogic(this.store, ns, this.authn);
|
|
112
|
+
this.chat = new ChatLogic_1.ChatLogic(this.store, ns, this.profile);
|
|
113
|
+
this.util = new UtilityLogic_1.UtilityLogic(this.store, ns, this.fetcher);
|
|
114
|
+
}
|
|
115
|
+
SolidLogic.prototype.findAclDocUrl = function (url) {
|
|
116
|
+
return this.util.findAclDocUrl(url);
|
|
117
|
+
};
|
|
118
|
+
SolidLogic.prototype.loadDoc = function (doc) {
|
|
119
|
+
return this.util.loadDoc(doc);
|
|
120
|
+
};
|
|
121
|
+
SolidLogic.prototype.loadProfile = function (me) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
+
var profileDocument, err_1, message;
|
|
124
|
+
return __generator(this, function (_a) {
|
|
125
|
+
switch (_a.label) {
|
|
126
|
+
case 0:
|
|
127
|
+
// console.log('loadProfile', me)
|
|
128
|
+
if (this.cache.profileDocument[me.value]) {
|
|
129
|
+
return [2 /*return*/, this.cache.profileDocument[me.value]];
|
|
130
|
+
}
|
|
131
|
+
_a.label = 1;
|
|
132
|
+
case 1:
|
|
133
|
+
_a.trys.push([1, 3, , 4]);
|
|
134
|
+
profileDocument = me.doc();
|
|
135
|
+
return [4 /*yield*/, this.loadDoc(profileDocument)];
|
|
136
|
+
case 2:
|
|
137
|
+
_a.sent();
|
|
138
|
+
return [2 /*return*/, profileDocument];
|
|
139
|
+
case 3:
|
|
140
|
+
err_1 = _a.sent();
|
|
141
|
+
message = "Logged in but cannot load profile ".concat(profileDocument, " : ").concat(err_1);
|
|
142
|
+
throw new Error(message);
|
|
143
|
+
case 4: return [2 /*return*/];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
SolidLogic.prototype.loadPreferences = function (me) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
150
|
+
// console.log('this.store.any()', this.store.any())
|
|
151
|
+
/**
|
|
152
|
+
* Are we working cross-origin?
|
|
153
|
+
* Returns True if we are in a webapp at an origin, and the file origin is different
|
|
154
|
+
*/
|
|
155
|
+
function differentOrigin() {
|
|
156
|
+
if (!preferencesFile) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
return ("".concat(window.location.origin, "/") !== new URL(preferencesFile.value).origin);
|
|
160
|
+
}
|
|
161
|
+
var preferencesFile, err_2, status_1;
|
|
162
|
+
return __generator(this, function (_a) {
|
|
163
|
+
switch (_a.label) {
|
|
164
|
+
case 0:
|
|
165
|
+
// console.log('loadPreferences', me)
|
|
166
|
+
if (this.cache.preferencesFile[me.value]) {
|
|
167
|
+
return [2 /*return*/, this.cache.preferencesFile[me.value]];
|
|
168
|
+
}
|
|
169
|
+
preferencesFile = this.store.any(me, ns.space("preferencesFile"));
|
|
170
|
+
if (!preferencesFile) {
|
|
171
|
+
throw new Error("Can't find a preference file pointer in profile ".concat(me.doc()));
|
|
172
|
+
}
|
|
173
|
+
if (!this.store.fetcher) {
|
|
174
|
+
throw new Error("Cannot load doc, have no fetcher");
|
|
175
|
+
}
|
|
176
|
+
_a.label = 1;
|
|
177
|
+
case 1:
|
|
178
|
+
_a.trys.push([1, 3, , 4]);
|
|
179
|
+
return [4 /*yield*/, this.store.fetcher.load(preferencesFile, {
|
|
180
|
+
withCredentials: true,
|
|
181
|
+
})];
|
|
182
|
+
case 2:
|
|
183
|
+
_a.sent();
|
|
184
|
+
return [3 /*break*/, 4];
|
|
185
|
+
case 3:
|
|
186
|
+
err_2 = _a.sent();
|
|
187
|
+
status_1 = err_2.status;
|
|
188
|
+
debug.log("HTTP status ".concat(status_1, " for preference file ").concat(preferencesFile));
|
|
189
|
+
if (status_1 === 401) {
|
|
190
|
+
throw new UnauthorizedError();
|
|
191
|
+
}
|
|
192
|
+
if (status_1 === 403) {
|
|
193
|
+
if (differentOrigin()) {
|
|
194
|
+
throw new CrossOriginForbiddenError();
|
|
195
|
+
}
|
|
196
|
+
throw new SameOriginForbiddenError();
|
|
197
|
+
}
|
|
198
|
+
if (status_1 === 404) {
|
|
199
|
+
throw new NotFoundError(preferencesFile.value);
|
|
200
|
+
}
|
|
201
|
+
throw new FetchError(err_2.status, err_2.message);
|
|
202
|
+
case 4: return [2 /*return*/, preferencesFile];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
SolidLogic.prototype.getTypeIndex = function (me, preferencesFile, isPublic) {
|
|
208
|
+
// console.log('getTypeIndex', this.store.each(me, undefined, undefined, preferencesFile), isPublic, preferencesFile)
|
|
209
|
+
return this.store.each(me, isPublic ? ns.solid("publicTypeIndex") : ns.solid("privateTypeIndex"), undefined, preferencesFile);
|
|
210
|
+
};
|
|
211
|
+
SolidLogic.prototype.getRegistrations = function (instance, theClass) {
|
|
212
|
+
var _this = this;
|
|
213
|
+
return this.store
|
|
214
|
+
.each(undefined, ns.solid("instance"), instance)
|
|
215
|
+
.filter(function (r) {
|
|
216
|
+
return _this.store.holds(r, ns.solid("forClass"), theClass);
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
SolidLogic.prototype.load = function (doc) {
|
|
220
|
+
if (!this.store.fetcher) {
|
|
221
|
+
throw new Error("Cannot load doc(s), have no fetcher");
|
|
222
|
+
}
|
|
223
|
+
return this.store.fetcher.load(doc);
|
|
224
|
+
};
|
|
225
|
+
SolidLogic.prototype.loadIndexes = function (me, publicProfile, preferencesFile, onWarning) {
|
|
226
|
+
var _this = this;
|
|
227
|
+
if (onWarning === void 0) { onWarning = function (_err) { return __awaiter(_this, void 0, void 0, function () {
|
|
228
|
+
return __generator(this, function (_a) {
|
|
229
|
+
return [2 /*return*/, undefined];
|
|
230
|
+
});
|
|
231
|
+
}); }; }
|
|
232
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
233
|
+
var privateIndexes, publicIndexes, err_3, err_4;
|
|
234
|
+
return __generator(this, function (_a) {
|
|
235
|
+
switch (_a.label) {
|
|
236
|
+
case 0:
|
|
237
|
+
privateIndexes = [];
|
|
238
|
+
publicIndexes = [];
|
|
239
|
+
if (!publicProfile) return [3 /*break*/, 4];
|
|
240
|
+
publicIndexes = this.getTypeIndex(me, publicProfile, true);
|
|
241
|
+
_a.label = 1;
|
|
242
|
+
case 1:
|
|
243
|
+
_a.trys.push([1, 3, , 4]);
|
|
244
|
+
return [4 /*yield*/, this.load(publicIndexes)];
|
|
245
|
+
case 2:
|
|
246
|
+
_a.sent();
|
|
247
|
+
return [3 /*break*/, 4];
|
|
248
|
+
case 3:
|
|
249
|
+
err_3 = _a.sent();
|
|
250
|
+
onWarning(new Error("loadIndex: loading public type index(es) ".concat(err_3)));
|
|
251
|
+
return [3 /*break*/, 4];
|
|
252
|
+
case 4:
|
|
253
|
+
if (!preferencesFile) return [3 /*break*/, 9];
|
|
254
|
+
privateIndexes = this.getTypeIndex(me, preferencesFile, false);
|
|
255
|
+
if (!(privateIndexes.length === 0)) return [3 /*break*/, 6];
|
|
256
|
+
return [4 /*yield*/, onWarning(new Error("Your preference file ".concat(preferencesFile, " does not point to a private type index.")))];
|
|
257
|
+
case 5:
|
|
258
|
+
_a.sent();
|
|
259
|
+
return [3 /*break*/, 9];
|
|
260
|
+
case 6:
|
|
261
|
+
_a.trys.push([6, 8, , 9]);
|
|
262
|
+
return [4 /*yield*/, this.load(privateIndexes)];
|
|
263
|
+
case 7:
|
|
264
|
+
_a.sent();
|
|
265
|
+
return [3 /*break*/, 9];
|
|
266
|
+
case 8:
|
|
267
|
+
err_4 = _a.sent();
|
|
268
|
+
onWarning(new Error("loadIndex: loading private type index(es) ".concat(err_4)));
|
|
269
|
+
return [3 /*break*/, 9];
|
|
270
|
+
case 9: return [2 /*return*/, {
|
|
271
|
+
private: privateIndexes,
|
|
272
|
+
public: publicIndexes,
|
|
273
|
+
}];
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
SolidLogic.prototype.createEmptyRdfDoc = function (doc, comment) {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
280
|
+
return __generator(this, function (_a) {
|
|
281
|
+
switch (_a.label) {
|
|
282
|
+
case 0:
|
|
283
|
+
if (!this.store.fetcher) {
|
|
284
|
+
throw new Error("Cannot create empty rdf doc, have no fetcher");
|
|
285
|
+
}
|
|
286
|
+
return [4 /*yield*/, this.store.fetcher.webOperation("PUT", doc.uri, {
|
|
287
|
+
data: "# ".concat(new Date(), " ").concat(comment, "\n"),
|
|
288
|
+
contentType: "text/turtle",
|
|
289
|
+
})];
|
|
290
|
+
case 1:
|
|
291
|
+
_a.sent();
|
|
292
|
+
return [2 /*return*/];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
// @@@@ use the one in rdflib.js when it is available and delete this
|
|
298
|
+
SolidLogic.prototype.updatePromise = function (del, ins) {
|
|
299
|
+
var _this = this;
|
|
300
|
+
if (ins === void 0) { ins = []; }
|
|
301
|
+
return new Promise(function (resolve, reject) {
|
|
302
|
+
if (!_this.store.updater) {
|
|
303
|
+
throw new Error("Cannot updatePromise, have no updater");
|
|
304
|
+
}
|
|
305
|
+
_this.store.updater.update(del, ins, function (_uri, ok, errorBody) {
|
|
306
|
+
if (!ok) {
|
|
307
|
+
reject(new Error(errorBody));
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
resolve();
|
|
311
|
+
}
|
|
312
|
+
}); // callback
|
|
313
|
+
}); // promise
|
|
314
|
+
};
|
|
315
|
+
SolidLogic.prototype.isContainer = function (url) {
|
|
316
|
+
return this.util.isContainer(url);
|
|
317
|
+
};
|
|
318
|
+
SolidLogic.prototype.getContainerElements = function (containerNode) {
|
|
319
|
+
return this.util.getContainerElements(containerNode);
|
|
320
|
+
};
|
|
321
|
+
SolidLogic.prototype.getContainerMembers = function (containerUrl) {
|
|
322
|
+
return this.util.getContainerMembers(containerUrl);
|
|
323
|
+
};
|
|
324
|
+
SolidLogic.prototype.recursiveDelete = function (url) {
|
|
325
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
326
|
+
return __generator(this, function (_a) {
|
|
327
|
+
return [2 /*return*/, this.util.recursiveDelete(url)];
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
SolidLogic.prototype.clearStore = function () {
|
|
332
|
+
return this.util.clearStore();
|
|
333
|
+
};
|
|
334
|
+
SolidLogic.prototype.fetch = function (url, options) {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
336
|
+
return __generator(this, function (_a) {
|
|
337
|
+
return [2 /*return*/, this.fetcher.fetch(url, options)];
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
return SolidLogic;
|
|
342
|
+
}());
|
|
343
|
+
exports.SolidLogic = SolidLogic;
|
|
344
|
+
var CustomError = /** @class */ (function (_super) {
|
|
345
|
+
__extends(CustomError, _super);
|
|
346
|
+
function CustomError(message) {
|
|
347
|
+
var _newTarget = this.constructor;
|
|
348
|
+
var _this = _super.call(this, message) || this;
|
|
349
|
+
// see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html
|
|
350
|
+
Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain
|
|
351
|
+
_this.name = _newTarget.name; // stack traces display correctly now
|
|
352
|
+
return _this;
|
|
353
|
+
}
|
|
354
|
+
return CustomError;
|
|
355
|
+
}(Error));
|
|
356
|
+
var UnauthorizedError = /** @class */ (function (_super) {
|
|
357
|
+
__extends(UnauthorizedError, _super);
|
|
358
|
+
function UnauthorizedError() {
|
|
359
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
360
|
+
}
|
|
361
|
+
return UnauthorizedError;
|
|
362
|
+
}(CustomError));
|
|
363
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
364
|
+
var CrossOriginForbiddenError = /** @class */ (function (_super) {
|
|
365
|
+
__extends(CrossOriginForbiddenError, _super);
|
|
366
|
+
function CrossOriginForbiddenError() {
|
|
367
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
368
|
+
}
|
|
369
|
+
return CrossOriginForbiddenError;
|
|
370
|
+
}(CustomError));
|
|
371
|
+
exports.CrossOriginForbiddenError = CrossOriginForbiddenError;
|
|
372
|
+
var SameOriginForbiddenError = /** @class */ (function (_super) {
|
|
373
|
+
__extends(SameOriginForbiddenError, _super);
|
|
374
|
+
function SameOriginForbiddenError() {
|
|
375
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
376
|
+
}
|
|
377
|
+
return SameOriginForbiddenError;
|
|
378
|
+
}(CustomError));
|
|
379
|
+
exports.SameOriginForbiddenError = SameOriginForbiddenError;
|
|
380
|
+
var NotFoundError = /** @class */ (function (_super) {
|
|
381
|
+
__extends(NotFoundError, _super);
|
|
382
|
+
function NotFoundError() {
|
|
383
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
384
|
+
}
|
|
385
|
+
return NotFoundError;
|
|
386
|
+
}(CustomError));
|
|
387
|
+
exports.NotFoundError = NotFoundError;
|
|
388
|
+
var FetchError = /** @class */ (function (_super) {
|
|
389
|
+
__extends(FetchError, _super);
|
|
390
|
+
function FetchError(status, message) {
|
|
391
|
+
var _this = _super.call(this, message) || this;
|
|
392
|
+
_this.status = status;
|
|
393
|
+
return _this;
|
|
394
|
+
}
|
|
395
|
+
return FetchError;
|
|
396
|
+
}(CustomError));
|
|
397
|
+
exports.FetchError = FetchError;
|
|
398
|
+
//# sourceMappingURL=index-alain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-alain.js","sourceRoot":"","sources":["../src/index-alain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAA8B;AAE9B,oEAA6C;AAE7C,qDAAoD;AACpD,2DAA0D;AAG1D,8CAA6C;AAC7C,6CAAiC;AACjC,uDAAsD;AACtD,oDAAmD;AAEnD,oDAA+C;AAAtC,wGAAA,QAAQ,OAAA;AAEjB,IAAM,EAAE,GAAmB,IAAA,yBAAc,EAAC,GAAG,CAAC,CAAC;AAc/C;IAoBE,oBAAY,OAAu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