solid-logic 1.3.17 → 2.0.0-30dbc72f
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/.babelrc +0 -0
- package/.eslintrc.js +0 -0
- package/.github/workflows/ci.yml +0 -0
- package/.github/workflows/release.yml +0 -0
- package/.nvmrc +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/jest.config.js +0 -0
- package/lib/acl/aclLogic.d.ts +3 -30
- package/lib/acl/aclLogic.d.ts.map +1 -1
- package/lib/acl/aclLogic.js +152 -119
- package/lib/acl/aclLogic.js.map +1 -1
- package/lib/authSession/authSession.d.ts +0 -0
- package/lib/authSession/authSession.d.ts.map +0 -0
- package/lib/authSession/authSession.js +0 -0
- package/lib/authSession/authSession.js.map +0 -0
- package/lib/authn/SolidAuthnLogic.d.ts +0 -0
- package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/lib/authn/SolidAuthnLogic.js +3 -3
- package/lib/authn/SolidAuthnLogic.js.map +1 -1
- package/lib/authn/authUtil.d.ts +0 -0
- package/lib/authn/authUtil.d.ts.map +0 -0
- package/lib/authn/authUtil.js +0 -0
- package/lib/authn/authUtil.js.map +0 -0
- 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} +58 -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.d.ts +0 -0
- package/lib/issuer/issuerLogic.d.ts.map +0 -0
- 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/types.js +0 -0
- package/lib/types.js.map +0 -0
- 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} +53 -44
- package/lib/util/containerLogic.js.map +1 -0
- package/lib/util/debug.d.ts +0 -0
- package/lib/util/debug.d.ts.map +0 -0
- package/lib/util/debug.js +0 -0
- package/lib/util/debug.js.map +0 -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 +272 -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 +17 -15
- package/src/acl/aclLogic.ts +137 -118
- package/src/authSession/authSession.ts +0 -0
- package/src/authn/SolidAuthnLogic.ts +8 -7
- package/src/authn/authUtil.ts +0 -0
- 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 +54 -0
- package/src/util/debug.ts +0 -0
- package/src/util/ns.ts +5 -0
- package/src/util/utilityLogic.ts +155 -0
- package/src/util/utils.ts +52 -0
- package/test/aclLogic.test.ts +13 -4
- package/test/authUtil.test.ts +0 -0
- package/test/chatLogic.test.ts +70 -71
- package/test/container.test.ts +56 -0
- package/test/helpers/dataSetup.ts +134 -0
- package/test/helpers/setup.ts +4 -0
- package/test/inboxLogic.test.ts +39 -38
- package/test/logic.test.ts +10 -9
- package/test/profileLogic.test.ts +246 -0
- package/test/solidAuthLogic.test.ts +0 -0
- package/test/typeIndexLogic.test.ts +488 -30
- package/test/utilityLogic.test.ts +172 -126
- package/test/utils.test.ts +32 -0
- package/tsconfig.json +0 -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 -13
- package/lib/discovery/discoveryLogic.d.ts.map +0 -1
- package/lib/discovery/discoveryLogic.js +0 -203
- 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 -90
- 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
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;GAEG;AACH;IAME,oBAAY,KAAgB,EAAE,EAAkB,EAAE,OAAqB,EAAE,IAAkB;QACzF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC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AAU"}
|
|
@@ -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,CAAC;SAC1B,CAAC;KACL,CAAC;IAEF,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,eAAe,EAAE;QAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,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IvB,oBAAoB,CAAC,aAAa,EAAE,SAAS,GAAG,SAAS,EAAE;IAI3D,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAItD,eAAe,CAAC,GAAG,EAAE,MAAM;IAIjC,UAAU;IAIJ,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;CAGzC"}
|
package/lib/logic/SolidLogic.js
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
-
};
|
|
64
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.SolidLogic = void 0;
|
|
66
|
-
var rdf = __importStar(require("rdflib"));
|
|
67
|
-
var solid_namespace_1 = __importDefault(require("solid-namespace"));
|
|
68
|
-
var SolidAuthnLogic_1 = require("../authn/SolidAuthnLogic");
|
|
69
|
-
var ChatLogic_1 = require("../chat/ChatLogic");
|
|
70
|
-
var ProfileLogic_1 = require("../profile/ProfileLogic");
|
|
71
|
-
var debug = __importStar(require("../util/debug"));
|
|
72
|
-
var UtilityLogic_1 = require("../util/UtilityLogic");
|
|
73
|
-
var CustomError_1 = require("./CustomError");
|
|
74
|
-
/*
|
|
75
|
-
** It is important to distinquish `fetch`, a function provided by the browser
|
|
76
|
-
** and `Fetcher`, a helper object for the rdflib Store which turns it
|
|
77
|
-
** into a `ConnectedStore` or a `LiveStore`. A Fetcher object is
|
|
78
|
-
** available at store.fetcher, and `fetch` function at `store.fetcher._fetch`,
|
|
79
|
-
*/
|
|
80
|
-
var ns = (0, solid_namespace_1.default)(rdf);
|
|
81
|
-
var SolidLogic = /** @class */ (function () {
|
|
82
|
-
function SolidLogic(specialFetch, session) {
|
|
83
|
-
// would xpect to be able to do it this way: but get TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation status: 999
|
|
84
|
-
// this.store = new rdf.LiveStore({})
|
|
85
|
-
// this.store.fetcher._fetch = fetch
|
|
86
|
-
console.log("SolidLogic: Unique instance created. There should only be one of these.");
|
|
87
|
-
this.store = rdf.graph(); // Make a Quad store
|
|
88
|
-
rdf.fetcher(this.store, { fetch: specialFetch.fetch }); // Attach a web I/O module, store.fetcher
|
|
89
|
-
this.store.updater = new rdf.UpdateManager(this.store); // Add real-time live updates store.updater
|
|
90
|
-
this.store.features = []; // disable automatic node merging on store load
|
|
91
|
-
this.cache = {
|
|
92
|
-
profileDocument: {},
|
|
93
|
-
preferencesFile: {},
|
|
94
|
-
};
|
|
95
|
-
this.underlyingFetch = { fetch: fetch }; // Note global one not the one passed
|
|
96
|
-
this.authn = new SolidAuthnLogic_1.SolidAuthnLogic(session);
|
|
97
|
-
debug.log('SolidAuthnLogic initialized');
|
|
98
|
-
this.profile = new ProfileLogic_1.ProfileLogic(this.store, ns, this.authn);
|
|
99
|
-
this.chat = new ChatLogic_1.ChatLogic(this.store, ns, this.profile);
|
|
100
|
-
this.util = new UtilityLogic_1.UtilityLogic(this.store, ns, this.underlyingFetch);
|
|
101
|
-
}
|
|
102
|
-
SolidLogic.prototype.findAclDocUrl = function (url) {
|
|
103
|
-
return this.util.findAclDocUrl(url);
|
|
104
|
-
};
|
|
105
|
-
SolidLogic.prototype.loadProfile = function (me) {
|
|
106
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
var profileDocument, err_1, message;
|
|
108
|
-
return __generator(this, function (_a) {
|
|
109
|
-
switch (_a.label) {
|
|
110
|
-
case 0:
|
|
111
|
-
/*
|
|
112
|
-
// console.log('loadProfile cache ', this.cache)
|
|
113
|
-
if (this.cache.profileDocument[me.value]) {
|
|
114
|
-
return this.cache.profileDocument[me.value];
|
|
115
|
-
} @@ just use the cache in the store
|
|
116
|
-
*/
|
|
117
|
-
console.log('loadProfile me ', me);
|
|
118
|
-
profileDocument = me.doc();
|
|
119
|
-
_a.label = 1;
|
|
120
|
-
case 1:
|
|
121
|
-
_a.trys.push([1, 3, , 4]);
|
|
122
|
-
return [4 /*yield*/, this.store.fetcher.load(profileDocument)];
|
|
123
|
-
case 2:
|
|
124
|
-
_a.sent();
|
|
125
|
-
return [2 /*return*/, profileDocument];
|
|
126
|
-
case 3:
|
|
127
|
-
err_1 = _a.sent();
|
|
128
|
-
message = "Cannot load profile ".concat(profileDocument, " : ").concat(err_1);
|
|
129
|
-
throw new Error(message);
|
|
130
|
-
case 4: return [2 /*return*/];
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
SolidLogic.prototype.loadPreferences = function (me) {
|
|
136
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
137
|
-
// console.log('this.store.any()', this.store.any())
|
|
138
|
-
/**
|
|
139
|
-
* Are we working cross-origin?
|
|
140
|
-
* Returns True if we are in a webapp at an origin, and the file origin is different
|
|
141
|
-
*/
|
|
142
|
-
function differentOrigin() {
|
|
143
|
-
if (!preferencesFile) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
return ("".concat(window.location.origin, "/") !== new URL(preferencesFile.value).origin);
|
|
147
|
-
}
|
|
148
|
-
var preferencesFile, err_2, status_1;
|
|
149
|
-
return __generator(this, function (_a) {
|
|
150
|
-
switch (_a.label) {
|
|
151
|
-
case 0:
|
|
152
|
-
console.log('loadPreferences cache ', this.cache);
|
|
153
|
-
if (this.cache.preferencesFile[me.value]) {
|
|
154
|
-
return [2 /*return*/, this.cache.preferencesFile[me.value]];
|
|
155
|
-
}
|
|
156
|
-
return [4 /*yield*/, this.loadProfile(me)]; // Load pointer to pref file
|
|
157
|
-
case 1:
|
|
158
|
-
_a.sent(); // Load pointer to pref file
|
|
159
|
-
preferencesFile = this.store.any(me, ns.space('preferencesFile'), null, me.doc());
|
|
160
|
-
if (!preferencesFile) {
|
|
161
|
-
throw new Error("Can't find a preference file pointer in profile ".concat(me.doc()));
|
|
162
|
-
}
|
|
163
|
-
_a.label = 2;
|
|
164
|
-
case 2:
|
|
165
|
-
_a.trys.push([2, 4, , 5]);
|
|
166
|
-
return [4 /*yield*/, this.store.fetcher.load(preferencesFile, {
|
|
167
|
-
withCredentials: true,
|
|
168
|
-
})];
|
|
169
|
-
case 3:
|
|
170
|
-
_a.sent();
|
|
171
|
-
return [3 /*break*/, 5];
|
|
172
|
-
case 4:
|
|
173
|
-
err_2 = _a.sent();
|
|
174
|
-
status_1 = err_2.status;
|
|
175
|
-
debug.log("HTTP status ".concat(status_1, " for preference file ").concat(preferencesFile));
|
|
176
|
-
if (status_1 === 401) {
|
|
177
|
-
throw new CustomError_1.UnauthorizedError();
|
|
178
|
-
}
|
|
179
|
-
if (status_1 === 403) {
|
|
180
|
-
if (differentOrigin()) {
|
|
181
|
-
throw new CustomError_1.CrossOriginForbiddenError();
|
|
182
|
-
}
|
|
183
|
-
throw new CustomError_1.SameOriginForbiddenError();
|
|
184
|
-
}
|
|
185
|
-
if (status_1 === 404) {
|
|
186
|
-
throw new CustomError_1.NotFoundError(preferencesFile.value);
|
|
187
|
-
}
|
|
188
|
-
throw new CustomError_1.FetchError(err_2.status, err_2.message);
|
|
189
|
-
case 5: return [2 /*return*/, preferencesFile];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
SolidLogic.prototype.getTypeIndex = function (me, preferencesFile, isPublic) {
|
|
195
|
-
// console.log('getTypeIndex', this.store.each(me, undefined, undefined, preferencesFile), isPublic, preferencesFile)
|
|
196
|
-
return this.store.each(me, isPublic ? ns.solid("publicTypeIndex") : ns.solid("privateTypeIndex"), undefined, preferencesFile);
|
|
197
|
-
};
|
|
198
|
-
SolidLogic.prototype.getRegistrations = function (instance, theClass) {
|
|
199
|
-
var _this = this;
|
|
200
|
-
return this.store
|
|
201
|
-
.each(undefined, ns.solid("instance"), instance)
|
|
202
|
-
.filter(function (r) {
|
|
203
|
-
return _this.store.holds(r, ns.solid("forClass"), theClass);
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
SolidLogic.prototype.load = function (doc) {
|
|
207
|
-
return this.store.fetcher.load(doc);
|
|
208
|
-
};
|
|
209
|
-
SolidLogic.prototype.loadIndexes = function (me, publicProfile, preferencesFile, onWarning) {
|
|
210
|
-
var _this = this;
|
|
211
|
-
if (onWarning === void 0) { onWarning = function (_err) { return __awaiter(_this, void 0, void 0, function () {
|
|
212
|
-
return __generator(this, function (_a) {
|
|
213
|
-
return [2 /*return*/, undefined];
|
|
214
|
-
});
|
|
215
|
-
}); }; }
|
|
216
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
217
|
-
var privateIndexes, publicIndexes, err_3, err_4;
|
|
218
|
-
return __generator(this, function (_a) {
|
|
219
|
-
switch (_a.label) {
|
|
220
|
-
case 0:
|
|
221
|
-
privateIndexes = [];
|
|
222
|
-
publicIndexes = [];
|
|
223
|
-
if (!publicProfile) return [3 /*break*/, 4];
|
|
224
|
-
publicIndexes = this.getTypeIndex(me, publicProfile, true);
|
|
225
|
-
_a.label = 1;
|
|
226
|
-
case 1:
|
|
227
|
-
_a.trys.push([1, 3, , 4]);
|
|
228
|
-
return [4 /*yield*/, this.load(publicIndexes)];
|
|
229
|
-
case 2:
|
|
230
|
-
_a.sent();
|
|
231
|
-
return [3 /*break*/, 4];
|
|
232
|
-
case 3:
|
|
233
|
-
err_3 = _a.sent();
|
|
234
|
-
onWarning(new Error("loadIndex: loading public type index(es) ".concat(err_3)));
|
|
235
|
-
return [3 /*break*/, 4];
|
|
236
|
-
case 4:
|
|
237
|
-
if (!preferencesFile) return [3 /*break*/, 9];
|
|
238
|
-
privateIndexes = this.getTypeIndex(me, preferencesFile, false);
|
|
239
|
-
if (!(privateIndexes.length === 0)) return [3 /*break*/, 6];
|
|
240
|
-
return [4 /*yield*/, onWarning(new Error("Your preference file ".concat(preferencesFile, " does not point to a private type index.")))];
|
|
241
|
-
case 5:
|
|
242
|
-
_a.sent();
|
|
243
|
-
return [3 /*break*/, 9];
|
|
244
|
-
case 6:
|
|
245
|
-
_a.trys.push([6, 8, , 9]);
|
|
246
|
-
return [4 /*yield*/, this.load(privateIndexes)];
|
|
247
|
-
case 7:
|
|
248
|
-
_a.sent();
|
|
249
|
-
return [3 /*break*/, 9];
|
|
250
|
-
case 8:
|
|
251
|
-
err_4 = _a.sent();
|
|
252
|
-
onWarning(new Error("loadIndex: loading private type index(es) ".concat(err_4)));
|
|
253
|
-
return [3 /*break*/, 9];
|
|
254
|
-
case 9: return [2 /*return*/, {
|
|
255
|
-
private: privateIndexes,
|
|
256
|
-
public: publicIndexes,
|
|
257
|
-
}];
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
};
|
|
262
|
-
SolidLogic.prototype.createEmptyRdfDoc = function (doc, comment) {
|
|
263
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
264
|
-
return __generator(this, function (_a) {
|
|
265
|
-
switch (_a.label) {
|
|
266
|
-
case 0: return [4 /*yield*/, this.store.fetcher.webOperation("PUT", doc.uri, {
|
|
267
|
-
data: "# ".concat(new Date(), " ").concat(comment, "\n "),
|
|
268
|
-
contentType: "text/turtle",
|
|
269
|
-
})];
|
|
270
|
-
case 1:
|
|
271
|
-
_a.sent();
|
|
272
|
-
return [2 /*return*/];
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
});
|
|
276
|
-
};
|
|
277
|
-
// @@@@ use the one in rdflib.js when it is available and delete this
|
|
278
|
-
SolidLogic.prototype.updatePromise = function (del, ins) {
|
|
279
|
-
var _this = this;
|
|
280
|
-
if (ins === void 0) { ins = []; }
|
|
281
|
-
return new Promise(function (resolve, reject) {
|
|
282
|
-
_this.store.updater.update(del, ins, function (_uri, ok, errorBody) {
|
|
283
|
-
if (!ok) {
|
|
284
|
-
reject(new Error(errorBody));
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
resolve();
|
|
288
|
-
}
|
|
289
|
-
}); // callback
|
|
290
|
-
}); // promise
|
|
291
|
-
};
|
|
292
|
-
SolidLogic.prototype.isContainer = function (url) {
|
|
293
|
-
return this.util.isContainer(url);
|
|
294
|
-
};
|
|
295
|
-
SolidLogic.prototype.getContainerElements = function (containerNode) {
|
|
296
|
-
return this.util.getContainerElements(containerNode);
|
|
297
|
-
};
|
|
298
|
-
SolidLogic.prototype.getContainerMembers = function (containerUrl) {
|
|
299
|
-
return this.util.getContainerMembers(containerUrl);
|
|
300
|
-
};
|
|
301
|
-
SolidLogic.prototype.recursiveDelete = function (url) {
|
|
302
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
303
|
-
return __generator(this, function (_a) {
|
|
304
|
-
return [2 /*return*/, this.util.recursiveDelete(url)];
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
};
|
|
308
|
-
SolidLogic.prototype.clearStore = function () {
|
|
309
|
-
return this.util.clearStore();
|
|
310
|
-
};
|
|
311
|
-
SolidLogic.prototype.fetch = function (url, options) {
|
|
312
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
return __generator(this, function (_a) {
|
|
314
|
-
return [2 /*return*/, this.underlyingFetch.fetch(url, options)];
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
return SolidLogic;
|
|
319
|
-
}());
|
|
320
|
-
exports.SolidLogic = SolidLogic;
|
|
321
|
-
//# sourceMappingURL=SolidLogic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidLogic.js","sourceRoot":"","sources":["../../src/logic/SolidLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAA8B;AAE9B,oEAA6C;AAC7C,4DAA2D;AAC3D,+CAA8C;AAC9C,wDAAuD;AAEvD,mDAAuC;AACvC,qDAAoD;AACpD,6CAAkI;AAClI;;;;;EAKE;AAEF,IAAM,EAAE,GAAmB,IAAA,yBAAc,EAAC,GAAG,CAAC,CAAC;AAE/C;IA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AAa,CAAC,CAAC;IACzD,CAAC;IAED,wCAAmB,GAAnB,UAAoB,YAAoB;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC;IAEK,oCAAe,GAArB,UAAsB,GAAW;;;gBAC7B,sBAAO,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,EAAC;;;KACzC;IAED,+BAAU,GAAV;QACI,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAEK,0BAAK,GAAX,UAAY,GAAW,EAAE,OAAa;;;gBAClC,sBAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,EAAC;;;KACnD;IACL,iBAAC;AAAD,CAAC,AAjPD,IAiPC;AAjPY,gCAAU"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NamedNode, LiveStore } from "rdflib";
|
|
2
|
-
import { AuthnLogic, SolidNamespace } from "../types";
|
|
3
|
-
export declare class ProfileLogic {
|
|
4
|
-
store: LiveStore;
|
|
5
|
-
ns: SolidNamespace;
|
|
6
|
-
authn: AuthnLogic;
|
|
7
|
-
constructor(store: LiveStore, ns: SolidNamespace, authn: AuthnLogic);
|
|
8
|
-
loadMe(): Promise<NamedNode>;
|
|
9
|
-
getPodRoot(user: NamedNode): NamedNode;
|
|
10
|
-
getMainInbox(user: NamedNode): Promise<NamedNode>;
|
|
11
|
-
private findStorage;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=ProfileLogic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileLogic.d.ts","sourceRoot":"","sources":["../../src/profile/ProfileLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEt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AC,0BAA0B,CAAC,CAAC;SAC7C;QACD,OAAO,OAAoB,CAAC;IAC9B,CAAC;IAEK,mCAAY,GAAlB,UAAmB,IAAe;;;;;;4BAChC,qBAAM,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,IAAI,CAAC,IAAI,CAAC,CAAA,EAAA;;wBAApC,SAAoC,CAAC;wBAC/B,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;wBACpF,IAAI,CAAC,SAAS,EAAE;4BACd,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;yBAC/C;wBACD,sBAAO,SAAsB,EAAC;;;;KAC/B;IAEO,kCAAW,GAAnB,UAAoB,EAAa;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3E,CAAC;IACH,mBAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,oCAAY"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { NamedNode, LiveStore } from "rdflib";
|
|
2
|
-
import { SolidNamespace } from "../types";
|
|
3
|
-
export declare const ACL_LINK: NamedNode;
|
|
4
|
-
/**
|
|
5
|
-
* Utility-related logic
|
|
6
|
-
*/
|
|
7
|
-
export declare class UtilityLogic {
|
|
8
|
-
store: LiveStore;
|
|
9
|
-
ns: SolidNamespace;
|
|
10
|
-
underlyingFetch: {
|
|
11
|
-
fetch: (url: string, options?: any) => any;
|
|
12
|
-
};
|
|
13
|
-
constructor(store: LiveStore, ns: SolidNamespace, underlyingFetch: {
|
|
14
|
-
fetch: (url: string, options?: any) => any;
|
|
15
|
-
});
|
|
16
|
-
findAclDocUrl(url: string): Promise<string>;
|
|
17
|
-
setSinglePeerAccess(options: {
|
|
18
|
-
ownerWebId: string;
|
|
19
|
-
peerWebId: string;
|
|
20
|
-
accessToModes?: string;
|
|
21
|
-
defaultModes?: string;
|
|
22
|
-
target: string;
|
|
23
|
-
}): Promise<any>;
|
|
24
|
-
loadDoc(doc: NamedNode): Promise<void>;
|
|
25
|
-
isContainer(url: string): boolean;
|
|
26
|
-
createContainer(url: string): Promise<void>;
|
|
27
|
-
getContainerElements(containerNode: NamedNode): NamedNode[];
|
|
28
|
-
getContainerMembers(containerUrl: string): Promise<string[]>;
|
|
29
|
-
recursiveDelete(url: string): Promise<any>;
|
|
30
|
-
clearStore(): void;
|
|
31
|
-
getArchiveUrl(baseUrl: string, date: Date): string;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=UtilityLogic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UtilityLogic.d.ts","sourceRoot":"","sources":["../../src/util/UtilityLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,QAAQ,WAEpB,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAY;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,cAAc,CAAC;IACnB,eAAe,EAAE;QAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,CAAA;KAAE,CAAC;gBAEpD,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE;QAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,CAAA;KAAE;IAM3G,aAAa,CAAC,GAAG,EAAE,MAAM;IAWz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