@openreceive/http 0.4.17 → 0.4.19

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.
@@ -7,7 +7,7 @@ import {
7
7
  isServiceErrorShape,
8
8
  mapHostRouteError,
9
9
  startNotificationWorker
10
- } from "./chunk-67MZJBIF.js";
10
+ } from "./chunk-5BKH35YW.js";
11
11
  export {
12
12
  HostError,
13
13
  HttpError,
@@ -290,11 +290,11 @@ function paymentInsert(input) {
290
290
  // src/sql-payments.ts
291
291
  import { randomUUID } from "crypto";
292
292
  import {
293
+ OPENRECEIVE_ATTEMPT_EXPIRY_GRACE_SECONDS as OPENRECEIVE_ATTEMPT_EXPIRY_GRACE_SECONDS2,
293
294
  OPENRECEIVE_PAYMENTS_SCHEMA_VERSION,
294
295
  paymentsDdlStatements,
295
- unixSeconds as unixSeconds2,
296
- OPENRECEIVE_ATTEMPT_EXPIRY_GRACE_SECONDS as OPENRECEIVE_ATTEMPT_EXPIRY_GRACE_SECONDS2,
297
- redactSecrets
296
+ redactSecrets,
297
+ unixSeconds as unixSeconds2
298
298
  } from "@openreceive/core";
299
299
 
300
300
  // src/sql-adapters.ts
@@ -509,10 +509,10 @@ function createSqlPayments(db, options = {}) {
509
509
  const statement = (sql) => adapter.dialect === "postgres" ? toPgPlaceholders(sql) : sql;
510
510
  const lockReference = async (tx, reference) => {
511
511
  if (adapter.dialect === "postgres") {
512
- await tx.query(statement("SELECT pg_advisory_xact_lock(hashtextextended(?, ?))"), [
513
- reference,
514
- ADVISORY_LOCK_SEED
515
- ]);
512
+ await tx.query(
513
+ statement("SELECT 1 AS locked FROM pg_advisory_xact_lock(hashtextextended(?, ?))"),
514
+ [reference, ADVISORY_LOCK_SEED]
515
+ );
516
516
  }
517
517
  };
518
518
  const rowsForReference = async (tx, reference) => {
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  startReconciler,
35
35
  typeOrmDb,
36
36
  webRequest
37
- } from "./chunk-67MZJBIF.js";
37
+ } from "./chunk-5BKH35YW.js";
38
38
  export {
39
39
  HostError,
40
40
  HttpError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openreceive/http",
3
- "version": "0.4.17",
3
+ "version": "0.4.19",
4
4
  "description": "Node.js HTTP routes and payment storage for Bitcoin Lightning checkout, with optional USDT, USDC, SOL and ETH swaps.",
5
5
  "keywords": [
6
6
  "bitcoin",
@@ -17,8 +17,8 @@
17
17
  "main": "./dist/index.js",
18
18
  "types": "./dist/index.d.ts",
19
19
  "dependencies": {
20
- "@openreceive/core": "0.4.17",
21
- "@openreceive/node": "0.4.17"
20
+ "@openreceive/core": "0.4.19",
21
+ "@openreceive/node": "0.4.19"
22
22
  },
23
23
  "exports": {
24
24
  ".": {