@matter/general 0.13.1-alpha.0-20250516-6288f3c54 → 0.13.1-alpha.0-20250517-99a1e848a
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/dist/cjs/transaction/Transaction.d.ts +4 -5
- package/dist/cjs/transaction/Transaction.d.ts.map +1 -1
- package/dist/cjs/transaction/Transaction.js.map +1 -1
- package/dist/esm/transaction/Transaction.d.ts +4 -5
- package/dist/esm/transaction/Transaction.d.ts.map +1 -1
- package/dist/esm/transaction/Transaction.js.map +1 -1
- package/package.json +2 -2
- package/src/transaction/Transaction.ts +4 -5
|
@@ -9,7 +9,7 @@ import { Resource } from "./Resource.js";
|
|
|
9
9
|
import { ResourceSet } from "./ResourceSet.js";
|
|
10
10
|
import { Status } from "./Status.js";
|
|
11
11
|
/**
|
|
12
|
-
* .
|
|
12
|
+
* Two-phase commit implementation.
|
|
13
13
|
*
|
|
14
14
|
* Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
|
|
15
15
|
* transactions but state updates will not be visible until the transaction completes.
|
|
@@ -20,8 +20,7 @@ import { Status } from "./Status.js";
|
|
|
20
20
|
* locks.
|
|
21
21
|
*
|
|
22
22
|
* Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
|
|
23
|
-
* participants roll back. An error in phase 2 could result in data inconsistency
|
|
24
|
-
* of yet.
|
|
23
|
+
* participants roll back. An error in phase 2 could result in data inconsistency.
|
|
25
24
|
*
|
|
26
25
|
* TODO - does prevent deadlock but we should probably add a timeout for resource locking
|
|
27
26
|
*/
|
|
@@ -64,8 +63,8 @@ export interface Transaction {
|
|
|
64
63
|
/**
|
|
65
64
|
* Add {@link ResourceType}s to the transaction synchronously.
|
|
66
65
|
*
|
|
67
|
-
* Unlike {@link addResources}, this method will throw an error if the
|
|
68
|
-
*
|
|
66
|
+
* Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
|
|
67
|
+
* cannot be locked.
|
|
69
68
|
*/
|
|
70
69
|
addResourcesSync(...resources: Resource[]): void;
|
|
71
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC
|
|
1
|
+
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAExC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAEtD;;OAEG;IACH,QAAQ,CAAC,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B,KAAY,MAAM,GAAG,UAAU,CAAC;IAEhC,KAAY,QAAQ,GAAG,YAAY,CAAC;IAEpC,KAAY,WAAW,GAAG,eAAe,CAAC;IAE1C,KAAY,WAAW,GAAG,eAAe,CAAC;CAC7C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/transaction/Transaction.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,sBAAyB;AAEzB,oBAAuB;AACvB,gBAAyC;AAXzC;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,sBAAyB;AAEzB,oBAAuB;AACvB,gBAAyC;AAXzC;AAAA;AAAA;AAAA;AAAA;AA0JO,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvB,IAAO,KAAa,OAAuE;AAEvF,eAAO,eAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,UAAU;AAAA,EAEV;AAAA,EAEA;AAAA,EAEA,CAAC,OAAO,WAAW,GAAG;AAC1B;AAGA,YAAY,MAAM;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -9,7 +9,7 @@ import { Resource } from "./Resource.js";
|
|
|
9
9
|
import { ResourceSet } from "./ResourceSet.js";
|
|
10
10
|
import { Status } from "./Status.js";
|
|
11
11
|
/**
|
|
12
|
-
* .
|
|
12
|
+
* Two-phase commit implementation.
|
|
13
13
|
*
|
|
14
14
|
* Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
|
|
15
15
|
* transactions but state updates will not be visible until the transaction completes.
|
|
@@ -20,8 +20,7 @@ import { Status } from "./Status.js";
|
|
|
20
20
|
* locks.
|
|
21
21
|
*
|
|
22
22
|
* Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
|
|
23
|
-
* participants roll back. An error in phase 2 could result in data inconsistency
|
|
24
|
-
* of yet.
|
|
23
|
+
* participants roll back. An error in phase 2 could result in data inconsistency.
|
|
25
24
|
*
|
|
26
25
|
* TODO - does prevent deadlock but we should probably add a timeout for resource locking
|
|
27
26
|
*/
|
|
@@ -64,8 +63,8 @@ export interface Transaction {
|
|
|
64
63
|
/**
|
|
65
64
|
* Add {@link ResourceType}s to the transaction synchronously.
|
|
66
65
|
*
|
|
67
|
-
* Unlike {@link addResources}, this method will throw an error if the
|
|
68
|
-
*
|
|
66
|
+
* Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
|
|
67
|
+
* cannot be locked.
|
|
69
68
|
*/
|
|
70
69
|
addResourcesSync(...resources: Resource[]): void;
|
|
71
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC
|
|
1
|
+
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAA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@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/general",
|
|
3
|
-
"version": "0.13.1-alpha.0-
|
|
3
|
+
"version": "0.13.1-alpha.0-20250517-99a1e848a",
|
|
4
4
|
"description": "Non-Matter support for Matter.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iot",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@noble/curves": "^1.8.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@matter/testing": "0.13.1-alpha.0-
|
|
39
|
+
"@matter/testing": "0.13.1-alpha.0-20250517-99a1e848a"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist/**/*",
|
|
@@ -12,7 +12,7 @@ import { Status } from "./Status.js";
|
|
|
12
12
|
import { ReadOnlyTransaction, act } from "./Tx.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* .
|
|
15
|
+
* Two-phase commit implementation.
|
|
16
16
|
*
|
|
17
17
|
* Transactions are either shared (for reads) or exclusive (for writes). Exclusive transactions do not block shared
|
|
18
18
|
* transactions but state updates will not be visible until the transaction completes.
|
|
@@ -23,8 +23,7 @@ import { ReadOnlyTransaction, act } from "./Tx.js";
|
|
|
23
23
|
* locks.
|
|
24
24
|
*
|
|
25
25
|
* Persistence is implemented by a list of participants. Commits are two phase. If an error throws in phase one all
|
|
26
|
-
* participants roll back. An error in phase 2 could result in data inconsistency
|
|
27
|
-
* of yet.
|
|
26
|
+
* participants roll back. An error in phase 2 could result in data inconsistency.
|
|
28
27
|
*
|
|
29
28
|
* TODO - does prevent deadlock but we should probably add a timeout for resource locking
|
|
30
29
|
*/
|
|
@@ -75,8 +74,8 @@ export interface Transaction {
|
|
|
75
74
|
/**
|
|
76
75
|
* Add {@link ResourceType}s to the transaction synchronously.
|
|
77
76
|
*
|
|
78
|
-
* Unlike {@link addResources}, this method will throw an error if the
|
|
79
|
-
*
|
|
77
|
+
* Unlike {@link addResources}, this method will throw an error if the transaction is exclusive and the resources
|
|
78
|
+
* cannot be locked.
|
|
80
79
|
*/
|
|
81
80
|
addResourcesSync(...resources: Resource[]): void;
|
|
82
81
|
|