solid-logic 2.0.1-d3bc92c3 → 2.0.1-d631865a
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeIndexLogic.d.ts","sourceRoot":"","sources":["../../src/typeIndex/typeIndexLogic.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAkB,MAAM,UAAU,CAAA;AAKpE,wBAAgB,oBAAoB,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,EAAE,YAAY,KAAA,EAAE,YAAY,KAAA,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"typeIndexLogic.d.ts","sourceRoot":"","sources":["../../src/typeIndex/typeIndexLogic.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAkB,MAAM,UAAU,CAAA;AAKpE,wBAAgB,oBAAoB,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,EAAE,YAAY,KAAA,EAAE,YAAY,KAAA,GAAG,cAAc,CA4L7F"}
|
|
@@ -322,7 +322,7 @@ function createTypeIndexLogic(store, authn, profileLogic, utilityLogic) {
|
|
|
322
322
|
}
|
|
323
323
|
function getScopedAppsFromIndex(scope, theClass) {
|
|
324
324
|
return __awaiter(this, void 0, void 0, function () {
|
|
325
|
-
var index, results, registrations,
|
|
325
|
+
var index, results, registrations, _i, registrations_1, reg, klass, instances, _a, instances_1, instance, containers, _b, containers_1, cont, contents, _c, contents_1, instance;
|
|
326
326
|
return __generator(this, function (_d) {
|
|
327
327
|
switch (_d.label) {
|
|
328
328
|
case 0:
|
|
@@ -331,14 +331,13 @@ function createTypeIndexLogic(store, authn, profileLogic, utilityLogic) {
|
|
|
331
331
|
registrations = store.statementsMatching(null, ns.solid('instance'), null, index)
|
|
332
332
|
.concat(store.statementsMatching(null, ns.solid('instanceContainer'), null, index))
|
|
333
333
|
.map(function (st) { return st.subject; });
|
|
334
|
-
|
|
335
|
-
: registrations;
|
|
336
|
-
_i = 0, relevant_1 = relevant;
|
|
334
|
+
_i = 0, registrations_1 = registrations;
|
|
337
335
|
_d.label = 1;
|
|
338
336
|
case 1:
|
|
339
|
-
if (!(_i <
|
|
340
|
-
reg =
|
|
337
|
+
if (!(_i < registrations_1.length)) return [3 /*break*/, 6];
|
|
338
|
+
reg = registrations_1[_i];
|
|
341
339
|
klass = store.any(reg, ns.solid('forClass'), null, index);
|
|
340
|
+
if (!(!theClass || klass.sameTerm(theClass))) return [3 /*break*/, 5];
|
|
342
341
|
instances = store.each(reg, ns.solid('instance'), null, index);
|
|
343
342
|
for (_a = 0, instances_1 = instances; _a < instances_1.length; _a++) {
|
|
344
343
|
instance = instances_1[_a];
|
|
@@ -365,27 +364,7 @@ function createTypeIndexLogic(store, authn, profileLogic, utilityLogic) {
|
|
|
365
364
|
case 5:
|
|
366
365
|
_i++;
|
|
367
366
|
return [3 /*break*/, 1];
|
|
368
|
-
case 6: return [2 /*return*/, results
|
|
369
|
-
/*
|
|
370
|
-
const directInstances = relevant.map(reg => store.each(reg, ns.solid('instance'), null, index)).flat()
|
|
371
|
-
// const directInstances = relevant.map(reg => store.each(reg, ns.solid('instance'), null, index).map(one => sym(one.value))).flat()
|
|
372
|
-
let instances = uniqueNodes(directInstances)
|
|
373
|
-
|
|
374
|
-
const instanceContainers = relevant.map(
|
|
375
|
-
reg => store.each(reg, ns.solid('instanceContainer'), null, index).map(one => sym(one.value))).flat()
|
|
376
|
-
|
|
377
|
-
// instanceContainers may be deprocatable if no one has used them
|
|
378
|
-
const containers = uniqueNodes(instanceContainers)
|
|
379
|
-
if (containers.length > 0) { console.log('@@ getScopedAppsFromIndex containers ', containers) }
|
|
380
|
-
for (let i = 0; i < containers.length; i++) {
|
|
381
|
-
const cont = containers[i]
|
|
382
|
-
await store.fetcher.load(cont)
|
|
383
|
-
const contents = store.each(cont, ns.ldp('contains'), null, cont).map(one => sym(one.value))
|
|
384
|
-
instances = instances.concat(contents)
|
|
385
|
-
}
|
|
386
|
-
return instances.map(instance => { return { instance, scope } })
|
|
387
|
-
*/
|
|
388
|
-
];
|
|
367
|
+
case 6: return [2 /*return*/, results];
|
|
389
368
|
}
|
|
390
369
|
});
|
|
391
370
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeIndexLogic.js","sourceRoot":"","sources":["../../src/typeIndex/typeIndexLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA2C;AAE3C,mDAAsC;AACtC,iCAA4C;AAC5C,uCAAwC;AAExC,SAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY;IACzE,IAAM,EAAE,GAAG,OAAS,CAAA;IAEpB,SAAS,gBAAgB,CAAC,QAAQ,EAAE,QAAQ;QACxC,OAAO,KAAK;aACP,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;aAC/C,MAAM,CAAC,UAAC,CAAC;YACN,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACX,CAAC;IAED,SAAe,kBAAkB,CAAC,IAAe;;;;;;wBAC7C,IAAI,CAAC,IAAI;4BAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;wBAC/C,qBAAM,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,EAAA;;wBAA9C,OAAO,GAAG,SAAoC;wBAE9C,UAAU,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;;;;wBAGzB,qBAAM,YAAY,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAc,EAAE,UAAU,EAAE,OAAO,CAAC,EAAA;;wBAA5H,eAAe,GAA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,CAAC,EAAA;;wBAA9B,SAA8B,CAAA;wBACxB,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,IAAA,YAAG,EAAC,GAAG,CAAC,KAAK,CAAC,EAAd,CAAc,CAAC,CAAA;wBAC5F,WAA+B,EAAR,qBAAQ,EAAR,sBAAQ,EAAR,IAAQ,EAAE;4BAAtB,QAAQ;4BACjB,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAA,YAAG,EAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAG,KAAK,OAAA,EAAE,CAAC,CAAA;yBACrE;;;wBALgB,IAAU,CAAA;;;wBARf,IAAa,CAAA;;4BAiB/B,sBAAO,OAAO,EAAA;;;;KACjB;IAED,OAAO;QACH,mBAAmB,qBAAA;QACnB,gBAAgB,kBAAA;QAChB,kBAAkB,oBAAA;QAClB,wBAAwB,0BAAA;QACxB,kBAAkB,oBAAA;QAClB,qBAAqB,uBAAA;QACrB,eAAe,iBAAA;QACf,sBAAsB,wBAAA;QACtB,uBAAuB,yBAAA;QACvB,2BAA2B,6BAAA;QAC3B,sBAAsB,wBAAA;KACzB,CAAA;AACL,CAAC;AA5LD,oDA4LC"}
|
package/package.json
CHANGED
|
@@ -159,44 +159,24 @@ export function createTypeIndexLogic(store, authn, profileLogic, utilityLogic):
|
|
|
159
159
|
const registrations = store.statementsMatching(null, ns.solid('instance'), null, index)
|
|
160
160
|
.concat(store.statementsMatching(null, ns.solid('instanceContainer'), null, index))
|
|
161
161
|
.map(st => st.subject)
|
|
162
|
-
const
|
|
163
|
-
: registrations
|
|
164
|
-
|
|
165
|
-
for (const reg of relevant) {
|
|
162
|
+
for (const reg of registrations) {
|
|
166
163
|
const klass = store.any(reg, ns.solid('forClass'), null, index)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
164
|
+
if (!theClass || klass.sameTerm(theClass)) {
|
|
165
|
+
const instances = store.each(reg, ns.solid('instance'), null, index)
|
|
166
|
+
for (const instance of instances) {
|
|
167
|
+
results.push({ instance, type: klass, scope })
|
|
168
|
+
}
|
|
169
|
+
const containers = store.each(reg, ns.solid('instanceContainer'), null, index)
|
|
170
|
+
for (const cont of containers) {
|
|
171
|
+
await store.fetcher.load(cont)
|
|
172
|
+
const contents = store.each(cont, ns.ldp('contains'), null, cont).map(one => sym(one.value))
|
|
173
|
+
for (const instance of contents) {
|
|
174
|
+
results.push({ instance: sym(instance.value), type: klass, scope })
|
|
175
|
+
}
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
return results
|
|
181
|
-
/*
|
|
182
|
-
const directInstances = relevant.map(reg => store.each(reg, ns.solid('instance'), null, index)).flat()
|
|
183
|
-
// const directInstances = relevant.map(reg => store.each(reg, ns.solid('instance'), null, index).map(one => sym(one.value))).flat()
|
|
184
|
-
let instances = uniqueNodes(directInstances)
|
|
185
|
-
|
|
186
|
-
const instanceContainers = relevant.map(
|
|
187
|
-
reg => store.each(reg, ns.solid('instanceContainer'), null, index).map(one => sym(one.value))).flat()
|
|
188
|
-
|
|
189
|
-
// instanceContainers may be deprocatable if no one has used them
|
|
190
|
-
const containers = uniqueNodes(instanceContainers)
|
|
191
|
-
if (containers.length > 0) { console.log('@@ getScopedAppsFromIndex containers ', containers) }
|
|
192
|
-
for (let i = 0; i < containers.length; i++) {
|
|
193
|
-
const cont = containers[i]
|
|
194
|
-
await store.fetcher.load(cont)
|
|
195
|
-
const contents = store.each(cont, ns.ldp('contains'), null, cont).map(one => sym(one.value))
|
|
196
|
-
instances = instances.concat(contents)
|
|
197
|
-
}
|
|
198
|
-
return instances.map(instance => { return { instance, scope } })
|
|
199
|
-
*/
|
|
200
180
|
}
|
|
201
181
|
|
|
202
182
|
return {
|
|
@@ -173,209 +173,7 @@ describe("TypeIndex logic NEW", () => {
|
|
|
173
173
|
})
|
|
174
174
|
})
|
|
175
175
|
|
|
176
|
-
const AliceAndClubScopes =
|
|
177
|
-
[
|
|
178
|
-
{
|
|
179
|
-
"instance": {
|
|
180
|
-
"classOrder": 5,
|
|
181
|
-
"termType": "NamedNode",
|
|
182
|
-
"value": "https://alice.example.com/publicStuff/actionItems.ttl#this",
|
|
183
|
-
},
|
|
184
|
-
"scope": {
|
|
185
|
-
"agent": {
|
|
186
|
-
"classOrder": 5,
|
|
187
|
-
"termType": "NamedNode",
|
|
188
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
189
|
-
},
|
|
190
|
-
"index": {
|
|
191
|
-
"classOrder": 5,
|
|
192
|
-
"termType": "NamedNode",
|
|
193
|
-
"value": "https://alice.example.com/profile/public-type-index.ttl",
|
|
194
|
-
},
|
|
195
|
-
"label": "public",
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"instance": {
|
|
200
|
-
"classOrder": 5,
|
|
201
|
-
"termType": "NamedNode",
|
|
202
|
-
"value": "https://alice.example.com/project4/issues.ttl#this",
|
|
203
|
-
},
|
|
204
|
-
"scope": {
|
|
205
|
-
"agent": {
|
|
206
|
-
"classOrder": 5,
|
|
207
|
-
"termType": "NamedNode",
|
|
208
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
209
|
-
},
|
|
210
|
-
"index": {
|
|
211
|
-
"classOrder": 5,
|
|
212
|
-
"termType": "NamedNode",
|
|
213
|
-
"value": "https://alice.example.com/profile/public-type-index.ttl",
|
|
214
|
-
},
|
|
215
|
-
"label": "public",
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"instance": {
|
|
220
|
-
"classOrder": 5,
|
|
221
|
-
"termType": "NamedNode",
|
|
222
|
-
"value": "https://alice.example.com/privateStuff/ToDo.ttl#this",
|
|
223
|
-
},
|
|
224
|
-
"scope": {
|
|
225
|
-
"agent": {
|
|
226
|
-
"classOrder": 5,
|
|
227
|
-
"termType": "NamedNode",
|
|
228
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
229
|
-
},
|
|
230
|
-
"index": {
|
|
231
|
-
"classOrder": 5,
|
|
232
|
-
"termType": "NamedNode",
|
|
233
|
-
"value": "https://alice.example.com/settings/private-type-index.ttl",
|
|
234
|
-
},
|
|
235
|
-
"label": "private",
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"instance": {
|
|
240
|
-
"classOrder": 5,
|
|
241
|
-
"termType": "NamedNode",
|
|
242
|
-
"value": "https://alice.example.com/privateStuff/Goals.ttl#this",
|
|
243
|
-
},
|
|
244
|
-
"scope": {
|
|
245
|
-
"agent": {
|
|
246
|
-
"classOrder": 5,
|
|
247
|
-
"termType": "NamedNode",
|
|
248
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
249
|
-
},
|
|
250
|
-
"index": {
|
|
251
|
-
"classOrder": 5,
|
|
252
|
-
"termType": "NamedNode",
|
|
253
|
-
"value": "https://alice.example.com/settings/private-type-index.ttl",
|
|
254
|
-
},
|
|
255
|
-
"label": "private",
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"instance": {
|
|
260
|
-
"classOrder": 5,
|
|
261
|
-
"termType": "NamedNode",
|
|
262
|
-
"value": "https://alice.example.com/privateStuff/workingOn.ttl#this",
|
|
263
|
-
},
|
|
264
|
-
"scope": {
|
|
265
|
-
"agent": {
|
|
266
|
-
"classOrder": 5,
|
|
267
|
-
"termType": "NamedNode",
|
|
268
|
-
"value": "https://alice.example.com/profile/card.ttl#me",
|
|
269
|
-
},
|
|
270
|
-
"index": {
|
|
271
|
-
"classOrder": 5,
|
|
272
|
-
"termType": "NamedNode",
|
|
273
|
-
"value": "https://alice.example.com/settings/private-type-index.ttl",
|
|
274
|
-
},
|
|
275
|
-
"label": "private",
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"instance": {
|
|
280
|
-
"classOrder": 5,
|
|
281
|
-
"termType": "NamedNode",
|
|
282
|
-
"value": "https://club.example.com/publicStuff/actionItems.ttl#this",
|
|
283
|
-
},
|
|
284
|
-
"scope": {
|
|
285
|
-
"agent": {
|
|
286
|
-
"classOrder": 5,
|
|
287
|
-
"termType": "NamedNode",
|
|
288
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
289
|
-
},
|
|
290
|
-
"index": {
|
|
291
|
-
"classOrder": 5,
|
|
292
|
-
"termType": "NamedNode",
|
|
293
|
-
"value": "https://club.example.com/profile/public-type-index.ttl",
|
|
294
|
-
},
|
|
295
|
-
"label": "public",
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"instance": {
|
|
300
|
-
"classOrder": 5,
|
|
301
|
-
"termType": "NamedNode",
|
|
302
|
-
"value": "https://club.example.com/project4/clubIssues.ttl#this",
|
|
303
|
-
},
|
|
304
|
-
"scope": {
|
|
305
|
-
"agent": {
|
|
306
|
-
"classOrder": 5,
|
|
307
|
-
"termType": "NamedNode",
|
|
308
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
309
|
-
},
|
|
310
|
-
"index": {
|
|
311
|
-
"classOrder": 5,
|
|
312
|
-
"termType": "NamedNode",
|
|
313
|
-
"value": "https://club.example.com/profile/public-type-index.ttl",
|
|
314
|
-
},
|
|
315
|
-
"label": "public",
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"instance": {
|
|
320
|
-
"classOrder": 5,
|
|
321
|
-
"termType": "NamedNode",
|
|
322
|
-
"value": "https://club.example.com/privateStuff/ToDo.ttl#this",
|
|
323
|
-
},
|
|
324
|
-
"scope": {
|
|
325
|
-
"agent": {
|
|
326
|
-
"classOrder": 5,
|
|
327
|
-
"termType": "NamedNode",
|
|
328
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
329
|
-
},
|
|
330
|
-
"index": {
|
|
331
|
-
"classOrder": 5,
|
|
332
|
-
"termType": "NamedNode",
|
|
333
|
-
"value": "https://club.example.com/settings/private-type-index.ttl",
|
|
334
|
-
},
|
|
335
|
-
"label": "private",
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"instance": {
|
|
340
|
-
"classOrder": 5,
|
|
341
|
-
"termType": "NamedNode",
|
|
342
|
-
"value": "https://club.example.com/privateStuff/Goals.ttl#this",
|
|
343
|
-
},
|
|
344
|
-
"scope": {
|
|
345
|
-
"agent": {
|
|
346
|
-
"classOrder": 5,
|
|
347
|
-
"termType": "NamedNode",
|
|
348
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
349
|
-
},
|
|
350
|
-
"index": {
|
|
351
|
-
"classOrder": 5,
|
|
352
|
-
"termType": "NamedNode",
|
|
353
|
-
"value": "https://club.example.com/settings/private-type-index.ttl",
|
|
354
|
-
},
|
|
355
|
-
"label": "private",
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"instance": {
|
|
360
|
-
"classOrder": 5,
|
|
361
|
-
"termType": "NamedNode",
|
|
362
|
-
"value": "https://club.example.com/privateStuff/tasks.ttl#this",
|
|
363
|
-
},
|
|
364
|
-
"scope": {
|
|
365
|
-
"agent": {
|
|
366
|
-
"classOrder": 5,
|
|
367
|
-
"termType": "NamedNode",
|
|
368
|
-
"value": "https://club.example.com/profile/card.ttl#it",
|
|
369
|
-
},
|
|
370
|
-
"index": {
|
|
371
|
-
"classOrder": 5,
|
|
372
|
-
"termType": "NamedNode",
|
|
373
|
-
"value": "https://club.example.com/settings/private-type-index.ttl",
|
|
374
|
-
},
|
|
375
|
-
"label": "private",
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
]
|
|
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"}}]
|
|
379
177
|
|
|
380
178
|
describe('getScopedAppInstances', () => {
|
|
381
179
|
it('exists', () => {
|
|
@@ -383,7 +181,7 @@ describe("TypeIndex logic NEW", () => {
|
|
|
383
181
|
})
|
|
384
182
|
it('pulls in users scopes and also community ones', async () => {
|
|
385
183
|
const result = await typeIndexLogic.getScopedAppInstances(Tracker, alice)
|
|
386
|
-
|
|
184
|
+
expect(result).toEqual(AliceAndClubScopes) // @@ AliceAndClubScopes
|
|
387
185
|
})
|
|
388
186
|
it('creates new preferenceFile and typeIndex files where they dont exist', async () => {
|
|
389
187
|
const result = await typeIndexLogic.getScopedAppInstances(Tracker, bob)
|
|
@@ -412,58 +210,16 @@ describe("TypeIndex logic NEW", () => {
|
|
|
412
210
|
})
|
|
413
211
|
|
|
414
212
|
const TRACKERS =
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"classOrder": 5,
|
|
428
|
-
"termType": "NamedNode",
|
|
429
|
-
"value": "https://alice.example.com/privateStuff/ToDo.ttl#this",
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
"classOrder": 5,
|
|
433
|
-
"termType": "NamedNode",
|
|
434
|
-
"value": "https://alice.example.com/privateStuff/Goals.ttl#this",
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"classOrder": 5,
|
|
438
|
-
"termType": "NamedNode",
|
|
439
|
-
"value": "https://alice.example.com/privateStuff/workingOn.ttl#this",
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
"classOrder": 5,
|
|
443
|
-
"termType": "NamedNode",
|
|
444
|
-
"value": "https://club.example.com/publicStuff/actionItems.ttl#this",
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"classOrder": 5,
|
|
448
|
-
"termType": "NamedNode",
|
|
449
|
-
"value": "https://club.example.com/project4/clubIssues.ttl#this",
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"classOrder": 5,
|
|
453
|
-
"termType": "NamedNode",
|
|
454
|
-
"value": "https://club.example.com/privateStuff/ToDo.ttl#this",
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
"classOrder": 5,
|
|
458
|
-
"termType": "NamedNode",
|
|
459
|
-
"value": "https://club.example.com/privateStuff/Goals.ttl#this",
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
"classOrder": 5,
|
|
463
|
-
"termType": "NamedNode",
|
|
464
|
-
"value": "https://club.example.com/privateStuff/tasks.ttl#this",
|
|
465
|
-
},
|
|
466
|
-
]
|
|
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"} ]
|
|
467
223
|
|
|
468
224
|
describe('getAppInstances', () => {
|
|
469
225
|
it('exists', () => {
|
|
@@ -471,7 +227,7 @@ describe("TypeIndex logic NEW", () => {
|
|
|
471
227
|
})
|
|
472
228
|
it('finds trackers', async () => {
|
|
473
229
|
const result = await typeIndexLogic.getAppInstances(Tracker)
|
|
474
|
-
|
|
230
|
+
expect(result).toEqual(TRACKERS) // TRACKERS @@
|
|
475
231
|
expect(result).toEqual(uniqueNodes(result)) // shoud have no dups
|
|
476
232
|
})
|
|
477
233
|
it('finds images in containers', async () => {
|