@pattern-stack/codegen 0.17.1 → 0.18.0
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 +36 -0
- package/README.md +106 -2
- package/dist/{chunk-SFQRETXJ.js → chunk-2VGVSL2D.js} +6 -6
- package/dist/{chunk-VNBC3VXM.js → chunk-3A34R6CI.js} +7 -7
- package/dist/{chunk-FVNAU7VO.js → chunk-7MMS36AN.js} +6 -6
- package/dist/{chunk-FWRL7BZ5.js → chunk-C5E7H553.js} +25 -15
- package/dist/chunk-C5E7H553.js.map +1 -0
- package/dist/{chunk-IOQMMH6C.js → chunk-CFFTPWHM.js} +79 -4
- package/dist/chunk-CFFTPWHM.js.map +1 -0
- package/dist/{chunk-HOIRY5XP.js → chunk-EWYI5GGJ.js} +10 -10
- package/dist/{chunk-BHZP6LOV.js → chunk-IN3EWFB4.js} +4 -4
- package/dist/{chunk-CZQUOIDY.js → chunk-J7JMVS2B.js} +4 -4
- package/dist/{chunk-KSTZIULO.js → chunk-K2I6XIK5.js} +4 -4
- package/dist/{chunk-T6SCOJF4.js → chunk-NXHL5YII.js} +4 -4
- package/dist/{chunk-JA7GJDNI.js → chunk-PKDS6QIJ.js} +4 -4
- package/dist/{chunk-MYQIQ27N.js → chunk-Q6LRJ4VI.js} +51 -2
- package/dist/chunk-Q6LRJ4VI.js.map +1 -0
- package/dist/{chunk-EJBK7I4F.js → chunk-R4BPUUB5.js} +3 -3
- package/dist/{chunk-4PFF3ED4.js → chunk-RKNW56RU.js} +5 -5
- package/dist/{chunk-SGSWVNNB.js → chunk-TBGTMALE.js} +4 -4
- package/dist/{chunk-GM3RMJIJ.js → chunk-VHAR2BGH.js} +4 -4
- package/dist/{chunk-DUMI2J5M.js → chunk-VQOAATIG.js} +4 -4
- package/dist/{chunk-HPS554L4.js → chunk-X6BP6LI5.js} +6 -6
- package/dist/{chunk-PSDVGPQR.js → chunk-YZLBU6O2.js} +9 -9
- package/dist/runtime/shared/openapi/index.js +3 -3
- package/dist/runtime/subsystems/analytics/analytics.module.js +2 -2
- package/dist/runtime/subsystems/analytics/index.js +4 -4
- package/dist/runtime/subsystems/auth/auth.module.js +3 -3
- package/dist/runtime/subsystems/auth/index.js +10 -10
- package/dist/runtime/subsystems/bridge/bridge-delivery-handler.js +2 -2
- package/dist/runtime/subsystems/bridge/bridge-delivery.drizzle-backend.js +2 -2
- package/dist/runtime/subsystems/bridge/bridge-outbox-drain-hook.js +6 -6
- package/dist/runtime/subsystems/bridge/bridge.module.js +17 -17
- package/dist/runtime/subsystems/bridge/index.js +24 -24
- package/dist/runtime/subsystems/cache/cache.module.js +1 -1
- package/dist/runtime/subsystems/cache/index.js +3 -3
- package/dist/runtime/subsystems/events/event-bus.drizzle-backend.js +3 -3
- package/dist/runtime/subsystems/events/events.module.js +6 -6
- package/dist/runtime/subsystems/events/generated/bus.js +2 -2
- package/dist/runtime/subsystems/events/generated/index.js +2 -2
- package/dist/runtime/subsystems/events/index.js +10 -10
- package/dist/runtime/subsystems/index.js +64 -64
- package/dist/runtime/subsystems/integration/index.js +10 -10
- package/dist/runtime/subsystems/integration/integration.module.js +2 -2
- package/dist/runtime/subsystems/jobs/index.js +21 -21
- package/dist/runtime/subsystems/jobs/job-orchestrator.bullmq-backend.js +5 -5
- package/dist/runtime/subsystems/jobs/job-orchestrator.drizzle-backend.js +3 -3
- package/dist/runtime/subsystems/jobs/job-orchestrator.memory-backend.js +2 -2
- package/dist/runtime/subsystems/jobs/job-run-service.drizzle-backend.js +3 -3
- package/dist/runtime/subsystems/jobs/job-run-service.memory-backend.js +2 -2
- package/dist/runtime/subsystems/jobs/job-worker.d.ts +8 -0
- package/dist/runtime/subsystems/jobs/job-worker.js +3 -3
- package/dist/runtime/subsystems/jobs/job-worker.module.js +11 -11
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js +9 -9
- package/dist/runtime/subsystems/jobs/pg-notify.d.ts +25 -1
- package/dist/runtime/subsystems/jobs/pg-notify.js +1 -1
- package/dist/src/cli/index.js +1408 -245
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.js +5 -5
- package/package.json +1 -1
- package/runtime/subsystems/jobs/job-worker.ts +29 -11
- package/runtime/subsystems/jobs/pg-notify.ts +63 -3
- package/src/config/locations.mjs +0 -6
- package/src/config/paths.mjs +0 -13
- package/templates/entity/new/prompt.js +12 -88
- package/dist/chunk-FWRL7BZ5.js.map +0 -1
- package/dist/chunk-IOQMMH6C.js.map +0 -1
- package/dist/chunk-MYQIQ27N.js.map +0 -1
- package/templates/entity/new/frontend/_inject-entities-entry.ejs.t +0 -7
- package/templates/entity/new/frontend/_inject-entities-import.ejs.t +0 -7
- package/templates/entity/new/frontend/collections/_ensure-anchor-collections.ejs.t +0 -10
- package/templates/entity/new/frontend/collections/_inject-index.ejs.t +0 -9
- package/templates/entity/new/frontend/collections/_inject-schema-import.ejs.t +0 -9
- package/templates/entity/new/frontend/collections/collection.ejs.t +0 -86
- package/templates/entity/new/frontend/collections/collections-base.ejs.t +0 -35
- package/templates/entity/new/frontend/entity/collection.ejs.t +0 -173
- package/templates/entity/new/frontend/entity/combined.ejs.t +0 -505
- package/templates/entity/new/frontend/entity/fields.ejs.t +0 -105
- package/templates/entity/new/frontend/entity/hooks.ejs.t +0 -74
- package/templates/entity/new/frontend/entity/index.ejs.t +0 -22
- package/templates/entity/new/frontend/entity/mutation-hooks.ejs.t +0 -85
- package/templates/entity/new/frontend/entity/mutations.ejs.t +0 -39
- package/templates/entity/new/frontend/entity/types.ejs.t +0 -60
- package/templates/entity/new/frontend/generated/_inject-index-export.ejs.t +0 -7
- package/templates/entity/new/frontend/generated/_inject-index-import.ejs.t +0 -7
- package/templates/entity/new/frontend/generated/_inject-index-registry.ejs.t +0 -7
- package/templates/entity/new/frontend/store/_inject-collection-import.ejs.t +0 -9
- package/templates/entity/new/frontend/store/_inject-collections.ejs.t +0 -9
- package/templates/entity/new/frontend/store/_inject-entity.ejs.t +0 -9
- package/templates/entity/new/frontend/store/_inject-import.ejs.t +0 -9
- package/templates/entity/new/frontend/store/_inject-lookups.ejs.t +0 -9
- package/templates/entity/new/frontend/store/_inject-resolve.ejs.t +0 -10
- package/templates/entity/new/frontend/store/hooks.ejs.t +0 -73
- package/templates/entity/new/frontend/unified-entity.ejs.t +0 -29
- /package/dist/{chunk-SFQRETXJ.js.map → chunk-2VGVSL2D.js.map} +0 -0
- /package/dist/{chunk-VNBC3VXM.js.map → chunk-3A34R6CI.js.map} +0 -0
- /package/dist/{chunk-FVNAU7VO.js.map → chunk-7MMS36AN.js.map} +0 -0
- /package/dist/{chunk-HOIRY5XP.js.map → chunk-EWYI5GGJ.js.map} +0 -0
- /package/dist/{chunk-BHZP6LOV.js.map → chunk-IN3EWFB4.js.map} +0 -0
- /package/dist/{chunk-CZQUOIDY.js.map → chunk-J7JMVS2B.js.map} +0 -0
- /package/dist/{chunk-KSTZIULO.js.map → chunk-K2I6XIK5.js.map} +0 -0
- /package/dist/{chunk-T6SCOJF4.js.map → chunk-NXHL5YII.js.map} +0 -0
- /package/dist/{chunk-JA7GJDNI.js.map → chunk-PKDS6QIJ.js.map} +0 -0
- /package/dist/{chunk-EJBK7I4F.js.map → chunk-R4BPUUB5.js.map} +0 -0
- /package/dist/{chunk-4PFF3ED4.js.map → chunk-RKNW56RU.js.map} +0 -0
- /package/dist/{chunk-SGSWVNNB.js.map → chunk-TBGTMALE.js.map} +0 -0
- /package/dist/{chunk-GM3RMJIJ.js.map → chunk-VHAR2BGH.js.map} +0 -0
- /package/dist/{chunk-DUMI2J5M.js.map → chunk-VQOAATIG.js.map} +0 -0
- /package/dist/{chunk-HPS554L4.js.map → chunk-X6BP6LI5.js.map} +0 -0
- /package/dist/{chunk-PSDVGPQR.js.map → chunk-YZLBU6O2.js.map} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DrizzleJobStepService
|
|
3
|
-
} from "./chunk-DV4RV2DC.js";
|
|
4
|
-
import {
|
|
5
|
-
DrizzleJobOrchestrator
|
|
6
|
-
} from "./chunk-FVNAU7VO.js";
|
|
7
1
|
import {
|
|
8
2
|
MemoryJobOrchestrator
|
|
9
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQOAATIG.js";
|
|
10
4
|
import {
|
|
11
5
|
MemoryJobStepService
|
|
12
6
|
} from "./chunk-PNZSGAB2.js";
|
|
13
7
|
import {
|
|
14
8
|
DrizzleJobRunService
|
|
15
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3A34R6CI.js";
|
|
16
10
|
import {
|
|
17
11
|
MemoryJobRunService
|
|
18
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IN3EWFB4.js";
|
|
19
13
|
import {
|
|
20
14
|
MemoryJobStore
|
|
21
15
|
} from "./chunk-SNQ3TOWP.js";
|
|
16
|
+
import {
|
|
17
|
+
DrizzleJobStepService
|
|
18
|
+
} from "./chunk-DV4RV2DC.js";
|
|
19
|
+
import {
|
|
20
|
+
DrizzleJobOrchestrator
|
|
21
|
+
} from "./chunk-7MMS36AN.js";
|
|
22
22
|
import {
|
|
23
23
|
BULLMQ_CONNECTION,
|
|
24
24
|
BULLMQ_RESOLVED_CONFIG,
|
|
@@ -114,4 +114,4 @@ JobsDomainModule = __decorateClass([
|
|
|
114
114
|
export {
|
|
115
115
|
JobsDomainModule
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-EWYI5GGJ.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoryJobStore
|
|
3
3
|
} from "./chunk-SNQ3TOWP.js";
|
|
4
|
-
import {
|
|
5
|
-
MissingTenantIdError
|
|
6
|
-
} from "./chunk-T4BIIU5E.js";
|
|
7
4
|
import {
|
|
8
5
|
clampLimit,
|
|
9
6
|
decodeKeysetCursor,
|
|
10
7
|
encodeKeysetCursor,
|
|
11
8
|
toJobRunSummary
|
|
12
9
|
} from "./chunk-L3LZWWSX.js";
|
|
10
|
+
import {
|
|
11
|
+
MissingTenantIdError
|
|
12
|
+
} from "./chunk-T4BIIU5E.js";
|
|
13
13
|
import {
|
|
14
14
|
JOBS_MULTI_TENANT,
|
|
15
15
|
JOB_ORCHESTRATOR
|
|
@@ -209,4 +209,4 @@ function compareBy(a, b, order) {
|
|
|
209
209
|
export {
|
|
210
210
|
MemoryJobRunService
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-IN3EWFB4.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CubeAnalyticsBackend
|
|
3
3
|
} from "./chunk-7B3RYX45.js";
|
|
4
|
+
import {
|
|
5
|
+
NoopAnalyticsBackend
|
|
6
|
+
} from "./chunk-J37YWU7Y.js";
|
|
4
7
|
import {
|
|
5
8
|
ANALYTICS_QUERY,
|
|
6
9
|
CUBE_API_SECRET,
|
|
7
10
|
CUBE_API_URL
|
|
8
11
|
} from "./chunk-6I7ULIN6.js";
|
|
9
|
-
import {
|
|
10
|
-
NoopAnalyticsBackend
|
|
11
|
-
} from "./chunk-J37YWU7Y.js";
|
|
12
12
|
import {
|
|
13
13
|
__decorateClass
|
|
14
14
|
} from "./chunk-2E224ZSN.js";
|
|
@@ -50,4 +50,4 @@ AnalyticsModule = __decorateClass([
|
|
|
50
50
|
export {
|
|
51
51
|
AnalyticsModule
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-J7JMVS2B.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
bridgeDelivery
|
|
3
|
-
} from "./chunk-2TVVBC53.js";
|
|
4
1
|
import {
|
|
5
2
|
assertTenantId
|
|
6
3
|
} from "./chunk-6DWFJNIK.js";
|
|
4
|
+
import {
|
|
5
|
+
bridgeDelivery
|
|
6
|
+
} from "./chunk-2TVVBC53.js";
|
|
7
7
|
import {
|
|
8
8
|
BRIDGE_MULTI_TENANT
|
|
9
9
|
} from "./chunk-4LH67P4U.js";
|
|
@@ -119,4 +119,4 @@ DrizzleBridgeDeliveryRepo = __decorateClass([
|
|
|
119
119
|
export {
|
|
120
120
|
DrizzleBridgeDeliveryRepo
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-K2I6XIK5.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EnvEncryptionKey
|
|
3
3
|
} from "./chunk-IP4OO26U.js";
|
|
4
|
+
import {
|
|
5
|
+
MemoryOAuthStateStore
|
|
6
|
+
} from "./chunk-QLTJSCE6.js";
|
|
4
7
|
import {
|
|
5
8
|
AuthController
|
|
6
9
|
} from "./chunk-SZVPIHWE.js";
|
|
7
10
|
import {
|
|
8
11
|
DrizzleOAuthStateStore
|
|
9
12
|
} from "./chunk-N5OTOWTP.js";
|
|
10
|
-
import {
|
|
11
|
-
MemoryOAuthStateStore
|
|
12
|
-
} from "./chunk-QLTJSCE6.js";
|
|
13
13
|
import {
|
|
14
14
|
AUTH_OPTIONS,
|
|
15
15
|
ENCRYPTION_KEY,
|
|
@@ -89,4 +89,4 @@ AuthModule = __decorateClass([
|
|
|
89
89
|
export {
|
|
90
90
|
AuthModule
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-NXHL5YII.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MemoryCursorStore
|
|
3
|
-
} from "./chunk-AHV4GDYM.js";
|
|
4
1
|
import {
|
|
5
2
|
DrizzleIntegrationRunRecorder
|
|
6
3
|
} from "./chunk-YK5JEVLX.js";
|
|
@@ -17,6 +14,9 @@ import {
|
|
|
17
14
|
INTEGRATION_MULTI_TENANT,
|
|
18
15
|
INTEGRATION_RUN_RECORDER
|
|
19
16
|
} from "./chunk-S7C6TIIF.js";
|
|
17
|
+
import {
|
|
18
|
+
MemoryCursorStore
|
|
19
|
+
} from "./chunk-AHV4GDYM.js";
|
|
20
20
|
import {
|
|
21
21
|
DeepEqualDiffer
|
|
22
22
|
} from "./chunk-JEINYUJH.js";
|
|
@@ -84,4 +84,4 @@ IntegrationModule = __decorateClass([
|
|
|
84
84
|
export {
|
|
85
85
|
IntegrationModule
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-PKDS6QIJ.js.map
|
|
@@ -27,24 +27,60 @@ var PgNotifyListener = class {
|
|
|
27
27
|
backoffMaxMs;
|
|
28
28
|
/** WARN-once gate so a flapping listener doesn't spam the log. */
|
|
29
29
|
warnedDown = false;
|
|
30
|
+
/**
|
|
31
|
+
* LISTEN-NOTIFY-2 — the in-flight `connect()` promise, set while a checkout is
|
|
32
|
+
* mid-`await`. `stop()` awaits it so a `stop()` that races a still-resolving
|
|
33
|
+
* `connect()` can't return before the connect either assigns `this.client`
|
|
34
|
+
* (then released by `releaseClient`) or self-releases the checked-out client.
|
|
35
|
+
* Without this, a `stop()` arriving during `pool.connect()`'s await saw
|
|
36
|
+
* `this.client === null` (nothing to release), then `connect()` resumed,
|
|
37
|
+
* assigned the client, and issued `LISTEN` — leaking an ESTABLISHED socket
|
|
38
|
+
* holding `LISTEN <channel>` forever past `app.close()`.
|
|
39
|
+
*/
|
|
40
|
+
connecting = null;
|
|
30
41
|
/** Begin listening. Idempotent-ish: a second call while connected is a no-op. */
|
|
31
42
|
async start() {
|
|
32
43
|
this.stopped = false;
|
|
33
44
|
await this.connect();
|
|
34
45
|
}
|
|
35
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Stop listening + release the connection. Safe to call repeatedly and
|
|
48
|
+
* race-safe against an in-flight `connect()` (LISTEN-NOTIFY-2): it sets
|
|
49
|
+
* `stopped` first (so a resuming `connect()` self-releases its checkout),
|
|
50
|
+
* then awaits any in-flight connect, then releases whatever client landed.
|
|
51
|
+
*/
|
|
36
52
|
async stop() {
|
|
37
53
|
this.stopped = true;
|
|
38
54
|
if (this.reconnectTimer) {
|
|
39
55
|
clearTimeout(this.reconnectTimer);
|
|
40
56
|
this.reconnectTimer = null;
|
|
41
57
|
}
|
|
58
|
+
const inflight = this.connecting;
|
|
59
|
+
if (inflight) {
|
|
60
|
+
try {
|
|
61
|
+
await inflight;
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
42
65
|
await this.releaseClient();
|
|
43
66
|
}
|
|
44
67
|
async connect() {
|
|
45
68
|
if (this.stopped) return;
|
|
69
|
+
const attempt = this.doConnect();
|
|
70
|
+
this.connecting = attempt;
|
|
71
|
+
try {
|
|
72
|
+
await attempt;
|
|
73
|
+
} finally {
|
|
74
|
+
if (this.connecting === attempt) this.connecting = null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async doConnect() {
|
|
46
78
|
try {
|
|
47
79
|
const client = await this.opts.pool.connect();
|
|
80
|
+
if (this.stopped) {
|
|
81
|
+
await this.releaseRawClient(client);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
48
84
|
client.on("notification", (msg) => {
|
|
49
85
|
if (msg.channel !== this.opts.channel) return;
|
|
50
86
|
try {
|
|
@@ -58,6 +94,10 @@ var PgNotifyListener = class {
|
|
|
58
94
|
this.handleDrop();
|
|
59
95
|
});
|
|
60
96
|
await client.query(`LISTEN ${this.opts.channel}`);
|
|
97
|
+
if (this.stopped) {
|
|
98
|
+
await this.releaseRawClient(client);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
61
101
|
this.client = client;
|
|
62
102
|
if (this.warnedDown) {
|
|
63
103
|
this.logger.log(
|
|
@@ -99,6 +139,15 @@ var PgNotifyListener = class {
|
|
|
99
139
|
const client = this.client;
|
|
100
140
|
this.client = null;
|
|
101
141
|
if (!client) return;
|
|
142
|
+
await this.releaseRawClient(client);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Tear down a raw checked-out client (LISTEN-NOTIFY-2). Used both by the
|
|
146
|
+
* normal `releaseClient()` path and by the connect-vs-stop race bail-outs,
|
|
147
|
+
* where the client was checked out but never assigned to `this.client`.
|
|
148
|
+
* Destroys (`release(true)`) so a half-listening socket is never reused.
|
|
149
|
+
*/
|
|
150
|
+
async releaseRawClient(client) {
|
|
102
151
|
try {
|
|
103
152
|
client.removeAllListeners?.("notification");
|
|
104
153
|
client.removeAllListeners?.("error");
|
|
@@ -115,4 +164,4 @@ export {
|
|
|
115
164
|
pgNotify,
|
|
116
165
|
PgNotifyListener
|
|
117
166
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-Q6LRJ4VI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../runtime/subsystems/jobs/pg-notify.ts"],"sourcesContent":["/**\n * PgNotifyListener + pgNotify — Postgres LISTEN/NOTIFY wakeups\n * (LISTEN-NOTIFY-1, dogfood gap #7).\n *\n * The drizzle jobs worker and events outbox drainer poll on an interval today\n * (default 1 s/hop). With `listen_notify` enabled, a row write that makes work\n * claimable emits an in-transaction `pg_notify(...)`; a dedicated listener\n * connection wakes the polling loop the moment the writing transaction commits.\n *\n * Two halves:\n * - `pgNotify(tx, channel, payload)` — fire an in-tx `pg_notify`. MUST be\n * called with the SAME transaction handle as the row write it announces, so\n * Postgres delivers it only on commit (the transactional-outbox guarantee).\n * - `PgNotifyListener` — owns a single long-lived `pg.PoolClient`, issues\n * `LISTEN <channel>`, forwards each notification's payload to an owner\n * callback, debounces bursts, and reconnects with capped backoff on drop.\n *\n * **Polling never stops.** This is a wake-early optimisation layered ON TOP of\n * interval polling. A lost notification (listener down, pooler eats the LISTEN,\n * etc.) degrades to today's poll latency, never to lost work — the claim/drain\n * query remains the source of truth.\n *\n * **PgBouncer caveat:** session-scoped `LISTEN` does not survive a\n * transaction-mode pooler. `listen_notify` requires a direct (or session-mode)\n * connection; behind a transaction pooler notifies are simply never received and\n * the system degrades to polling. See the jobs config block / skill.\n */\n// TODO(logging-subsystem): swap to ILogger once ADR-028 lands\nimport { Logger } from '@nestjs/common';\nimport { sql } from 'drizzle-orm';\nimport type { DrizzleClient } from '../../types/drizzle';\nimport type { DrizzleTransaction } from '../events/event-bus.protocol';\n\n/** Channel the jobs worker LISTENs on; payload = pool name. */\nexport const JOBS_WAKE_CHANNEL = 'codegen_jobs_wake';\n/** Channel the events drainer LISTENs on; payload = event pool (or ''). */\nexport const EVENTS_WAKE_CHANNEL = 'codegen_events_wake';\n\n/**\n * Emit an in-transaction `pg_notify`. Call with the SAME `tx`/client handle as\n * the row write being announced so delivery is gated on commit. `payload` is a\n * short plain string (a pool name); it is NOT JSON — the wake is a hint and the\n * subsequent claim/drain query is authoritative. Channel names are framework\n * constants (never user input), so the `set_config`-free literal-channel form is\n * safe; the payload is bound as a parameter.\n */\nexport async function pgNotify(\n tx: DrizzleClient | DrizzleTransaction,\n channel: string,\n payload: string,\n): Promise<void> {\n const client = tx as DrizzleClient;\n // `pg_notify(channel, payload)` is the function form (vs the `NOTIFY chan,\n // 'payload'` statement form) precisely because it accepts bound parameters —\n // the payload is parameterised, never string-concatenated.\n await client.execute(sql`select pg_notify(${channel}, ${payload})`);\n}\n\n/** Minimal structural view of the `pg` Client/PoolClient surface we touch. */\ninterface PgListenClient {\n query(text: string): Promise<unknown>;\n on(event: 'notification', cb: (msg: { channel: string; payload?: string }) => void): void;\n on(event: 'error', cb: (err: Error) => void): void;\n removeAllListeners?: (event?: string) => void;\n release?: (err?: boolean) => void;\n end?: () => Promise<void>;\n}\n\n/** Minimal structural view of the `pg` Pool's `connect()`. */\ninterface PgPoolish {\n connect(): Promise<PgListenClient>;\n}\n\nconst DEFAULT_BACKOFF_MIN_MS = 100;\nconst DEFAULT_BACKOFF_MAX_MS = 5_000;\n\nexport interface PgNotifyListenerOptions {\n /** Channel to LISTEN on. */\n channel: string;\n /**\n * The underlying `pg.Pool` — obtained from `drizzleClient.$client`. A\n * dedicated `PoolClient` is checked out and held for the listener's lifetime\n * (separate from the query pool so a slow query never delays a wake).\n */\n pool: PgPoolish;\n /**\n * Called for every notification on `channel`, with the raw payload string\n * (`''` when Postgres delivers an empty payload). The owner decides whether\n * the payload is relevant (e.g. \"is this one of my pools?\") and debounces its\n * own claim cycle.\n */\n onNotify: (payload: string) => void;\n /** Label used in log lines (e.g. 'jobs:interactive', 'events'). */\n label: string;\n backoffMinMs?: number;\n backoffMaxMs?: number;\n}\n\n/**\n * Holds a dedicated listener connection and forwards notifications to `onNotify`.\n * Reconnects with capped exponential backoff on drop; logs the first failure +\n * the recovery exactly once each so a flapping connection doesn't flood logs.\n */\nexport class PgNotifyListener {\n private readonly logger: Logger;\n private client: PgListenClient | null = null;\n private stopped = false;\n private reconnectTimer: ReturnType<typeof setTimeout> | null = null;\n private backoffMs: number;\n private readonly backoffMinMs: number;\n private readonly backoffMaxMs: number;\n /** WARN-once gate so a flapping listener doesn't spam the log. */\n private warnedDown = false;\n /**\n * LISTEN-NOTIFY-2 — the in-flight `connect()` promise, set while a checkout is\n * mid-`await`. `stop()` awaits it so a `stop()` that races a still-resolving\n * `connect()` can't return before the connect either assigns `this.client`\n * (then released by `releaseClient`) or self-releases the checked-out client.\n * Without this, a `stop()` arriving during `pool.connect()`'s await saw\n * `this.client === null` (nothing to release), then `connect()` resumed,\n * assigned the client, and issued `LISTEN` — leaking an ESTABLISHED socket\n * holding `LISTEN <channel>` forever past `app.close()`.\n */\n private connecting: Promise<void> | null = null;\n\n constructor(private readonly opts: PgNotifyListenerOptions) {\n this.logger = new Logger(`PgNotifyListener(${opts.label})`);\n this.backoffMinMs = opts.backoffMinMs ?? DEFAULT_BACKOFF_MIN_MS;\n this.backoffMaxMs = opts.backoffMaxMs ?? DEFAULT_BACKOFF_MAX_MS;\n this.backoffMs = this.backoffMinMs;\n }\n\n /** Begin listening. Idempotent-ish: a second call while connected is a no-op. */\n async start(): Promise<void> {\n this.stopped = false;\n await this.connect();\n }\n\n /**\n * Stop listening + release the connection. Safe to call repeatedly and\n * race-safe against an in-flight `connect()` (LISTEN-NOTIFY-2): it sets\n * `stopped` first (so a resuming `connect()` self-releases its checkout),\n * then awaits any in-flight connect, then releases whatever client landed.\n */\n async stop(): Promise<void> {\n this.stopped = true;\n if (this.reconnectTimer) {\n clearTimeout(this.reconnectTimer);\n this.reconnectTimer = null;\n }\n // Await an in-flight checkout so we don't return while a client is still\n // mid-`pool.connect()`. The resuming `connect()` sees `stopped` and either\n // self-releases its checkout or assigns `this.client`; either way the\n // `releaseClient()` below mops up.\n const inflight = this.connecting;\n if (inflight) {\n try {\n await inflight;\n } catch {\n // connect failures are handled inside connect(); ignore here.\n }\n }\n await this.releaseClient();\n }\n\n private async connect(): Promise<void> {\n if (this.stopped) return;\n // Track this checkout so a racing stop() can await it (LISTEN-NOTIFY-2).\n const attempt = this.doConnect();\n this.connecting = attempt;\n try {\n await attempt;\n } finally {\n if (this.connecting === attempt) this.connecting = null;\n }\n }\n\n private async doConnect(): Promise<void> {\n try {\n const client = await this.opts.pool.connect();\n // Re-check AFTER the await resolves: a stop() may have fired while this\n // checkout was in flight. If so, release the just-checked-out client\n // right here and bail BEFORE wiring handlers / issuing LISTEN — otherwise\n // we'd leak an ESTABLISHED listener socket past shutdown (LISTEN-NOTIFY-2).\n if (this.stopped) {\n await this.releaseRawClient(client);\n return;\n }\n client.on('notification', (msg) => {\n if (msg.channel !== this.opts.channel) return;\n try {\n this.opts.onNotify(msg.payload ?? '');\n } catch (err) {\n this.logger.error(`onNotify threw: ${(err as Error).message}`);\n }\n });\n client.on('error', (err) => {\n // A connection-level error is the signal to reconnect. Don't double-log\n // here — scheduleReconnect owns the WARN-once.\n this.logger.debug?.(`listener connection error: ${err.message}`);\n this.handleDrop();\n });\n await client.query(`LISTEN ${this.opts.channel}`);\n // A stop() could have fired during the LISTEN round-trip too — same guard.\n if (this.stopped) {\n await this.releaseRawClient(client);\n return;\n }\n this.client = client;\n // Recovery: only announce if we had previously warned about being down.\n if (this.warnedDown) {\n this.logger.log(\n `listener reconnected; LISTEN ${this.opts.channel} re-established`,\n );\n this.warnedDown = false;\n }\n this.backoffMs = this.backoffMinMs;\n } catch (err) {\n this.handleConnectFailure(err);\n }\n }\n\n /** Connection dropped after being established → reconnect. */\n private handleDrop(): void {\n if (this.stopped) return;\n void this.releaseClient().finally(() => this.scheduleReconnect());\n }\n\n /** Initial / reconnect `connect()` threw. */\n private handleConnectFailure(err: unknown): void {\n this.scheduleReconnect(err);\n }\n\n private scheduleReconnect(err?: unknown): void {\n if (this.stopped) return;\n if (!this.warnedDown) {\n this.warnedDown = true;\n this.logger.warn(\n `listener down — falling back to interval polling until reconnect. ` +\n `Cause: ${err instanceof Error ? err.message : 'connection lost'}. ` +\n `(This degrades latency, not durability — polling still drives all work.)`,\n );\n }\n if (this.reconnectTimer) clearTimeout(this.reconnectTimer);\n const delay = this.backoffMs;\n this.backoffMs = Math.min(this.backoffMs * 2, this.backoffMaxMs);\n this.reconnectTimer = setTimeout(() => {\n this.reconnectTimer = null;\n void this.connect();\n }, delay);\n }\n\n private async releaseClient(): Promise<void> {\n const client = this.client;\n this.client = null;\n if (!client) return;\n await this.releaseRawClient(client);\n }\n\n /**\n * Tear down a raw checked-out client (LISTEN-NOTIFY-2). Used both by the\n * normal `releaseClient()` path and by the connect-vs-stop race bail-outs,\n * where the client was checked out but never assigned to `this.client`.\n * Destroys (`release(true)`) so a half-listening socket is never reused.\n */\n private async releaseRawClient(client: PgListenClient): Promise<void> {\n try {\n client.removeAllListeners?.('notification');\n client.removeAllListeners?.('error');\n if (client.release) client.release(true);\n else if (client.end) await client.end();\n } catch {\n // best-effort teardown\n }\n }\n}\n"],"mappings":";AA4BA,SAAS,cAAc;AACvB,SAAS,WAAW;AAKb,IAAM,oBAAoB;AAE1B,IAAM,sBAAsB;AAUnC,eAAsB,SACpB,IACA,SACA,SACe;AACf,QAAM,SAAS;AAIf,QAAM,OAAO,QAAQ,uBAAuB,OAAO,KAAK,OAAO,GAAG;AACpE;AAiBA,IAAM,yBAAyB;AAC/B,IAAM,yBAAyB;AA6BxB,IAAM,mBAAN,MAAuB;AAAA,EAsB5B,YAA6B,MAA+B;AAA/B;AAC3B,SAAK,SAAS,IAAI,OAAO,oBAAoB,KAAK,KAAK,GAAG;AAC1D,SAAK,eAAe,KAAK,gBAAgB;AACzC,SAAK,eAAe,KAAK,gBAAgB;AACzC,SAAK,YAAY,KAAK;AAAA,EACxB;AAAA,EAL6B;AAAA,EArBZ;AAAA,EACT,SAAgC;AAAA,EAChC,UAAU;AAAA,EACV,iBAAuD;AAAA,EACvD;AAAA,EACS;AAAA,EACA;AAAA;AAAA,EAET,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWb,aAAmC;AAAA;AAAA,EAU3C,MAAM,QAAuB;AAC3B,SAAK,UAAU;AACf,UAAM,KAAK,QAAQ;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAsB;AAC1B,SAAK,UAAU;AACf,QAAI,KAAK,gBAAgB;AACvB,mBAAa,KAAK,cAAc;AAChC,WAAK,iBAAiB;AAAA,IACxB;AAKA,UAAM,WAAW,KAAK;AACtB,QAAI,UAAU;AACZ,UAAI;AACF,cAAM;AAAA,MACR,QAAQ;AAAA,MAER;AAAA,IACF;AACA,UAAM,KAAK,cAAc;AAAA,EAC3B;AAAA,EAEA,MAAc,UAAyB;AACrC,QAAI,KAAK,QAAS;AAElB,UAAM,UAAU,KAAK,UAAU;AAC/B,SAAK,aAAa;AAClB,QAAI;AACF,YAAM;AAAA,IACR,UAAE;AACA,UAAI,KAAK,eAAe,QAAS,MAAK,aAAa;AAAA,IACrD;AAAA,EACF;AAAA,EAEA,MAAc,YAA2B;AACvC,QAAI;AACF,YAAM,SAAS,MAAM,KAAK,KAAK,KAAK,QAAQ;AAK5C,UAAI,KAAK,SAAS;AAChB,cAAM,KAAK,iBAAiB,MAAM;AAClC;AAAA,MACF;AACA,aAAO,GAAG,gBAAgB,CAAC,QAAQ;AACjC,YAAI,IAAI,YAAY,KAAK,KAAK,QAAS;AACvC,YAAI;AACF,eAAK,KAAK,SAAS,IAAI,WAAW,EAAE;AAAA,QACtC,SAAS,KAAK;AACZ,eAAK,OAAO,MAAM,mBAAoB,IAAc,OAAO,EAAE;AAAA,QAC/D;AAAA,MACF,CAAC;AACD,aAAO,GAAG,SAAS,CAAC,QAAQ;AAG1B,aAAK,OAAO,QAAQ,8BAA8B,IAAI,OAAO,EAAE;AAC/D,aAAK,WAAW;AAAA,MAClB,CAAC;AACD,YAAM,OAAO,MAAM,UAAU,KAAK,KAAK,OAAO,EAAE;AAEhD,UAAI,KAAK,SAAS;AAChB,cAAM,KAAK,iBAAiB,MAAM;AAClC;AAAA,MACF;AACA,WAAK,SAAS;AAEd,UAAI,KAAK,YAAY;AACnB,aAAK,OAAO;AAAA,UACV,gCAAgC,KAAK,KAAK,OAAO;AAAA,QACnD;AACA,aAAK,aAAa;AAAA,MACpB;AACA,WAAK,YAAY,KAAK;AAAA,IACxB,SAAS,KAAK;AACZ,WAAK,qBAAqB,GAAG;AAAA,IAC/B;AAAA,EACF;AAAA;AAAA,EAGQ,aAAmB;AACzB,QAAI,KAAK,QAAS;AAClB,SAAK,KAAK,cAAc,EAAE,QAAQ,MAAM,KAAK,kBAAkB,CAAC;AAAA,EAClE;AAAA;AAAA,EAGQ,qBAAqB,KAAoB;AAC/C,SAAK,kBAAkB,GAAG;AAAA,EAC5B;AAAA,EAEQ,kBAAkB,KAAqB;AAC7C,QAAI,KAAK,QAAS;AAClB,QAAI,CAAC,KAAK,YAAY;AACpB,WAAK,aAAa;AAClB,WAAK,OAAO;AAAA,QACV,iFACY,eAAe,QAAQ,IAAI,UAAU,iBAAiB;AAAA,MAEpE;AAAA,IACF;AACA,QAAI,KAAK,eAAgB,cAAa,KAAK,cAAc;AACzD,UAAM,QAAQ,KAAK;AACnB,SAAK,YAAY,KAAK,IAAI,KAAK,YAAY,GAAG,KAAK,YAAY;AAC/D,SAAK,iBAAiB,WAAW,MAAM;AACrC,WAAK,iBAAiB;AACtB,WAAK,KAAK,QAAQ;AAAA,IACpB,GAAG,KAAK;AAAA,EACV;AAAA,EAEA,MAAc,gBAA+B;AAC3C,UAAM,SAAS,KAAK;AACpB,SAAK,SAAS;AACd,QAAI,CAAC,OAAQ;AACb,UAAM,KAAK,iBAAiB,MAAM;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAc,iBAAiB,QAAuC;AACpE,QAAI;AACF,aAAO,qBAAqB,cAAc;AAC1C,aAAO,qBAAqB,OAAO;AACnC,UAAI,OAAO,QAAS,QAAO,QAAQ,IAAI;AAAA,eAC9B,OAAO,IAAK,OAAM,OAAO,IAAI;AAAA,IACxC,QAAQ;AAAA,IAER;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TypedEventBus
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VHAR2BGH.js";
|
|
4
4
|
import {
|
|
5
5
|
DrizzleEventBus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RKNW56RU.js";
|
|
7
7
|
import {
|
|
8
8
|
MemoryEventBus
|
|
9
9
|
} from "./chunk-LQ6PYFU6.js";
|
|
@@ -152,4 +152,4 @@ EventsModule = __decorateClass([
|
|
|
152
152
|
export {
|
|
153
153
|
EventsModule
|
|
154
154
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-R4BPUUB5.js.map
|
|
@@ -2,13 +2,10 @@ import {
|
|
|
2
2
|
EVENTS_WAKE_CHANNEL,
|
|
3
3
|
PgNotifyListener,
|
|
4
4
|
pgNotify
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q6LRJ4VI.js";
|
|
6
6
|
import {
|
|
7
7
|
BRIDGE_OUTBOX_DRAIN_HOOK
|
|
8
8
|
} from "./chunk-4LH67P4U.js";
|
|
9
|
-
import {
|
|
10
|
-
domainEvents
|
|
11
|
-
} from "./chunk-OFRRBC7M.js";
|
|
12
9
|
import {
|
|
13
10
|
EVENTS_MODULE_OPTIONS
|
|
14
11
|
} from "./chunk-H5NH7KPE.js";
|
|
@@ -17,6 +14,9 @@ import {
|
|
|
17
14
|
decodeEventCursor,
|
|
18
15
|
encodeEventCursor
|
|
19
16
|
} from "./chunk-UQ5EHOH2.js";
|
|
17
|
+
import {
|
|
18
|
+
domainEvents
|
|
19
|
+
} from "./chunk-OFRRBC7M.js";
|
|
20
20
|
import {
|
|
21
21
|
DRIZZLE
|
|
22
22
|
} from "./chunk-U64T4YZE.js";
|
|
@@ -393,4 +393,4 @@ DrizzleEventBus = __decorateClass([
|
|
|
393
393
|
export {
|
|
394
394
|
DrizzleEventBus
|
|
395
395
|
};
|
|
396
|
-
//# sourceMappingURL=chunk-
|
|
396
|
+
//# sourceMappingURL=chunk-RKNW56RU.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertTenantId
|
|
3
3
|
} from "./chunk-6DWFJNIK.js";
|
|
4
|
-
import {
|
|
5
|
-
JOB_ORCHESTRATOR
|
|
6
|
-
} from "./chunk-ZPL74UQN.js";
|
|
7
4
|
import {
|
|
8
5
|
JobHandler,
|
|
9
6
|
JobHandlerBase
|
|
10
7
|
} from "./chunk-7P5ODGLA.js";
|
|
8
|
+
import {
|
|
9
|
+
JOB_ORCHESTRATOR
|
|
10
|
+
} from "./chunk-ZPL74UQN.js";
|
|
11
11
|
import {
|
|
12
12
|
BRIDGE_DELIVERY_REPO,
|
|
13
13
|
BRIDGE_MULTI_TENANT,
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
BRIDGE_DELIVERY_JOB_TYPE,
|
|
119
119
|
BridgeDeliveryHandler
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-TBGTMALE.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
eventPayloadSchemas
|
|
6
6
|
} from "./chunk-JRQO2IOF.js";
|
|
7
|
-
import {
|
|
8
|
-
MissingTenantIdError
|
|
9
|
-
} from "./chunk-V4AF6DI4.js";
|
|
10
7
|
import {
|
|
11
8
|
EVENTS_MULTI_TENANT,
|
|
12
9
|
EVENT_BUS
|
|
13
10
|
} from "./chunk-H5NH7KPE.js";
|
|
11
|
+
import {
|
|
12
|
+
MissingTenantIdError
|
|
13
|
+
} from "./chunk-V4AF6DI4.js";
|
|
14
14
|
import {
|
|
15
15
|
__decorateClass,
|
|
16
16
|
__decorateParam
|
|
@@ -89,4 +89,4 @@ TypedEventBus = __decorateClass([
|
|
|
89
89
|
export {
|
|
90
90
|
TypedEventBus
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-VHAR2BGH.js.map
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
JobTypeNotFoundError,
|
|
12
12
|
MissingTenantIdError
|
|
13
13
|
} from "./chunk-T4BIIU5E.js";
|
|
14
|
-
import {
|
|
15
|
-
JOBS_MULTI_TENANT
|
|
16
|
-
} from "./chunk-ZPL74UQN.js";
|
|
17
14
|
import {
|
|
18
15
|
FN_KEY_SENTINEL,
|
|
19
16
|
JobKeyFunctionUnavailableError,
|
|
20
17
|
keySelectorToTemplate
|
|
21
18
|
} from "./chunk-7P5ODGLA.js";
|
|
19
|
+
import {
|
|
20
|
+
JOBS_MULTI_TENANT
|
|
21
|
+
} from "./chunk-ZPL74UQN.js";
|
|
22
22
|
import {
|
|
23
23
|
__decorateClass,
|
|
24
24
|
__decorateParam
|
|
@@ -663,4 +663,4 @@ function serialiseError(err, attempt, retryable) {
|
|
|
663
663
|
export {
|
|
664
664
|
MemoryJobOrchestrator
|
|
665
665
|
};
|
|
666
|
-
//# sourceMappingURL=chunk-
|
|
666
|
+
//# sourceMappingURL=chunk-VQOAATIG.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JobWorker
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C5E7H553.js";
|
|
4
4
|
import {
|
|
5
5
|
JobsDomainModule
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EWYI5GGJ.js";
|
|
7
7
|
import {
|
|
8
8
|
BootValidationError,
|
|
9
9
|
ReservedPoolViolationError
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
allPoolNames,
|
|
19
19
|
loadPoolConfig
|
|
20
20
|
} from "./chunk-RHVN6NA7.js";
|
|
21
|
+
import {
|
|
22
|
+
HandlerRegistry
|
|
23
|
+
} from "./chunk-7P5ODGLA.js";
|
|
21
24
|
import {
|
|
22
25
|
JOB_ORCHESTRATOR,
|
|
23
26
|
JOB_RUN_SERVICE,
|
|
24
27
|
JOB_STEP_SERVICE
|
|
25
28
|
} from "./chunk-ZPL74UQN.js";
|
|
26
|
-
import {
|
|
27
|
-
HandlerRegistry
|
|
28
|
-
} from "./chunk-7P5ODGLA.js";
|
|
29
29
|
import {
|
|
30
30
|
tokenKey
|
|
31
31
|
} from "./chunk-GYGNEQSC.js";
|
|
@@ -290,4 +290,4 @@ export {
|
|
|
290
290
|
JobWorkerOrchestrator,
|
|
291
291
|
JobWorkerModule
|
|
292
292
|
};
|
|
293
|
-
//# sourceMappingURL=chunk-
|
|
293
|
+
//# sourceMappingURL=chunk-X6BP6LI5.js.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bridgeRegistry
|
|
3
3
|
} from "./chunk-5A432NZJ.js";
|
|
4
|
+
import {
|
|
5
|
+
BridgeOutboxDrainHook
|
|
6
|
+
} from "./chunk-2VGVSL2D.js";
|
|
4
7
|
import {
|
|
5
8
|
EventFlowService
|
|
6
9
|
} from "./chunk-5RT7JGKT.js";
|
|
7
10
|
import {
|
|
8
11
|
BRIDGE_RESERVED_POOLS
|
|
9
12
|
} from "./chunk-EDKJU5BO.js";
|
|
13
|
+
import {
|
|
14
|
+
BridgeDeliveryHandler
|
|
15
|
+
} from "./chunk-TBGTMALE.js";
|
|
10
16
|
import {
|
|
11
17
|
DrizzleBridgeDeliveryRepo
|
|
12
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K2I6XIK5.js";
|
|
13
19
|
import {
|
|
14
20
|
MemoryBridgeDeliveryRepo
|
|
15
21
|
} from "./chunk-4DOJBQTP.js";
|
|
16
|
-
import {
|
|
17
|
-
BridgeOutboxDrainHook
|
|
18
|
-
} from "./chunk-SFQRETXJ.js";
|
|
19
|
-
import {
|
|
20
|
-
BridgeDeliveryHandler
|
|
21
|
-
} from "./chunk-SGSWVNNB.js";
|
|
22
22
|
import {
|
|
23
23
|
BridgeReservedPoolsNotPolledError
|
|
24
24
|
} from "./chunk-NXXDZ6ZF.js";
|
|
25
25
|
import {
|
|
26
26
|
JOB_WORKER_MODULE_OPTIONS
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X6BP6LI5.js";
|
|
28
28
|
import {
|
|
29
29
|
BRIDGE_DELIVERY_REPO,
|
|
30
30
|
BRIDGE_MODULE_OPTIONS,
|
|
@@ -119,4 +119,4 @@ BridgeModule = __decorateClass([
|
|
|
119
119
|
export {
|
|
120
120
|
BridgeModule
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-YZLBU6O2.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OPENAPI_REGISTRY
|
|
3
|
+
} from "../../../chunk-PSXUNOVU.js";
|
|
1
4
|
import {
|
|
2
5
|
OpenApiRegistry
|
|
3
6
|
} from "../../../chunk-Y7GDG744.js";
|
|
@@ -9,9 +12,6 @@ import {
|
|
|
9
12
|
DuplicateSchemaError,
|
|
10
13
|
OpenApiPeerDepMissingError
|
|
11
14
|
} from "../../../chunk-YSLTTQLC.js";
|
|
12
|
-
import {
|
|
13
|
-
OPENAPI_REGISTRY
|
|
14
|
-
} from "../../../chunk-PSXUNOVU.js";
|
|
15
15
|
import "../../../chunk-2E224ZSN.js";
|
|
16
16
|
export {
|
|
17
17
|
DuplicateSchemaError,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnalyticsModule
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-J7JMVS2B.js";
|
|
4
4
|
import "../../../chunk-7B3RYX45.js";
|
|
5
|
-
import "../../../chunk-6I7ULIN6.js";
|
|
6
5
|
import "../../../chunk-J37YWU7Y.js";
|
|
6
|
+
import "../../../chunk-6I7ULIN6.js";
|
|
7
7
|
import "../../../chunk-GYGNEQSC.js";
|
|
8
8
|
import "../../../chunk-2E224ZSN.js";
|
|
9
9
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnalyticsModule
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-J7JMVS2B.js";
|
|
4
4
|
import {
|
|
5
5
|
CubeAnalyticsBackend
|
|
6
6
|
} from "../../../chunk-7B3RYX45.js";
|
|
7
|
+
import {
|
|
8
|
+
NoopAnalyticsBackend
|
|
9
|
+
} from "../../../chunk-J37YWU7Y.js";
|
|
7
10
|
import {
|
|
8
11
|
ANALYTICS_QUERY,
|
|
9
12
|
CUBE_API_SECRET,
|
|
10
13
|
CUBE_API_URL
|
|
11
14
|
} from "../../../chunk-6I7ULIN6.js";
|
|
12
|
-
import {
|
|
13
|
-
NoopAnalyticsBackend
|
|
14
|
-
} from "../../../chunk-J37YWU7Y.js";
|
|
15
15
|
import "../../../chunk-GYGNEQSC.js";
|
|
16
16
|
import "../../../chunk-2E224ZSN.js";
|
|
17
17
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthModule
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-NXHL5YII.js";
|
|
4
4
|
import "../../../chunk-IP4OO26U.js";
|
|
5
|
+
import "../../../chunk-QLTJSCE6.js";
|
|
5
6
|
import "../../../chunk-SZVPIHWE.js";
|
|
6
7
|
import "../../../chunk-N5OTOWTP.js";
|
|
7
|
-
import "../../../chunk-QLTJSCE6.js";
|
|
8
8
|
import "../../../chunk-BPARRK6F.js";
|
|
9
|
-
import "../../../chunk-6XY6ZMMD.js";
|
|
10
9
|
import "../../../chunk-NPFPZ2HO.js";
|
|
10
|
+
import "../../../chunk-6XY6ZMMD.js";
|
|
11
11
|
import "../../../chunk-GYGNEQSC.js";
|
|
12
12
|
import "../../../chunk-U64T4YZE.js";
|
|
13
13
|
import "../../../chunk-2E224ZSN.js";
|
|
@@ -2,9 +2,6 @@ import "../../../chunk-7C3FOSDI.js";
|
|
|
2
2
|
import {
|
|
3
3
|
OAuth2RefreshStrategy
|
|
4
4
|
} from "../../../chunk-M6QLSLPO.js";
|
|
5
|
-
import {
|
|
6
|
-
ConnectionBrokenError
|
|
7
|
-
} from "../../../chunk-2N4UG4VD.js";
|
|
8
5
|
import {
|
|
9
6
|
withAuthRetry
|
|
10
7
|
} from "../../../chunk-WL67FZGF.js";
|
|
@@ -17,24 +14,30 @@ import {
|
|
|
17
14
|
makeRequesterContextMiddleware,
|
|
18
15
|
resolveRequesterContext
|
|
19
16
|
} from "../../../chunk-OSQRXVG2.js";
|
|
17
|
+
import {
|
|
18
|
+
ConnectionBrokenError
|
|
19
|
+
} from "../../../chunk-2N4UG4VD.js";
|
|
20
20
|
import {
|
|
21
21
|
AuthModule
|
|
22
|
-
} from "../../../chunk-
|
|
22
|
+
} from "../../../chunk-NXHL5YII.js";
|
|
23
23
|
import {
|
|
24
24
|
EnvEncryptionKey
|
|
25
25
|
} from "../../../chunk-IP4OO26U.js";
|
|
26
|
+
import {
|
|
27
|
+
MemoryOAuthStateStore
|
|
28
|
+
} from "../../../chunk-QLTJSCE6.js";
|
|
26
29
|
import {
|
|
27
30
|
AuthController
|
|
28
31
|
} from "../../../chunk-SZVPIHWE.js";
|
|
29
32
|
import {
|
|
30
33
|
DrizzleOAuthStateStore
|
|
31
34
|
} from "../../../chunk-N5OTOWTP.js";
|
|
32
|
-
import {
|
|
33
|
-
MemoryOAuthStateStore
|
|
34
|
-
} from "../../../chunk-QLTJSCE6.js";
|
|
35
35
|
import {
|
|
36
36
|
OAuthStateError
|
|
37
37
|
} from "../../../chunk-BPARRK6F.js";
|
|
38
|
+
import {
|
|
39
|
+
authOAuthState
|
|
40
|
+
} from "../../../chunk-NPFPZ2HO.js";
|
|
38
41
|
import {
|
|
39
42
|
AUTH_CONNECTION_GRANT_SINK,
|
|
40
43
|
AUTH_CONNECTION_READER,
|
|
@@ -45,9 +48,6 @@ import {
|
|
|
45
48
|
OAUTH_STATE_STORE,
|
|
46
49
|
STRATEGY_REGISTRY
|
|
47
50
|
} from "../../../chunk-6XY6ZMMD.js";
|
|
48
|
-
import {
|
|
49
|
-
authOAuthState
|
|
50
|
-
} from "../../../chunk-NPFPZ2HO.js";
|
|
51
51
|
import "../../../chunk-GYGNEQSC.js";
|
|
52
52
|
import "../../../chunk-U64T4YZE.js";
|
|
53
53
|
import "../../../chunk-ZUKFQL6E.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BRIDGE_DELIVERY_JOB_TYPE,
|
|
3
3
|
BridgeDeliveryHandler
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-TBGTMALE.js";
|
|
5
5
|
import "../../../chunk-6DWFJNIK.js";
|
|
6
6
|
import "../../../chunk-NXXDZ6ZF.js";
|
|
7
|
-
import "../../../chunk-ZPL74UQN.js";
|
|
8
7
|
import "../../../chunk-7P5ODGLA.js";
|
|
8
|
+
import "../../../chunk-ZPL74UQN.js";
|
|
9
9
|
import "../../../chunk-4LH67P4U.js";
|
|
10
10
|
import "../../../chunk-H5NH7KPE.js";
|
|
11
11
|
import "../../../chunk-GYGNEQSC.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DrizzleBridgeDeliveryRepo
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-2TVVBC53.js";
|
|
3
|
+
} from "../../../chunk-K2I6XIK5.js";
|
|
5
4
|
import "../../../chunk-6DWFJNIK.js";
|
|
5
|
+
import "../../../chunk-2TVVBC53.js";
|
|
6
6
|
import "../../../chunk-NXXDZ6ZF.js";
|
|
7
7
|
import "../../../chunk-OKXZ63IA.js";
|
|
8
8
|
import "../../../chunk-4LH67P4U.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BridgeOutboxDrainHook
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-2TVVBC53.js";
|
|
3
|
+
} from "../../../chunk-2VGVSL2D.js";
|
|
4
|
+
import "../../../chunk-TBGTMALE.js";
|
|
6
5
|
import "../../../chunk-6DWFJNIK.js";
|
|
6
|
+
import "../../../chunk-2TVVBC53.js";
|
|
7
7
|
import "../../../chunk-NXXDZ6ZF.js";
|
|
8
|
-
import "../../../chunk-ZPL74UQN.js";
|
|
9
8
|
import "../../../chunk-7P5ODGLA.js";
|
|
10
9
|
import "../../../chunk-OKXZ63IA.js";
|
|
11
|
-
import "../../../chunk-
|
|
10
|
+
import "../../../chunk-ZPL74UQN.js";
|
|
11
|
+
import "../../../chunk-Q6LRJ4VI.js";
|
|
12
12
|
import "../../../chunk-4LH67P4U.js";
|
|
13
|
-
import "../../../chunk-OFRRBC7M.js";
|
|
14
13
|
import "../../../chunk-H5NH7KPE.js";
|
|
14
|
+
import "../../../chunk-OFRRBC7M.js";
|
|
15
15
|
import "../../../chunk-GYGNEQSC.js";
|
|
16
16
|
import "../../../chunk-2E224ZSN.js";
|
|
17
17
|
export {
|