solid-logic 3.1.1-f0ed025 → 3.1.1-f3e6173
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/README.md +103 -2
- package/dist/acl/aclLogic.d.ts +5 -0
- package/{lib → dist}/acl/aclLogic.d.ts.map +1 -1
- package/dist/acl/aclLogic.js +117 -0
- package/dist/acl/aclLogic.js.map +1 -0
- package/dist/authSession/authSession.js +3 -0
- package/dist/authSession/authSession.js.map +1 -0
- package/{lib → dist}/authn/SolidAuthnLogic.d.ts +3 -3
- package/{lib → dist}/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/dist/authn/SolidAuthnLogic.js +109 -0
- package/dist/authn/SolidAuthnLogic.js.map +1 -0
- package/{lib → dist}/authn/authUtil.d.ts +1 -1
- package/dist/authn/authUtil.d.ts.map +1 -0
- package/dist/authn/authUtil.js +64 -0
- package/dist/authn/authUtil.js.map +1 -0
- package/{lib → dist}/chat/chatLogic.d.ts +1 -1
- package/{lib → dist}/chat/chatLogic.d.ts.map +1 -1
- package/dist/chat/chatLogic.js +157 -0
- package/dist/chat/chatLogic.js.map +1 -0
- package/{lib → dist}/inbox/inboxLogic.d.ts +1 -1
- package/{lib → dist}/inbox/inboxLogic.d.ts.map +1 -1
- package/dist/inbox/inboxLogic.js +51 -0
- package/dist/inbox/inboxLogic.js.map +1 -0
- package/{lib → dist}/index.d.ts +1 -1
- package/{lib → dist}/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/issuer/issuerLogic.js +37 -0
- package/dist/issuer/issuerLogic.js.map +1 -0
- package/{lib → dist}/logic/CustomError.d.ts.map +1 -1
- package/dist/logic/CustomError.js +27 -0
- package/dist/logic/CustomError.js.map +1 -0
- package/dist/logic/solidLogic.d.ts +6 -0
- package/{lib → dist}/logic/solidLogic.d.ts.map +1 -1
- package/dist/logic/solidLogic.js +64 -0
- package/dist/logic/solidLogic.js.map +1 -0
- package/dist/logic/solidLogicSingleton.d.ts +4 -0
- package/{lib → dist}/logic/solidLogicSingleton.d.ts.map +1 -1
- package/dist/logic/solidLogicSingleton.js +31 -0
- package/dist/logic/solidLogicSingleton.js.map +1 -0
- package/{lib → dist}/profile/profileLogic.d.ts +1 -1
- package/{lib → dist}/profile/profileLogic.d.ts.map +1 -1
- package/dist/profile/profileLogic.js +128 -0
- package/dist/profile/profileLogic.js.map +1 -0
- package/dist/solid-logic.esm.js +7356 -0
- package/dist/solid-logic.esm.js.map +1 -0
- package/dist/solid-logic.esm.min.js +32 -0
- package/dist/solid-logic.esm.min.js.map +1 -0
- package/dist/solid-logic.js +7415 -0
- package/dist/solid-logic.js.map +1 -0
- package/dist/solid-logic.min.js +32 -0
- package/dist/solid-logic.min.js.map +1 -0
- package/{lib → dist}/typeIndex/typeIndexLogic.d.ts.map +1 -1
- package/dist/typeIndex/typeIndexLogic.js +182 -0
- package/dist/typeIndex/typeIndexLogic.js.map +1 -0
- package/{lib → dist}/types.d.ts +2 -2
- package/{lib → dist}/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/{lib → dist}/util/containerLogic.d.ts +1 -1
- package/{lib → dist}/util/containerLogic.d.ts.map +1 -1
- package/{src/util/containerLogic.ts → dist/util/containerLogic.js} +15 -23
- package/dist/util/containerLogic.js.map +1 -0
- package/dist/util/debug.d.ts.map +1 -0
- package/dist/util/debug.js +13 -0
- package/dist/util/debug.js.map +1 -0
- package/dist/util/ns.js +5 -0
- package/dist/util/ns.js.map +1 -0
- package/{lib → dist}/util/utilityLogic.d.ts +1 -1
- package/{lib → dist}/util/utilityLogic.d.ts.map +1 -1
- package/dist/util/utilityLogic.js +144 -0
- package/dist/util/utilityLogic.js.map +1 -0
- package/{lib → dist}/util/utils.d.ts +1 -1
- package/{lib → dist}/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +39 -0
- package/dist/util/utils.js.map +1 -0
- package/dist/versionInfo.js +31 -0
- package/dist/versionInfo.js.map +1 -0
- package/package.json +51 -23
- package/eslint.config.js +0 -29
- package/jest.config.js +0 -10
- package/lib/acl/aclLogic.d.ts +0 -5
- package/lib/acl/aclLogic.js +0 -168
- package/lib/acl/aclLogic.js.map +0 -1
- package/lib/authSession/authSession.js +0 -6
- package/lib/authSession/authSession.js.map +0 -1
- package/lib/authn/SolidAuthnLogic.js +0 -193
- package/lib/authn/SolidAuthnLogic.js.map +0 -1
- package/lib/authn/authUtil.d.ts.map +0 -1
- package/lib/authn/authUtil.js +0 -105
- package/lib/authn/authUtil.js.map +0 -1
- package/lib/chat/chatLogic.js +0 -272
- package/lib/chat/chatLogic.js.map +0 -1
- package/lib/inbox/inboxLogic.js +0 -139
- package/lib/inbox/inboxLogic.js.map +0 -1
- package/lib/index.js +0 -31
- package/lib/index.js.map +0 -1
- package/lib/issuer/issuerLogic.js +0 -52
- package/lib/issuer/issuerLogic.js.map +0 -1
- package/lib/logic/CustomError.js +0 -89
- package/lib/logic/CustomError.js.map +0 -1
- package/lib/logic/solidLogic.d.ts +0 -6
- package/lib/logic/solidLogic.js +0 -102
- package/lib/logic/solidLogic.js.map +0 -1
- package/lib/logic/solidLogicSingleton.d.ts +0 -3
- package/lib/logic/solidLogicSingleton.js +0 -94
- package/lib/logic/solidLogicSingleton.js.map +0 -1
- package/lib/profile/profileLogic.js +0 -259
- package/lib/profile/profileLogic.js.map +0 -1
- package/lib/typeIndex/typeIndexLogic.js +0 -399
- package/lib/typeIndex/typeIndexLogic.js.map +0 -1
- package/lib/types.js +0 -3
- package/lib/util/containerLogic.js +0 -102
- package/lib/util/containerLogic.js.map +0 -1
- package/lib/util/debug.d.ts.map +0 -1
- package/lib/util/debug.js +0 -40
- package/lib/util/debug.js.map +0 -1
- package/lib/util/ns.js +0 -44
- package/lib/util/ns.js.map +0 -1
- package/lib/util/utilityLogic.js +0 -284
- package/lib/util/utilityLogic.js.map +0 -1
- package/lib/util/utils.js +0 -47
- package/lib/util/utils.js.map +0 -1
- package/src/acl/aclLogic.ts +0 -156
- package/src/authSession/authSession.ts +0 -7
- package/src/authn/SolidAuthnLogic.ts +0 -127
- package/src/authn/authUtil.ts +0 -70
- package/src/chat/chatLogic.ts +0 -226
- package/src/inbox/inboxLogic.ts +0 -59
- package/src/index.ts +0 -22
- package/src/issuer/issuerLogic.ts +0 -40
- package/src/logic/CustomError.ts +0 -29
- package/src/logic/solidLogic.ts +0 -76
- package/src/logic/solidLogicSingleton.ts +0 -20
- package/src/profile/profileLogic.ts +0 -125
- package/src/typeIndex/typeIndexLogic.ts +0 -198
- package/src/types.ts +0 -122
- package/src/util/debug.ts +0 -20
- package/src/util/ns.ts +0 -5
- package/src/util/utilityLogic.ts +0 -156
- package/src/util/utils.ts +0 -52
- package/test/aclLogic.test.ts +0 -24
- package/test/authUtil.test.ts +0 -23
- package/test/chatLogic.test.ts +0 -316
- package/test/container.test.ts +0 -58
- package/test/helpers/dataSetup.ts +0 -134
- package/test/helpers/setup.ts +0 -17
- package/test/inboxLogic.test.ts +0 -218
- package/test/logic.test.ts +0 -29
- package/test/profileLogic.test.ts +0 -246
- package/test/solidAuthLogic.test.ts +0 -49
- package/test/typeIndexLogic.test.ts +0 -255
- package/test/utilityLogic.test.ts +0 -179
- package/test/utils.test.ts +0 -32
- package/tsconfig.json +0 -75
- /package/{lib → dist}/authSession/authSession.d.ts +0 -0
- /package/{lib → dist}/authSession/authSession.d.ts.map +0 -0
- /package/{lib → dist}/issuer/issuerLogic.d.ts +0 -0
- /package/{lib → dist}/issuer/issuerLogic.d.ts.map +0 -0
- /package/{lib → dist}/logic/CustomError.d.ts +0 -0
- /package/{lib → dist}/typeIndex/typeIndexLogic.d.ts +0 -0
- /package/{lib → dist}/types.js.map +0 -0
- /package/{lib → dist}/util/debug.d.ts +0 -0
- /package/{lib → dist}/util/ns.d.ts +0 -0
- /package/{lib → dist}/util/ns.d.ts.map +0 -0
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment jsdom
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
import { Fetcher, Store, sym, UpdateManager } from "rdflib";
|
|
6
|
-
import { createAclLogic } from "../src/acl/aclLogic";
|
|
7
|
-
import { createProfileLogic } from "../src/profile/profileLogic";
|
|
8
|
-
import { createTypeIndexLogic} from "../src/typeIndex/typeIndexLogic";
|
|
9
|
-
import { createContainerLogic } from "../src/util/containerLogic";
|
|
10
|
-
import { ns } from "../src/util/ns";
|
|
11
|
-
import { createUtilityLogic } from "../src/util/utilityLogic";
|
|
12
|
-
import { uniqueNodes } from "../src/util/utils";
|
|
13
|
-
import { alice, AlicePhotoFolder, AlicePhotos, AlicePreferences, AlicePreferencesFile, AlicePrivateTypeIndex, AlicePrivateTypes, AliceProfile, AlicePublicTypeIndex, AlicePublicTypes, bob, BobProfile, club, ClubPreferences, ClubPreferencesFile, ClubPrivateTypeIndex, ClubPrivateTypes, ClubProfile, ClubPublicTypeIndex, ClubPublicTypes } from "./helpers/dataSetup";
|
|
14
|
-
|
|
15
|
-
const prefixes = Object.keys(ns).map(prefix => `@prefix ${prefix}: ${ns[prefix]('')}.\n`).join('') // In turtle
|
|
16
|
-
window.$SolidTestEnvironment = { username: alice.uri }
|
|
17
|
-
|
|
18
|
-
const Tracker = ns.wf('Tracker')
|
|
19
|
-
const Image = ns.schema('Image')
|
|
20
|
-
|
|
21
|
-
//let web = {}
|
|
22
|
-
//web = loadWebObject()
|
|
23
|
-
const user = alice
|
|
24
|
-
const profile = user.doc()
|
|
25
|
-
const web = {}
|
|
26
|
-
web[profile.uri] = AliceProfile
|
|
27
|
-
web[AlicePreferencesFile.uri] = AlicePreferences
|
|
28
|
-
web[AlicePrivateTypeIndex.uri] = AlicePrivateTypes
|
|
29
|
-
web[AlicePublicTypeIndex.uri] = AlicePublicTypes
|
|
30
|
-
web[AlicePhotoFolder.uri] = AlicePhotos
|
|
31
|
-
web[bob.doc().uri] = BobProfile
|
|
32
|
-
|
|
33
|
-
web[club.doc().uri] = ClubProfile
|
|
34
|
-
web[ClubPreferencesFile.uri] = ClubPreferences
|
|
35
|
-
web[ClubPrivateTypeIndex.uri] = ClubPrivateTypes
|
|
36
|
-
web[ClubPublicTypeIndex.uri] = ClubPublicTypes
|
|
37
|
-
let requests = []
|
|
38
|
-
let statustoBeReturned = 200
|
|
39
|
-
let typeIndexLogic
|
|
40
|
-
|
|
41
|
-
describe("TypeIndex logic NEW", () => {
|
|
42
|
-
let store;
|
|
43
|
-
const authn = {
|
|
44
|
-
currentUser: () => {
|
|
45
|
-
return alice;
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
beforeEach(() => {
|
|
50
|
-
fetchMock.resetMocks();
|
|
51
|
-
requests = []
|
|
52
|
-
statustoBeReturned = 200
|
|
53
|
-
const init = { headers: { "Content-Type": "text/turtle" } } // Fetch options tend to be called this
|
|
54
|
-
|
|
55
|
-
fetchMock.mockIf(/^https?.*$/, async req => {
|
|
56
|
-
|
|
57
|
-
if (req.method !== 'GET') {
|
|
58
|
-
requests.push(req)
|
|
59
|
-
if (req.method === 'PUT') {
|
|
60
|
-
const contents = await req.text()
|
|
61
|
-
web[req.url] = contents // Update our dummy web
|
|
62
|
-
console.log(`Tetst: Updated ${req.url} on PUT to <<<${web[req.url]}>>>`)
|
|
63
|
-
}
|
|
64
|
-
return { status: statustoBeReturned }
|
|
65
|
-
}
|
|
66
|
-
const contents = web[req.url]
|
|
67
|
-
if (contents !== undefined) { //
|
|
68
|
-
return {
|
|
69
|
-
body: prefixes + contents, // Add namespaces to anything
|
|
70
|
-
status: 200,
|
|
71
|
-
headers: {
|
|
72
|
-
"Content-Type": "text/turtle",
|
|
73
|
-
"WAC-Allow": 'user="write", public="read"',
|
|
74
|
-
"Accept-Patch": "application/sparql-update"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
} // if contents
|
|
78
|
-
return {
|
|
79
|
-
status: 404,
|
|
80
|
-
body: 'Not Found'
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
store = new Store()
|
|
85
|
-
store.fetcher = new Fetcher(store, { fetch: fetch });
|
|
86
|
-
store.updater = new UpdateManager(store);
|
|
87
|
-
const util = createUtilityLogic(store, createAclLogic(store), createContainerLogic(store))
|
|
88
|
-
typeIndexLogic = createTypeIndexLogic(store, authn, createProfileLogic(store, authn, util), util)
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
describe('loadAllTypeIndexes', () => {
|
|
92
|
-
it('exists', () => {
|
|
93
|
-
expect(typeIndexLogic.loadAllTypeIndexes).toBeInstanceOf(Function)
|
|
94
|
-
})
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
const AliceScopes = [{
|
|
98
|
-
"agent": {
|
|
99
|
-
"classOrder": 5,
|
|
100
|
-
"termType": "NamedNode",
|
|
101
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
102
|
-
},
|
|
103
|
-
"index": {
|
|
104
|
-
"classOrder": 5,
|
|
105
|
-
"termType": "NamedNode",
|
|
106
|
-
"value": "https://alice.example.com/profile/public-type-index.ttl",
|
|
107
|
-
},
|
|
108
|
-
"label": "public",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"agent": {
|
|
112
|
-
"classOrder": 5,
|
|
113
|
-
"termType": "NamedNode",
|
|
114
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
115
|
-
},
|
|
116
|
-
"index": {
|
|
117
|
-
"classOrder": 5,
|
|
118
|
-
"termType": "NamedNode",
|
|
119
|
-
"value": "https://alice.example.com/settings/private-type-index.ttl",
|
|
120
|
-
},
|
|
121
|
-
"label": "private",
|
|
122
|
-
}
|
|
123
|
-
];
|
|
124
|
-
|
|
125
|
-
describe('loadTypeIndexesFor', () => {
|
|
126
|
-
it('exists', () => {
|
|
127
|
-
expect(typeIndexLogic.loadTypeIndexesFor).toBeInstanceOf(Function)
|
|
128
|
-
})
|
|
129
|
-
it('loads data', async () => {
|
|
130
|
-
const result = await typeIndexLogic.loadTypeIndexesFor(alice)
|
|
131
|
-
expect(result).toEqual(AliceScopes)
|
|
132
|
-
expect(store.statementsMatching(null, null, null, AlicePrivateTypeIndex).length).toEqual(8)
|
|
133
|
-
expect(store.statementsMatching(null, null, null, AlicePublicTypeIndex).length).toEqual(8)
|
|
134
|
-
})
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
const ClubScopes =
|
|
138
|
-
[
|
|
139
|
-
{
|
|
140
|
-
"agent": {
|
|
141
|
-
"classOrder": 5,
|
|
142
|
-
"termType": "NamedNode",
|
|
143
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
144
|
-
},
|
|
145
|
-
"index": {
|
|
146
|
-
"classOrder": 5,
|
|
147
|
-
"termType": "NamedNode",
|
|
148
|
-
"value": "https://club.example.com/profile/public-type-index.ttl",
|
|
149
|
-
},
|
|
150
|
-
"label": "public",
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"agent": {
|
|
154
|
-
"classOrder": 5,
|
|
155
|
-
"termType": "NamedNode",
|
|
156
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
157
|
-
},
|
|
158
|
-
"index": {
|
|
159
|
-
"classOrder": 5,
|
|
160
|
-
"termType": "NamedNode",
|
|
161
|
-
"value": "https://club.example.com/settings/private-type-index.ttl",
|
|
162
|
-
},
|
|
163
|
-
"label": "private",
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
describe('loadCommunityTypeIndexes', () => {
|
|
167
|
-
it('exists', () => {
|
|
168
|
-
expect(typeIndexLogic.loadCommunityTypeIndexes).toBeInstanceOf(Function)
|
|
169
|
-
})
|
|
170
|
-
it('loads data', async () => {
|
|
171
|
-
const result = await typeIndexLogic.loadCommunityTypeIndexes(alice)
|
|
172
|
-
expect(result).toEqual(ClubScopes)
|
|
173
|
-
})
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
const AliceAndClubScopes = [{"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/publicStuff/actionItems.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/card.ttl#me"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/public-type-index.ttl"}, "label": "public"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/project4/issues.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/card.ttl#me"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/public-type-index.ttl"}, "label": "public"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/ToDo.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/card.ttl#me"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/Goals.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/card.ttl#me"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/workingOn.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/profile/card.ttl#me"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/publicStuff/actionItems.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/card.ttl#it"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/public-type-index.ttl"}, "label": "public"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/project4/clubIssues.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/card.ttl#it"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/public-type-index.ttl"}, "label": "public"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/ToDo.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/card.ttl#it"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/Goals.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/card.ttl#it"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}, {"instance": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/tasks.ttl#this"}, "scope": {"agent": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/profile/card.ttl#it"}, "index": {"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/settings/private-type-index.ttl"}, "label": "private"}, "type": {"classOrder": 5, "termType": "NamedNode", "value": "http://www.w3.org/2005/01/wf/flow#Tracker"}}]
|
|
177
|
-
|
|
178
|
-
describe('getScopedAppInstances', () => {
|
|
179
|
-
it('exists', () => {
|
|
180
|
-
expect(typeIndexLogic.getScopedAppInstances).toBeInstanceOf(Function)
|
|
181
|
-
})
|
|
182
|
-
it('pulls in users scopes and also community ones', async () => {
|
|
183
|
-
const result = await typeIndexLogic.getScopedAppInstances(Tracker, alice)
|
|
184
|
-
expect(result).toEqual(AliceAndClubScopes) // @@ AliceAndClubScopes
|
|
185
|
-
})
|
|
186
|
-
it('creates new preferenceFile and typeIndex files where they dont exist', async () => {
|
|
187
|
-
const result = await typeIndexLogic.getScopedAppInstances(Tracker, bob)
|
|
188
|
-
|
|
189
|
-
expect(requests[0].method).toEqual('PATCH') // Add preferrencesFile link to profile
|
|
190
|
-
expect(requests[0].url).toEqual('https://bob.example.com/profile/card.ttl')
|
|
191
|
-
|
|
192
|
-
expect(requests[1].method).toEqual('PUT') // create publiTypeIndex
|
|
193
|
-
expect(requests[1].url).toEqual('https://bob.example.com/profile/publicTypeIndex.ttl')
|
|
194
|
-
|
|
195
|
-
expect(requests[2].method).toEqual('PATCH') // Add link of publiTypeIndex to profile
|
|
196
|
-
expect(requests[2].url).toEqual('https://bob.example.com/profile/card.ttl')
|
|
197
|
-
|
|
198
|
-
expect(requests[3].method).toEqual('PUT') // create preferenceFile
|
|
199
|
-
expect(requests[3].url).toEqual('https://bob.example.com/Settings/Preferences.ttl')
|
|
200
|
-
|
|
201
|
-
expect(requests[4].method).toEqual('PATCH') // Add privateTypeIndex link preference file
|
|
202
|
-
expect(requests[4].url).toEqual('https://bob.example.com/Settings/Preferences.ttl')
|
|
203
|
-
|
|
204
|
-
expect(requests[5].method).toEqual('PUT') //create privatTypeIndex
|
|
205
|
-
expect(requests[5].url).toEqual('https://bob.example.com/Settings/privateTypeIndex.ttl')
|
|
206
|
-
|
|
207
|
-
expect(requests.length).toEqual(6)
|
|
208
|
-
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
const TRACKERS =
|
|
213
|
-
[{"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/publicStuff/actionItems.ttl#this"},
|
|
214
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/project4/issues.ttl#this"},
|
|
215
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/ToDo.ttl#this"},
|
|
216
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/Goals.ttl#this"},
|
|
217
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://alice.example.com/privateStuff/workingOn.ttl#this"},
|
|
218
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/publicStuff/actionItems.ttl#this"},
|
|
219
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/project4/clubIssues.ttl#this"},
|
|
220
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/ToDo.ttl#this"},
|
|
221
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/Goals.ttl#this"},
|
|
222
|
-
{"classOrder": 5, "termType": "NamedNode", "value": "https://club.example.com/privateStuff/tasks.ttl#this"} ]
|
|
223
|
-
|
|
224
|
-
describe('getAppInstances', () => {
|
|
225
|
-
it('exists', () => {
|
|
226
|
-
expect(typeIndexLogic.getAppInstances).toBeInstanceOf(Function)
|
|
227
|
-
})
|
|
228
|
-
it('finds trackers', async () => {
|
|
229
|
-
const result = await typeIndexLogic.getAppInstances(Tracker)
|
|
230
|
-
expect(result).toEqual(TRACKERS) // TRACKERS @@
|
|
231
|
-
expect(result).toEqual(uniqueNodes(result)) // shoud have no dups
|
|
232
|
-
})
|
|
233
|
-
it('finds containers', async () => {
|
|
234
|
-
const result = await typeIndexLogic.getAppInstances(Image)
|
|
235
|
-
expect(result.length).toEqual(1)
|
|
236
|
-
expect(result).toEqual(uniqueNodes(result)) // shoud have no dups
|
|
237
|
-
expect(result.map(x => x.uri).join()).toEqual("https://alice.example.com/profile/Photos/")
|
|
238
|
-
})
|
|
239
|
-
})
|
|
240
|
-
|
|
241
|
-
describe('registerInTypeIndex', () => {
|
|
242
|
-
it('exists', () => {
|
|
243
|
-
expect(typeIndexLogic.registerInTypeIndex).toBeInstanceOf(Function)
|
|
244
|
-
})
|
|
245
|
-
it('throws error', async () => {
|
|
246
|
-
const result = await typeIndexLogic.registerInTypeIndex(
|
|
247
|
-
sym('https://test.test#'),
|
|
248
|
-
sym('https://test.test#'),
|
|
249
|
-
sym('https://test.test/TheClass')
|
|
250
|
-
)
|
|
251
|
-
console.log(result)
|
|
252
|
-
expect(result).toEqual(null)
|
|
253
|
-
})
|
|
254
|
-
})
|
|
255
|
-
})
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment jsdom
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
import fetchMock from "jest-fetch-mock";
|
|
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";
|
|
13
|
-
|
|
14
|
-
window.$SolidTestEnvironment = { username: alice.uri }
|
|
15
|
-
const prefixes = Object.keys(ns).map(prefix => `@prefix ${prefix}: ${ns[prefix]('')}.\n`).join('') // In turtle
|
|
16
|
-
|
|
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
|
|
32
|
-
|
|
33
|
-
fetchMock.mockIf(/^https?.*$/, async req => {
|
|
34
|
-
|
|
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))
|
|
80
|
-
});
|
|
81
|
-
|
|
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
|
-
})
|
package/test/utils.test.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
})
|
package/tsconfig.json
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Basic Options */
|
|
4
|
-
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
|
5
|
-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
6
|
-
"lib": [
|
|
7
|
-
"dom",
|
|
8
|
-
"es2015",
|
|
9
|
-
"es2019"
|
|
10
|
-
] /* Specify library files to be included in the compilation. */,
|
|
11
|
-
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
12
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
13
|
-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
14
|
-
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
15
|
-
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
|
|
16
|
-
"sourceMap": true /* Generates corresponding '.map' file. */,
|
|
17
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
18
|
-
|
|
19
|
-
"outDir": "lib" /* Redirect output structure to the directory. */,
|
|
20
|
-
"rootDir": "src/",
|
|
21
|
-
|
|
22
|
-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
23
|
-
// "composite": true, /* Enable project compilation */
|
|
24
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
25
|
-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
26
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
27
|
-
// "noEmit": true, /* Do not emit outputs. */
|
|
28
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
29
|
-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
30
|
-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
31
|
-
|
|
32
|
-
/* Strict Type-Checking Options */
|
|
33
|
-
"strict": false /* Enable all strict type-checking options. */,
|
|
34
|
-
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
|
|
35
|
-
"strictNullChecks": true /* Enable strict null checks. */,
|
|
36
|
-
"strictFunctionTypes": true /* Enable strict checking of function types. */,
|
|
37
|
-
"strictBindCallApply": true /* Enable strict 'bind', 'call', and 'apply' methods on functions. */,
|
|
38
|
-
"strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */,
|
|
39
|
-
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
|
40
|
-
"alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
|
|
41
|
-
|
|
42
|
-
/* Additional Checks */
|
|
43
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
44
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
45
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
46
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
47
|
-
|
|
48
|
-
/* Module Resolution Options */
|
|
49
|
-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
50
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
51
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
52
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
53
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
54
|
-
"typeRoots": [
|
|
55
|
-
"node_modules/@types",
|
|
56
|
-
"typings"
|
|
57
|
-
] /* List of folders to include type definitions from. */,
|
|
58
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
59
|
-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
60
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
61
|
-
|
|
62
|
-
/* Source Map Options */
|
|
63
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
64
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
66
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
67
|
-
|
|
68
|
-
/* Experimental Options */
|
|
69
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
70
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
71
|
-
},
|
|
72
|
-
"include": [
|
|
73
|
-
"src/**/*"
|
|
74
|
-
]
|
|
75
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|