@pattern-stack/codegen 0.4.2 → 0.4.3
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 +6 -0
- package/dist/runtime/subsystems/bridge/bridge.module.d.ts +1 -0
- package/dist/runtime/subsystems/bridge/bridge.module.js +38 -21
- package/dist/runtime/subsystems/bridge/bridge.module.js.map +1 -1
- package/dist/runtime/subsystems/bridge/index.d.ts +1 -0
- package/dist/runtime/subsystems/bridge/index.js +29 -12
- package/dist/runtime/subsystems/bridge/index.js.map +1 -1
- package/dist/runtime/subsystems/index.js +31 -14
- package/dist/runtime/subsystems/index.js.map +1 -1
- package/dist/runtime/subsystems/jobs/index.d.ts +1 -0
- package/dist/runtime/subsystems/jobs/index.js +27 -10
- package/dist/runtime/subsystems/jobs/index.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-orchestrator.memory-backend.d.ts +3 -1
- package/dist/runtime/subsystems/jobs/job-orchestrator.memory-backend.js +9 -4
- package/dist/runtime/subsystems/jobs/job-orchestrator.memory-backend.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-worker.d.ts +3 -1
- package/dist/runtime/subsystems/jobs/job-worker.js +6 -2
- package/dist/runtime/subsystems/jobs/job-worker.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-worker.module.d.ts +3 -1
- package/dist/runtime/subsystems/jobs/job-worker.module.js +27 -10
- package/dist/runtime/subsystems/jobs/job-worker.module.js.map +1 -1
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js +9 -4
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js.map +1 -1
- package/dist/src/cli/index.js +29 -2
- package/dist/src/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/runtime/subsystems/jobs/job-orchestrator.memory-backend.ts +12 -2
- package/runtime/subsystems/jobs/job-worker.module.ts +10 -0
- package/runtime/subsystems/jobs/job-worker.ts +12 -3
|
@@ -720,7 +720,7 @@ DrizzleJobStepService = __decorateClass([
|
|
|
720
720
|
|
|
721
721
|
// runtime/subsystems/jobs/job-orchestrator.memory-backend.ts
|
|
722
722
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
723
|
-
import { Inject as Inject4, Injectable as Injectable4, Logger as Logger2 } from "@nestjs/common";
|
|
723
|
+
import { Inject as Inject4, Injectable as Injectable4, Logger as Logger2, Optional } from "@nestjs/common";
|
|
724
724
|
|
|
725
725
|
// runtime/subsystems/jobs/job-handler.base.ts
|
|
726
726
|
var JOB_HANDLER_REGISTRY = /* @__PURE__ */ new Map();
|
|
@@ -773,14 +773,16 @@ var PromiseMutex = class {
|
|
|
773
773
|
}
|
|
774
774
|
};
|
|
775
775
|
var MemoryJobOrchestrator = class {
|
|
776
|
-
constructor(store, stepService, multiTenant) {
|
|
776
|
+
constructor(store, stepService, multiTenant, moduleRef) {
|
|
777
777
|
this.store = store;
|
|
778
778
|
this.stepService = stepService;
|
|
779
779
|
this.multiTenant = multiTenant;
|
|
780
|
+
this.moduleRef = moduleRef;
|
|
780
781
|
}
|
|
781
782
|
store;
|
|
782
783
|
stepService;
|
|
783
784
|
multiTenant;
|
|
785
|
+
moduleRef;
|
|
784
786
|
logger = new Logger2(MemoryJobOrchestrator.name);
|
|
785
787
|
mutex = new PromiseMutex();
|
|
786
788
|
handlerRegistry = /* @__PURE__ */ new Map();
|
|
@@ -1121,7 +1123,9 @@ var MemoryJobOrchestrator = class {
|
|
|
1121
1123
|
}
|
|
1122
1124
|
const meta = registration.meta;
|
|
1123
1125
|
const HandlerClass = registration.handlerClass;
|
|
1124
|
-
const handler =
|
|
1126
|
+
const handler = this.moduleRef ? await this.moduleRef.create(
|
|
1127
|
+
HandlerClass
|
|
1128
|
+
) : new HandlerClass();
|
|
1125
1129
|
const ctx = {
|
|
1126
1130
|
input: run.input,
|
|
1127
1131
|
run,
|
|
@@ -1301,7 +1305,8 @@ var MemoryJobOrchestrator = class {
|
|
|
1301
1305
|
};
|
|
1302
1306
|
MemoryJobOrchestrator = __decorateClass([
|
|
1303
1307
|
Injectable4(),
|
|
1304
|
-
__decorateParam(2, Inject4(JOBS_MULTI_TENANT))
|
|
1308
|
+
__decorateParam(2, Inject4(JOBS_MULTI_TENANT)),
|
|
1309
|
+
__decorateParam(3, Optional())
|
|
1305
1310
|
], MemoryJobOrchestrator);
|
|
1306
1311
|
function classifyError(err, policy, currentAttempts) {
|
|
1307
1312
|
if (!policy) return "fail";
|