@geekmidas/constructs 3.0.9 → 3.0.10
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/CHANGELOG.md +10 -0
- package/dist/{Endpoint-CE7qHX5S.d.cts → Endpoint-BoTfIVxN.d.cts} +2 -2
- package/dist/{Endpoint-CE7qHX5S.d.cts.map → Endpoint-BoTfIVxN.d.cts.map} +1 -1
- package/dist/{HonoEndpointAdaptor-Dl8BW_9u.cjs → HonoEndpointAdaptor-DNn3-dHv.cjs} +3 -3
- package/dist/{HonoEndpointAdaptor-Dl8BW_9u.cjs.map → HonoEndpointAdaptor-DNn3-dHv.cjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-nHYMdbBi.mjs → HonoEndpointAdaptor-cpttJfsS.mjs} +3 -3
- package/dist/{HonoEndpointAdaptor-nHYMdbBi.mjs.map → HonoEndpointAdaptor-cpttJfsS.mjs.map} +1 -1
- package/dist/adaptors/aws.cjs +3 -3
- package/dist/adaptors/aws.d.cts +2 -2
- package/dist/adaptors/aws.mjs +3 -3
- package/dist/adaptors/hono.cjs +3 -3
- package/dist/adaptors/hono.d.cts +2 -2
- package/dist/adaptors/hono.mjs +3 -3
- package/dist/adaptors/testing.cjs +3 -3
- package/dist/adaptors/testing.d.cts +2 -2
- package/dist/adaptors/testing.mjs +3 -3
- package/dist/crons/index.cjs +1 -1
- package/dist/crons/index.d.cts +1 -1
- package/dist/crons/index.mjs +1 -1
- package/dist/endpoints/index.cjs +2 -2
- package/dist/endpoints/index.d.cts +4 -4
- package/dist/endpoints/index.mjs +2 -2
- package/dist/functions/index.cjs +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/{functions-GmSHFbpr.mjs → functions-DN9d6sgj.mjs} +1 -1
- package/dist/{functions-GmSHFbpr.mjs.map → functions-DN9d6sgj.mjs.map} +1 -1
- package/dist/{functions-DiaRAdfp.cjs → functions-yrAtvBor.cjs} +1 -1
- package/dist/{functions-DiaRAdfp.cjs.map → functions-yrAtvBor.cjs.map} +1 -1
- package/dist/{index-CzIMpK-e.d.cts → index-6U4XAuUI.d.cts} +5 -5
- package/dist/{index-CzIMpK-e.d.cts.map → index-6U4XAuUI.d.cts.map} +1 -1
- package/dist/{lazyAccessors-5h-aWohM.mjs → lazyAccessors-BPPR05EA.mjs} +2 -2
- package/dist/{lazyAccessors-5h-aWohM.mjs.map → lazyAccessors-BPPR05EA.mjs.map} +1 -1
- package/dist/{lazyAccessors-Bc1u42WC.cjs → lazyAccessors-BzMEdmis.cjs} +2 -2
- package/dist/{lazyAccessors-Bc1u42WC.cjs.map → lazyAccessors-BzMEdmis.cjs.map} +1 -1
- package/package.json +12 -12
- package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/constructs",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -83,31 +83,31 @@
|
|
|
83
83
|
"zod": "~4.1.13",
|
|
84
84
|
"@geekmidas/audit": "^2.0.0",
|
|
85
85
|
"@geekmidas/cache": "^1.1.0",
|
|
86
|
-
"@geekmidas/envkit": "^1.0.5",
|
|
87
86
|
"@geekmidas/db": "^1.0.1",
|
|
87
|
+
"@geekmidas/envkit": "^1.0.6",
|
|
88
88
|
"@geekmidas/errors": "^1.0.0",
|
|
89
|
-
"@geekmidas/events": "^1.1.
|
|
89
|
+
"@geekmidas/events": "^1.1.2",
|
|
90
90
|
"@geekmidas/logger": "^1.0.1",
|
|
91
91
|
"@geekmidas/rate-limit": "^2.0.0",
|
|
92
|
+
"@geekmidas/schema": "^1.0.1",
|
|
92
93
|
"@geekmidas/services": "^1.0.1",
|
|
93
|
-
"@geekmidas/testkit": "^1.0.
|
|
94
|
-
"@geekmidas/schema": "^1.0.0"
|
|
94
|
+
"@geekmidas/testkit": "^1.0.6"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@middy/core": ">=6.3.1",
|
|
98
98
|
"@types/aws-lambda": ">=8.10.92",
|
|
99
99
|
"hono": ">=4.8.2",
|
|
100
100
|
"msw": ">=2.0.0",
|
|
101
|
-
"@geekmidas/envkit": "^1.0.5",
|
|
102
|
-
"@geekmidas/errors": "^1.0.0",
|
|
103
101
|
"@geekmidas/audit": "^2.0.0",
|
|
102
|
+
"@geekmidas/cache": "^1.1.0",
|
|
103
|
+
"@geekmidas/db": "^1.0.1",
|
|
104
|
+
"@geekmidas/envkit": "^1.0.6",
|
|
105
|
+
"@geekmidas/errors": "^1.0.0",
|
|
106
|
+
"@geekmidas/events": "^1.1.2",
|
|
104
107
|
"@geekmidas/logger": "^1.0.1",
|
|
105
|
-
"@geekmidas/events": "^1.1.0",
|
|
106
|
-
"@geekmidas/schema": "^1.0.0",
|
|
107
108
|
"@geekmidas/rate-limit": "^2.0.0",
|
|
108
|
-
"@geekmidas/
|
|
109
|
-
"@geekmidas/
|
|
110
|
-
"@geekmidas/db": "^1.0.1"
|
|
109
|
+
"@geekmidas/schema": "^1.0.1",
|
|
110
|
+
"@geekmidas/services": "^1.0.1"
|
|
111
111
|
},
|
|
112
112
|
"peerDependenciesMeta": {
|
|
113
113
|
"@geekmidas/audit": {
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
import type { Service } from '@geekmidas/services';
|
|
9
9
|
import { ServiceDiscovery } from '@geekmidas/services';
|
|
10
10
|
import { Hono } from 'hono';
|
|
11
|
+
import { Client } from 'pg';
|
|
11
12
|
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
|
12
13
|
import { z } from 'zod';
|
|
13
14
|
import { e } from '../EndpointFactory';
|
|
@@ -18,18 +19,33 @@ type OrderEvent =
|
|
|
18
19
|
| PublishableMessage<'notification.sent', { orderId: string; type: string }>;
|
|
19
20
|
|
|
20
21
|
const POSTGRES_URL = 'postgres://geekmidas:geekmidas@localhost:5432/geekmidas';
|
|
22
|
+
const TEST_SCHEMA = 'pgboss_hono_publisher_test';
|
|
21
23
|
|
|
22
24
|
const uniqueQueue = () =>
|
|
23
25
|
`test-${Date.now()}-${Math.random().toString(36).substring(7)}`;
|
|
24
26
|
|
|
27
|
+
// Drop the test schema before pg-boss runs. Without this, a stale schema left
|
|
28
|
+
// behind by an older pg-boss version trips v12's migrator because it sees the
|
|
29
|
+
// `version` table but not the new `job_common` table.
|
|
30
|
+
async function dropTestSchema() {
|
|
31
|
+
const client = new Client({ connectionString: POSTGRES_URL });
|
|
32
|
+
await client.connect();
|
|
33
|
+
try {
|
|
34
|
+
await client.query(`DROP SCHEMA IF EXISTS "${TEST_SCHEMA}" CASCADE`);
|
|
35
|
+
} finally {
|
|
36
|
+
await client.end();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
25
40
|
describe('HonoEndpoint with PgBoss Publisher', () => {
|
|
26
41
|
let connection: PgBossConnection;
|
|
27
42
|
let envParser: EnvironmentParser<{}>;
|
|
28
43
|
|
|
29
44
|
beforeAll(async () => {
|
|
45
|
+
await dropTestSchema();
|
|
30
46
|
connection = new PgBossConnection({
|
|
31
47
|
connectionString: POSTGRES_URL,
|
|
32
|
-
schema:
|
|
48
|
+
schema: TEST_SCHEMA,
|
|
33
49
|
});
|
|
34
50
|
await connection.connect();
|
|
35
51
|
envParser = new EnvironmentParser({});
|