solid-logic 1.3.13 → 1.3.14-2dd035d2
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 +39 -5
- package/.github/workflows/release.yml +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/jest.config.js +4 -1
- package/lib/acl/aclLogic.d.ts +32 -0
- package/lib/acl/aclLogic.d.ts.map +1 -0
- package/lib/acl/aclLogic.js +136 -0
- package/lib/acl/aclLogic.js.map +1 -0
- package/lib/authSession/authSession.d.ts +3 -0
- package/lib/authSession/authSession.d.ts.map +1 -0
- package/lib/authSession/authSession.js +8 -0
- package/lib/authSession/authSession.js.map +1 -0
- package/lib/authn/SolidAuthnLogic.d.ts +26 -5
- package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/lib/authn/SolidAuthnLogic.js +171 -5
- package/lib/authn/SolidAuthnLogic.js.map +1 -1
- package/lib/authn/authUtil.d.ts +17 -0
- package/lib/authn/authUtil.d.ts.map +1 -0
- package/lib/authn/authUtil.js +92 -0
- package/lib/authn/authUtil.js.map +1 -0
- package/lib/chat/ChatLogic.d.ts +2 -2
- package/lib/chat/ChatLogic.d.ts.map +1 -1
- package/lib/chat/ChatLogic.js +2 -2
- package/lib/chat/ChatLogic.js.map +1 -1
- package/lib/chat/determineChatContainer.d.ts +0 -0
- package/lib/chat/determineChatContainer.d.ts.map +0 -0
- package/lib/chat/determineChatContainer.js +0 -0
- package/lib/chat/determineChatContainer.js.map +0 -0
- package/lib/inbox/InboxLogic.d.ts +2 -2
- package/lib/inbox/InboxLogic.d.ts.map +1 -1
- package/lib/inbox/InboxLogic.js +0 -0
- package/lib/inbox/InboxLogic.js.map +1 -1
- package/lib/index.d.ts +14 -67
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +39 -387
- package/lib/index.js.map +1 -1
- package/lib/issuer/issuerLogic.d.ts +8 -0
- package/lib/issuer/issuerLogic.d.ts.map +1 -0
- package/lib/issuer/issuerLogic.js +53 -0
- package/lib/issuer/issuerLogic.js.map +1 -0
- package/lib/logic/CustomError.d.ts +17 -0
- package/lib/logic/CustomError.d.ts.map +1 -0
- package/lib/logic/CustomError.js +73 -0
- package/lib/logic/CustomError.js.map +1 -0
- package/lib/logic/SolidLogic.d.ts +49 -0
- package/lib/logic/SolidLogic.d.ts.map +1 -0
- package/lib/logic/SolidLogic.js +321 -0
- package/lib/logic/SolidLogic.js.map +1 -0
- package/lib/logic/solidLogicSingleton.d.ts +4 -0
- package/lib/logic/solidLogicSingleton.d.ts.map +1 -0
- package/lib/logic/solidLogicSingleton.js +84 -0
- package/lib/logic/solidLogicSingleton.js.map +1 -0
- package/lib/profile/ProfileLogic.d.ts +2 -3
- package/lib/profile/ProfileLogic.d.ts.map +1 -1
- package/lib/profile/ProfileLogic.js +0 -0
- package/lib/profile/ProfileLogic.js.map +1 -1
- package/lib/typeIndex/typeIndexLogic.d.ts +22 -0
- package/lib/typeIndex/typeIndexLogic.d.ts.map +1 -0
- package/lib/typeIndex/typeIndexLogic.js +306 -0
- package/lib/typeIndex/typeIndexLogic.js.map +1 -0
- package/lib/types.d.ts +31 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/{authn/index.js → types.js} +1 -1
- package/lib/types.js.map +1 -0
- package/lib/util/UtilityLogic.d.ts +2 -2
- package/lib/util/UtilityLogic.d.ts.map +1 -1
- package/lib/util/UtilityLogic.js +0 -0
- package/lib/util/UtilityLogic.js.map +1 -1
- package/lib/{debug.d.ts → util/debug.d.ts} +0 -0
- package/lib/util/debug.d.ts.map +1 -0
- package/lib/{debug.js → util/debug.js} +0 -0
- package/lib/util/debug.js.map +1 -0
- package/lib/{uri.d.ts → util/uri.d.ts} +0 -0
- package/lib/util/uri.d.ts.map +1 -0
- package/lib/{uri.js → util/uri.js} +0 -0
- package/lib/util/uri.js.map +1 -0
- package/package.json +15 -16
- package/src/acl/aclLogic.ts +137 -0
- package/src/authSession/authSession.ts +13 -0
- package/src/authn/SolidAuthnLogic.ts +114 -9
- package/src/authn/authUtil.ts +67 -0
- package/src/chat/ChatLogic.ts +4 -4
- package/src/chat/determineChatContainer.ts +0 -0
- package/src/inbox/InboxLogic.ts +2 -14
- package/src/index.ts +29 -308
- package/src/issuer/issuerLogic.ts +40 -0
- package/src/logic/CustomError.ts +25 -0
- package/src/logic/SolidLogic.ts +265 -0
- package/src/logic/solidLogicSingleton.ts +20 -0
- package/src/profile/ProfileLogic.ts +2 -3
- package/src/typeIndex/typeIndexLogic.ts +170 -0
- package/src/types.ts +43 -0
- package/src/util/UtilityLogic.ts +2 -14
- package/src/{debug.ts → util/debug.ts} +0 -0
- package/src/{uri.ts → util/uri.ts} +0 -0
- package/test/aclLogic.test.ts +15 -0
- package/test/authUtil.test.ts +23 -0
- package/{src/chat/integration.test.ts → test/chatLogic.test.ts} +7 -9
- package/test/helpers/setup.ts +13 -0
- package/{src/inbox/unit.test.ts → test/inboxLogic.test.ts} +5 -6
- package/test/logic.test.ts +28 -0
- package/test/solidAuthLogic.test.ts +49 -0
- package/test/typeIndexLogic.test.ts +26 -0
- package/{src/util/unit.test.ts → test/utilityLogic.test.ts} +3 -4
- package/tsconfig.json +0 -0
- package/jest.setup.ts +0 -2
- package/lib/authn/NoAuthnLogic.d.ts +0 -9
- package/lib/authn/NoAuthnLogic.d.ts.map +0 -1
- package/lib/authn/NoAuthnLogic.js +0 -17
- package/lib/authn/NoAuthnLogic.js.map +0 -1
- package/lib/authn/index.d.ts +0 -5
- package/lib/authn/index.d.ts.map +0 -1
- package/lib/authn/index.js.map +0 -1
- package/lib/chat/integration.test.d.ts +0 -2
- package/lib/chat/integration.test.d.ts.map +0 -1
- package/lib/chat/integration.test.js +0 -318
- package/lib/chat/integration.test.js.map +0 -1
- package/lib/debug.d.ts.map +0 -1
- package/lib/debug.js.map +0 -1
- package/lib/inbox/unit.test.d.ts +0 -2
- package/lib/inbox/unit.test.d.ts.map +0 -1
- package/lib/inbox/unit.test.js +0 -264
- package/lib/inbox/unit.test.js.map +0 -1
- package/lib/uri.d.ts.map +0 -1
- package/lib/uri.js.map +0 -1
- package/lib/util/unit.test.d.ts +0 -2
- package/lib/util/unit.test.d.ts.map +0 -1
- package/lib/util/unit.test.js +0 -200
- package/lib/util/unit.test.js.map +0 -1
- package/renovate.json +0 -5
- package/src/authn/NoAuthnLogic.ts +0 -16
- package/src/authn/index.ts +0 -5
package/lib/chat/ChatLogic.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SolidNamespace } from "../index";
|
|
1
|
+
import { NamedNode, LiveStore } from "rdflib";
|
|
3
2
|
import { ProfileLogic } from "../profile/ProfileLogic";
|
|
3
|
+
import { SolidNamespace } from "../types";
|
|
4
4
|
/**
|
|
5
5
|
* Chat-related logic
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatLogic.d.ts","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"ChatLogic.d.ts","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAgB1C;;GAEG;AACH,qBAAa,SAAS;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,cAAc,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;gBAEV,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY;IAMjE,MAAM,CACV,aAAa,EAAE,SAAS,EACxB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,IAAI,CAAC;YAsCF,qBAAqB;YAqCrB,QAAQ;YAeR,eAAe;IAW7B,OAAO,CAAC,OAAO;IAoDf;;;;;OAKG;IACG,OAAO,CACX,OAAO,EAAE,SAAS,EAClB,eAAe,UAAO,GACrB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;YAgBd,UAAU;CA6BzB"}
|
package/lib/chat/ChatLogic.js
CHANGED
|
@@ -49,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.ChatLogic = void 0;
|
|
51
51
|
var rdflib_1 = require("rdflib");
|
|
52
|
-
var uri_1 = require("../uri");
|
|
52
|
+
var uri_1 = require("../util/uri");
|
|
53
53
|
var determineChatContainer_1 = require("./determineChatContainer");
|
|
54
54
|
var CHAT_LOCATION_IN_CONTAINER = "index.ttl#this";
|
|
55
55
|
/**
|
|
@@ -255,7 +255,7 @@ var ChatLogic = /** @class */ (function () {
|
|
|
255
255
|
if (!inviteeInbox) {
|
|
256
256
|
throw new Error("Invitee inbox not found! ".concat(invitee.value));
|
|
257
257
|
}
|
|
258
|
-
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(this.ns.rdf("seeAlso"), " <").concat(chatThing.value, ">
|
|
258
|
+
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(this.ns.rdf("seeAlso"), " <").concat(chatThing.value, "> .\n ");
|
|
259
259
|
return [4 /*yield*/, ((_b = this.store.fetcher) === null || _b === void 0 ? void 0 : _b.webOperation("POST", inviteeInbox.value, {
|
|
260
260
|
data: inviteBody,
|
|
261
261
|
contentType: "text/turtle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatLogic.js","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,CAAC,CAAA,EAAA;;wBAA7C,SAA6C,CAAC;wBACxC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CACjC,OAAO,EACP,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EACpB,SAAS,EACT,OAAO,CAAC,GAAG,EAAE,CACd,CAAC;wBACF,IAAI,CAAC,YAAY,EAAE;4BACjB,MAAM,IAAI,KAAK,CAAC,mCAA4B,OAAO,CAAC,KAAK,CAAE,CAAC,CAAC;yBAC9D;wBACK,UAAU,GAAG,sEAErB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,eAAK,SAAS,CAAC,KAAK,YACzC,CAAC;wBAEuB,qBAAM,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,YAAY,CAC3D,MAAM,EACN,YAAY,CAAC,KAAK,EAClB;gCACE,IAAI,EAAE,UAAU;gCAChB,WAAW,EAAE,aAAa;6BAC3B,CACF,CAAA,EAAA;;wBAPK,cAAc,GAAG,SAOtB;wBACK,WAAW,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;wBAC5D,IAAI,CAAC,WAAW,EAAE;4BAChB,MAAM,IAAI,KAAK,CAAC,oCAA6B,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,CAAE,CAAC,CAAC;yBACxE;;;;;KACF;IACH,gBAAC;AAAD,CAAC,AA9ND,IA8NC;AA9NY,8BAAS"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SolidNamespace } from "../index";
|
|
1
|
+
import { NamedNode, LiveStore } from "rdflib";
|
|
3
2
|
import { ProfileLogic } from "../profile/ProfileLogic";
|
|
3
|
+
import { SolidNamespace } from "../types";
|
|
4
4
|
import { UtilityLogic } from "../util/UtilityLogic";
|
|
5
5
|
/**
|
|
6
6
|
* Inbox-related logic
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxLogic.d.ts","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":"
|
|
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"}
|
package/lib/inbox/InboxLogic.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxLogic.js","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"InboxLogic.js","sourceRoot":"","sources":["../../src/inbox/InboxLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE;gCACpC,MAAM,EAAE,QAAQ;6BACjB,CAAC,CAAA,EAAA;;wBAFF,SAEE,CAAC;;;;;;KAEN;IACH,iBAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDY,gCAAU"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,69 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const authn: import("./types").AuthnLogic;
|
|
2
|
+
declare const authSession: import("@inrupt/solid-client-authn-browser").Session;
|
|
3
|
+
declare const store: import("rdflib").LiveStore;
|
|
4
|
+
declare const chat: import("./chat/ChatLogic").ChatLogic;
|
|
5
|
+
declare const profile: import("./profile/ProfileLogic").ProfileLogic;
|
|
6
|
+
export { setACLUserPublic, genACLText } from './acl/aclLogic';
|
|
7
|
+
export { ensureTypeIndexes, loadTypeIndexes, registerInTypeIndex, loadIndex } from './typeIndex/typeIndexLogic';
|
|
8
|
+
export { SolidLogic } from './logic/SolidLogic';
|
|
9
|
+
export { offlineTestID, appContext } from './authn/authUtil';
|
|
9
10
|
export { ACL_LINK } from './util/UtilityLogic';
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
profileDocument: {
|
|
16
|
-
[WebID: string]: NamedNode;
|
|
17
|
-
};
|
|
18
|
-
preferencesFile: {
|
|
19
|
-
[WebID: string]: NamedNode;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
store: LiveStore;
|
|
23
|
-
me: string | undefined;
|
|
24
|
-
fetcher: {
|
|
25
|
-
fetch: (url: string, options?: any) => any;
|
|
26
|
-
};
|
|
27
|
-
chat: ChatLogic;
|
|
28
|
-
profile: ProfileLogic;
|
|
29
|
-
authn: AuthnLogic;
|
|
30
|
-
util: UtilityLogic;
|
|
31
|
-
constructor(fetcher: {
|
|
32
|
-
fetch: (url: any, requestInit: any) => any;
|
|
33
|
-
}, solidAuthSession: Session);
|
|
34
|
-
findAclDocUrl(url: string): Promise<string>;
|
|
35
|
-
loadDoc(doc: NamedNode): Promise<void>;
|
|
36
|
-
loadProfile(me: NamedNode): Promise<NamedNode>;
|
|
37
|
-
loadPreferences(me: NamedNode): Promise<NamedNode>;
|
|
38
|
-
getTypeIndex(me: NamedNode | string, preferencesFile: NamedNode | string, isPublic: boolean): NamedNode[];
|
|
39
|
-
getRegistrations(instance: any, theClass: any): rdf.Node[];
|
|
40
|
-
load(doc: NamedNode | NamedNode[] | string): Promise<Response> | Promise<Response[]>;
|
|
41
|
-
loadIndexes(me: NamedNode | string, publicProfile: NamedNode | string | null, preferencesFile: NamedNode | string | null, onWarning?: (_err: Error) => Promise<undefined>): Promise<{
|
|
42
|
-
private: any;
|
|
43
|
-
public: any;
|
|
44
|
-
}>;
|
|
45
|
-
createEmptyRdfDoc(doc: NamedNode, comment: string): Promise<void>;
|
|
46
|
-
updatePromise(del: Array<Statement>, ins?: Array<Statement>): Promise<void>;
|
|
47
|
-
isContainer(url: string): boolean;
|
|
48
|
-
getContainerElements(containerNode: NamedNode): NamedNode[];
|
|
49
|
-
getContainerMembers(containerUrl: string): Promise<string[]>;
|
|
50
|
-
recursiveDelete(url: string): Promise<any>;
|
|
51
|
-
clearStore(): void;
|
|
52
|
-
fetch(url: string, options?: any): Promise<any>;
|
|
53
|
-
}
|
|
54
|
-
declare class CustomError extends Error {
|
|
55
|
-
constructor(message?: string);
|
|
56
|
-
}
|
|
57
|
-
export declare class UnauthorizedError extends CustomError {
|
|
58
|
-
}
|
|
59
|
-
export declare class CrossOriginForbiddenError extends CustomError {
|
|
60
|
-
}
|
|
61
|
-
export declare class SameOriginForbiddenError extends CustomError {
|
|
62
|
-
}
|
|
63
|
-
export declare class NotFoundError extends CustomError {
|
|
64
|
-
}
|
|
65
|
-
export declare class FetchError extends CustomError {
|
|
66
|
-
status: number;
|
|
67
|
-
constructor(status: number, message?: string);
|
|
68
|
-
}
|
|
11
|
+
export { getSuggestedIssuers } from './issuer/issuerLogic';
|
|
12
|
+
export { AppDetails, SolidNamespace, AuthenticationContext } from './types';
|
|
13
|
+
export { solidLogicSingleton } from './logic/solidLogicSingleton';
|
|
14
|
+
export { UnauthorizedError, CrossOriginForbiddenError, SameOriginForbiddenError, NotFoundError, FetchError } from './logic/CustomError';
|
|
15
|
+
export { authn, authSession, store, chat, profile };
|
|
69
16
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,KAAK,8BAA4B,CAAA;AACvC,QAAA,MAAM,WAAW,sDAAwC,CAAA;AACzD,QAAA,MAAM,KAAK,4BAA4B,CAAA;AAEvC,QAAA,MAAM,IAAI,sCAA2B,CAAA;AACrC,QAAA,MAAM,OAAO,+CAA8B,CAAA;AAE3C,OAAO,EACL,gBAAgB,EAChB,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,SAAS,EACV,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACvI,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -1,391 +1,43 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
3
|
+
exports.profile = exports.chat = exports.store = exports.authSession = exports.authn = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.solidLogicSingleton = exports.getSuggestedIssuers = exports.ACL_LINK = exports.appContext = exports.offlineTestID = exports.SolidLogic = exports.loadIndex = exports.registerInTypeIndex = exports.loadTypeIndexes = exports.ensureTypeIndexes = exports.genACLText = exports.setACLUserPublic = void 0;
|
|
4
|
+
// Make these variables directly accessible as it is what you need most of the time
|
|
5
|
+
// This also makes these variable globaly accesible in mashlib
|
|
6
|
+
var solidLogicSingleton_1 = require("./logic/solidLogicSingleton");
|
|
7
|
+
var authn = solidLogicSingleton_1.solidLogicSingleton.authn;
|
|
8
|
+
exports.authn = authn;
|
|
9
|
+
var authSession = solidLogicSingleton_1.solidLogicSingleton.authn.authSession;
|
|
10
|
+
exports.authSession = authSession;
|
|
11
|
+
var store = solidLogicSingleton_1.solidLogicSingleton.store;
|
|
12
|
+
exports.store = store;
|
|
13
|
+
var chat = solidLogicSingleton_1.solidLogicSingleton.chat;
|
|
14
|
+
exports.chat = chat;
|
|
15
|
+
var profile = solidLogicSingleton_1.solidLogicSingleton.profile;
|
|
16
|
+
exports.profile = profile;
|
|
17
|
+
var aclLogic_1 = require("./acl/aclLogic");
|
|
18
|
+
Object.defineProperty(exports, "setACLUserPublic", { enumerable: true, get: function () { return aclLogic_1.setACLUserPublic; } });
|
|
19
|
+
Object.defineProperty(exports, "genACLText", { enumerable: true, get: function () { return aclLogic_1.genACLText; } });
|
|
20
|
+
var typeIndexLogic_1 = require("./typeIndex/typeIndexLogic");
|
|
21
|
+
Object.defineProperty(exports, "ensureTypeIndexes", { enumerable: true, get: function () { return typeIndexLogic_1.ensureTypeIndexes; } });
|
|
22
|
+
Object.defineProperty(exports, "loadTypeIndexes", { enumerable: true, get: function () { return typeIndexLogic_1.loadTypeIndexes; } });
|
|
23
|
+
Object.defineProperty(exports, "registerInTypeIndex", { enumerable: true, get: function () { return typeIndexLogic_1.registerInTypeIndex; } });
|
|
24
|
+
Object.defineProperty(exports, "loadIndex", { enumerable: true, get: function () { return typeIndexLogic_1.loadIndex; } });
|
|
25
|
+
var SolidLogic_1 = require("./logic/SolidLogic");
|
|
26
|
+
Object.defineProperty(exports, "SolidLogic", { enumerable: true, get: function () { return SolidLogic_1.SolidLogic; } });
|
|
27
|
+
var authUtil_1 = require("./authn/authUtil");
|
|
28
|
+
Object.defineProperty(exports, "offlineTestID", { enumerable: true, get: function () { return authUtil_1.offlineTestID; } });
|
|
29
|
+
Object.defineProperty(exports, "appContext", { enumerable: true, get: function () { return authUtil_1.appContext; } });
|
|
84
30
|
var UtilityLogic_1 = require("./util/UtilityLogic");
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.fetcher = fetcher;
|
|
98
|
-
if (solidAuthSession) {
|
|
99
|
-
this.authn = new SolidAuthnLogic_1.SolidAuthnLogic(solidAuthSession);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
this.authn = new NoAuthnLogic_1.NoAuthnLogic();
|
|
103
|
-
}
|
|
104
|
-
this.profile = new ProfileLogic_1.ProfileLogic(this.store, ns, this.authn);
|
|
105
|
-
this.chat = new ChatLogic_1.ChatLogic(this.store, ns, this.profile);
|
|
106
|
-
this.util = new UtilityLogic_1.UtilityLogic(this.store, ns, this.fetcher);
|
|
107
|
-
}
|
|
108
|
-
SolidLogic.prototype.findAclDocUrl = function (url) {
|
|
109
|
-
return this.util.findAclDocUrl(url);
|
|
110
|
-
};
|
|
111
|
-
SolidLogic.prototype.loadDoc = function (doc) {
|
|
112
|
-
return this.util.loadDoc(doc);
|
|
113
|
-
};
|
|
114
|
-
SolidLogic.prototype.loadProfile = function (me) {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
-
var profileDocument, err_1, message;
|
|
117
|
-
return __generator(this, function (_a) {
|
|
118
|
-
switch (_a.label) {
|
|
119
|
-
case 0:
|
|
120
|
-
// console.log('loadProfile', me)
|
|
121
|
-
if (this.cache.profileDocument[me.value]) {
|
|
122
|
-
return [2 /*return*/, this.cache.profileDocument[me.value]];
|
|
123
|
-
}
|
|
124
|
-
_a.label = 1;
|
|
125
|
-
case 1:
|
|
126
|
-
_a.trys.push([1, 3, , 4]);
|
|
127
|
-
profileDocument = me.doc();
|
|
128
|
-
return [4 /*yield*/, this.loadDoc(profileDocument)];
|
|
129
|
-
case 2:
|
|
130
|
-
_a.sent();
|
|
131
|
-
return [2 /*return*/, profileDocument];
|
|
132
|
-
case 3:
|
|
133
|
-
err_1 = _a.sent();
|
|
134
|
-
message = "Logged in but cannot load profile ".concat(profileDocument, " : ").concat(err_1);
|
|
135
|
-
throw new Error(message);
|
|
136
|
-
case 4: return [2 /*return*/];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
SolidLogic.prototype.loadPreferences = function (me) {
|
|
142
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
143
|
-
// console.log('this.store.any()', this.store.any())
|
|
144
|
-
/**
|
|
145
|
-
* Are we working cross-origin?
|
|
146
|
-
* Returns True if we are in a webapp at an origin, and the file origin is different
|
|
147
|
-
*/
|
|
148
|
-
function differentOrigin() {
|
|
149
|
-
if (!preferencesFile) {
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
return ("".concat(window.location.origin, "/") !== new URL(preferencesFile.value).origin);
|
|
153
|
-
}
|
|
154
|
-
var preferencesFile, err_2, status_1;
|
|
155
|
-
return __generator(this, function (_a) {
|
|
156
|
-
switch (_a.label) {
|
|
157
|
-
case 0:
|
|
158
|
-
// console.log('loadPreferences', me)
|
|
159
|
-
if (this.cache.preferencesFile[me.value]) {
|
|
160
|
-
return [2 /*return*/, this.cache.preferencesFile[me.value]];
|
|
161
|
-
}
|
|
162
|
-
preferencesFile = this.store.any(me, ns.space("preferencesFile"));
|
|
163
|
-
if (!preferencesFile) {
|
|
164
|
-
throw new Error("Can't find a preference file pointer in profile ".concat(me.doc()));
|
|
165
|
-
}
|
|
166
|
-
if (!this.store.fetcher) {
|
|
167
|
-
throw new Error("Cannot load doc, have no fetcher");
|
|
168
|
-
}
|
|
169
|
-
_a.label = 1;
|
|
170
|
-
case 1:
|
|
171
|
-
_a.trys.push([1, 3, , 4]);
|
|
172
|
-
return [4 /*yield*/, this.store.fetcher.load(preferencesFile, {
|
|
173
|
-
withCredentials: true,
|
|
174
|
-
})];
|
|
175
|
-
case 2:
|
|
176
|
-
_a.sent();
|
|
177
|
-
return [3 /*break*/, 4];
|
|
178
|
-
case 3:
|
|
179
|
-
err_2 = _a.sent();
|
|
180
|
-
status_1 = err_2.status;
|
|
181
|
-
debug.log("HTTP status ".concat(status_1, " for preference file ").concat(preferencesFile));
|
|
182
|
-
if (status_1 === 401) {
|
|
183
|
-
throw new UnauthorizedError();
|
|
184
|
-
}
|
|
185
|
-
if (status_1 === 403) {
|
|
186
|
-
if (differentOrigin()) {
|
|
187
|
-
throw new CrossOriginForbiddenError();
|
|
188
|
-
}
|
|
189
|
-
throw new SameOriginForbiddenError();
|
|
190
|
-
}
|
|
191
|
-
if (status_1 === 404) {
|
|
192
|
-
throw new NotFoundError(preferencesFile.value);
|
|
193
|
-
}
|
|
194
|
-
throw new FetchError(err_2.status, err_2.message);
|
|
195
|
-
case 4: return [2 /*return*/, preferencesFile];
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
};
|
|
200
|
-
SolidLogic.prototype.getTypeIndex = function (me, preferencesFile, isPublic) {
|
|
201
|
-
// console.log('getTypeIndex', this.store.each(me, undefined, undefined, preferencesFile), isPublic, preferencesFile)
|
|
202
|
-
return this.store.each(me, isPublic ? ns.solid("publicTypeIndex") : ns.solid("privateTypeIndex"), undefined, preferencesFile);
|
|
203
|
-
};
|
|
204
|
-
SolidLogic.prototype.getRegistrations = function (instance, theClass) {
|
|
205
|
-
var _this = this;
|
|
206
|
-
return this.store
|
|
207
|
-
.each(undefined, ns.solid("instance"), instance)
|
|
208
|
-
.filter(function (r) {
|
|
209
|
-
return _this.store.holds(r, ns.solid("forClass"), theClass);
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
|
-
SolidLogic.prototype.load = function (doc) {
|
|
213
|
-
if (!this.store.fetcher) {
|
|
214
|
-
throw new Error("Cannot load doc(s), have no fetcher");
|
|
215
|
-
}
|
|
216
|
-
return this.store.fetcher.load(doc);
|
|
217
|
-
};
|
|
218
|
-
SolidLogic.prototype.loadIndexes = function (me, publicProfile, preferencesFile, onWarning) {
|
|
219
|
-
var _this = this;
|
|
220
|
-
if (onWarning === void 0) { onWarning = function (_err) { return __awaiter(_this, void 0, void 0, function () {
|
|
221
|
-
return __generator(this, function (_a) {
|
|
222
|
-
return [2 /*return*/, undefined];
|
|
223
|
-
});
|
|
224
|
-
}); }; }
|
|
225
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
226
|
-
var privateIndexes, publicIndexes, err_3, err_4;
|
|
227
|
-
return __generator(this, function (_a) {
|
|
228
|
-
switch (_a.label) {
|
|
229
|
-
case 0:
|
|
230
|
-
privateIndexes = [];
|
|
231
|
-
publicIndexes = [];
|
|
232
|
-
if (!publicProfile) return [3 /*break*/, 4];
|
|
233
|
-
publicIndexes = this.getTypeIndex(me, publicProfile, true);
|
|
234
|
-
_a.label = 1;
|
|
235
|
-
case 1:
|
|
236
|
-
_a.trys.push([1, 3, , 4]);
|
|
237
|
-
return [4 /*yield*/, this.load(publicIndexes)];
|
|
238
|
-
case 2:
|
|
239
|
-
_a.sent();
|
|
240
|
-
return [3 /*break*/, 4];
|
|
241
|
-
case 3:
|
|
242
|
-
err_3 = _a.sent();
|
|
243
|
-
onWarning(new Error("loadIndex: loading public type index(es) ".concat(err_3)));
|
|
244
|
-
return [3 /*break*/, 4];
|
|
245
|
-
case 4:
|
|
246
|
-
if (!preferencesFile) return [3 /*break*/, 9];
|
|
247
|
-
privateIndexes = this.getTypeIndex(me, preferencesFile, false);
|
|
248
|
-
if (!(privateIndexes.length === 0)) return [3 /*break*/, 6];
|
|
249
|
-
return [4 /*yield*/, onWarning(new Error("Your preference file ".concat(preferencesFile, " does not point to a private type index.")))];
|
|
250
|
-
case 5:
|
|
251
|
-
_a.sent();
|
|
252
|
-
return [3 /*break*/, 9];
|
|
253
|
-
case 6:
|
|
254
|
-
_a.trys.push([6, 8, , 9]);
|
|
255
|
-
return [4 /*yield*/, this.load(privateIndexes)];
|
|
256
|
-
case 7:
|
|
257
|
-
_a.sent();
|
|
258
|
-
return [3 /*break*/, 9];
|
|
259
|
-
case 8:
|
|
260
|
-
err_4 = _a.sent();
|
|
261
|
-
onWarning(new Error("loadIndex: loading private type index(es) ".concat(err_4)));
|
|
262
|
-
return [3 /*break*/, 9];
|
|
263
|
-
case 9: return [2 /*return*/, {
|
|
264
|
-
private: privateIndexes,
|
|
265
|
-
public: publicIndexes,
|
|
266
|
-
}];
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
SolidLogic.prototype.createEmptyRdfDoc = function (doc, comment) {
|
|
272
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
273
|
-
return __generator(this, function (_a) {
|
|
274
|
-
switch (_a.label) {
|
|
275
|
-
case 0:
|
|
276
|
-
if (!this.store.fetcher) {
|
|
277
|
-
throw new Error("Cannot create empty rdf doc, have no fetcher");
|
|
278
|
-
}
|
|
279
|
-
return [4 /*yield*/, this.store.fetcher.webOperation("PUT", doc.uri, {
|
|
280
|
-
data: "# ".concat(new Date(), " ").concat(comment, "\n"),
|
|
281
|
-
contentType: "text/turtle",
|
|
282
|
-
})];
|
|
283
|
-
case 1:
|
|
284
|
-
_a.sent();
|
|
285
|
-
return [2 /*return*/];
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
// @@@@ use the one in rdflib.js when it is available and delete this
|
|
291
|
-
SolidLogic.prototype.updatePromise = function (del, ins) {
|
|
292
|
-
var _this = this;
|
|
293
|
-
if (ins === void 0) { ins = []; }
|
|
294
|
-
return new Promise(function (resolve, reject) {
|
|
295
|
-
if (!_this.store.updater) {
|
|
296
|
-
throw new Error("Cannot updatePromise, have no updater");
|
|
297
|
-
}
|
|
298
|
-
_this.store.updater.update(del, ins, function (_uri, ok, errorBody) {
|
|
299
|
-
if (!ok) {
|
|
300
|
-
reject(new Error(errorBody));
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
resolve();
|
|
304
|
-
}
|
|
305
|
-
}); // callback
|
|
306
|
-
}); // promise
|
|
307
|
-
};
|
|
308
|
-
SolidLogic.prototype.isContainer = function (url) {
|
|
309
|
-
return this.util.isContainer(url);
|
|
310
|
-
};
|
|
311
|
-
SolidLogic.prototype.getContainerElements = function (containerNode) {
|
|
312
|
-
return this.util.getContainerElements(containerNode);
|
|
313
|
-
};
|
|
314
|
-
SolidLogic.prototype.getContainerMembers = function (containerUrl) {
|
|
315
|
-
return this.util.getContainerMembers(containerUrl);
|
|
316
|
-
};
|
|
317
|
-
SolidLogic.prototype.recursiveDelete = function (url) {
|
|
318
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
-
return __generator(this, function (_a) {
|
|
320
|
-
return [2 /*return*/, this.util.recursiveDelete(url)];
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
|
-
SolidLogic.prototype.clearStore = function () {
|
|
325
|
-
return this.util.clearStore();
|
|
326
|
-
};
|
|
327
|
-
SolidLogic.prototype.fetch = function (url, options) {
|
|
328
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
329
|
-
return __generator(this, function (_a) {
|
|
330
|
-
return [2 /*return*/, this.fetcher.fetch(url, options)];
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
return SolidLogic;
|
|
335
|
-
}());
|
|
336
|
-
exports.SolidLogic = SolidLogic;
|
|
337
|
-
var CustomError = /** @class */ (function (_super) {
|
|
338
|
-
__extends(CustomError, _super);
|
|
339
|
-
function CustomError(message) {
|
|
340
|
-
var _newTarget = this.constructor;
|
|
341
|
-
var _this = _super.call(this, message) || this;
|
|
342
|
-
// see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html
|
|
343
|
-
Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain
|
|
344
|
-
_this.name = _newTarget.name; // stack traces display correctly now
|
|
345
|
-
return _this;
|
|
346
|
-
}
|
|
347
|
-
return CustomError;
|
|
348
|
-
}(Error));
|
|
349
|
-
var UnauthorizedError = /** @class */ (function (_super) {
|
|
350
|
-
__extends(UnauthorizedError, _super);
|
|
351
|
-
function UnauthorizedError() {
|
|
352
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
353
|
-
}
|
|
354
|
-
return UnauthorizedError;
|
|
355
|
-
}(CustomError));
|
|
356
|
-
exports.UnauthorizedError = UnauthorizedError;
|
|
357
|
-
var CrossOriginForbiddenError = /** @class */ (function (_super) {
|
|
358
|
-
__extends(CrossOriginForbiddenError, _super);
|
|
359
|
-
function CrossOriginForbiddenError() {
|
|
360
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
361
|
-
}
|
|
362
|
-
return CrossOriginForbiddenError;
|
|
363
|
-
}(CustomError));
|
|
364
|
-
exports.CrossOriginForbiddenError = CrossOriginForbiddenError;
|
|
365
|
-
var SameOriginForbiddenError = /** @class */ (function (_super) {
|
|
366
|
-
__extends(SameOriginForbiddenError, _super);
|
|
367
|
-
function SameOriginForbiddenError() {
|
|
368
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
369
|
-
}
|
|
370
|
-
return SameOriginForbiddenError;
|
|
371
|
-
}(CustomError));
|
|
372
|
-
exports.SameOriginForbiddenError = SameOriginForbiddenError;
|
|
373
|
-
var NotFoundError = /** @class */ (function (_super) {
|
|
374
|
-
__extends(NotFoundError, _super);
|
|
375
|
-
function NotFoundError() {
|
|
376
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
377
|
-
}
|
|
378
|
-
return NotFoundError;
|
|
379
|
-
}(CustomError));
|
|
380
|
-
exports.NotFoundError = NotFoundError;
|
|
381
|
-
var FetchError = /** @class */ (function (_super) {
|
|
382
|
-
__extends(FetchError, _super);
|
|
383
|
-
function FetchError(status, message) {
|
|
384
|
-
var _this = _super.call(this, message) || this;
|
|
385
|
-
_this.status = status;
|
|
386
|
-
return _this;
|
|
387
|
-
}
|
|
388
|
-
return FetchError;
|
|
389
|
-
}(CustomError));
|
|
390
|
-
exports.FetchError = FetchError;
|
|
31
|
+
Object.defineProperty(exports, "ACL_LINK", { enumerable: true, get: function () { return UtilityLogic_1.ACL_LINK; } });
|
|
32
|
+
var issuerLogic_1 = require("./issuer/issuerLogic");
|
|
33
|
+
Object.defineProperty(exports, "getSuggestedIssuers", { enumerable: true, get: function () { return issuerLogic_1.getSuggestedIssuers; } });
|
|
34
|
+
// solidLogicSingleton is exported entirely because it is used in solid-panes
|
|
35
|
+
var solidLogicSingleton_2 = require("./logic/solidLogicSingleton");
|
|
36
|
+
Object.defineProperty(exports, "solidLogicSingleton", { enumerable: true, get: function () { return solidLogicSingleton_2.solidLogicSingleton; } });
|
|
37
|
+
var CustomError_1 = require("./logic/CustomError");
|
|
38
|
+
Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return CustomError_1.UnauthorizedError; } });
|
|
39
|
+
Object.defineProperty(exports, "CrossOriginForbiddenError", { enumerable: true, get: function () { return CustomError_1.CrossOriginForbiddenError; } });
|
|
40
|
+
Object.defineProperty(exports, "SameOriginForbiddenError", { enumerable: true, get: function () { return CustomError_1.SameOriginForbiddenError; } });
|
|
41
|
+
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return CustomError_1.NotFoundError; } });
|
|
42
|
+
Object.defineProperty(exports, "FetchError", { enumerable: true, get: function () { return CustomError_1.FetchError; } });
|
|
391
43
|
//# sourceMappingURL=index.js.map
|