solid-logic 1.3.17-9d25ceb7 → 1.3.17-a849582e

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.
Files changed (114) hide show
  1. package/lib/acl/aclLogic.d.ts +12 -30
  2. package/lib/acl/aclLogic.d.ts.map +1 -1
  3. package/lib/acl/aclLogic.js +151 -116
  4. package/lib/acl/aclLogic.js.map +1 -1
  5. package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
  6. package/lib/authn/SolidAuthnLogic.js +2 -2
  7. package/lib/authn/SolidAuthnLogic.js.map +1 -1
  8. package/lib/chat/chatLogic.d.ts +16 -0
  9. package/lib/chat/chatLogic.d.ts.map +1 -0
  10. package/lib/chat/{ChatLogic.js → chatLogic.js} +82 -87
  11. package/lib/chat/chatLogic.js.map +1 -0
  12. package/lib/discovery/discoveryLogic.d.ts +8 -8
  13. package/lib/discovery/discoveryLogic.d.ts.map +1 -1
  14. package/lib/discovery/discoveryLogic.js +65 -72
  15. package/lib/discovery/discoveryLogic.js.map +1 -1
  16. package/lib/inbox/inboxLogic.d.ts +7 -0
  17. package/lib/inbox/inboxLogic.d.ts.map +1 -0
  18. package/lib/inbox/{InboxLogic.js → inboxLogic.js} +58 -64
  19. package/lib/inbox/inboxLogic.js.map +1 -0
  20. package/lib/index.d.ts +10 -13
  21. package/lib/index.d.ts.map +1 -1
  22. package/lib/index.js +76 -32
  23. package/lib/index.js.map +1 -1
  24. package/lib/logic/CustomError.d.ts +4 -0
  25. package/lib/logic/CustomError.d.ts.map +1 -1
  26. package/lib/logic/CustomError.js +17 -1
  27. package/lib/logic/CustomError.js.map +1 -1
  28. package/lib/logic/solidLogicSingleton.d.ts +35 -3
  29. package/lib/logic/solidLogicSingleton.d.ts.map +1 -1
  30. package/lib/logic/solidLogicSingleton.js +87 -8
  31. package/lib/logic/solidLogicSingleton.js.map +1 -1
  32. package/lib/profile/profileLogic.d.ts +13 -0
  33. package/lib/profile/profileLogic.d.ts.map +1 -0
  34. package/lib/profile/profileLogic.js +268 -0
  35. package/lib/profile/profileLogic.js.map +1 -0
  36. package/lib/typeIndex/typeIndexLogic.d.ts +31 -21
  37. package/lib/typeIndex/typeIndexLogic.d.ts.map +1 -1
  38. package/lib/typeIndex/typeIndexLogic.js +650 -295
  39. package/lib/typeIndex/typeIndexLogic.js.map +1 -1
  40. package/lib/types.d.ts +17 -0
  41. package/lib/types.d.ts.map +1 -1
  42. package/lib/util/containerLogic.d.ts +11 -0
  43. package/lib/util/containerLogic.d.ts.map +1 -0
  44. package/lib/{profile/ProfileLogic.js → util/containerLogic.js} +53 -44
  45. package/lib/util/containerLogic.js.map +1 -0
  46. package/lib/util/utilityLogic.d.ts +15 -0
  47. package/lib/util/utilityLogic.d.ts.map +1 -0
  48. package/lib/util/utilityLogic.js +272 -0
  49. package/lib/util/utilityLogic.js.map +1 -0
  50. package/lib/util/utils.d.ts +8 -0
  51. package/lib/util/utils.d.ts.map +1 -0
  52. package/lib/util/utils.js +48 -0
  53. package/lib/util/utils.js.map +1 -0
  54. package/package.json +3 -1
  55. package/src/acl/aclLogic.ts +135 -119
  56. package/src/authn/SolidAuthnLogic.ts +3 -2
  57. package/src/chat/chatLogic.ts +225 -0
  58. package/src/discovery/discoveryLogic.ts +66 -87
  59. package/src/inbox/inboxLogic.ts +57 -0
  60. package/src/index.ts +74 -21
  61. package/src/logic/CustomError.ts +5 -1
  62. package/src/logic/solidLogicSingleton.ts +160 -7
  63. package/src/profile/profileLogic.ts +134 -0
  64. package/src/typeIndex/typeIndexLogic.ts +417 -153
  65. package/src/types.ts +7 -3
  66. package/src/util/containerLogic.ts +54 -0
  67. package/src/util/ns.js +5 -0
  68. package/src/util/utilityLogic.ts +155 -0
  69. package/src/util/utils.ts +52 -0
  70. package/test/aclLogic.test.ts +13 -4
  71. package/test/chatLogic.test.ts +70 -71
  72. package/test/container.test.ts +56 -0
  73. package/test/discoveryLogic.test.ts +14 -14
  74. package/test/helpers/dataSetup.ts +134 -0
  75. package/test/helpers/setup.ts +4 -0
  76. package/test/inboxLogic.test.ts +39 -38
  77. package/test/logic.test.ts +11 -9
  78. package/test/profileLogic.test.ts +246 -0
  79. package/test/typeIndexLogic.test.ts +49 -22
  80. package/test/typeIndexLogicPart2.test.ts +485 -0
  81. package/test/utilityLogic.test.ts +172 -126
  82. package/test/utils.test.ts +32 -0
  83. package/lib/chat/ChatLogic.d.ts +0 -26
  84. package/lib/chat/ChatLogic.d.ts.map +0 -1
  85. package/lib/chat/ChatLogic.js.map +0 -1
  86. package/lib/chat/determineChatContainer.d.ts +0 -3
  87. package/lib/chat/determineChatContainer.d.ts.map +0 -1
  88. package/lib/chat/determineChatContainer.js +0 -12
  89. package/lib/chat/determineChatContainer.js.map +0 -1
  90. package/lib/inbox/InboxLogic.d.ts +0 -18
  91. package/lib/inbox/InboxLogic.d.ts.map +0 -1
  92. package/lib/inbox/InboxLogic.js.map +0 -1
  93. package/lib/logic/SolidLogic.d.ts +0 -48
  94. package/lib/logic/SolidLogic.d.ts.map +0 -1
  95. package/lib/logic/SolidLogic.js +0 -321
  96. package/lib/logic/SolidLogic.js.map +0 -1
  97. package/lib/profile/ProfileLogic.d.ts +0 -13
  98. package/lib/profile/ProfileLogic.d.ts.map +0 -1
  99. package/lib/profile/ProfileLogic.js.map +0 -1
  100. package/lib/util/UtilityLogic.d.ts +0 -33
  101. package/lib/util/UtilityLogic.d.ts.map +0 -1
  102. package/lib/util/UtilityLogic.js +0 -240
  103. package/lib/util/UtilityLogic.js.map +0 -1
  104. package/lib/util/uri.d.ts +0 -3
  105. package/lib/util/uri.d.ts.map +0 -1
  106. package/lib/util/uri.js +0 -9
  107. package/lib/util/uri.js.map +0 -1
  108. package/src/chat/ChatLogic.ts +0 -244
  109. package/src/chat/determineChatContainer.ts +0 -14
  110. package/src/inbox/InboxLogic.ts +0 -66
  111. package/src/logic/SolidLogic.ts +0 -262
  112. package/src/profile/ProfileLogic.ts +0 -44
  113. package/src/util/UtilityLogic.ts +0 -161
  114. package/src/util/uri.ts +0 -5
