@fedify/postgres 2.2.16 → 2.2.17
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/mq.cjs +6 -1
- package/dist/mq.d.cts +2 -0
- package/dist/mq.d.ts +2 -0
- package/dist/mq.js +6 -1
- package/package.json +3 -3
package/dist/mq.cjs
CHANGED
|
@@ -290,10 +290,15 @@ var PostgresMessageQueue = class {
|
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
292
|
* Initializes the message queue table if it does not already exist.
|
|
293
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
294
|
+
* call retries initialization.
|
|
293
295
|
*/
|
|
294
296
|
initialize() {
|
|
295
297
|
if (this.#initialized) return Promise.resolve();
|
|
296
|
-
return this.#initPromise ??= this.#doInitialize()
|
|
298
|
+
return this.#initPromise ??= this.#doInitialize().catch((error) => {
|
|
299
|
+
this.#initPromise = void 0;
|
|
300
|
+
throw error;
|
|
301
|
+
});
|
|
297
302
|
}
|
|
298
303
|
async #doInitialize() {
|
|
299
304
|
logger.debug("Initializing the message queue table {tableName}...", { tableName: this.#tableName });
|
package/dist/mq.d.cts
CHANGED
|
@@ -72,6 +72,8 @@ declare class PostgresMessageQueue implements MessageQueue {
|
|
|
72
72
|
listen(handler: (message: any) => void | Promise<void>, options?: MessageQueueListenOptions): Promise<void>;
|
|
73
73
|
/**
|
|
74
74
|
* Initializes the message queue table if it does not already exist.
|
|
75
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
76
|
+
* call retries initialization.
|
|
75
77
|
*/
|
|
76
78
|
initialize(): Promise<void>;
|
|
77
79
|
/**
|
package/dist/mq.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ declare class PostgresMessageQueue implements MessageQueue {
|
|
|
72
72
|
listen(handler: (message: any) => void | Promise<void>, options?: MessageQueueListenOptions): Promise<void>;
|
|
73
73
|
/**
|
|
74
74
|
* Initializes the message queue table if it does not already exist.
|
|
75
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
76
|
+
* call retries initialization.
|
|
75
77
|
*/
|
|
76
78
|
initialize(): Promise<void>;
|
|
77
79
|
/**
|
package/dist/mq.js
CHANGED
|
@@ -287,10 +287,15 @@ var PostgresMessageQueue = class {
|
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
289
|
* Initializes the message queue table if it does not already exist.
|
|
290
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
291
|
+
* call retries initialization.
|
|
290
292
|
*/
|
|
291
293
|
initialize() {
|
|
292
294
|
if (this.#initialized) return Promise.resolve();
|
|
293
|
-
return this.#initPromise ??= this.#doInitialize()
|
|
295
|
+
return this.#initPromise ??= this.#doInitialize().catch((error) => {
|
|
296
|
+
this.#initPromise = void 0;
|
|
297
|
+
throw error;
|
|
298
|
+
});
|
|
294
299
|
}
|
|
295
300
|
async #doInitialize() {
|
|
296
301
|
logger.debug("Initializing the message queue table {tableName}...", { tableName: this.#tableName });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/postgres",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"description": "PostgreSQL drivers for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"postgres": "^3.4.7",
|
|
77
|
-
"@fedify/fedify": "^2.2.
|
|
77
|
+
"@fedify/fedify": "^2.2.17"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
81
81
|
"tsdown": "^0.21.6",
|
|
82
82
|
"typescript": "^6.0.0",
|
|
83
|
-
"@fedify/testing": "^2.2.
|
|
83
|
+
"@fedify/testing": "^2.2.17",
|
|
84
84
|
"@fedify/fixture": "^2.0.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|