@matter/general 0.13.0-alpha.0-20250403-1e0d4620e → 0.13.0-alpha.0-20250405-5f5f0caa

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
- "__#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;
147
+ "__#14998@#participants": Set<Participant>;
148
+ "__#14998@#roles": Map<{}, Participant>;
149
+ "__#14998@#resources": Set<Resource>;
150
+ "__#14998@#status": Status;
151
+ "__#14998@#waitingOn"?: Iterable<Transaction>;
152
+ "__#14998@#via": string;
153
+ "__#14998@#shared"?: import("../index.js").Observable<[]>;
154
+ "__#14998@#closed"?: import("../index.js").Observable<[]>;
155
+ "__#14998@#isAsync": boolean;
156
+ "__#14998@#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
- "__#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;
178
+ "__#14998@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
179
+ "__#14998@#executePreCommit"(): MaybePromise<void>;
180
+ "__#14998@#executeCommit"(): MaybePromise;
181
+ "__#14998@#executeCommit1"(): MaybePromise;
182
+ "__#14998@#executeCommit2"(): Promise<void> | undefined;
183
+ "__#14998@#executePostCommit"(participants: Participant[]): MaybePromise;
184
+ "__#14998@#executeRollback"(): Promise<void> | undefined;
185
+ "__#14998@#locksChanged"(resources: Set<Resource>, how?: string): void;
186
+ "__#14998@#assertAvailable"(): void;
187
187
  };
188
188
  Status: typeof Status;
189
189
  Resource: typeof Resource;
@@ -31,7 +31,7 @@ export declare class Mutex implements PromiseLike<unknown> {
31
31
  */
32
32
  terminate(cleanup?: () => PromiseLike<void>): void;
33
33
  /**
34
- * Execute a task immediately if it is a function.
34
+ * Activate a task.
35
35
  */
36
36
  protected initiateTask(task: PromiseLike<unknown> | (() => PromiseLike<unknown>)): Promise<unknown>;
37
37
  }
@@ -108,13 +108,13 @@ class Mutex {
108
108
  }
109
109
  }
110
110
  /**
111
- * Execute a task immediately if it is a function.
111
+ * Activate a task.
112
112
  */
113
113
  async initiateTask(task) {
114
114
  if (typeof task === "function") {
115
115
  task = task();
116
116
  }
117
- return Promise.resolve(task).catch((cause) => logger.error(`Error initializing ${this.#owner} worker:`, cause));
117
+ return Promise.resolve(task).catch((cause) => logger.error(`Unhandled error in ${this.#owner} worker:`, cause));
118
118
  }
119
119
  }
120
120
  //# sourceMappingURL=Mutex.js.map
@@ -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
- "__#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;
147
+ "__#14998@#participants": Set<Participant>;
148
+ "__#14998@#roles": Map<{}, Participant>;
149
+ "__#14998@#resources": Set<Resource>;
150
+ "__#14998@#status": Status;
151
+ "__#14998@#waitingOn"?: Iterable<Transaction>;
152
+ "__#14998@#via": string;
153
+ "__#14998@#shared"?: import("../index.js").Observable<[]>;
154
+ "__#14998@#closed"?: import("../index.js").Observable<[]>;
155
+ "__#14998@#isAsync": boolean;
156
+ "__#14998@#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
- "__#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;
178
+ "__#14998@#finalize"(status: Status, why: string, finalizer: () => MaybePromise): Promise<void> | undefined;
179
+ "__#14998@#executePreCommit"(): MaybePromise<void>;
180
+ "__#14998@#executeCommit"(): MaybePromise;
181
+ "__#14998@#executeCommit1"(): MaybePromise;
182
+ "__#14998@#executeCommit2"(): Promise<void> | undefined;
183
+ "__#14998@#executePostCommit"(participants: Participant[]): MaybePromise;
184
+ "__#14998@#executeRollback"(): Promise<void> | undefined;
185
+ "__#14998@#locksChanged"(resources: Set<Resource>, how?: string): void;
186
+ "__#14998@#assertAvailable"(): void;
187
187
  };
188
188
  Status: typeof Status;
189
189
  Resource: typeof Resource;
@@ -31,7 +31,7 @@ export declare class Mutex implements PromiseLike<unknown> {
31
31
  */
32
32
  terminate(cleanup?: () => PromiseLike<void>): void;
33
33
  /**
34
- * Execute a task immediately if it is a function.
34
+ * Activate a task.
35
35
  */
36
36
  protected initiateTask(task: PromiseLike<unknown> | (() => PromiseLike<unknown>)): Promise<unknown>;
37
37
  }
@@ -85,13 +85,13 @@ class Mutex {
85
85
  }
86
86
  }
87
87
  /**
88
- * Execute a task immediately if it is a function.
88
+ * Activate a task.
89
89
  */
90
90
  async initiateTask(task) {
91
91
  if (typeof task === "function") {
92
92
  task = task();
93
93
  }
94
- return Promise.resolve(task).catch((cause) => logger.error(`Error initializing ${this.#owner} worker:`, cause));
94
+ return Promise.resolve(task).catch((cause) => logger.error(`Unhandled error in ${this.#owner} worker:`, cause));
95
95
  }
96
96
  }
97
97
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/general",
3
- "version": "0.13.0-alpha.0-20250403-1e0d4620e",
3
+ "version": "0.13.0-alpha.0-20250405-5f5f0caa",
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-20250403-1e0d4620e"
39
+ "@matter/testing": "0.13.0-alpha.0-20250405-5f5f0caa"
40
40
  },
41
41
  "files": [
42
42
  "dist/**/*",
package/src/util/Mutex.ts CHANGED
@@ -105,12 +105,12 @@ export class Mutex implements PromiseLike<unknown> {
105
105
  }
106
106
 
107
107
  /**
108
- * Execute a task immediately if it is a function.
108
+ * Activate a task.
109
109
  */
110
110
  protected async initiateTask(task: PromiseLike<unknown> | (() => PromiseLike<unknown>)) {
111
111
  if (typeof task === "function") {
112
112
  task = task();
113
113
  }
114
- return Promise.resolve(task).catch(cause => logger.error(`Error initializing ${this.#owner} worker:`, cause));
114
+ return Promise.resolve(task).catch(cause => logger.error(`Unhandled error in ${this.#owner} worker:`, cause));
115
115
  }
116
116
  }