@codemation/host 0.3.0 → 1.0.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 +75 -0
- package/dist/{AppConfigFactory-Dq7ttwQ_.d.ts → AppConfigFactory-PFmDg5Sg.d.ts} +3 -3
- package/dist/{AppContainerFactory-D9je1sSV.js → AppContainerFactory-Cr3JeVmg.js} +85 -132
- package/dist/AppContainerFactory-Cr3JeVmg.js.map +1 -0
- package/dist/{CodemationAppContext-P7P-xZhQ.d.ts → CodemationAppContext-DP_-56c6.d.ts} +2 -2
- package/dist/{CodemationAuthoring.types-OMYu7vKP.d.ts → CodemationAuthoring.types-zJ2t73Bn.d.ts} +4 -3
- package/dist/{CodemationConfigNormalizer-BCtBrJDe.d.ts → CodemationConfigNormalizer-B8RGUwAe.d.ts} +2 -2
- package/dist/{CodemationConsumerConfigLoader-evvw4b_a.d.ts → CodemationConsumerConfigLoader-C_QVwcI3.d.ts} +2 -2
- package/dist/{CodemationPluginListMerger-PSTtEQjC.d.ts → CodemationPluginListMerger-Bgn1CIX9.d.ts} +5 -5
- package/dist/{CredentialServices-0Hk8RFY1.d.ts → CredentialServices-95DPogx-.d.ts} +3 -3
- package/dist/{PublicFrontendBootstrapFactory-D0_ds7nS.d.ts → PublicFrontendBootstrapFactory-C_iLgPV-.d.ts} +2 -2
- package/dist/authoring.d.ts +3 -3
- package/dist/consumer.d.ts +4 -4
- package/dist/credentials.d.ts +3 -3
- package/dist/devServerSidecar.d.ts +1 -1
- package/dist/{index-CeS2saCe.d.ts → index-W4eSjdCM.d.ts} +26 -15
- package/dist/index.d.ts +11 -11
- package/dist/index.js +2 -2
- package/dist/nextServer.d.ts +7 -7
- package/dist/nextServer.js +1 -1
- package/dist/{persistenceServer-CJeu1STC.d.ts → persistenceServer-_pqP_0nw.d.ts} +2 -2
- package/dist/persistenceServer.d.ts +5 -5
- package/dist/{server-C_ZIEOTY.js → server-BE4PLhcb.js} +2 -2
- package/dist/{server-C_ZIEOTY.js.map → server-BE4PLhcb.js.map} +1 -1
- package/dist/{server-Clvg5x1w.d.ts → server-Q5uwa6iR.d.ts} +5 -5
- package/dist/server.d.ts +8 -8
- package/dist/server.js +2 -2
- package/package.json +7 -5
- package/src/bootstrap/AppContainerFactory.ts +77 -81
- package/src/bootstrap/CodemationContainerRegistrationRegistrar.ts +1 -3
- package/src/infrastructure/config/CodemationPluginRegistrar.ts +2 -6
- package/src/infrastructure/di/HandlesDomainEventRegistry.ts +5 -7
- package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +8 -0
- package/src/presentation/http/hono/registrars/AuthHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/BinaryHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/BootstrapHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/CredentialHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/DevHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/OAuth2HonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/RunHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/TelemetryHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/UserHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/WebhookHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/WhitelabelHonoApiRouteRegistrar.ts +1 -3
- package/src/presentation/http/hono/registrars/WorkflowHonoApiRouteRegistrar.ts +1 -3
- package/dist/AppContainerFactory-D9je1sSV.js.map +0 -1
|
@@ -365,7 +365,7 @@ export class AppContainerFactory {
|
|
|
365
365
|
dependencyContainer.resolve(CredentialTypeRegistryImpl),
|
|
366
366
|
),
|
|
367
367
|
});
|
|
368
|
-
container.
|
|
368
|
+
container.registerSingleton(CodemationIdFactory, CodemationIdFactory);
|
|
369
369
|
container.register(CoreTokens.RunIdFactory, {
|
|
370
370
|
useFactory: instanceCachingFactory((dependencyContainer) => dependencyContainer.resolve(CodemationIdFactory)),
|
|
371
371
|
});
|
|
@@ -420,7 +420,7 @@ export class AppContainerFactory {
|
|
|
420
420
|
},
|
|
421
421
|
});
|
|
422
422
|
container.registerInstance(LogLevelPolicyFactory, logLevelPolicyFactory);
|
|
423
|
-
container.
|
|
423
|
+
container.registerSingleton(ServerLoggerFactory, ServerLoggerFactory);
|
|
424
424
|
container.register(ApplicationTokens.LoggerFactory, {
|
|
425
425
|
useFactory: instanceCachingFactory((dependencyContainer) => dependencyContainer.resolve(ServerLoggerFactory)),
|
|
426
426
|
});
|
|
@@ -441,43 +441,41 @@ export class AppContainerFactory {
|
|
|
441
441
|
);
|
|
442
442
|
}),
|
|
443
443
|
});
|
|
444
|
-
container.
|
|
445
|
-
container.
|
|
446
|
-
container.
|
|
447
|
-
container.
|
|
448
|
-
container.
|
|
449
|
-
container.
|
|
450
|
-
container.
|
|
451
|
-
container.
|
|
452
|
-
container.
|
|
453
|
-
container.
|
|
454
|
-
container.
|
|
455
|
-
container.
|
|
456
|
-
container.
|
|
457
|
-
container.
|
|
458
|
-
container.
|
|
459
|
-
container.
|
|
444
|
+
container.registerSingleton(PrismaClientFactory, PrismaClientFactory);
|
|
445
|
+
container.registerSingleton(WorkflowPolicyUiPresentationFactory, WorkflowPolicyUiPresentationFactory);
|
|
446
|
+
container.registerSingleton(WorkflowDefinitionMapper, WorkflowDefinitionMapper);
|
|
447
|
+
container.registerSingleton(RequestToWebhookItemMapper, RequestToWebhookItemMapper);
|
|
448
|
+
container.registerSingleton(WebhookEndpointPathValidator, WebhookEndpointPathValidator);
|
|
449
|
+
container.registerSingleton(CredentialSecretCipher, CredentialSecretCipher);
|
|
450
|
+
container.registerSingleton(CredentialMaterialResolver, CredentialMaterialResolver);
|
|
451
|
+
container.registerSingleton(CredentialFieldEnvOverlayService, CredentialFieldEnvOverlayService);
|
|
452
|
+
container.registerSingleton(CredentialRuntimeMaterialService, CredentialRuntimeMaterialService);
|
|
453
|
+
container.registerSingleton(WorkflowCredentialNodeResolver, WorkflowCredentialNodeResolver);
|
|
454
|
+
container.registerSingleton(CredentialInstanceService, CredentialInstanceService);
|
|
455
|
+
container.registerSingleton(CredentialBindingService, CredentialBindingService);
|
|
456
|
+
container.registerSingleton(WorkflowActivationPreflightRules, WorkflowActivationPreflightRules);
|
|
457
|
+
container.registerSingleton(WorkflowActivationPreflight, WorkflowActivationPreflight);
|
|
458
|
+
container.registerSingleton(CredentialTestService, CredentialTestService);
|
|
459
|
+
container.registerSingleton(CredentialSessionServiceImpl, CredentialSessionServiceImpl);
|
|
460
460
|
if (!inputs.appConfig.hasConfiguredCredentialSessionServiceRegistration) {
|
|
461
461
|
container.register(CoreTokens.CredentialSessionService, { useToken: CredentialSessionServiceImpl });
|
|
462
462
|
}
|
|
463
|
-
container.
|
|
464
|
-
container.
|
|
465
|
-
container.
|
|
466
|
-
container.
|
|
467
|
-
container.
|
|
468
|
-
container.
|
|
469
|
-
container.
|
|
470
|
-
container.
|
|
471
|
-
container.
|
|
472
|
-
container.
|
|
473
|
-
container.
|
|
474
|
-
container.
|
|
475
|
-
container.
|
|
476
|
-
container.
|
|
477
|
-
container.
|
|
478
|
-
|
|
479
|
-
});
|
|
480
|
-
container.register(UserAccountSessionPolicy, { useClass: UserAccountSessionPolicy });
|
|
463
|
+
container.registerSingleton(OAuth2ProviderRegistry, OAuth2ProviderRegistry);
|
|
464
|
+
container.registerSingleton(OAuth2ConnectService, OAuth2ConnectService);
|
|
465
|
+
container.registerSingleton(CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotFactory);
|
|
466
|
+
container.registerSingleton(FrontendAppConfigFactory, FrontendAppConfigFactory);
|
|
467
|
+
container.registerSingleton(PublicFrontendBootstrapFactory, PublicFrontendBootstrapFactory);
|
|
468
|
+
container.registerSingleton(InternalAuthBootstrapFactory, InternalAuthBootstrapFactory);
|
|
469
|
+
container.registerSingleton(DatabaseMigrations, DatabaseMigrations);
|
|
470
|
+
container.registerSingleton(FrontendRuntime, FrontendRuntime);
|
|
471
|
+
container.registerSingleton(WorkerRuntime, WorkerRuntime);
|
|
472
|
+
container.registerSingleton(DevelopmentSessionBypassVerifier, DevelopmentSessionBypassVerifier);
|
|
473
|
+
container.registerSingleton(SecureRequestDetector, SecureRequestDetector);
|
|
474
|
+
container.registerSingleton(InAppCallbackUrlPolicy, InAppCallbackUrlPolicy);
|
|
475
|
+
container.registerSingleton(AuthSessionCookieFactory, AuthSessionCookieFactory);
|
|
476
|
+
container.registerSingleton(CodemationBetterAuthBcryptPasswordCodec, CodemationBetterAuthBcryptPasswordCodec);
|
|
477
|
+
container.registerSingleton(CodemationBetterAuthDatabaseOptionsFactory, CodemationBetterAuthDatabaseOptionsFactory);
|
|
478
|
+
container.registerSingleton(UserAccountSessionPolicy, UserAccountSessionPolicy);
|
|
481
479
|
container.register(CodemationBetterAuthBaseUrlPolicy, {
|
|
482
480
|
useFactory: instanceCachingFactory(
|
|
483
481
|
(dependencyContainer) =>
|
|
@@ -524,7 +522,7 @@ export class AppContainerFactory {
|
|
|
524
522
|
return new BetterAuthApiSessionVerifier(runtime, eligibility);
|
|
525
523
|
}),
|
|
526
524
|
});
|
|
527
|
-
container.
|
|
525
|
+
container.registerSingleton(CodemationSessionVerifier, CodemationSessionVerifier);
|
|
528
526
|
container.register(ApplicationTokens.SessionVerifier, {
|
|
529
527
|
useFactory: instanceCachingFactory((dependencyContainer) => {
|
|
530
528
|
const appConfig = dependencyContainer.resolve<AppConfig>(ApplicationTokens.AppConfig);
|
|
@@ -564,53 +562,51 @@ export class AppContainerFactory {
|
|
|
564
562
|
}
|
|
565
563
|
|
|
566
564
|
private registerRepositoriesAndBuses(container: Container): void {
|
|
567
|
-
container.
|
|
568
|
-
container.
|
|
569
|
-
container.
|
|
570
|
-
container.
|
|
571
|
-
container.
|
|
572
|
-
container.
|
|
565
|
+
container.registerSingleton(OtelIdentityFactory, OtelIdentityFactory);
|
|
566
|
+
container.registerSingleton(TelemetryPrivacyPolicy, TelemetryPrivacyPolicy);
|
|
567
|
+
container.registerSingleton(TelemetryEnricherChain, TelemetryEnricherChain);
|
|
568
|
+
container.registerSingleton(TelemetryRetentionTimestampFactory, TelemetryRetentionTimestampFactory);
|
|
569
|
+
container.registerSingleton(TelemetryQueryService, TelemetryQueryService);
|
|
570
|
+
container.registerSingleton(NoOpTelemetryExporter, NoOpTelemetryExporter);
|
|
573
571
|
container.register(CompositeTelemetryExporter, {
|
|
574
572
|
useFactory: instanceCachingFactory(
|
|
575
573
|
(dependencyContainer) => new CompositeTelemetryExporter([dependencyContainer.resolve(NoOpTelemetryExporter)]),
|
|
576
574
|
),
|
|
577
575
|
});
|
|
578
|
-
container.
|
|
579
|
-
container.
|
|
580
|
-
container.
|
|
581
|
-
container.
|
|
582
|
-
container.
|
|
583
|
-
container.
|
|
584
|
-
container.
|
|
585
|
-
container.
|
|
586
|
-
container.
|
|
587
|
-
container.
|
|
588
|
-
container.
|
|
589
|
-
container.
|
|
590
|
-
container.
|
|
591
|
-
container.
|
|
592
|
-
container.
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
container.
|
|
596
|
-
container.
|
|
597
|
-
container.
|
|
598
|
-
container.register(InMemoryWorkflowActivationRepository, { useClass: InMemoryWorkflowActivationRepository });
|
|
599
|
-
container.register(PrismaCredentialStore, { useClass: PrismaCredentialStore });
|
|
576
|
+
container.registerSingleton(OtelExecutionTelemetryFactory, OtelExecutionTelemetryFactory);
|
|
577
|
+
container.registerSingleton(InMemoryRunTraceContextRepository, InMemoryRunTraceContextRepository);
|
|
578
|
+
container.registerSingleton(InMemoryTelemetrySpanStore, InMemoryTelemetrySpanStore);
|
|
579
|
+
container.registerSingleton(InMemoryTelemetryArtifactStore, InMemoryTelemetryArtifactStore);
|
|
580
|
+
container.registerSingleton(InMemoryTelemetryMetricPointStore, InMemoryTelemetryMetricPointStore);
|
|
581
|
+
container.registerSingleton(PrismaRunTraceContextRepository, PrismaRunTraceContextRepository);
|
|
582
|
+
container.registerSingleton(PrismaTelemetrySpanStore, PrismaTelemetrySpanStore);
|
|
583
|
+
container.registerSingleton(PrismaTelemetryArtifactStore, PrismaTelemetryArtifactStore);
|
|
584
|
+
container.registerSingleton(PrismaTelemetryMetricPointStore, PrismaTelemetryMetricPointStore);
|
|
585
|
+
container.registerSingleton(WorkflowDefinitionRepositoryAdapter, WorkflowDefinitionRepositoryAdapter);
|
|
586
|
+
container.registerSingleton(InMemoryWorkflowRunRepository, InMemoryWorkflowRunRepository);
|
|
587
|
+
container.registerSingleton(InMemoryTriggerSetupStateRepository, InMemoryTriggerSetupStateRepository);
|
|
588
|
+
container.registerSingleton(InMemoryCredentialStore, InMemoryCredentialStore);
|
|
589
|
+
container.registerSingleton(SqlWorkflowRunRepository, SqlWorkflowRunRepository);
|
|
590
|
+
container.registerSingleton(InMemoryWorkflowDebuggerOverlayRepository, InMemoryWorkflowDebuggerOverlayRepository);
|
|
591
|
+
container.registerSingleton(PrismaTriggerSetupStateRepository, PrismaTriggerSetupStateRepository);
|
|
592
|
+
container.registerSingleton(PrismaWorkflowDebuggerOverlayRepository, PrismaWorkflowDebuggerOverlayRepository);
|
|
593
|
+
container.registerSingleton(PrismaWorkflowActivationRepository, PrismaWorkflowActivationRepository);
|
|
594
|
+
container.registerSingleton(InMemoryWorkflowActivationRepository, InMemoryWorkflowActivationRepository);
|
|
595
|
+
container.registerSingleton(PrismaCredentialStore, PrismaCredentialStore);
|
|
600
596
|
container.register(ApplicationTokens.WorkflowDefinitionRepository, {
|
|
601
597
|
useFactory: instanceCachingFactory(
|
|
602
598
|
(dependencyContainer) =>
|
|
603
599
|
dependencyContainer.resolve(WorkflowDefinitionRepositoryAdapter) as unknown as WorkflowDefinitionRepository,
|
|
604
600
|
),
|
|
605
601
|
});
|
|
606
|
-
container.
|
|
607
|
-
container.
|
|
608
|
-
container.
|
|
602
|
+
container.registerSingleton(InMemoryQueryBus, InMemoryQueryBus);
|
|
603
|
+
container.registerSingleton(InMemoryCommandBus, InMemoryCommandBus);
|
|
604
|
+
container.registerSingleton(InMemoryDomainEventBus, InMemoryDomainEventBus);
|
|
609
605
|
for (const handler of AppContainerFactory.queryHandlers) {
|
|
610
|
-
container.
|
|
606
|
+
container.registerSingleton(ApplicationTokens.QueryHandler, handler);
|
|
611
607
|
}
|
|
612
608
|
for (const handler of AppContainerFactory.commandHandlers) {
|
|
613
|
-
container.
|
|
609
|
+
container.registerSingleton(ApplicationTokens.CommandHandler, handler);
|
|
614
610
|
}
|
|
615
611
|
container.register(ApplicationTokens.QueryBus, {
|
|
616
612
|
useFactory: instanceCachingFactory((dependencyContainer) => dependencyContainer.resolve(InMemoryQueryBus)),
|
|
@@ -629,25 +625,25 @@ export class AppContainerFactory {
|
|
|
629
625
|
}
|
|
630
626
|
|
|
631
627
|
private registerApplicationServicesAndRoutes(container: Container): void {
|
|
632
|
-
container.
|
|
633
|
-
container.
|
|
634
|
-
container.
|
|
635
|
-
container.
|
|
636
|
-
container.
|
|
637
|
-
container.
|
|
628
|
+
container.registerSingleton(DevBootstrapSummaryAssembler, DevBootstrapSummaryAssembler);
|
|
629
|
+
container.registerSingleton(DevBootstrapSummaryHttpRouteHandler, DevBootstrapSummaryHttpRouteHandler);
|
|
630
|
+
container.registerSingleton(AuthHttpRouteHandler, AuthHttpRouteHandler);
|
|
631
|
+
container.registerSingleton(PublicFrontendBootstrapHttpRouteHandler, PublicFrontendBootstrapHttpRouteHandler);
|
|
632
|
+
container.registerSingleton(InternalAuthBootstrapHttpRouteHandler, InternalAuthBootstrapHttpRouteHandler);
|
|
633
|
+
container.registerSingleton(WhitelabelLogoHttpRouteHandler, WhitelabelLogoHttpRouteHandler);
|
|
638
634
|
for (const registrar of AppContainerFactory.honoRouteRegistrars) {
|
|
639
|
-
container.
|
|
635
|
+
container.registerSingleton(ApplicationTokens.HonoApiRouteRegistrar, registrar);
|
|
640
636
|
}
|
|
641
|
-
container.
|
|
637
|
+
container.registerSingleton(CodemationHonoApiApp, CodemationHonoApiApp);
|
|
642
638
|
}
|
|
643
639
|
|
|
644
640
|
private registerOperationalInfrastructure(container: Container): void {
|
|
645
641
|
container.register(ApplicationTokens.WorkflowWebsocketPublisher, {
|
|
646
642
|
useFactory: instanceCachingFactory((dependencyContainer) => dependencyContainer.resolve(WorkflowWebsocketServer)),
|
|
647
643
|
});
|
|
648
|
-
container.
|
|
649
|
-
container.
|
|
650
|
-
container.
|
|
644
|
+
container.registerSingleton(WorkflowRunEventWebsocketRelay, WorkflowRunEventWebsocketRelay);
|
|
645
|
+
container.registerSingleton(RunEventBusTelemetryReporter, RunEventBusTelemetryReporter);
|
|
646
|
+
container.registerSingleton(WorkflowRunRetentionPruneScheduler, WorkflowRunRetentionPruneScheduler);
|
|
651
647
|
}
|
|
652
648
|
|
|
653
649
|
private async registerRuntimeInfrastructure(container: Container, appConfig: AppConfig): Promise<PrismaOwnership> {
|
|
@@ -18,9 +18,7 @@ export class CodemationContainerRegistrationRegistrar {
|
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
if (this.isClassRegistration(registration)) {
|
|
21
|
-
container.
|
|
22
|
-
useClass: registration.useClass as never,
|
|
23
|
-
});
|
|
21
|
+
container.registerSingleton(registration.token as never, registration.useClass as never);
|
|
24
22
|
return;
|
|
25
23
|
}
|
|
26
24
|
container.register(registration.token, {
|
|
@@ -27,17 +27,13 @@ export class CodemationPluginRegistrar {
|
|
|
27
27
|
loggerFactory: args.loggerFactory,
|
|
28
28
|
registerCredentialType: (type) => args.registerCredentialType(type),
|
|
29
29
|
registerNode: (token, implementation) => {
|
|
30
|
-
args.container.
|
|
31
|
-
useClass: (implementation ?? token) as never,
|
|
32
|
-
});
|
|
30
|
+
args.container.registerSingleton(token as never, (implementation ?? token) as never);
|
|
33
31
|
},
|
|
34
32
|
registerValue: (token, value) => {
|
|
35
33
|
args.container.registerInstance(token, value);
|
|
36
34
|
},
|
|
37
35
|
registerClass: (token, implementation) => {
|
|
38
|
-
args.container.
|
|
39
|
-
useClass: implementation as never,
|
|
40
|
-
});
|
|
36
|
+
args.container.registerSingleton(token as never, implementation as never);
|
|
41
37
|
},
|
|
42
38
|
registerFactory: (token, factory) => {
|
|
43
39
|
args.container.register(token, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { container as tsyringeContainer, injectable } from "@codemation/core";
|
|
2
2
|
import type { DomainEvent } from "../../application/bus/DomainEvent";
|
|
3
3
|
import type { DomainEventHandler } from "../../application/bus/DomainEventHandler";
|
|
4
4
|
import { ApplicationTokens } from "../../applicationTokens";
|
|
@@ -13,12 +13,10 @@ export class HandlesDomainEvent {
|
|
|
13
13
|
return (target) => {
|
|
14
14
|
Reflect.defineMetadata(domainEventHandlerMetadataKey, eventType, target);
|
|
15
15
|
injectable()(target as never);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
])(target as never);
|
|
16
|
+
tsyringeContainer.registerSingleton(
|
|
17
|
+
ApplicationTokens.DomainEventHandler as never,
|
|
18
|
+
target as unknown as ConcreteType<DomainEventHandler<DomainEvent>>,
|
|
19
|
+
);
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -611,6 +611,14 @@ export class PrismaWorkflowRunRepository implements WorkflowRunRepository, Workf
|
|
|
611
611
|
}
|
|
612
612
|
let cIdx = 0;
|
|
613
613
|
for (const inv of state.connectionInvocations ?? []) {
|
|
614
|
+
if (inv.runId !== state.runId) {
|
|
615
|
+
// Defense-in-depth: `invocationId` is a global primary key in `ExecutionInstance`.
|
|
616
|
+
// A record whose `runId` differs from the current run belongs to another run and
|
|
617
|
+
// would collide on insert. `RunStartService.createRunCurrentState` already prevents
|
|
618
|
+
// carry-over; we skip here so any other accidental carry-over path self-heals
|
|
619
|
+
// instead of crashing the save.
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
614
622
|
rows.push({
|
|
615
623
|
instanceId: inv.invocationId,
|
|
616
624
|
runId: state.runId,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { CodemationBetterAuthRuntime } from "../../../../infrastructure/auth/CodemationBetterAuthRuntime";
|
|
5
4
|
import { AuthHttpRouteHandler } from "../../routeHandlers/AuthHttpRouteHandlerFactory";
|
|
6
5
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
7
6
|
|
|
8
7
|
@injectable()
|
|
9
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: AuthHonoApiRouteRegistrar }])
|
|
10
8
|
export class AuthHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
11
9
|
constructor(
|
|
12
10
|
@inject(AuthHttpRouteHandler) private readonly handler: AuthHttpRouteHandler,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { BinaryHttpRouteHandler } from "../../routeHandlers/BinaryHttpRouteHandlerFactory";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
/** Run-scoped binary content. Workflow overlay binary GET/POST are registered on {@link CodemationHonoApiApp} after route registrars. */
|
|
8
7
|
@injectable()
|
|
9
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: BinaryHonoApiRouteRegistrar }])
|
|
10
8
|
export class BinaryHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
11
9
|
constructor(@inject(BinaryHttpRouteHandler) private readonly handler: BinaryHttpRouteHandler) {}
|
|
12
10
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
|
|
4
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
5
4
|
import { ApiPaths } from "../../ApiPaths";
|
|
6
5
|
import { InternalAuthBootstrapHttpRouteHandler } from "../../routeHandlers/InternalAuthBootstrapHttpRouteHandler";
|
|
7
6
|
import { PublicFrontendBootstrapHttpRouteHandler } from "../../routeHandlers/PublicFrontendBootstrapHttpRouteHandler";
|
|
8
7
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
9
8
|
|
|
10
9
|
@injectable()
|
|
11
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: BootstrapHonoApiRouteRegistrar }])
|
|
12
10
|
export class BootstrapHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
13
11
|
constructor(
|
|
14
12
|
@inject(PublicFrontendBootstrapHttpRouteHandler)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { CredentialHttpRouteHandler } from "../../routeHandlers/CredentialHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: CredentialHonoApiRouteRegistrar }])
|
|
9
7
|
export class CredentialHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(CredentialHttpRouteHandler) private readonly handler: CredentialHttpRouteHandler) {}
|
|
11
9
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { DevBootstrapSummaryHttpRouteHandler } from "../../routeHandlers/DevBootstrapSummaryHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: DevHonoApiRouteRegistrar }])
|
|
9
7
|
export class DevHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(
|
|
11
9
|
@inject(DevBootstrapSummaryHttpRouteHandler) private readonly handler: DevBootstrapSummaryHttpRouteHandler,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { OAuth2HttpRouteHandler } from "../../routeHandlers/OAuth2HttpRouteHandlerFactory";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: OAuth2HonoApiRouteRegistrar }])
|
|
9
7
|
export class OAuth2HonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(OAuth2HttpRouteHandler) private readonly handler: OAuth2HttpRouteHandler) {}
|
|
11
9
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { RunHttpRouteHandler } from "../../routeHandlers/RunHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: RunHonoApiRouteRegistrar }])
|
|
9
7
|
export class RunHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(RunHttpRouteHandler) private readonly handler: RunHttpRouteHandler) {}
|
|
11
9
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { TelemetryHttpRouteHandler } from "../../routeHandlers/TelemetryHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: TelemetryHonoApiRouteRegistrar }])
|
|
9
7
|
export class TelemetryHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(TelemetryHttpRouteHandler) private readonly handler: TelemetryHttpRouteHandler) {}
|
|
11
9
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { UserHttpRouteHandler } from "../../routeHandlers/UserHttpRouteHandlerFactory";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: UserHonoApiRouteRegistrar }])
|
|
9
7
|
export class UserHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(UserHttpRouteHandler) private readonly handler: UserHttpRouteHandler) {}
|
|
11
9
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import type { Context } from "hono";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
5
4
|
import { WebhookHttpRouteHandler } from "../../routeHandlers/WebhookHttpRouteHandler";
|
|
6
5
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
7
6
|
|
|
8
7
|
@injectable()
|
|
9
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: WebhookHonoApiRouteRegistrar }])
|
|
10
8
|
export class WebhookHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
11
9
|
constructor(@inject(WebhookHttpRouteHandler) private readonly handler: WebhookHttpRouteHandler) {}
|
|
12
10
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { WhitelabelLogoHttpRouteHandler } from "../../routeHandlers/WhitelabelLogoHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: WhitelabelHonoApiRouteRegistrar }])
|
|
9
7
|
export class WhitelabelHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(
|
|
11
9
|
@inject(WhitelabelLogoHttpRouteHandler)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { inject, injectable
|
|
1
|
+
import { inject, injectable } from "@codemation/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import { ApplicationTokens } from "../../../../applicationTokens";
|
|
4
3
|
import { WorkflowHttpRouteHandler } from "../../routeHandlers/WorkflowHttpRouteHandler";
|
|
5
4
|
import type { HonoApiRouteRegistrar } from "../HonoApiRouteRegistrar";
|
|
6
5
|
|
|
7
6
|
@injectable()
|
|
8
|
-
@registry([{ token: ApplicationTokens.HonoApiRouteRegistrar, useClass: WorkflowHonoApiRouteRegistrar }])
|
|
9
7
|
export class WorkflowHonoApiRouteRegistrar implements HonoApiRouteRegistrar {
|
|
10
8
|
constructor(@inject(WorkflowHttpRouteHandler) private readonly handler: WorkflowHttpRouteHandler) {}
|
|
11
9
|
|