solid-logic 3.0.9-f327aa58 → 3.0.9-f51524a8

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 (102) hide show
  1. package/babel.config.js +6 -0
  2. package/eslint.config.js +23 -24
  3. package/jest.config.js +15 -8
  4. package/lib/acl/aclLogic.d.ts +2 -2
  5. package/lib/acl/aclLogic.d.ts.map +1 -1
  6. package/lib/authSession/authSession.d.ts.map +1 -1
  7. package/lib/authn/SolidAuthnLogic.d.ts +3 -3
  8. package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
  9. package/lib/authn/authUtil.d.ts +1 -1
  10. package/lib/chat/chatLogic.d.ts +1 -1
  11. package/lib/inbox/inboxLogic.d.ts +1 -1
  12. package/lib/inbox/inboxLogic.d.ts.map +1 -1
  13. package/lib/index.d.ts +1 -1
  14. package/lib/index.d.ts.map +1 -1
  15. package/lib/logic/CustomError.d.ts.map +1 -1
  16. package/lib/logic/solidLogic.d.ts +2 -2
  17. package/lib/logic/solidLogic.d.ts.map +1 -1
  18. package/lib/profile/profileLogic.d.ts +1 -1
  19. package/lib/solid-logic.js +107 -0
  20. package/lib/solid-logic.js.map +1 -0
  21. package/lib/types.d.ts +2 -2
  22. package/lib/util/containerLogic.d.ts +1 -1
  23. package/lib/util/containerLogic.d.ts.map +1 -1
  24. package/lib/util/debug.d.ts.map +1 -1
  25. package/lib/util/utilityLogic.d.ts +1 -1
  26. package/lib/util/utilityLogic.d.ts.map +1 -1
  27. package/lib/util/utils.d.ts +1 -1
  28. package/lib/util/utils.d.ts.map +1 -1
  29. package/package.json +39 -16
  30. package/rollup.config.js +29 -0
  31. package/src/acl/aclLogic.ts +8 -8
  32. package/src/authSession/authSession.ts +7 -1
  33. package/src/authn/SolidAuthnLogic.ts +7 -8
  34. package/src/authn/authUtil.ts +1 -1
  35. package/src/chat/chatLogic.ts +75 -75
  36. package/src/inbox/inboxLogic.ts +19 -19
  37. package/src/index.ts +1 -1
  38. package/src/logic/CustomError.ts +6 -6
  39. package/src/logic/solidLogic.ts +22 -22
  40. package/src/logic/solidLogicSingleton.ts +3 -3
  41. package/src/profile/profileLogic.ts +22 -22
  42. package/src/typeIndex/typeIndexLogic.ts +7 -7
  43. package/src/types.ts +2 -2
  44. package/src/util/containerLogic.ts +15 -15
  45. package/src/util/debug.ts +4 -8
  46. package/src/util/utilityLogic.ts +18 -18
  47. package/src/util/utils.ts +12 -12
  48. package/src/versionInfo.ts +32 -0
  49. package/test/aclLogic.test.ts +5 -5
  50. package/test/authUtil.test.ts +1 -1
  51. package/test/chatLogic.test.ts +160 -154
  52. package/test/container.test.ts +23 -23
  53. package/test/helpers/dataSetup.ts +2 -1
  54. package/test/helpers/setup.ts +8 -3
  55. package/test/inboxLogic.test.ts +101 -110
  56. package/test/logic.test.ts +2 -2
  57. package/test/profileLogic.test.ts +35 -33
  58. package/test/solidAuthLogic.test.ts +1 -1
  59. package/test/typeIndexLogic.test.ts +71 -71
  60. package/test/utilityLogic.test.ts +46 -45
  61. package/test/utils.test.ts +11 -11
  62. package/timestamp.sh +13 -0
  63. package/tsconfig.json +5 -3
  64. package/tsconfig.test.json +8 -0
  65. package/lib/acl/aclLogic.js +0 -168
  66. package/lib/acl/aclLogic.js.map +0 -1
  67. package/lib/authSession/authSession.js +0 -6
  68. package/lib/authSession/authSession.js.map +0 -1
  69. package/lib/authn/SolidAuthnLogic.js +0 -193
  70. package/lib/authn/SolidAuthnLogic.js.map +0 -1
  71. package/lib/authn/authUtil.js +0 -105
  72. package/lib/authn/authUtil.js.map +0 -1
  73. package/lib/chat/chatLogic.js +0 -272
  74. package/lib/chat/chatLogic.js.map +0 -1
  75. package/lib/inbox/inboxLogic.js +0 -139
  76. package/lib/inbox/inboxLogic.js.map +0 -1
  77. package/lib/index.js +0 -29
  78. package/lib/index.js.map +0 -1
  79. package/lib/issuer/issuerLogic.js +0 -52
  80. package/lib/issuer/issuerLogic.js.map +0 -1
  81. package/lib/logic/CustomError.js +0 -89
  82. package/lib/logic/CustomError.js.map +0 -1
  83. package/lib/logic/solidLogic.js +0 -102
  84. package/lib/logic/solidLogic.js.map +0 -1
  85. package/lib/logic/solidLogicSingleton.js +0 -94
  86. package/lib/logic/solidLogicSingleton.js.map +0 -1
  87. package/lib/profile/profileLogic.js +0 -259
  88. package/lib/profile/profileLogic.js.map +0 -1
  89. package/lib/typeIndex/typeIndexLogic.js +0 -399
  90. package/lib/typeIndex/typeIndexLogic.js.map +0 -1
  91. package/lib/types.js +0 -3
  92. package/lib/types.js.map +0 -1
  93. package/lib/util/containerLogic.js +0 -102
  94. package/lib/util/containerLogic.js.map +0 -1
  95. package/lib/util/debug.js +0 -40
  96. package/lib/util/debug.js.map +0 -1
  97. package/lib/util/ns.js +0 -44
  98. package/lib/util/ns.js.map +0 -1
  99. package/lib/util/utilityLogic.js +0 -284
  100. package/lib/util/utilityLogic.js.map +0 -1
  101. package/lib/util/utils.js +0 -47
  102. package/lib/util/utils.js.map +0 -1