@@ -1,133 +1,179 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
- import { UtilityLogic } from "../src/util/UtilityLogic";
3
- import solidNamespace from "solid-namespace";
4
- import * as rdf from "rdflib";
1
+ /**
2
+ * @jest-environment jsdom
3
+ *
4
+ */
5
5
  import fetchMock from "jest-fetch-mock";
6
- import { UpdateManager } from "rdflib";
7
- import { SolidNamespace } from "../src/types";
6
+ import { UpdateManager, sym, Fetcher, Store } from "rdflib";
7
+ import { createAclLogic } from "../src/acl/aclLogic";
8
+ import { WebOperationError } from "../src/logic/CustomError";
9
+ import { createContainerLogic } from "../src/util/containerLogic";
10
+ import { ns } from "../src/util/ns";
11
+ import { createUtilityLogic } from "../src/util/utilityLogic";
12
+ import { alice, AlicePhotoFolder, AlicePhotos, AlicePreferences, AlicePreferencesFile, AlicePrivateTypeIndex, AlicePrivateTypes, AliceProfile, AlicePublicTypeIndex, AlicePublicTypes, bob, BobProfile, club, ClubPreferences, ClubPreferencesFile, ClubPrivateTypeIndex, ClubPrivateTypes, ClubProfile, ClubPublicTypeIndex, ClubPublicTypes } from "./helpers/dataSetup";
8
13
 
