@jskit-ai/users-core 0.2.2 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/users-core",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test --test-concurrency=1"
@@ -15,12 +15,12 @@
15
15
  "./locales/en.json": "./locales/en.json"
16
16
  },
17
17
  "dependencies": {
18
- "@jskit-ai/database-runtime": "0.1.250",
19
- "@jskit-ai/json-rest-api-core": "0.2.1",
20
- "@jskit-ai/resource-core": "0.1.192",
21
- "@jskit-ai/resource-crud-core": "0.1.192",
22
- "@jskit-ai/storage-runtime": "0.1.247",
23
- "@jskit-ai/uploads-runtime": "0.2.1",
18
+ "@jskit-ai/database-runtime": "0.1.252",
19
+ "@jskit-ai/json-rest-api-core": "0.2.3",
20
+ "@jskit-ai/resource-core": "0.1.194",
21
+ "@jskit-ai/resource-crud-core": "0.1.194",
22
+ "@jskit-ai/storage-runtime": "0.1.249",
23
+ "@jskit-ai/uploads-runtime": "0.2.3",
24
24
  "json-rest-schema": "^1.0.17"
25
25
  },
26
26
  "description": "Users/account runtime plus HTTP routes for account features.",
@@ -168,8 +168,8 @@
168
168
  }
169
169
  },
170
170
  "peerDependencies": {
171
- "@jskit-ai/auth-core": "0.2.1",
172
- "@jskit-ai/http-runtime": "0.2.1",
173
- "@jskit-ai/kernel": "0.2.1"
171
+ "@jskit-ai/auth-core": "0.2.3",
172
+ "@jskit-ai/http-runtime": "0.2.3",
173
+ "@jskit-ai/kernel": "0.2.3"
174
174
  }
175
175
  }
@@ -9,8 +9,8 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.1",
13
- "@jskit-ai/resource-crud-core": "0.1.192"
12
+ "@jskit-ai/crud-core": "0.2.3",
13
+ "@jskit-ai/resource-crud-core": "0.1.194"
14
14
  },
15
15
  "jskit": {
16
16
  "kind": "runtime",
@@ -9,9 +9,9 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.1",
13
- "@jskit-ai/resource-crud-core": "0.1.192",
14
- "@jskit-ai/workspaces-core": "0.2.2"
12
+ "@jskit-ai/crud-core": "0.2.3",
13
+ "@jskit-ai/resource-crud-core": "0.1.194",
14
+ "@jskit-ai/workspaces-core": "0.2.4"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  normalizeDbRecordId,
3
+ retryDeadlocks,
3
4
  toIsoString
4
5
  } from "@jskit-ai/database-runtime/shared";
5
6
  import { findDuplicateEntryError, isDuplicateEntryError } from "@jskit-ai/database-runtime/shared/duplicateEntry";
@@ -30,6 +31,7 @@ function toDbJson(value, fallback = {}) {
30
31
 
31
32
  export {
32
33
  toIsoString,
34
+ retryDeadlocks,
33
35
  isDuplicateEntryError,
34
36
  findDuplicateEntryError,
35
37
  normalizeText,
@@ -5,7 +5,8 @@ import {
5
5
  normalizeLowerText,
6
6
  normalizeRecordId,
7
7
  normalizeText,
8
- toIsoString
8
+ toIsoString,
9
+ retryDeadlocks
9
10
  } from "./repositoryUtils.js";
10
11
  import {
11
12
  createJsonRestContext,
@@ -169,7 +170,7 @@ function createRepository({ api } = {}) {
169
170
  throw new TypeError("internal.repository.user-profiles requires json-rest-api userProfiles resource.");
170
171
  }
171
172
 
172
- const withTransaction = (work) => api.transaction(work);
173
+ const withTransaction = (work) => retryDeadlocks(() => api.transaction(work));
173
174
 
174
175
  async function queryFirst(filters = {}, options = {}) {
175
176
  const rows = extractJsonRestCollectionRows(
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  normalizeRecordId,
3
- isDuplicateEntryError
3
+ isDuplicateEntryError,
4
+ retryDeadlocks
4
5
  } from "./repositoryUtils.js";
5
6
  import {
6
7
  createJsonRestContext,
@@ -57,7 +58,7 @@ function createRepository({ api } = {}) {
57
58
  if (!api?.resources?.userSettings) {
58
59
  throw new TypeError("userSettingsRepository requires json-rest-api userSettings resource.");
59
60
  }
60
- const withTransaction = (work) => api.transaction(work);
61
+ const withTransaction = (work) => retryDeadlocks(() => api.transaction(work));
61
62
 
62
63
  async function queryFirst(filters = {}, options = {}) {
63
64
  const rows = extractJsonRestCollectionRows(