@@ -2,104 +2,104 @@
2
2
  * @jest-environment jsdom
3
3
  *
4
4
  */
5
- import { UpdateManager, Store, Fetcher, sym } from "rdflib";
6
- import { createAclLogic } from "../src/acl/aclLogic";
7
- import { createInboxLogic } from '../src/inbox/inboxLogic';
8
- import { createProfileLogic } from "../src/profile/profileLogic";
9
- import { createContainerLogic } from "../src/util/containerLogic";
10
- import { createUtilityLogic } from "../src/util/utilityLogic";
5
+ import { UpdateManager, Store, Fetcher, sym } from 'rdflib'
6
+ import { createAclLogic } from '../src/acl/aclLogic'
7
+ import { createInboxLogic } from '../src/inbox/inboxLogic'
8
+ import { createProfileLogic } from '../src/profile/profileLogic'
9
+ import { createContainerLogic } from '../src/util/containerLogic'
10
+ import { createUtilityLogic } from '../src/util/utilityLogic'
11
11
 
12
- const alice = sym("https://alice.example.com/profile/card#me");
13
- const bob = sym("https://bob.example.com/profile/card#me");
12
+ const alice = sym('https://alice.example.com/profile/card#me')
13
+ const bob = sym('https://bob.example.com/profile/card#me')
14
14
 
