@matter/general 0.13.0-alpha.0-20250401-82b90831a → 0.13.0-alpha.0-20250403-1e0d4620e
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.
|
@@ -144,16 +144,16 @@ export declare const Transaction: {
|
|
|
144
144
|
*/
|
|
145
145
|
act<T>(via: string, actor: (transaction: Transaction) => MaybePromise<T>): MaybePromise<T>;
|
|
146
146
|
ReadOnly: {
|
|
147
|
-
"__#
|
|
148
|
-
"__#
|
|
149
|
-
"__#
|
|
150
|
-
"__#
|
|
151
|
-
"__#
|
|
152
|
-
"__#
|
|
153
|
-
"__#
|
|
154
|
-
"__#
|
|
155
|
-
"__#
|
|
156
|
-
"__#
|
|
147
|
+
"__#15019@#participants": Set<Participant>;
|
|
148
|
+
"__#15019@#roles": Map<{}, Participant>;
|
|
149
|
+
"__#15019@#resources": Set<Resource>;
|
|
150
|
+
"__#15019@#status": Status;
|
|
151
|
+
"__#15019@#waitingOn"?: Iterable<Transaction>;
|
|
152
|
+
"__#15019@#via": string;
|
|
153
|
+
"__#15019@#shared"?: import("../index.js").Observable<[]>;
|
|
154
|
+
"__#15019@#closed"?: import("../index.js").Observable<[]>;
|
|
155
|
+
"__#15019@#isAsync": boolean;
|
|
156
|
+
"__#15019@#reportingLocks": boolean;
|
|
157
157
|
close(): void;
|
|
158
158
|
readonly via: string;
|
|
159
159
|
readonly status: Status;
|
|
@@ -175,15 +175,15 @@ export declare const Transaction: {
|
|
|
175
175
|
waitFor(others: Set<Transaction>): Promise<void>;
|
|
176
176
|
toString(): string;
|
|
177
177
|
treatAsSlow(): void;
|
|
178
|
-
"__#
|
|
179
|
-
"__#
|
|
180
|
-
"__#
|
|
181
|
-
"__#
|
|
182
|
-
"__#
|
|
183
|
-
"__#
|
|
184
|
-
"__#
|
|
185
|
-
"__#
|
|
186
|
-
"__#
|
|
178
|
+
"__#15019@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
|
|
179
|
+
"__#15019@#executePreCommit"(): MaybePromise<void>;
|
|
180
|
+
"__#15019@#executeCommit"(): MaybePromise;
|
|
181
|
+
"__#15019@#executeCommit1"(): MaybePromise;
|
|
182
|
+
"__#15019@#executeCommit2"(): Promise<void> | undefined;
|
|
183
|
+
"__#15019@#executePostCommit"(participants: Participant[]): MaybePromise;
|
|
184
|
+
"__#15019@#executeRollback"(): Promise<void> | undefined;
|
|
185
|
+
"__#15019@#locksChanged"(resources: Set<Resource>, how?: string): void;
|
|
186
|
+
"__#15019@#assertAvailable"(): void;
|
|
187
187
|
};
|
|
188
188
|
Status: typeof Status;
|
|
189
189
|
Resource: typeof Resource;
|
package/dist/cjs/util/Number.js
CHANGED
|
@@ -88,9 +88,9 @@ function cropValueRange(value, min, max) {
|
|
|
88
88
|
function addValueWithOverflow(value, add, min, max) {
|
|
89
89
|
const newValue = value + add;
|
|
90
90
|
if (newValue < min) {
|
|
91
|
-
return newValue
|
|
91
|
+
return newValue - min + max;
|
|
92
92
|
} else if (newValue > max) {
|
|
93
|
-
return newValue - max
|
|
93
|
+
return newValue - max + min;
|
|
94
94
|
}
|
|
95
95
|
return newValue;
|
|
96
96
|
}
|
|
@@ -144,16 +144,16 @@ export declare const Transaction: {
|
|
|
144
144
|
*/
|
|
145
145
|
act<T>(via: string, actor: (transaction: Transaction) => MaybePromise<T>): MaybePromise<T>;
|
|
146
146
|
ReadOnly: {
|
|
147
|
-
"__#
|
|
148
|
-
"__#
|
|
149
|
-
"__#
|
|
150
|
-
"__#
|
|
151
|
-
"__#
|
|
152
|
-
"__#
|
|
153
|
-
"__#
|
|
154
|
-
"__#
|
|
155
|
-
"__#
|
|
156
|
-
"__#
|
|
147
|
+
"__#15019@#participants": Set<Participant>;
|
|
148
|
+
"__#15019@#roles": Map<{}, Participant>;
|
|
149
|
+
"__#15019@#resources": Set<Resource>;
|
|
150
|
+
"__#15019@#status": Status;
|
|
151
|
+
"__#15019@#waitingOn"?: Iterable<Transaction>;
|
|
152
|
+
"__#15019@#via": string;
|
|
153
|
+
"__#15019@#shared"?: import("../index.js").Observable<[]>;
|
|
154
|
+
"__#15019@#closed"?: import("../index.js").Observable<[]>;
|
|
155
|
+
"__#15019@#isAsync": boolean;
|
|
156
|
+
"__#15019@#reportingLocks": boolean;
|
|
157
157
|
close(): void;
|
|
158
158
|
readonly via: string;
|
|
159
159
|
readonly status: Status;
|
|
@@ -175,15 +175,15 @@ export declare const Transaction: {
|
|
|
175
175
|
waitFor(others: Set<Transaction>): Promise<void>;
|
|
176
176
|
toString(): string;
|
|
177
177
|
treatAsSlow(): void;
|
|
178
|
-
"__#
|
|
179
|
-
"__#
|
|
180
|
-
"__#
|
|
181
|
-
"__#
|
|
182
|
-
"__#
|
|
183
|
-
"__#
|
|
184
|
-
"__#
|
|
185
|
-
"__#
|
|
186
|
-
"__#
|
|
178
|
+
"__#15019@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
|
|
179
|
+
"__#15019@#executePreCommit"(): MaybePromise<void>;
|
|
180
|
+
"__#15019@#executeCommit"(): MaybePromise;
|
|
181
|
+
"__#15019@#executeCommit1"(): MaybePromise;
|
|
182
|
+
"__#15019@#executeCommit2"(): Promise<void> | undefined;
|
|
183
|
+
"__#15019@#executePostCommit"(participants: Participant[]): MaybePromise;
|
|
184
|
+
"__#15019@#executeRollback"(): Promise<void> | undefined;
|
|
185
|
+
"__#15019@#locksChanged"(resources: Set<Resource>, how?: string): void;
|
|
186
|
+
"__#15019@#assertAvailable"(): void;
|
|
187
187
|
};
|
|
188
188
|
Status: typeof Status;
|
|
189
189
|
Resource: typeof Resource;
|
package/dist/esm/util/Number.js
CHANGED
|
@@ -44,9 +44,9 @@ function cropValueRange(value, min, max) {
|
|
|
44
44
|
function addValueWithOverflow(value, add, min, max) {
|
|
45
45
|
const newValue = value + add;
|
|
46
46
|
if (newValue < min) {
|
|
47
|
-
return newValue
|
|
47
|
+
return newValue - min + max;
|
|
48
48
|
} else if (newValue > max) {
|
|
49
|
-
return newValue - max
|
|
49
|
+
return newValue - max + min;
|
|
50
50
|
}
|
|
51
51
|
return newValue;
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/general",
|
|
3
|
-
"version": "0.13.0-alpha.0-
|
|
3
|
+
"version": "0.13.0-alpha.0-20250403-1e0d4620e",
|
|
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.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@matter/testing": "0.13.0-alpha.0-
|
|
39
|
+
"@matter/testing": "0.13.0-alpha.0-20250403-1e0d4620e"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist/**/*",
|
package/src/util/Number.ts
CHANGED
|
@@ -63,9 +63,9 @@ export function cropValueRange(value: number, min: number, max: number): number
|
|
|
63
63
|
export function addValueWithOverflow(value: number, add: number, min: number, max: number): number {
|
|
64
64
|
const newValue = value + add;
|
|
65
65
|
if (newValue < min) {
|
|
66
|
-
return newValue
|
|
66
|
+
return newValue - min + max;
|
|
67
67
|
} else if (newValue > max) {
|
|
68
|
-
return newValue - max
|
|
68
|
+
return newValue - max + min;
|
|
69
69
|
}
|
|
70
70
|
return newValue;
|
|
71
71
|
}
|