@fedify/postgres 1.9.6-dev.2118 → 1.9.7
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/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +3 -12
- package/dist/kv.cjs +6 -10
- package/dist/kv.js +2 -6
- package/dist/mod.cjs +5 -7
- package/dist/mod.js +2 -5
- package/dist/mq.cjs +10 -13
- package/dist/mq.js +3 -8
- package/dist/utils.cjs +3 -8
- package/dist/utils.js +3 -7
- package/package.json +3 -3
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region rolldown:runtime
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
5
3
|
var __create = Object.create;
|
|
6
4
|
var __defProp = Object.defineProperty;
|
|
7
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -22,12 +20,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
20
|
value: mod,
|
|
23
21
|
enumerable: true
|
|
24
22
|
}) : target, mod));
|
|
25
|
-
|
|
26
23
|
//#endregion
|
|
27
|
-
|
|
28
|
-
Object.defineProperty(exports, '__toESM', {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () {
|
|
31
|
-
return __toESM;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
24
|
+
exports.__toESM = __toESM;
|
package/dist/kv.cjs
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const require_utils = require('./utils.cjs');
|
|
6
|
-
const __logtape_logtape = require_rolldown_runtime.__toESM(require("@logtape/logtape"));
|
|
7
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_utils = require("./utils.cjs");
|
|
8
5
|
//#region src/kv.ts
|
|
9
|
-
const logger = (0,
|
|
6
|
+
const logger = (0, require("@logtape/logtape").getLogger)([
|
|
10
7
|
"fedify",
|
|
11
8
|
"postgres",
|
|
12
9
|
"kv"
|
|
@@ -111,6 +108,5 @@ var PostgresKvStore = class {
|
|
|
111
108
|
return this.#sql.json(JSON.stringify(value));
|
|
112
109
|
}
|
|
113
110
|
};
|
|
114
|
-
|
|
115
111
|
//#endregion
|
|
116
|
-
exports.PostgresKvStore = PostgresKvStore;
|
|
112
|
+
exports.PostgresKvStore = PostgresKvStore;
|
package/dist/kv.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
4
2
|
import { driverSerializesJson } from "./utils.js";
|
|
5
3
|
import { getLogger } from "@logtape/logtape";
|
|
6
|
-
|
|
7
4
|
//#region src/kv.ts
|
|
8
5
|
const logger = getLogger([
|
|
9
6
|
"fedify",
|
|
@@ -110,6 +107,5 @@ var PostgresKvStore = class {
|
|
|
110
107
|
return this.#sql.json(JSON.stringify(value));
|
|
111
108
|
}
|
|
112
109
|
};
|
|
113
|
-
|
|
114
110
|
//#endregion
|
|
115
|
-
export { PostgresKvStore };
|
|
111
|
+
export { PostgresKvStore };
|
package/dist/mod.cjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const require_mq = require('./mq.cjs');
|
|
6
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_kv = require("./kv.cjs");
|
|
4
|
+
const require_mq = require("./mq.cjs");
|
|
7
5
|
exports.PostgresKvStore = require_kv.PostgresKvStore;
|
|
8
|
-
exports.PostgresMessageQueue = require_mq.PostgresMessageQueue;
|
|
6
|
+
exports.PostgresMessageQueue = require_mq.PostgresMessageQueue;
|
package/dist/mod.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
4
2
|
import { PostgresKvStore } from "./kv.js";
|
|
5
3
|
import { PostgresMessageQueue } from "./mq.js";
|
|
6
|
-
|
|
7
|
-
export { PostgresKvStore, PostgresMessageQueue };
|
|
4
|
+
export { PostgresKvStore, PostgresMessageQueue };
|
package/dist/mq.cjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_utils = require("./utils.cjs");
|
|
5
|
+
let _logtape_logtape = require("@logtape/logtape");
|
|
6
|
+
let postgres = require("postgres");
|
|
7
|
+
postgres = require_runtime.__toESM(postgres);
|
|
9
8
|
//#region src/mq.ts
|
|
10
|
-
const logger = (0,
|
|
9
|
+
const logger = (0, _logtape_logtape.getLogger)([
|
|
11
10
|
"fedify",
|
|
12
11
|
"postgres",
|
|
13
12
|
"mq"
|
|
@@ -118,8 +117,7 @@ var PostgresMessageQueue = class {
|
|
|
118
117
|
};
|
|
119
118
|
const timeouts = /* @__PURE__ */ new Set();
|
|
120
119
|
const listen = await this.#sql.listen(this.#channelName, async (delay) => {
|
|
121
|
-
const
|
|
122
|
-
const durationMs = duration.total("millisecond");
|
|
120
|
+
const durationMs = Temporal.Duration.from(delay).total("millisecond");
|
|
123
121
|
if (durationMs < 1) await poll();
|
|
124
122
|
else timeouts.add(setTimeout(poll, durationMs));
|
|
125
123
|
}, poll);
|
|
@@ -181,6 +179,5 @@ var PostgresMessageQueue = class {
|
|
|
181
179
|
return this.#sql.json(JSON.stringify(value));
|
|
182
180
|
}
|
|
183
181
|
};
|
|
184
|
-
|
|
185
182
|
//#endregion
|
|
186
|
-
exports.PostgresMessageQueue = PostgresMessageQueue;
|
|
183
|
+
exports.PostgresMessageQueue = PostgresMessageQueue;
|
package/dist/mq.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
4
2
|
import { driverSerializesJson } from "./utils.js";
|
|
5
3
|
import { getLogger } from "@logtape/logtape";
|
|
6
4
|
import postgres from "postgres";
|
|
7
|
-
|
|
8
5
|
//#region src/mq.ts
|
|
9
6
|
const logger = getLogger([
|
|
10
7
|
"fedify",
|
|
@@ -117,8 +114,7 @@ var PostgresMessageQueue = class {
|
|
|
117
114
|
};
|
|
118
115
|
const timeouts = /* @__PURE__ */ new Set();
|
|
119
116
|
const listen = await this.#sql.listen(this.#channelName, async (delay) => {
|
|
120
|
-
const
|
|
121
|
-
const durationMs = duration.total("millisecond");
|
|
117
|
+
const durationMs = Temporal.Duration.from(delay).total("millisecond");
|
|
122
118
|
if (durationMs < 1) await poll();
|
|
123
119
|
else timeouts.add(setTimeout(poll, durationMs));
|
|
124
120
|
}, poll);
|
|
@@ -180,6 +176,5 @@ var PostgresMessageQueue = class {
|
|
|
180
176
|
return this.#sql.json(JSON.stringify(value));
|
|
181
177
|
}
|
|
182
178
|
};
|
|
183
|
-
|
|
184
179
|
//#endregion
|
|
185
|
-
export { PostgresMessageQueue };
|
|
180
|
+
export { PostgresMessageQueue };
|
package/dist/utils.cjs
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
5
2
|
//#region src/utils.ts
|
|
6
3
|
async function driverSerializesJson(sql) {
|
|
7
|
-
|
|
8
|
-
return result[0].test === "{\"foo\":1}";
|
|
4
|
+
return (await sql`SELECT ${sql.json("{\"foo\":1}")}::jsonb AS test;`)[0].test === "{\"foo\":1}";
|
|
9
5
|
}
|
|
10
|
-
|
|
11
6
|
//#endregion
|
|
12
|
-
exports.driverSerializesJson = driverSerializesJson;
|
|
7
|
+
exports.driverSerializesJson = driverSerializesJson;
|
package/dist/utils.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
4
2
|
//#region src/utils.ts
|
|
5
3
|
async function driverSerializesJson(sql) {
|
|
6
|
-
|
|
7
|
-
return result[0].test === "{\"foo\":1}";
|
|
4
|
+
return (await sql`SELECT ${sql.json("{\"foo\":1}")}::jsonb AS test;`)[0].test === "{\"foo\":1}";
|
|
8
5
|
}
|
|
9
|
-
|
|
10
6
|
//#endregion
|
|
11
|
-
export { driverSerializesJson };
|
|
7
|
+
export { driverSerializesJson };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/postgres",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "PostgreSQL drivers for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"postgres": "^3.4.7",
|
|
77
|
-
"@fedify/fedify": "^1.9.
|
|
77
|
+
"@fedify/fedify": "^1.9.7"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
81
|
-
"tsdown": "^0.
|
|
81
|
+
"tsdown": "^0.21.6",
|
|
82
82
|
"typescript": "^5.9.2"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|