15
- describe("Inbox logic", () => {
16
- let store;
15
+ describe('Inbox logic', () => {
16
+ let store
17
17
  let inboxLogic
18
18
  beforeEach(() => {
19
- fetchMock.resetMocks();
20
- fetchMock.mockResponse("Not Found", {
19
+ fetchMock.resetMocks()
20
+ fetchMock.mockResponse('Not Found', {
21
21
  status: 404,
22
- });
22
+ })
23
23
  store = new Store()
24
- store.fetcher = new Fetcher(store, { fetch: fetch });
25
- store.updater = new UpdateManager(store);
24
+ store.fetcher = new Fetcher(store, { fetch: fetch })
25
+ store.updater = new UpdateManager(store)
26
26
  const authn = {
27
27
  currentUser: () => {
28
- return alice;
28
+ return alice
29
29
  },
30
- };
30
+ }
31
31
  const containerLogic = createContainerLogic(store)
32
32
  const aclLogic = createAclLogic(store)
33
- const util = createUtilityLogic(store, aclLogic, containerLogic);
34
- const profile = createProfileLogic(store, authn, util);
35
- inboxLogic = createInboxLogic(store, profile, util, containerLogic, aclLogic);
36
- });
33
+ const util = createUtilityLogic(store, aclLogic, containerLogic)
34
+ const profile = createProfileLogic(store, authn, util)
35
+ inboxLogic = createInboxLogic(store, profile, util, containerLogic, aclLogic)
36
+ })
37
37
 
38
- describe("getNewMessages", () => {
39
- describe("When inbox is empty", () => {
40
- let result;
38
+ describe('getNewMessages', () => {
39
+ describe('When inbox is empty', () => {
40
+ let result
41
41
  beforeEach(async () => {
42
- bobHasAnInbox();
43
- inboxIsEmpty();
44
- result = await inboxLogic.getNewMessages(bob);
45
- });
46
- it("Resolves to an empty array", () => {
47
- expect(result).toEqual([]);
48
- });
49
- });
50
- describe("When container has some containment triples", () => {
51
- let result;
42
+ bobHasAnInbox()
43
+ inboxIsEmpty()
44
+ result = await inboxLogic.getNewMessages(bob)
45
+ })
46
+ it('Resolves to an empty array', () => {
47
+ expect(result).toEqual([])
48
+ })
49
+ })
50
+ describe('When container has some containment triples', () => {
51
+ let result
52
52
  beforeEach(async () => {
53
- bobHasAnInbox();
54
- inboxHasSomeContainmentTriples();
55
- const messages = await inboxLogic.getNewMessages(bob);
53
+ bobHasAnInbox()
54
+ inboxHasSomeContainmentTriples()
55
+ const messages = await inboxLogic.getNewMessages(bob)
56
56
  result = messages.map(oneMessage => oneMessage.value)
57
- });
58
- it("Resolves to an array with URLs of non-container resources in inbox", () => {
57
+ })
58
+ it('Resolves to an array with URLs of non-container resources in inbox', () => {
59
59
  expect(result.sort()).toEqual([
60
60
  'https://container.com/foo.txt'
61
- ].sort());
62
- });
63
- });
64
- });
61
+ ].sort())
62
+ })
63
+ })
64
+ })
65
65
  describe('createInboxFor', () => {
66
66
  beforeEach(async () => {
67
- aliceHasValidProfile();
67
+ aliceHasValidProfile()
68
68
  // First for the PUT:
69
69
  fetchMock.mockOnceIf(
70
- "https://alice.example.com/p2p-inboxes/Peer%20Person/",
71
- "Created", {
70
+ 'https://alice.example.com/p2p-inboxes/Peer%20Person/',
71
+ 'Created', {
72
72
  status: 201
73
73
  }
74
74
  )
75
75
  // Then for the GET to read the ACL link:
76
76
  fetchMock.mockOnceIf(
77
- "https://alice.example.com/p2p-inboxes/Peer%20Person/",
78
- " ", {
77
+ 'https://alice.example.com/p2p-inboxes/Peer%20Person/',
78
+ ' ', {
79
79
  status: 200,
80
80
  headers: {
81
81
  Link: '<https://some/acl>; rel="acl"',
82
82
  }
83
83
  }
84
84
  )
85
- fetchMock.mockIf("https://some/acl", "Created", { status: 201 });
85
+ fetchMock.mockIf('https://some/acl', 'Created', { status: 201 })
86
86
 
87
- await inboxLogic.createInboxFor('https://peer.com/#me', 'Peer Person');
88
- });
89
- it("creates the inbox", () => {
87
+ await inboxLogic.createInboxFor('https://peer.com/#me', 'Peer Person')
88
+ })
89
+ it('creates the inbox', () => {
90
90
  expect(fetchMock.mock.calls).toEqual([
91
- [ "https://alice.example.com/profile/card", fetchMock.mock.calls[0][1] ],
92
- [ "https://alice.example.com/p2p-inboxes/Peer%20Person/", {
93
- body: " ",
91
+ [ 'https://alice.example.com/profile/card', fetchMock.mock.calls[0][1] ],
92
+ [ 'https://alice.example.com/p2p-inboxes/Peer%20Person/', {
93
+ body: ' ',
94
94
  headers: {
95
- "Content-Type": "text/turtle",
96
- "If-None-Match": "*",
97
- Link: "<http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"",
95
+ 'Content-Type': 'text/turtle',
96
+ 'If-None-Match': '*',
97
+ Link: '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"',
98
98
  },
99
- method: "PUT"
99
+ method: 'PUT'
100
100
  }],
101
- [ "https://alice.example.com/p2p-inboxes/Peer%20Person/", fetchMock.mock.calls[2][1] ],
102
- [ "https://some/acl", {
101
+ [ 'https://alice.example.com/p2p-inboxes/Peer%20Person/', fetchMock.mock.calls[2][1] ],
102
+ [ 'https://some/acl', {
103
103
  body: '@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n' +
104
104
  '\n' +
105
105
  '<#alice> a acl:Authorization;\n' +
@@ -116,53 +116,53 @@ describe("Inbox logic", () => {
116
116
  ],
117
117
  method: 'PUT'
118
118
  }]
119
- ]);
120
- });
119
+ ])
120
+ })
121
121
 
122
- });
122
+ })
123
123
  describe('markAsRead', () => {
124
124
  beforeEach(async () => {
125
125
  fetchMock.mockOnceIf(
126
- "https://container.com/item.ttl",
127
- "<#some> <#inbox> <#item> .",
126
+ 'https://container.com/item.ttl',
127
+ '<#some> <#inbox> <#item> .',
128
128
  {
129
- headers: { "Content-Type": "text/turtle" },
129
+ headers: { 'Content-Type': 'text/turtle' },
130
130
  }
131
- );
131
+ )
132
132
  fetchMock.mockOnceIf(
133
- "https://container.com/archive/2111/03/31/item.ttl",
134
- "Created",
133
+ 'https://container.com/archive/2111/03/31/item.ttl',
134
+ 'Created',
135
135
  {
136
136
  status: 201,
137
- headers: { "Content-Type": "text/turtle" },
137
+ headers: { 'Content-Type': 'text/turtle' },
138
138
  }
139
- );
140
- await inboxLogic.markAsRead("https://container.com/item.ttl", new Date('31 March 2111 UTC'));
141
- });
139
+ )
140
+ await inboxLogic.markAsRead('https://container.com/item.ttl', new Date('31 March 2111 UTC'))
141
+ })
142
142
  it('moves the item to archive', async () => {
143
143
  expect(fetchMock.mock.calls).toEqual([
144
- [ "https://container.com/item.ttl" ],
144
+ [ 'https://container.com/item.ttl' ],
145
145
  [
146
- "https://container.com/archive/2111/03/31/item.ttl",
146
+ 'https://container.com/archive/2111/03/31/item.ttl',
147
147
  {
148
- "body": "<#some> <#inbox> <#item> .",
149
- "headers": [
148
+ 'body': '<#some> <#inbox> <#item> .',
149
+ 'headers': [
150
150
  [
151
- "Content-Type",
152
- "text/turtle",
151
+ 'Content-Type',
152
+ 'text/turtle',
153
153
  ],
154
154
  ],
155
- "method": "PUT",
155
+ 'method': 'PUT',
156
156
  },
157
157
  ],
158
- [ "https://container.com/item.ttl", { method: 'DELETE' } ],
159
- ]);
160
- });
161
- });
158
+ [ 'https://container.com/item.ttl', { method: 'DELETE' } ],
159
+ ])
160
+ })
161
+ })
162
162
 
