solid-logic 1.3.13-0e650512 → 1.3.13-ef4be651

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 (120) hide show
  1. package/.github/workflows/ci.yml +18 -19
  2. package/jest.config.js +1 -4
  3. package/jest.setup.ts +2 -0
  4. package/lib/authn/NoAuthnLogic.d.ts +9 -0
  5. package/lib/authn/NoAuthnLogic.d.ts.map +1 -0
  6. package/lib/authn/NoAuthnLogic.js +17 -0
  7. package/lib/authn/NoAuthnLogic.js.map +1 -0
  8. package/lib/authn/SolidAuthnLogic.d.ts +6 -26
  9. package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
  10. package/lib/authn/SolidAuthnLogic.js +5 -161
  11. package/lib/authn/SolidAuthnLogic.js.map +1 -1
  12. package/lib/authn/index.d.ts +5 -0
  13. package/lib/authn/index.d.ts.map +1 -0
  14. package/lib/{types.js → authn/index.js} +1 -1
  15. package/lib/authn/index.js.map +1 -0
  16. package/lib/chat/ChatLogic.d.ts +2 -2
  17. package/lib/chat/ChatLogic.d.ts.map +1 -1
  18. package/lib/chat/ChatLogic.js +1 -1
  19. package/lib/chat/ChatLogic.js.map +1 -1
  20. package/lib/chat/integration.test.d.ts +2 -0
  21. package/lib/chat/integration.test.d.ts.map +1 -0
  22. package/lib/chat/integration.test.js +318 -0
  23. package/lib/chat/integration.test.js.map +1 -0
  24. package/lib/{util/debug.d.ts → debug.d.ts} +0 -0
  25. package/lib/debug.d.ts.map +1 -0
  26. package/lib/{util/debug.js → debug.js} +0 -0
  27. package/lib/debug.js.map +1 -0
  28. package/lib/inbox/InboxLogic.d.ts +2 -2
  29. package/lib/inbox/InboxLogic.d.ts.map +1 -1
  30. package/lib/inbox/InboxLogic.js.map +1 -1
  31. package/lib/inbox/unit.test.d.ts +2 -0
  32. package/lib/inbox/unit.test.d.ts.map +1 -0
  33. package/lib/inbox/unit.test.js +264 -0
  34. package/lib/inbox/unit.test.js.map +1 -0
  35. package/lib/index.d.ts +67 -9
  36. package/lib/index.d.ts.map +1 -1
  37. package/lib/index.js +384 -31
  38. package/lib/index.js.map +1 -1
  39. package/lib/profile/ProfileLogic.d.ts +3 -2
  40. package/lib/profile/ProfileLogic.d.ts.map +1 -1
  41. package/lib/profile/ProfileLogic.js.map +1 -1
  42. package/lib/{util/uri.d.ts → uri.d.ts} +0 -0
  43. package/lib/uri.d.ts.map +1 -0
  44. package/lib/{util/uri.js → uri.js} +0 -0
  45. package/lib/uri.js.map +1 -0
  46. package/lib/util/UtilityLogic.d.ts +2 -2
  47. package/lib/util/UtilityLogic.d.ts.map +1 -1
  48. package/lib/util/UtilityLogic.js.map +1 -1
  49. package/lib/util/unit.test.d.ts +2 -0
  50. package/lib/util/unit.test.d.ts.map +1 -0
  51. package/lib/util/unit.test.js +200 -0
  52. package/lib/util/unit.test.js.map +1 -0
  53. package/package.json +1 -3
  54. package/src/authn/NoAuthnLogic.ts +16 -0
  55. package/src/authn/SolidAuthnLogic.ts +10 -112
  56. package/src/authn/index.ts +5 -0
  57. package/src/chat/ChatLogic.ts +3 -3
  58. package/{test/chatLogic.test.ts → src/chat/integration.test.ts} +5 -4
  59. package/src/{util/debug.ts → debug.ts} +0 -0
  60. package/src/inbox/InboxLogic.ts +14 -2
  61. package/{test/inboxLogic.test.ts → src/inbox/unit.test.ts} +6 -5
  62. package/src/index.ts +308 -18
  63. package/src/profile/ProfileLogic.ts +3 -2
  64. package/src/{util/uri.ts → uri.ts} +0 -0
  65. package/src/util/UtilityLogic.ts +14 -2
  66. package/{test/utilityLogic.test.ts → src/util/unit.test.ts} +4 -3
  67. package/lib/acl/aclLogic.d.ts +0 -32
  68. package/lib/acl/aclLogic.d.ts.map +0 -1
  69. package/lib/acl/aclLogic.js +0 -132
  70. package/lib/acl/aclLogic.js.map +0 -1
  71. package/lib/authSession/authSession.d.ts +0 -4
  72. package/lib/authSession/authSession.d.ts.map +0 -1
  73. package/lib/authSession/authSession.js +0 -18
  74. package/lib/authSession/authSession.js.map +0 -1
  75. package/lib/authn/authUtil.d.ts +0 -17
  76. package/lib/authn/authUtil.d.ts.map +0 -1
  77. package/lib/authn/authUtil.js +0 -88
  78. package/lib/authn/authUtil.js.map +0 -1
  79. package/lib/issuer/issuerLogic.d.ts +0 -8
  80. package/lib/issuer/issuerLogic.d.ts.map +0 -1
  81. package/lib/issuer/issuerLogic.js +0 -53
  82. package/lib/issuer/issuerLogic.js.map +0 -1
  83. package/lib/logic/CustomError.d.ts +0 -17
  84. package/lib/logic/CustomError.d.ts.map +0 -1
  85. package/lib/logic/CustomError.js +0 -73
  86. package/lib/logic/CustomError.js.map +0 -1
  87. package/lib/logic/SolidLogic.d.ts +0 -49
  88. package/lib/logic/SolidLogic.d.ts.map +0 -1
  89. package/lib/logic/SolidLogic.js +0 -316
  90. package/lib/logic/SolidLogic.js.map +0 -1
  91. package/lib/logic/solidLogicSingleton.d.ts +0 -8
  92. package/lib/logic/solidLogicSingleton.d.ts.map +0 -1
  93. package/lib/logic/solidLogicSingleton.js +0 -88
  94. package/lib/logic/solidLogicSingleton.js.map +0 -1
  95. package/lib/typeIndex/typeIndexLogic.d.ts +0 -22
  96. package/lib/typeIndex/typeIndexLogic.d.ts.map +0 -1
  97. package/lib/typeIndex/typeIndexLogic.js +0 -302
  98. package/lib/typeIndex/typeIndexLogic.js.map +0 -1
  99. package/lib/types.d.ts +0 -29
  100. package/lib/types.d.ts.map +0 -1
  101. package/lib/types.js.map +0 -1
  102. package/lib/util/debug.d.ts.map +0 -1
  103. package/lib/util/debug.js.map +0 -1
  104. package/lib/util/uri.d.ts.map +0 -1
  105. package/lib/util/uri.js.map +0 -1
  106. package/src/acl/aclLogic.ts +0 -137
  107. package/src/authSession/authSession.ts +0 -22
  108. package/src/authn/authUtil.ts +0 -67
  109. package/src/issuer/issuerLogic.ts +0 -40
  110. package/src/logic/CustomError.ts +0 -25
  111. package/src/logic/SolidLogic.ts +0 -264
  112. package/src/logic/solidLogicSingleton.ts +0 -24
  113. package/src/typeIndex/typeIndexLogic.ts +0 -170
  114. package/src/types.ts +0 -41
  115. package/test/aclLogic.test.ts +0 -15
  116. package/test/authUtil.test.ts +0 -19
  117. package/test/helpers/setup.ts +0 -13
  118. package/test/logic.test.ts +0 -28
  119. package/test/solidAuthLogic.test.ts +0 -45
  120. package/test/typeIndexLogic.test.ts +0 -26
