@live-change/access-control-service 0.9.61 → 0.9.63

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 (2) hide show
  1. package/indexes.js +11 -2
  2. package/package.json +3 -3
package/indexes.js CHANGED
@@ -60,6 +60,7 @@ if(config.indexed) {
60
60
  const reindexerBucket = 128
61
61
 
62
62
  function indexEntry(parentType, childType, parent, child, property) {
63
+ output.debug('indexEntry', parentType, childType, parent, child, property)
63
64
  const indexPart = [parentType, parent, childType, child]
64
65
  .map(v => JSON.stringify(v)).join(':')
65
66
  return {
@@ -73,6 +74,7 @@ if(config.indexed) {
73
74
  }
74
75
 
75
76
  function indexEntryByProperty(childType, item, property) {
77
+ output.debug('indexEntryByProperty', childType, item, property)
76
78
  const value = item?.[property.property]
77
79
  if(!value) return
78
80
  const type = property.type || item[property.property + 'Type']
@@ -261,7 +263,8 @@ if(config.indexed) {
261
263
  /// reacting to index that are generated from childByParent index, because it will be updated later.
262
264
  await parentByChildIndex.onChange(async (entry, oldEntry) => {
263
265
  const anyEntry = entry || oldEntry
264
- await propagateChange(!!entry, entry.parentType, entry.parent, entry.childType, entry.child, [anyEntry.property])
266
+ await propagateChange(!!entry, anyEntry.parentType, anyEntry.parent,
267
+ anyEntry.childType, anyEntry.child, [anyEntry.property])
265
268
  })
266
269
  },
267
270
  parameters: {
@@ -270,8 +273,11 @@ if(config.indexed) {
270
273
  }
271
274
  })
272
275
 
276
+ //*
277
+
273
278
  definition.index({
274
279
  name: 'expandedRoles',
280
+ // index with redundant roles, one role from every source
275
281
  async function(input, output, { accessIndexName, publicAccessTableName, pathsIndexName }) {
276
282
  const bucketSize = 128
277
283
 
@@ -402,6 +408,7 @@ if(config.indexed) {
402
408
  })
403
409
 
404
410
  const roleByOwnerAndObjectIndex = definition.index({
411
+ // reduces expandedRoles
405
412
  name: 'roleByOwnerAndObject',
406
413
  async function(input, output, { expandedRolesIndexName }) {
407
414
  const expandedRolesIndex = await input.index(expandedRolesIndexName)
@@ -841,5 +848,7 @@ if(config.indexed) {
841
848
  }
842
849
  }
843
850
  })
851
+
852
+ //*/
844
853
 
845
- }
854
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/access-control-service",
3
- "version": "0.9.61",
3
+ "version": "0.9.63",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,8 +21,8 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.9.61"
24
+ "@live-change/framework": "^0.9.63"
25
25
  },
26
- "gitHead": "f750f29f912b9a76b5ffa2bdf5c46954cc7e7a67",
26
+ "gitHead": "89b9647aeaff9fc66add1f07d225fe4f44d91a39",
27
27
  "type": "module"
28
28
  }