163
163
  function aliceHasValidProfile() {
164
164
  fetchMock.mockOnceIf(
165
- "https://alice.example.com/profile/card",
165
+ 'https://alice.example.com/profile/card',
166
166
  `
167
167
  <https://alice.example.com/profile/card#me>
168
168
  <http://www.w3.org/ns/pim/space#storage> <https://alice.example.com/> ;
@@ -170,49 +170,40 @@ describe("Inbox logic", () => {
170
170
  .`,
171
171
  {
172
172
  headers: {
173
- "Content-Type": "text/turtle",
173
+ 'Content-Type': 'text/turtle',
174
174
  },
175
175
  }
176
- );
176
+ )
177
177
  }
178
178
 
179
179
  function bobHasAnInbox() {
180
180
  fetchMock.mockOnceIf(
181
- "https://bob.example.com/profile/card",
182
- "<https://bob.example.com/profile/card#me><http://www.w3.org/ns/ldp#inbox><https://container.com/>.",
181
+ 'https://bob.example.com/profile/card',
182
+ '<https://bob.example.com/profile/card#me><http://www.w3.org/ns/ldp#inbox><https://container.com/>.',
183
183
  {
184
- headers: { "Content-Type": "text/turtle" },
184
+ headers: { 'Content-Type': 'text/turtle' },
185
185
  }
186
- );
186
+ )
187
187
  }