@@ -1,28 +0,0 @@
1
- import { solidLogicSingleton } from "../src/index"
2
- import { silenceDebugMessages } from "./helpers/setup"
3
-
4
- silenceDebugMessages()
5
-
6
- describe('solidLogicSingleton (main global SolidLogic instance)', () => {
7
- it('exists', () => {
8
- expect(solidLogicSingleton).toBeInstanceOf(Object)
9
- })
10
- })
11
-
12
- describe('solidLogicSingleton.store', () => {
13
- it('exists', () => {
14
- expect(solidLogicSingleton.store).toBeInstanceOf(Object)
15
- })
16
- })
17
-
18
- describe('solidLogicSingleton.store.fetcher', () => {
19
- it('exists', () => {
20
- expect(solidLogicSingleton.store.fetcher).toBeInstanceOf(Object)
21
- })
22
- })
23
-
24
- describe('solidLogicSingleton.store.updater', () => {
25
- it('exists', () => {
26
- expect(solidLogicSingleton.store.updater).toBeInstanceOf(Object)
27
- })
28
- })
@@ -1,45 +0,0 @@
1
- import { SolidAuthnLogic } from '../src/authn/SolidAuthnLogic'
2
- import { silenceDebugMessages } from './helpers/setup'
3
- import { default as authSession } from '../src/authSession/authSession'
4
- import { AuthenticationContext } from '../src/types'
5
-
6
- silenceDebugMessages()
7
- let solidAuthnLogic
8
-
9
- describe("SolidAuthnLogic", () => {
10
-
11
- beforeEach(() => {
12
- solidAuthnLogic = new SolidAuthnLogic(authSession)
13
- })
14
-
15
- describe('checkUser', () => {
16
- it('exists', () => {
17
- expect(solidAuthnLogic.checkUser).toBeInstanceOf(Function)
18
- })
19
- it('runs', async () => {
20
- expect(await solidAuthnLogic.checkUser()).toEqual(null)
21
- })
22
- })
23
-
24
- describe('currentUser', () => {
25
- it('exists', () => {
26
- expect(solidAuthnLogic.currentUser).toBeInstanceOf(Function)
27
- })
28
- it('runs', async () => {
29
- expect(await solidAuthnLogic.currentUser()).toEqual(null)
30
- })
31
- })
32
-
33
- describe('saveUser', () => {
34
- it('exists', () => {
35
- expect(solidAuthnLogic.saveUser).toBeInstanceOf(Function)
36
- })
37
- it('runs', () => {
38
- expect(solidAuthnLogic.saveUser(
39
- '',
40
- {} as AuthenticationContext
41
- )).toEqual(null)
42
- })
43
- })
44
-
45
- })
@@ -1,26 +0,0 @@
1
- import { sym } from 'rdflib'
2
- import { AuthenticationContext } from '../src/types'
3
- import * as typeIndexLogic from '../src/typeIndex/typeIndexLogic'
4
-
5
- describe('loadTypeIndexes', () => {
6
- it('exists', () => {
7
- expect(typeIndexLogic.loadTypeIndexes).toBeInstanceOf(Function)
8
- })
9
- it('runs', () => {
10
- expect(typeIndexLogic.loadTypeIndexes({})).toBeInstanceOf(Object)
11
- })
12
- })
13
-
14
- describe('registerInTypeIndex', () => {
15
- it('exists', () => {
16
- expect(typeIndexLogic.registerInTypeIndex).toBeInstanceOf(Function)
17
- })
18
- it.skip('runs', async () => {
19
- expect(await typeIndexLogic.registerInTypeIndex(
20
- {} as AuthenticationContext,
21
- sym('https://test.test#'),
22
- sym('https://test.test#'),
23
- false
24
- )).toEqual(undefined)
25
- })
26
- })