@pattern-stack/codegen 0.20.0 → 0.20.2
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 +82 -0
- package/dist/{chunk-5LXOJGO2.js → chunk-3VEVGL74.js} +5 -5
- package/dist/{chunk-I6UXRJ3Q.js → chunk-43SBT72G.js} +4 -4
- package/dist/{chunk-5RT7JGKT.js → chunk-7OVCARTQ.js} +4 -4
- package/dist/{chunk-NYJYK6J4.js → chunk-BKP72EDW.js} +5 -5
- package/dist/{chunk-QSJ3J4HE.js → chunk-CDLWYZVQ.js} +4 -4
- package/dist/{chunk-W2UIDI3R.js → chunk-CLWBNXKF.js} +4 -4
- package/dist/{chunk-27ETSJ2X.js → chunk-COGHTKXY.js} +2 -2
- package/dist/{chunk-3YCUIGPG.js → chunk-D44QFQJZ.js} +8 -8
- package/dist/{chunk-LARB26EI.js → chunk-DB5UXJC3.js} +10 -10
- package/dist/{chunk-LQXBQO72.js → chunk-E5FJWOMP.js} +7 -7
- package/dist/{chunk-CUSMC2KK.js → chunk-E6PLM6QG.js} +13 -13
- package/dist/{chunk-YK5JEVLX.js → chunk-FFUDEIFF.js} +6 -6
- package/dist/{chunk-4OC5MSHO.js → chunk-GOO5ZMYO.js} +4 -4
- package/dist/{chunk-T6SCOJF4.js → chunk-JGGZUP64.js} +4 -4
- package/dist/{chunk-KHQ72A5F.js → chunk-NR7QQ6ZI.js} +4 -4
- package/dist/chunk-NR7QQ6ZI.js.map +1 -0
- package/dist/{chunk-XWBK3XJK.js → chunk-O2A6XHGD.js} +4 -4
- package/dist/{chunk-ATVGYF3D.js → chunk-QFUIE37H.js} +3 -3
- package/dist/{chunk-WKNOEVWQ.js → chunk-QMN3LQR3.js} +5 -5
- package/dist/{chunk-SGSWVNNB.js → chunk-R6F6KFIL.js} +7 -7
- package/dist/{chunk-7YGORYZD.js → chunk-T6C4LFLC.js} +4 -4
- package/dist/{chunk-KBO5OOON.js → chunk-VDL5CJ5C.js} +9 -9
- package/dist/{chunk-FLYF76CU.js → chunk-VQOAATIG.js} +4 -4
- package/dist/{chunk-E45CSC33.js → chunk-XKWOJZZ4.js} +2 -2
- package/dist/runtime/base-classes/index.js +22 -22
- package/dist/runtime/shared/openapi/index.js +3 -3
- package/dist/runtime/subsystems/auth/auth.module.js +3 -3
- package/dist/runtime/subsystems/auth/index.js +11 -11
- package/dist/runtime/subsystems/bridge/bridge-delivery-handler.js +3 -3
- package/dist/runtime/subsystems/bridge/bridge-delivery.drizzle-backend.js +1 -1
- package/dist/runtime/subsystems/bridge/bridge-outbox-drain-hook.js +6 -6
- package/dist/runtime/subsystems/bridge/bridge.module.js +15 -15
- package/dist/runtime/subsystems/bridge/event-flow.service.js +2 -2
- package/dist/runtime/subsystems/bridge/index.js +15 -15
- package/dist/runtime/subsystems/cache/cache.drizzle-backend.js +2 -2
- package/dist/runtime/subsystems/cache/cache.module.js +3 -3
- package/dist/runtime/subsystems/cache/index.js +5 -5
- package/dist/runtime/subsystems/events/event-bus.drizzle-backend.js +4 -4
- package/dist/runtime/subsystems/events/event-bus.memory-backend.js +2 -2
- package/dist/runtime/subsystems/events/events.module.d.ts +24 -7
- package/dist/runtime/subsystems/events/events.module.js +6 -6
- package/dist/runtime/subsystems/events/index.js +9 -9
- package/dist/runtime/subsystems/index.js +84 -84
- package/dist/runtime/subsystems/integration/build-change-source.js +2 -2
- package/dist/runtime/subsystems/integration/index.js +22 -22
- package/dist/runtime/subsystems/integration/integration-cursor-store.drizzle-backend.js +2 -2
- package/dist/runtime/subsystems/integration/integration-run-recorder.drizzle-backend.js +2 -2
- package/dist/runtime/subsystems/integration/integration.module.js +4 -4
- package/dist/runtime/subsystems/jobs/index.js +32 -32
- package/dist/runtime/subsystems/jobs/job-orchestrator.bullmq-backend.js +7 -7
- package/dist/runtime/subsystems/jobs/job-orchestrator.drizzle-backend.js +4 -4
- 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.bullmq-backend.js +3 -3
- package/dist/runtime/subsystems/jobs/job-worker.js +4 -4
- package/dist/runtime/subsystems/jobs/job-worker.module.js +10 -10
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js +8 -8
- package/dist/runtime/subsystems/observability/index.js +3 -3
- package/dist/runtime/subsystems/observability/observability.module.js +3 -3
- package/dist/runtime/subsystems/observability/observability.service.js +2 -2
- package/dist/src/cli/index.js +58 -11
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.js +7 -7
- package/package.json +1 -1
- package/runtime/subsystems/events/events.module.ts +24 -7
- package/dist/chunk-KHQ72A5F.js.map +0 -1
- /package/dist/{chunk-5LXOJGO2.js.map → chunk-3VEVGL74.js.map} +0 -0
- /package/dist/{chunk-I6UXRJ3Q.js.map → chunk-43SBT72G.js.map} +0 -0
- /package/dist/{chunk-5RT7JGKT.js.map → chunk-7OVCARTQ.js.map} +0 -0
- /package/dist/{chunk-NYJYK6J4.js.map → chunk-BKP72EDW.js.map} +0 -0
- /package/dist/{chunk-QSJ3J4HE.js.map → chunk-CDLWYZVQ.js.map} +0 -0
- /package/dist/{chunk-W2UIDI3R.js.map → chunk-CLWBNXKF.js.map} +0 -0
- /package/dist/{chunk-27ETSJ2X.js.map → chunk-COGHTKXY.js.map} +0 -0
- /package/dist/{chunk-3YCUIGPG.js.map → chunk-D44QFQJZ.js.map} +0 -0
- /package/dist/{chunk-LARB26EI.js.map → chunk-DB5UXJC3.js.map} +0 -0
- /package/dist/{chunk-LQXBQO72.js.map → chunk-E5FJWOMP.js.map} +0 -0
- /package/dist/{chunk-CUSMC2KK.js.map → chunk-E6PLM6QG.js.map} +0 -0
- /package/dist/{chunk-YK5JEVLX.js.map → chunk-FFUDEIFF.js.map} +0 -0
- /package/dist/{chunk-4OC5MSHO.js.map → chunk-GOO5ZMYO.js.map} +0 -0
- /package/dist/{chunk-T6SCOJF4.js.map → chunk-JGGZUP64.js.map} +0 -0
- /package/dist/{chunk-XWBK3XJK.js.map → chunk-O2A6XHGD.js.map} +0 -0
- /package/dist/{chunk-ATVGYF3D.js.map → chunk-QFUIE37H.js.map} +0 -0
- /package/dist/{chunk-WKNOEVWQ.js.map → chunk-QMN3LQR3.js.map} +0 -0
- /package/dist/{chunk-SGSWVNNB.js.map → chunk-R6F6KFIL.js.map} +0 -0
- /package/dist/{chunk-7YGORYZD.js.map → chunk-T6C4LFLC.js.map} +0 -0
- /package/dist/{chunk-KBO5OOON.js.map → chunk-VDL5CJ5C.js.map} +0 -0
- /package/dist/{chunk-FLYF76CU.js.map → chunk-VQOAATIG.js.map} +0 -0
- /package/dist/{chunk-E45CSC33.js.map → chunk-XKWOJZZ4.js.map} +0 -0
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
} from "../../../chunk-EWYCWP4H.js";
|
|
6
6
|
import {
|
|
7
7
|
ObservabilityModule
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-XKWOJZZ4.js";
|
|
9
9
|
import {
|
|
10
10
|
BridgeMetricsReporter
|
|
11
11
|
} from "../../../chunk-AQFQ4BYM.js";
|
|
12
|
-
import "../../../chunk-
|
|
12
|
+
import "../../../chunk-CLWBNXKF.js";
|
|
13
13
|
import {
|
|
14
14
|
OBSERVABILITY,
|
|
15
15
|
OBSERVABILITY_MODULE_OPTIONS
|
|
16
16
|
} from "../../../chunk-Y7RRSEOC.js";
|
|
17
17
|
import "../../../chunk-ZPL74UQN.js";
|
|
18
|
-
import "../../../chunk-4LH67P4U.js";
|
|
19
18
|
import "../../../chunk-H5NH7KPE.js";
|
|
19
|
+
import "../../../chunk-4LH67P4U.js";
|
|
20
20
|
import "../../../chunk-GYGNEQSC.js";
|
|
21
21
|
import "../../../chunk-S7C6TIIF.js";
|
|
22
22
|
import "../../../chunk-2E224ZSN.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ObservabilityModule
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-XKWOJZZ4.js";
|
|
4
4
|
import "../../../chunk-AQFQ4BYM.js";
|
|
5
|
-
import "../../../chunk-
|
|
5
|
+
import "../../../chunk-CLWBNXKF.js";
|
|
6
6
|
import "../../../chunk-Y7RRSEOC.js";
|
|
7
7
|
import "../../../chunk-ZPL74UQN.js";
|
|
8
|
-
import "../../../chunk-4LH67P4U.js";
|
|
9
8
|
import "../../../chunk-H5NH7KPE.js";
|
|
9
|
+
import "../../../chunk-4LH67P4U.js";
|
|
10
10
|
import "../../../chunk-GYGNEQSC.js";
|
|
11
11
|
import "../../../chunk-S7C6TIIF.js";
|
|
12
12
|
import "../../../chunk-2E224ZSN.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ObservabilityService
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-CLWBNXKF.js";
|
|
4
4
|
import "../../../chunk-ZPL74UQN.js";
|
|
5
|
-
import "../../../chunk-4LH67P4U.js";
|
|
6
5
|
import "../../../chunk-H5NH7KPE.js";
|
|
6
|
+
import "../../../chunk-4LH67P4U.js";
|
|
7
7
|
import "../../../chunk-GYGNEQSC.js";
|
|
8
8
|
import "../../../chunk-S7C6TIIF.js";
|
|
9
9
|
import "../../../chunk-2E224ZSN.js";
|
package/dist/src/cli/index.js
CHANGED
|
@@ -40,13 +40,17 @@ import {
|
|
|
40
40
|
writeManifest
|
|
41
41
|
} from "../../chunk-KK5A7B2T.js";
|
|
42
42
|
import "../../chunk-KVOWSC5S.js";
|
|
43
|
-
import "../../chunk-
|
|
44
|
-
import "../../chunk-
|
|
43
|
+
import "../../chunk-QFUIE37H.js";
|
|
44
|
+
import "../../chunk-FFUDEIFF.js";
|
|
45
45
|
import "../../chunk-EO2QPOKH.js";
|
|
46
46
|
import "../../chunk-PRWIX6UW.js";
|
|
47
|
-
import "../../chunk-
|
|
47
|
+
import "../../chunk-O2A6XHGD.js";
|
|
48
|
+
import "../../chunk-HNWZFNKP.js";
|
|
48
49
|
import "../../chunk-AHV4GDYM.js";
|
|
49
50
|
import "../../chunk-SQDOBLBP.js";
|
|
51
|
+
import "../../chunk-43SBT72G.js";
|
|
52
|
+
import "../../chunk-4MF3HKJA.js";
|
|
53
|
+
import "../../chunk-TIZXQU26.js";
|
|
50
54
|
import "../../chunk-JEINYUJH.js";
|
|
51
55
|
import {
|
|
52
56
|
isDivisibleCursor
|
|
@@ -57,10 +61,6 @@ import "../../chunk-TDEHU73T.js";
|
|
|
57
61
|
import "../../chunk-S7C6TIIF.js";
|
|
58
62
|
import "../../chunk-MZ6GV4YF.js";
|
|
59
63
|
import "../../chunk-LG57S2SC.js";
|
|
60
|
-
import "../../chunk-HNWZFNKP.js";
|
|
61
|
-
import "../../chunk-I6UXRJ3Q.js";
|
|
62
|
-
import "../../chunk-TIZXQU26.js";
|
|
63
|
-
import "../../chunk-4MF3HKJA.js";
|
|
64
64
|
import "../../chunk-U64T4YZE.js";
|
|
65
65
|
import "../../chunk-2E224ZSN.js";
|
|
66
66
|
|
|
@@ -2773,12 +2773,15 @@ var COMPOSERS = {
|
|
|
2773
2773
|
const imports = [
|
|
2774
2774
|
`import { EventsModule } from '${moduleImport("events", "events.module")}';`
|
|
2775
2775
|
];
|
|
2776
|
+
const registrySpecifier = mode === "package" ? "./events/registry" : moduleImport("events", "generated/registry");
|
|
2777
|
+
imports.push(`import { eventRegistry } from '${registrySpecifier}';`);
|
|
2778
|
+
const registryClause = `, eventRegistry`;
|
|
2776
2779
|
if (mode === "package") {
|
|
2777
2780
|
imports.push(`import { TypedEventBus } from './events/bus';`);
|
|
2778
2781
|
return {
|
|
2779
2782
|
imports,
|
|
2780
2783
|
calls: [
|
|
2781
|
-
` EventsModule.forRoot({ backend: '${backend}', multiTenant: ${multiTenant}, typedBus: TypedEventBus${listenNotifyClause} }),`
|
|
2784
|
+
` EventsModule.forRoot({ backend: '${backend}', multiTenant: ${multiTenant}, typedBus: TypedEventBus${registryClause}${listenNotifyClause} }),`
|
|
2782
2785
|
]
|
|
2783
2786
|
};
|
|
2784
2787
|
}
|
|
@@ -2786,14 +2789,14 @@ var COMPOSERS = {
|
|
|
2786
2789
|
return {
|
|
2787
2790
|
imports,
|
|
2788
2791
|
calls: [
|
|
2789
|
-
` EventsModule.forRoot({ backend: '${backend}', multiTenant: ${multiTenant}, listenNotify: true }),`
|
|
2792
|
+
` EventsModule.forRoot({ backend: '${backend}', multiTenant: ${multiTenant}${registryClause}, listenNotify: true }),`
|
|
2790
2793
|
]
|
|
2791
2794
|
};
|
|
2792
2795
|
}
|
|
2793
2796
|
return {
|
|
2794
2797
|
imports,
|
|
2795
2798
|
calls: [
|
|
2796
|
-
` EventsModule.forRoot(
|
|
2799
|
+
` EventsModule.forRoot({ backend: '${backend}', multiTenant: ${multiTenant}${registryClause} }),`
|
|
2797
2800
|
]
|
|
2798
2801
|
};
|
|
2799
2802
|
},
|
|
@@ -2874,6 +2877,23 @@ var COMPOSERS = {
|
|
|
2874
2877
|
],
|
|
2875
2878
|
calls: [` IntegrationModule.forRoot({ ${parts.join(", ")} }),`]
|
|
2876
2879
|
};
|
|
2880
|
+
},
|
|
2881
|
+
// #473 — observability combiner (ADR-025). NO `backend` / `multiTenant`:
|
|
2882
|
+
// it owns no durable state — portability is inherited from whichever
|
|
2883
|
+
// backends the composed siblings run (see `ObservabilityModule` docblock).
|
|
2884
|
+
// The only `forRoot` option is `reporters` (OBS-6); thread the config
|
|
2885
|
+
// block's `reporters:` when a reporter is enabled, else emit a bare
|
|
2886
|
+
// `forRoot()`. Ordered LAST in `COMPOSABLE_ORDER` so it registers after the
|
|
2887
|
+
// read ports it composes via `@Optional()` DI.
|
|
2888
|
+
observability: ({ moduleImport, cfg }) => {
|
|
2889
|
+
const reportersClause = observabilityReportersClause(cfg);
|
|
2890
|
+
const opts = reportersClause ? `{ ${reportersClause} }` : "";
|
|
2891
|
+
return {
|
|
2892
|
+
imports: [
|
|
2893
|
+
`import { ObservabilityModule } from '${moduleImport("observability", "observability.module")}';`
|
|
2894
|
+
],
|
|
2895
|
+
calls: [` ObservabilityModule.forRoot(${opts}),`]
|
|
2896
|
+
};
|
|
2877
2897
|
}
|
|
2878
2898
|
};
|
|
2879
2899
|
function integrationDifferClause(cfg) {
|
|
@@ -2888,6 +2908,18 @@ function integrationDifferClause(cfg) {
|
|
|
2888
2908
|
if (Object.keys(inner).length === 0) return "";
|
|
2889
2909
|
return `differ: ${jsonToTs(inner)}`;
|
|
2890
2910
|
}
|
|
2911
|
+
function observabilityReportersClause(cfg) {
|
|
2912
|
+
const reporters = cfg?.reporters;
|
|
2913
|
+
if (!reporters || typeof reporters !== "object") return "";
|
|
2914
|
+
const enabled = {};
|
|
2915
|
+
for (const [key, value] of Object.entries(reporters)) {
|
|
2916
|
+
if (value && typeof value === "object" && value.enabled === true) {
|
|
2917
|
+
enabled[key] = value;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
if (Object.keys(enabled).length === 0) return "";
|
|
2921
|
+
return `reporters: ${jsonToTs(enabled)}`;
|
|
2922
|
+
}
|
|
2891
2923
|
var PACKAGE2 = "@pattern-stack/codegen";
|
|
2892
2924
|
function makeModuleImport(mode, subsystemsRel) {
|
|
2893
2925
|
if (mode === "vendored") {
|
|
@@ -2895,7 +2927,13 @@ function makeModuleImport(mode, subsystemsRel) {
|
|
|
2895
2927
|
}
|
|
2896
2928
|
return (subsystem) => subsystem === "events" ? `${PACKAGE2}/subsystems` : `${PACKAGE2}/runtime/subsystems/${subsystem}/index`;
|
|
2897
2929
|
}
|
|
2898
|
-
var COMPOSABLE_ORDER = [
|
|
2930
|
+
var COMPOSABLE_ORDER = [
|
|
2931
|
+
"events",
|
|
2932
|
+
"jobs",
|
|
2933
|
+
"bridge",
|
|
2934
|
+
"integration",
|
|
2935
|
+
"observability"
|
|
2936
|
+
];
|
|
2899
2937
|
var HEADER5 = `// AUTO-GENERATED by @pattern-stack/codegen. DO NOT EDIT.
|
|
2900
2938
|
// Subsystem composition barrel \u2014 reflects \`subsystems.install\` in
|
|
2901
2939
|
// codegen.config.yaml and the per-subsystem option blocks
|
|
@@ -2984,6 +3022,15 @@ async function regenerateSubsystemBarrel(opts) {
|
|
|
2984
3022
|
}
|
|
2985
3023
|
}
|
|
2986
3024
|
}
|
|
3025
|
+
if (mode === "vendored" && emitted.includes("events")) {
|
|
3026
|
+
const eventsGenDir = path9.resolve(subsystemsAbs, "events", "generated");
|
|
3027
|
+
if (!fs7.existsSync(path9.resolve(eventsGenDir, "registry.ts"))) {
|
|
3028
|
+
fs7.mkdirSync(eventsGenDir, { recursive: true });
|
|
3029
|
+
for (const { name, content: content2 } of buildEventCodegenContents([], "vendored")) {
|
|
3030
|
+
fs7.writeFileSync(path9.resolve(eventsGenDir, name), content2);
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
2987
3034
|
}
|
|
2988
3035
|
return {
|
|
2989
3036
|
subsystemBarrel: barrelAbs,
|