188
188
 
189
189
  function inboxIsEmpty() {
190
190
  fetchMock.mockOnceIf(
191
- "https://container.com/",
192
- " ", // FIXME: https://github.com/jefflau/jest-fetch-mock/issues/189
191
+ 'https://container.com/',
192
+ ' ', // FIXME: https://github.com/jefflau/jest-fetch-mock/issues/189
193
193
  {
194
- headers: { "Content-Type": "text/turtle" },
194
+ headers: { 'Content-Type': 'text/turtle' },
195
195
  }
196
- );
196
+ )
197
197
  }
198
198
 
199
199
  function inboxHasSomeContainmentTriples() {
200
200
  fetchMock.mockOnceIf(
201
- "https://container.com/",
202
- "<.> <http://www.w3.org/ns/ldp#contains> <./foo.txt>, <./bar/> .",
201
+ 'https://container.com/',
202
+ '<.> <http://www.w3.org/ns/ldp#contains> <./foo.txt>, <./bar/> .',
203
203
  {
204
- headers: { "Content-Type": "text/turtle" },
204
+ headers: { 'Content-Type': 'text/turtle' },
205
205
  }
206
- );
206
+ )
207
207
  }
208
208
 
209
- function inboxItemExists() {
210
- fetchMock.mockOnceIf(
211
- "https://container.com/item.ttl",
212
- "<#some> <#inbox> <#item> .",
213
- {
214
- headers: { "Content-Type": "text/turtle" },
215
- }
216
- );
217
- }
218
- });
209
+ })
@@ -1,5 +1,5 @@
1
- import { solidLogicSingleton } from "../src/logic/solidLogicSingleton"
2
- import { silenceDebugMessages } from "./helpers/setup"
1
+ import { solidLogicSingleton } from '../src/logic/solidLogicSingleton'
2
+ import { silenceDebugMessages } from './helpers/setup'
3
3
 
4
4
  silenceDebugMessages()
5
5
 
@@ -2,23 +2,23 @@
2
2
  * @jest-environment jsdom
3
3
  *
4
4
  */
