@autofleet/zehut 3.1.2-beta.13 → 3.1.2-beta.14

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.
@@ -136,7 +136,7 @@ describe('E2E', () => {
136
136
  closeServer1();
137
137
  expect(error.message).toEqual('Entity id on elevatePermissions is not a valid UUID, provided: nnn');
138
138
  });
139
- it.only('should correctly handle elevation of permissions and their reversion', async () => {
139
+ it('should correctly handle elevation of permissions and their reversion', async () => {
140
140
  let capturedError = null;
141
141
  // Snapshots to capture state after each step
142
142
  let afterFirstElevationElevated = {
package/lib/utils.js CHANGED
@@ -98,7 +98,7 @@ const getContextAttributes = (contextId, decodedToken) => {
98
98
  };
99
99
  exports.getContextAttributes = getContextAttributes;
100
100
  const mergePermissions = (target, sources) => {
101
- const base = JSON.parse(JSON.stringify(target));
101
+ const base = structuredClone(target);
102
102
  Object.keys(sources).forEach((topLevelKey) => {
103
103
  base[topLevelKey] ?? (base[topLevelKey] = {});
104
104
  Object.entries(sources[topLevelKey]).forEach(([entityId, perms]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/zehut",
3
- "version": "3.1.2-beta.13",
3
+ "version": "3.1.2-beta.14",
4
4
  "description": "manage user's identity",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",