9
- const ns: SolidNamespace = solidNamespace(rdf);
14
+ window.$SolidTestEnvironment = { username: alice.uri }
15
+ const prefixes = Object.keys(ns).map(prefix => `@prefix ${prefix}: ${ns[prefix]('')}.\n`).join('') // In turtle
10
16
 
11
- const alice = rdf.sym("https://alice.example/profile/card#me");
12
- const bob = rdf.sym("https://bob.example/profile/card#me");
17
+ describe("utilityLogic", () => {
18
+ let store;
19
+ let options;
20
+ let web = {}
21
+ let requests = []
22
+ let statustoBeReturned = 200
23
+ let utilityLogic
24
+ beforeEach(() => {
25
+ fetchMock.resetMocks();
26
+ fetchMock.mockResponse("Not Found", {
27
+ status: 404,
28
+ });
29
+ requests = []
30
+ statustoBeReturned = 200
31
+ const init = { headers: { "Content-Type": "text/turtle" } } // Fetch options tend to be called this
13
32
 
14
- describe("Utility logic", () => {
15
- let util;
16
- let store;
17
- let fetcher;
18
- beforeEach(() => {
19
- fetchMock.resetMocks();
20
- fetchMock.mockResponse("Not Found", {
21
- status: 404,
22
- });
23
- fetcher = { fetch: fetchMock };
24
- store = rdf.graph();
25
- store.fetcher = rdf.fetcher(store, fetcher);
26
- store.updater = new UpdateManager(store);
27
- util = new UtilityLogic(store, ns, fetcher);
28
- });
33
+ fetchMock.mockIf(/^https?.*$/, async req => {
29
34
 
30
- describe("getArchiveUrl", () => {
31
- it("produces the right URL in February", () => {
32
- const url = util.getArchiveUrl('https://example.com/inbox/asdf-qwer-asdf-qwer', new Date('7 Feb 2062 UTC'));
33
- expect(url).toEqual('https://example.com/inbox/archive/2062/02/07/asdf-qwer-asdf-qwer');
34
- });
35
- it("produces the right URL in November", () => {
36
- const url = util.getArchiveUrl('https://example.com/inbox/asdf-qwer-asdf-qwer', new Date('12 Nov 2012 UTC'));
37
- expect(url).toEqual('https://example.com/inbox/archive/2012/11/12/asdf-qwer-asdf-qwer');
38
- });
39
- });
40
- describe("getContainerMembers", () => {
41
- describe("When container is empty", () => {
42
- let result;
43
- beforeEach(async () => {
44
- containerIsEmpty();
45
- result = await util.getContainerMembers('https://container.com/');
46
- });
47
- it("Resolves to an empty array", () => {
48
- expect(result).toEqual([]);
49
- });
50
- });
51
- describe("When container has some containment triples", () => {
52
- let result;
53
- beforeEach(async () => {
54
- containerHasSomeContainmentTriples();
55
- result = await util.getContainerMembers('https://container.com/');
56
- });
57
- it("Resolves to an array with some URLs", () => {
58
- expect(result.sort()).toEqual([
59
- 'https://container.com/foo.txt',
60
- 'https://container.com/bar/'
61
- ].sort());
62
- });
63
- });
64
- });
65
- describe("setSinglePeerAccess", () => {
66
- beforeEach(() => {
67
- fetchMock.mockOnceIf(
68
- "https://owner.com/some/resource",
69
- "hello", {
70
- headers: {
71
- Link: '<https://owner.com/some/acl>; rel="acl"'
72
- }
73
- });
74
- fetchMock.mockOnceIf(
75
- "https://owner.com/some/acl",
76
- "Created", {
77
- status: 201
78
- });
79
- });
80
- it("Creates the right ACL doc", async () => {
81
- await util.setSinglePeerAccess({
82
- ownerWebId: "https://owner.com/#me",
83
- peerWebId: "https://peer.com/#me",
84
- accessToModes: "acl:Read, acl:Control",
85
- defaultModes: "acl:Write",
86
- target: "https://owner.com/some/resource"
87
- });
88
- expect(fetchMock.mock.calls).toEqual([
89
- [ "https://owner.com/some/resource", fetchMock.mock.calls[0][1] ],
90
- [ "https://owner.com/some/acl", {
91
- body: '@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n' +
92
- '\n' +
93
- '<#alice> a acl:Authorization;\n' +
94
- ' acl:agent <https://owner.com/#me>;\n' +
95
- ' acl:accessTo <https://owner.com/some/resource>;\n' +
96
- ' acl:default <https://owner.com/some/resource>;\n' +
97
- ' acl:mode acl:Read, acl:Write, acl:Control.\n' +
98
- '<#bobAccessTo> a acl:Authorization;\n' +
99
- ' acl:agent <https://peer.com/#me>;\n' +
100
- ' acl:accessTo <https://owner.com/some/resource>;\n' +
101
- ' acl:mode acl:Read, acl:Control.\n' +
102
- '<#bobDefault> a acl:Authorization;\n' +
103
- ' acl:agent <https://peer.com/#me>;\n' +
104
- ' acl:default <https://owner.com/some/resource>;\n' +
105
- ' acl:mode acl:Write.\n',
106
- headers: [
107
- ["Content-Type", "text/turtle"]
108
- ],
109
- method: "PUT"
110
- }]
111
- ]);
35
+ if (req.method !== 'GET') {
36
+ requests.push(req)
37
+ if (req.method === 'PUT') {
38
+ const contents = await req.text()
39
+ web[req.url] = contents // Update our dummy web
40
+ console.log(`Tetst: Updated ${req.url} on PUT to <<<${web[req.url]}>>>`)
41
+ }
42
+ return { status: statustoBeReturned }
43
+ }
44
+ const contents = web[req.url]
45
+ if (contents !== undefined) { //
46
+ return {
47
+ body: prefixes + contents, // Add namespaces to anything
48
+ status: 200,
49
+ headers: {
50
+ "Content-Type": "text/turtle",
51
+ "WAC-Allow": 'user="write", public="read"',
52
+ "Accept-Patch": "application/sparql-update"
53
+ }
54
+ }
55
+ } // if contents
56
+ return {
57
+ status: 404,
58
+ body: 'Not Found'
59
+ }
60
+ })
61
+ web = {}
62
+ web[alice.doc().uri] = AliceProfile
63
+ web[AlicePreferencesFile.uri] = AlicePreferences
64
+ web[AlicePrivateTypeIndex.uri] = AlicePrivateTypes
65
+ web[AlicePublicTypeIndex.uri] = AlicePublicTypes
66
+ web[AlicePhotoFolder.uri] = AlicePhotos
67
+ web[bob.doc().uri] = BobProfile
68
+
69
+ web[club.doc().uri] = ClubProfile
70
+ web[ClubPreferencesFile.uri] = ClubPreferences
71
+ web[ClubPrivateTypeIndex.uri] = ClubPrivateTypes
72
+ web[ClubPublicTypeIndex.uri] = ClubPublicTypes
73
+
74
+ options = { fetch: fetch };
75
+ store = new Store()
76
+ store.fetcher = new Fetcher(store, options);
77
+ store.updater = new UpdateManager(store);
78
+ requests = []
79
+ utilityLogic = createUtilityLogic(store, createAclLogic(store), createContainerLogic(store))
112
80
  });
113
- });
114
- function containerIsEmpty() {
115
- fetchMock.mockOnceIf(
116
- "https://container.com/",
117
- " ", // FIXME: https://github.com/jefflau/jest-fetch-mock/issues/189
118
- {
119
- headers: { "Content-Type": "text/turtle" },
120
- }
121
- );
122
- }
123
81
 
124
- function containerHasSomeContainmentTriples() {
125
- fetchMock.mockOnceIf(
126
- "https://container.com/",
127
- "<.> <http://www.w3.org/ns/ldp#contains> <./foo.txt>, <./bar/> .",
128
- {
129
- headers: { "Content-Type": "text/turtle" },
130
- }
131
- );
132
- }
133
- });
82
+ describe('loadOrCreateIfNotExists', () => {
83
+ it('exists', () => {
84
+ expect(utilityLogic.loadOrCreateIfNotExists).toBeInstanceOf(Function)
85
+ })
86
+ it('does nothing if existing file', async () => {
87
+ const result = await utilityLogic.loadOrCreateIfNotExists(alice.doc())
88
+ expect(requests).toEqual([])
89
+
90
+ })
91
+ it('creates empty file if did not exist', async () => {
92
+ const suggestion = 'https://bob.example.com/settings/prefsSuggestion.ttl'
93
+ const result = await utilityLogic.loadOrCreateIfNotExists(sym(suggestion))
94
+ expect(requests[0].method).toEqual('PUT')
95
+ expect(requests[0].url).toEqual(suggestion)
96
+ })
97
+ })
98
+
99
+ describe('followOrCreateLink', () => {
100
+ it('exists', () => {
101
+ expect(utilityLogic.followOrCreateLink).toBeInstanceOf(Function)
102
+ })
103
+ it('follows existing link', async () => {
104
+ const suggestion = 'https://alice.example.com/settings/prefsSuggestion.ttl'
105
+ const result = await utilityLogic.followOrCreateLink(alice, ns.space('preferencesFile'), sym(suggestion), alice.doc())
106
+ expect(result).toEqual(AlicePreferencesFile)
107
+
108
+ })
109
+ it('creates empty file if did not exist and new link', async () => {
110
+ const suggestion = 'https://bob.example.com/settings/prefsSuggestion.ttl'
111
+ const result = await utilityLogic.followOrCreateLink(bob, ns.space('preferencesFile'), sym(suggestion), bob.doc())
112
+ expect(result).toEqual(sym(suggestion))
113
+ expect(requests[0].method).toEqual('PATCH')
114
+ expect(requests[0].url).toEqual(bob.doc().uri)
115
+ expect(requests[1].method).toEqual('PUT')
116
+ expect(requests[1].url).toEqual(suggestion)
117
+ expect(store.holds(bob, ns.space('preferencesFile'), sym(suggestion), bob.doc())).toEqual(true)
118
+ })
119
+ //
120
+ it('returns null if it cannot create the new file', async () => {
121
+ const suggestion = 'https://bob.example.com/settings/prefsSuggestion.ttl'
122
+ statustoBeReturned = 403 // Unauthorized
123
+ expect(async () => {
124
+ await utilityLogic.followOrCreateLink(bob, ns.space('preferencesFile'), sym(suggestion), bob.doc())
125
+ }).rejects.toThrow(WebOperationError)
126
+ })
127
+
128
+ })
129
+ describe("setSinglePeerAccess", () => {
130
+ beforeEach(() => {
131
+ fetchMock.mockOnceIf(
132
+ "https://owner.com/some/resource",
133
+ "hello", {
134
+ headers: {
135
+ Link: '<https://owner.com/some/acl>; rel="acl"'
136
+ }
137
+ });
138
+ fetchMock.mockOnceIf(
139
+ "https://owner.com/some/acl",
140
+ "Created", {
141
+ status: 201
142
+ });
143
+ });
144
+ it("Creates the right ACL doc", async () => {
145
+ await utilityLogic.setSinglePeerAccess({
146
+ ownerWebId: "https://owner.com/#me",
147
+ peerWebId: "https://peer.com/#me",
148
+ accessToModes: "acl:Read, acl:Control",
149
+ defaultModes: "acl:Write",
150
+ target: "https://owner.com/some/resource"
151
+ });
152
+ expect(fetchMock.mock.calls).toEqual([
153
+ [ "https://owner.com/some/resource", fetchMock.mock.calls[0][1] ],
154
+ [ "https://owner.com/some/acl", {
155
+ body: '@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n' +
156
+ '\n' +
157
+ '<#alice> a acl:Authorization;\n' +
158
+ ' acl:agent <https://owner.com/#me>;\n' +
159
+ ' acl:accessTo <https://owner.com/some/resource>;\n' +
160
+ ' acl:default <https://owner.com/some/resource>;\n' +
161
+ ' acl:mode acl:Read, acl:Write, acl:Control.\n' +
162
+ '<#bobAccessTo> a acl:Authorization;\n' +
163
+ ' acl:agent <https://peer.com/#me>;\n' +
164
+ ' acl:accessTo <https://owner.com/some/resource>;\n' +
165
+ ' acl:mode acl:Read, acl:Control.\n' +
166
+ '<#bobDefault> a acl:Authorization;\n' +
167
+ ' acl:agent <https://peer.com/#me>;\n' +
168
+ ' acl:default <https://owner.com/some/resource>;\n' +
169
+ ' acl:mode acl:Write.\n',
170
+ headers: [
171
+ ["Content-Type", "text/turtle"]
172
+ ],
173
+ method: "PUT"
174
+ }]
175
+ ]);
176
+ });
177
+ });
178
+
179
+ })
@@ -0,0 +1,32 @@
1
+ import * as rdf from "rdflib";
2
+ import { getArchiveUrl, uniqueNodes } from '../src/util/utils';
3
+
4
+ describe('utils', () => {
5
+ describe('uniqueNodes', () => {
6
+ it('exists', () => {
7
+ expect(uniqueNodes).toBeInstanceOf(Function)
8
+ })
9
+ it('removed duplicates', async () => {
10
+ const input = [ rdf.sym('https://a.com/'), rdf.sym('https://b.com/'), rdf.sym('https://a.com/'), rdf.sym('https://a.com/'), rdf.sym('https://c.com/'), ]
11
+ const expected = [ rdf.sym('https://a.com/'), rdf.sym('https://b.com/'), rdf.sym('https://c.com/'), ]
12
+ const result = uniqueNodes(input)
13
+ expect(result).toEqual(expected)
14
+
15
+ })
16
+ it('handles an empty array', async () => {
17
+ const result = await uniqueNodes([])
18
+ expect(result).toEqual([])
19
+ })
20
+ })
21
+
22
+ describe("getArchiveUrl", () => {
23
+ it("produces the right URL in February", () => {
24
+ const url = getArchiveUrl('https://example.com/inbox/asdf-qwer-asdf-qwer', new Date('7 Feb 2062 UTC'));
25
+ expect(url).toEqual('https://example.com/inbox/archive/2062/02/07/asdf-qwer-asdf-qwer');
26
+ });
27
+ it("produces the right URL in November", () => {
28
+ const url = getArchiveUrl('https://example.com/inbox/asdf-qwer-asdf-qwer', new Date('12 Nov 2012 UTC'));
29
+ expect(url).toEqual('https://example.com/inbox/archive/2012/11/12/asdf-qwer-asdf-qwer');
30
+ });
31
+ })
32
+ })
@@ -1,26 +0,0 @@
1
- import { NamedNode, LiveStore } from "rdflib";
2
- import { ProfileLogic } from "../profile/ProfileLogic";
3
- import { SolidNamespace } from "../types";
4
- /**
5
- * Chat-related logic
6
- */
7
- export declare class ChatLogic {
8
- store: LiveStore;
9
- ns: SolidNamespace;
10
- profile: ProfileLogic;
11
- constructor(store: LiveStore, ns: SolidNamespace, profile: ProfileLogic);
12
- setAcl(chatContainer: NamedNode, me: NamedNode, invitee: NamedNode): Promise<void>;
13
- private addToPrivateTypeIndex;
14
- private findChat;
15
- private createChatThing;
16
- private mintNew;
17
- /**
18
- * Find (and optionally create) an individual chat between the current user and the given invitee
19
- * @param invitee - The person to chat with
20
- * @param createIfMissing - Whether the chat should be created, if missing
21
- * @returns null if missing, or a node referring to an already existing chat, or the newly created chat
22
- */
23
- getChat(invitee: NamedNode, createIfMissing?: boolean): Promise<NamedNode | null>;
24
- private sendInvite;
25
- }
26
- //# sourceMappingURL=ChatLogic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatLogic.d.ts","sourceRoot":"","sources":["../../src/chat/ChatLogic.ts"],"names":[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B,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"}
@@ -1,3 +0,0 @@
1
- import { NamedNode } from "rdflib";
2
- export declare function determineChatContainer(invitee: NamedNode, podRoot: NamedNode): NamedNode;
3
- //# sourceMappingURL=determineChatContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"determineChatContainer.d.ts","sourceRoot":"","sources":["../../src/chat/determineChatContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,GACjB,SAAS,CAQX"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.determineChatContainer = void 0;
4
- var rdflib_1 = require("rdflib");
5
- function determineChatContainer(invitee, podRoot) {
6
- // Create chat
7
- // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
8
- var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
9
- return new rdflib_1.NamedNode(chatContainerStr);
10
- }
11
- exports.determineChatContainer = determineChatContainer;
12
- //# sourceMappingURL=determineChatContainer.js.map
@@ -1 +0,0 @@
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"}
@@ -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,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SAAuB;4BAC7B,UAAO,GAAE;gCACP,CAAE,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,0BAA0B,CAAE;6BACzF;+BACF;wBACgB,qBAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA;;wBAArE,QAAQ,GAAG,SAA0D;6BACvE,CAAA,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAA,EAArC,wBAAqC;wBACvC,qBAAM,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,MAAM,CAAC,GAAG,EAAE;gCACpC,MAAM,EAAE,QAAQ;6BACjB,CAAC,CAAA,EAAA;;wBAFF,SAEE,CAAC;;;;;;KAEN;IACH,iBAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDY,gCAAU"}
@@ -1,48 +0,0 @@
1
- import { Session } from "@inrupt/solid-client-authn-browser";
2
- import * as rdf from "rdflib";
3
- import { NamedNode, Statement, LiveStore } from "rdflib";
4
- import { ChatLogic } from "../chat/ChatLogic";
5
- import { ProfileLogic } from "../profile/ProfileLogic";
6
- import { AuthnLogic } from "../types";
7
- import { UtilityLogic } from "../util/UtilityLogic";
8
- export declare class SolidLogic {
9
- cache: {
10
- profileDocument: {
11
- [WebID: string]: NamedNode;
12
- };
13
- preferencesFile: {
14
- [WebID: string]: NamedNode;
15
- };
16
- };
17
- store: LiveStore;
18
- me: string | undefined;
19
- underlyingFetch: {
20
- fetch: (url: string, options?: any) => any;
21
- };
22
- chat: ChatLogic;
23
- profile: ProfileLogic;
24
- authn: AuthnLogic;
25
- util: UtilityLogic;
26
- constructor(specialFetch: {
27
- fetch: (url: any, requestInit: any) => any;
28
- }, session: Session);
29
- findAclDocUrl(url: string): Promise<string>;
30
- loadProfile(me: NamedNode): Promise<NamedNode>;
31
- loadPreferences(me: NamedNode): Promise<NamedNode>;
32
- getTypeIndex(me: NamedNode | string, preferencesFile: NamedNode | string, isPublic: boolean): NamedNode[];
33
- getRegistrations(instance: any, theClass: any): rdf.Node[];
34
- load(doc: NamedNode | NamedNode[] | string): Promise<Response> | Promise<Response[]>;
35
- loadIndexes(me: NamedNode | string, publicProfile: NamedNode | string | null, preferencesFile: NamedNode | string | null, onWarning?: (_err: Error) => Promise<undefined>): Promise<{
36
- private: any;
37
- public: any;
38
- }>;
39
- createEmptyRdfDoc(doc: NamedNode, comment: string): Promise<void>;
40
- updatePromise(del: Array<Statement>, ins?: Array<Statement>): Promise<void>;
41
- isContainer(url: string): boolean;
42
- getContainerElements(containerNode: NamedNode): NamedNode[];
43
- getContainerMembers(containerUrl: string): Promise<string[]>;
44
- recursiveDelete(url: string): Promise<any>;
45
- clearStore(): void;
46
- fetch(url: string, options?: any): Promise<any>;
47
- }
48
- //# sourceMappingURL=SolidLogic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolidLogic.d.ts","sourceRoot":"","sources":["../../src/logic/SolidLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWpD,qBAAa,UAAU;IACnB,KAAK,EAAE;QACH,eAAe,EAAE;YACjB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;SAC1B,CAAC;QACF,eAAe,EAAE;YACjB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;SAC1B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