5
- import { UpdateManager, Store, Fetcher } from 'rdflib';
6
- import { createProfileLogic } from "../src/profile/profileLogic";
7
- import { createUtilityLogic } from "../src/util/utilityLogic"
8
- import { ns } from "../src/util/ns";
5
+ import { UpdateManager, Store, Fetcher } from 'rdflib'
6
+ import { createProfileLogic } from '../src/profile/profileLogic'
7
+ import { createUtilityLogic } from '../src/util/utilityLogic'
8
+ import { ns } from '../src/util/ns'
9
9
  import {
10
10
  alice, AlicePreferencesFile, AlicePrivateTypeIndex, AliceProfileFile, bob, boby, loadWebObject
11
- } from './helpers/dataSetup';
12
- import { createAclLogic } from "../src/acl/aclLogic";
13
- import { createContainerLogic } from "../src/util/containerLogic";
11
+ } from './helpers/dataSetup'
12
+ import { createAclLogic } from '../src/acl/aclLogic'
13
+ import { createContainerLogic } from '../src/util/containerLogic'
14
14
 
15
15
  const prefixes = Object.keys(ns).map(prefix => `@prefix ${prefix}: ${ns[prefix]('')}.\n`).join('') // In turtle
16
16
  const user = alice
17
17
  const profile = user.doc()
18
- let requests = []
18
+ let requests: Request[] = []
19
19
  let profileLogic
20
20
 
