@fedify/postgres 2.3.12-dev.2365 → 2.3.12
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
|
@@ -308,10 +308,15 @@ var PostgresMessageQueue = class {
|
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
310
|
* Initializes the message queue table if it does not already exist.
|
|
311
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
312
|
+
* call retries initialization.
|
|
311
313
|
*/
|
|
312
314
|
initialize() {
|
|
313
315
|
if (this.#initialized) return Promise.resolve();
|
|
314
|
-
return this.#initPromise ??= this.#doInitialize()
|
|
316
|
+
return this.#initPromise ??= this.#doInitialize().catch((error) => {
|
|
317
|
+
this.#initPromise = void 0;
|
|
318
|
+
throw error;
|
|
319
|
+
});
|
|
315
320
|
}
|
|
316
321
|
async #doInitialize() {
|
|
317
322
|
logger.debug("Initializing the message queue table {tableName}...", { tableName: this.#tableName });
|
package/dist/mq.d.cts
CHANGED
|
@@ -73,6 +73,8 @@ declare class PostgresMessageQueue implements MessageQueue {
|
|
|
73
73
|
listen(handler: (message: any) => void | Promise<void>, options?: MessageQueueListenOptions): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Initializes the message queue table if it does not already exist.
|
|
76
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
77
|
+
* call retries initialization.
|
|
76
78
|
*/
|
|
77
79
|
initialize(): Promise<void>;
|
|
78
80
|
/**
|
package/dist/mq.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ declare class PostgresMessageQueue implements MessageQueue {
|
|
|
73
73
|
listen(handler: (message: any) => void | Promise<void>, options?: MessageQueueListenOptions): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Initializes the message queue table if it does not already exist.
|
|
76
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
77
|
+
* call retries initialization.
|
|
76
78
|
*/
|
|
77
79
|
initialize(): Promise<void>;
|
|
78
80
|
/**
|
package/dist/mq.js
CHANGED
|
@@ -305,10 +305,15 @@ var PostgresMessageQueue = class {
|
|
|
305
305
|
}
|
|
306
306
|
/**
|
|
307
307
|
* Initializes the message queue table if it does not already exist.
|
|
308
|
+
* Concurrent calls share one initialization attempt. If it fails, a later
|
|
309
|
+
* call retries initialization.
|
|
308
310
|
*/
|
|
309
311
|
initialize() {
|
|
310
312
|
if (this.#initialized) return Promise.resolve();
|
|
311
|
-
return this.#initPromise ??= this.#doInitialize()
|
|
313
|
+
return this.#initPromise ??= this.#doInitialize().catch((error) => {
|
|
314
|
+
this.#initPromise = void 0;
|
|
315
|
+
throw error;
|
|
316
|
+
});
|
|
312
317
|
}
|
|
313
318
|
async #doInitialize() {
|
|
314
319
|
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.3.12
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"description": "PostgreSQL drivers for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"postgres": "^3.4.7",
|
|
77
|
-
"@fedify/fedify": "^2.3.12
|
|
77
|
+
"@fedify/fedify": "^2.3.12"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
81
81
|
"tsdown": "^0.22.0",
|
|
82
82
|
"typescript": "^6.0.0",
|
|
83
83
|
"@fedify/fixture": "^2.0.0",
|
|
84
|
-
"@fedify/testing": "^2.3.12
|
|
84
|
+
"@fedify/testing": "^2.3.12"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build:self": "tsdown",
|