21
- describe("Profile", () => {
21
+ describe('Profile', () => {
22
22
 
23
23
  describe('loadProfile', () => {
24
24
  window.$SolidTestEnvironment = { username: alice.uri }
@@ -28,11 +28,11 @@ describe("Profile", () => {
28
28
  let web = {}
29
29
  const authn = {
30
30
  currentUser: () => {
31
- return alice;
31
+ return alice
32
32
  },
33
- };
33
+ }
34
34
  beforeEach(() => {
35
- fetchMock.resetMocks();
35
+ fetchMock.resetMocks()
36
36
  web = loadWebObject()
37
37
  requests = []
38
38
  fetchMock.mockIf(/^https?.*$/, async req => {
@@ -52,9 +52,9 @@ describe("Profile", () => {
52
52
  body: prefixes + contents, // Add namespaces to anything
53
53
  status: 200,
54
54
  headers: {
55
- "Content-Type": "text/turtle",
56
- "WAC-Allow": 'user="write", public="read"',
57
- "Accept-Patch": "application/sparql-update"
55
+ 'Content-Type': 'text/turtle',
56
+ 'WAC-Allow': 'user="write", public="read"',
57
+ 'Accept-Patch': 'application/sparql-update'
58
58
  }
59
59
  }
60
60
  } // if contents
@@ -65,8 +65,8 @@ describe("Profile", () => {
65
65
  })
66
66
 
67
67
  store = new Store()
68
- store.fetcher = new Fetcher(store, { fetch: fetch });
69
- store.updater = new UpdateManager(store);
68
+ store.fetcher = new Fetcher(store, { fetch: fetch })
69
+ store.updater = new UpdateManager(store)
70
70
  const util = createUtilityLogic(store, createAclLogic(store), createContainerLogic(store))
71
71
  profileLogic = createProfileLogic(store, authn, util)
72
72
  })
@@ -91,11 +91,11 @@ describe("Profile", () => {
91
91
  let web = {}
92
92
  const authn = {
93
93
  currentUser: () => {
94
- return alice;
94
+ return alice
95
95
  },
96
- };
96
+ }
97
97
  beforeEach(() => {
98
- fetchMock.resetMocks();
98
+ fetchMock.resetMocks()
99
99
  web = loadWebObject()
100
100
  requests = []
101
101
  fetchMock.mockIf(/^https?.*$/, async req => {
@@ -115,9 +115,9 @@ describe("Profile", () => {
115
115
  body: prefixes + contents, // Add namespaces to anything
116
116
  status: 200,
117
117
  headers: {
118
- "Content-Type": "text/turtle",
119
- "WAC-Allow": 'user="write", public="read"',
120
- "Accept-Patch": "application/sparql-update"
118
+ 'Content-Type': 'text/turtle',
119
+ 'WAC-Allow': 'user="write", public="read"',
120
+ 'Accept-Patch': 'application/sparql-update'
121
121
  }
122
122
  }
123
123
  } // if contents
@@ -128,8 +128,8 @@ describe("Profile", () => {
128
128
  })
129
129
 
130
130
  store = new Store()
131
- store.fetcher = new Fetcher(store, { fetch: fetch });
132
- store.updater = new UpdateManager(store);
131
+ store.fetcher = new Fetcher(store, { fetch: fetch })
132
+ store.updater = new UpdateManager(store)
133
133
  const util = createUtilityLogic(store, createAclLogic(store), createContainerLogic(store))
134
134
  profileLogic = createProfileLogic(store, authn, util)
135
135
  })
@@ -147,6 +147,7 @@ describe("Profile", () => {
147
147
  expect(store.holds(user, ns.solid('privateTypeIndex'), AlicePrivateTypeIndex, AlicePreferencesFile)).toEqual(true)
148
148
  })
149
149
  it('creates new file', async () => {
150
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
150
151
  const result = await profileLogic.silencedLoadPreferences(bob)
151
152
 
152
153
  const patchRequest = requests[0]
@@ -172,11 +173,11 @@ describe("Profile", () => {
172
173
  let web = {}
173
174
  const authn = {
174
175
  currentUser: () => {
175
- return boby;
176
+ return boby
176
177
  },
177
- };
178
+ }
178
179
  beforeEach(() => {
179
- fetchMock.resetMocks();
180
+ fetchMock.resetMocks()
180
181
  web = loadWebObject()
181
182
  requests = []
182
183
  fetchMock.mockIf(/^https?.*$/, async req => {
@@ -196,9 +197,9 @@ describe("Profile", () => {
196
197
  body: prefixes + contents, // Add namespaces to anything
197
198
  status: 200,
198
199
  headers: {
199
- "Content-Type": "text/turtle",
200
- "WAC-Allow": 'user="write", public="read"',
201
- "Accept-Patch": "application/sparql-update"
200
+ 'Content-Type': 'text/turtle',
201
+ 'WAC-Allow': 'user="write", public="read"',
202
+ 'Accept-Patch': 'application/sparql-update'
202
203
  }
203
204
  }
204
205
  } // if contents
@@ -209,8 +210,8 @@ describe("Profile", () => {
209
210
  })
210
211
 
211
212
  store = new Store()
212
- store.fetcher = new Fetcher(store, { fetch: fetch });
213
- store.updater = new UpdateManager(store);
213
+ store.fetcher = new Fetcher(store, { fetch: fetch })
214
+ store.updater = new UpdateManager(store)
214
215
  const util = createUtilityLogic(store, createAclLogic(store), createContainerLogic(store))
215
216
  profileLogic = createProfileLogic(store, authn, util)
216
217
  })
@@ -228,6 +229,7 @@ describe("Profile", () => {
228
229
  expect(store.holds(user, ns.solid('privateTypeIndex'), AlicePrivateTypeIndex, AlicePreferencesFile)).toEqual(true)
229
230
  })
230
231
  it('creates new file', async () => {
232
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
231
233
  const result = await profileLogic.loadPreferences(boby)
232
234
 
233
235
  const patchRequest = requests[0]
@@ -10,7 +10,7 @@ import { AuthenticationContext } from '../src/types'
10
10
  silenceDebugMessages()
11
11
  let solidAuthnLogic
12
12
 
13
- describe("SolidAuthnLogic", () => {
13
+ describe('SolidAuthnLogic', () => {
14
14
 
15
15
  beforeEach(() => {
16
16
  solidAuthnLogic = new SolidAuthnLogic(authSession)