@codemation/host 0.5.1 → 0.7.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 +465 -0
- package/LICENSE +1 -37
- package/dist/{ApiPaths-CLTHphYZ.js → ApiPaths-Dv1dcHu_.js} +4 -4
- package/dist/ApiPaths-Dv1dcHu_.js.map +1 -0
- package/dist/{AppConfigFactory-CvpFScwB.js → AppConfigFactory-Cx4qQvRk.js} +114 -53
- package/dist/AppConfigFactory-Cx4qQvRk.js.map +1 -0
- package/dist/{AppConfigFactory-LK76niPc.d.ts → AppConfigFactory-DnLoQ9Li.d.ts} +8527 -5549
- package/dist/{AppContainerFactory-BlLrm6_h.js → AppContainerFactory-DqKYCRNP.js} +7656 -2090
- package/dist/AppContainerFactory-DqKYCRNP.js.map +1 -0
- package/dist/{CodemationAppContext-CvWi5gey.d.ts → CodemationAppContext-CKVv9W9q.d.ts} +8 -4
- package/dist/{CodemationAuthoring.types-BuKNTDC1.d.ts → CodemationAuthoring.types-DA3G3s6d.d.ts} +25 -5
- package/dist/{CodemationAuthoring.types-DZl-sJaM.js → CodemationAuthoring.types-NGkBcmmT.js} +18 -6
- package/dist/CodemationAuthoring.types-NGkBcmmT.js.map +1 -0
- package/dist/{CodemationConfigNormalizer-CYdR0PR5.d.ts → CodemationConfigNormalizer-BAKjetJ6.d.ts} +3 -3
- package/dist/{CodemationConsumerConfigLoader-BeAUS144.js → CodemationConsumerConfigLoader-GYpBBvqE.js} +79 -10
- package/dist/CodemationConsumerConfigLoader-GYpBBvqE.js.map +1 -0
- package/dist/{CodemationConsumerConfigLoader-C3nAj9Bj.d.ts → CodemationConsumerConfigLoader-nxOqvv46.d.ts} +17 -2
- package/dist/{CodemationPluginListMerger-B-W5Fa_X.js → CodemationPluginListMerger-D1B1IEbt.js} +1 -1
- package/dist/{CodemationPluginListMerger-B-W5Fa_X.js.map → CodemationPluginListMerger-D1B1IEbt.js.map} +1 -1
- package/dist/{CodemationPluginListMerger-D-gwVwtw.d.ts → CodemationPluginListMerger-DKLAHT2b.d.ts} +123 -16
- package/dist/CodemationTsyringeTypeInfoRegistrar-Bj6FJYFz.js +97 -0
- package/dist/CodemationTsyringeTypeInfoRegistrar-Bj6FJYFz.js.map +1 -0
- package/dist/{CodemationWhitelabelConfig-CWbcyQqn.d.ts → CodemationWhitelabelConfig-Ca2mCUeC.d.ts} +2 -2
- package/dist/{CollectionContracts.types-DdpHft0i.d.ts → CollectionContracts.types-DDyFYT_D.d.ts} +1 -1
- package/dist/{CredentialContractsRegistry-D7mcPed2.d.ts → CredentialContractsRegistry-Bq2bq28t.d.ts} +2 -2
- package/dist/{CredentialServices-DdCEP2xt.d.ts → CredentialServices-Be2I60Th.d.ts} +65 -20
- package/dist/{CredentialServices-CgxwguAv.js → CredentialServices-Dk8yypeL.js} +310 -51
- package/dist/CredentialServices-Dk8yypeL.js.map +1 -0
- package/dist/InternalHonoApiRouteRegistrar-Ce1yxpnO.d.ts +17 -0
- package/dist/InternalPingRegistrar-DY3kSfxP.js +221 -0
- package/dist/InternalPingRegistrar-DY3kSfxP.js.map +1 -0
- package/dist/{ItemsInputNormalizer-D1WppVMU.d.ts → ItemsInputNormalizer-_RwIfRIQ.d.ts} +108 -25
- package/dist/{LogLevelPolicyFactory-CampWO0l.d.ts → LogLevelPolicyFactory-ewCHLDLn.d.ts} +2 -2
- package/dist/{PublicFrontendBootstrap-DzBgwOnG.d.ts → PublicFrontendBootstrap-Cev3qK46.d.ts} +9 -2
- package/dist/PublicFrontendBootstrapFactory-CY2FS-5g.d.ts +82 -0
- package/dist/{PublicFrontendBootstrapJsonCodec-Cl_DLRh0.d.ts → PublicFrontendBootstrapJsonCodec-CXG9Dxft.d.ts} +3 -3
- package/dist/{PublicFrontendBootstrapJsonCodec-DzqvA0uo.js → PublicFrontendBootstrapJsonCodec-CegIF_ne.js} +7 -2
- package/dist/PublicFrontendBootstrapJsonCodec-CegIF_ne.js.map +1 -0
- package/dist/ServerLoggerFactory-Ckk52S3w.js +223 -0
- package/dist/ServerLoggerFactory-Ckk52S3w.js.map +1 -0
- package/dist/{TelemetryContracts-BsOD_Y17.d.ts → TelemetryContracts-BtDx84Cp.d.ts} +13 -4
- package/dist/{WorkflowPolicyUiPresentationFactory-DNE5oAI6.d.ts → WorkflowPolicyUiPresentationFactory-6MyjCvBO.d.ts} +2 -2
- package/dist/{WorkflowPolicyUiPresentationFactory-DhPqQ9aB.js → WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js} +1 -1
- package/dist/{WorkflowPolicyUiPresentationFactory-DhPqQ9aB.js.map → WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js.map} +1 -1
- package/dist/{WorkflowViewContracts-0ZgsHQdp.d.ts → WorkflowViewContracts-B7aFQcIw.d.ts} +15 -1
- package/dist/authoring.d.ts +5 -5
- package/dist/authoring.js +1 -1
- package/dist/client.d.ts +4 -4
- package/dist/client.js +2 -2
- package/dist/consumer.d.ts +6 -6
- package/dist/consumer.js +2 -2
- package/dist/credentials.d.ts +6 -6
- package/dist/credentials.js +1 -1
- package/dist/devServerSidecar.d.ts +2 -2
- package/dist/devServerSidecar.js +1 -94
- package/dist/devServerSidecar.js.map +1 -1
- package/dist/dto.d.ts +6 -6
- package/dist/{index-BlGs9e9Q.d.ts → index-DilAYwnH.d.ts} +49 -3
- package/dist/index.d.ts +110 -21
- package/dist/index.js +15 -13
- package/dist/mapping.d.ts +2 -2
- package/dist/mapping.js +1 -1
- package/dist/nextServer.d.ts +43 -88
- package/dist/nextServer.js +9 -7
- package/dist/pairing.d.ts +93 -0
- package/dist/pairing.js +5 -0
- package/dist/pairing.types-snfZ_OzB.d.ts +19 -0
- package/dist/{persistenceServer-CpNFYa_q.js → persistenceServer-C-hH4z6l.js} +2 -2
- package/dist/{persistenceServer-CpNFYa_q.js.map → persistenceServer-C-hH4z6l.js.map} +1 -1
- package/dist/persistenceServer-CeTHtC6E.d.ts +30 -0
- package/dist/persistenceServer.d.ts +8 -8
- package/dist/persistenceServer.js +3 -3
- package/dist/{server-CQWdkT7t.d.ts → server-C4bS62rg.d.ts} +21 -6
- package/dist/{server-BK43OKxW.js → server-Y7kxwtCK.js} +7 -6
- package/dist/{server-BK43OKxW.js.map → server-Y7kxwtCK.js.map} +1 -1
- package/dist/server.d.ts +14 -14
- package/dist/server.js +13 -11
- package/package.json +29 -42
- package/prisma/migrations/20260507120000_execution_instance_child_run_id/migration.sql +5 -0
- package/prisma/migrations/20260519000000_workflow_audit_log/migration.sql +23 -0
- package/prisma/migrations/20260519100000_storage_growth_fixes/migration.sql +61 -0
- package/prisma/migrations.sqlite/20260507120000_execution_instance_child_run_id/migration.sql +5 -0
- package/prisma/migrations.sqlite/20260519000000_workflow_audit_log/migration.sql +21 -0
- package/prisma/migrations.sqlite/20260519100000_storage_growth_fixes/migration.sql +29 -0
- package/prisma/schema.postgresql.prisma +56 -17
- package/prisma/schema.sqlite.prisma +56 -17
- package/prisma-generated/prisma-postgresql-client/edge.js +35 -6
- package/prisma-generated/prisma-postgresql-client/index-browser.js +31 -2
- package/prisma-generated/prisma-postgresql-client/index.d.ts +8971 -5718
- package/prisma-generated/prisma-postgresql-client/index.js +35 -6
- package/prisma-generated/prisma-postgresql-client/package.json +1 -1
- package/prisma-generated/prisma-postgresql-client/schema.prisma +39 -0
- package/prisma-generated/prisma-sqlite-client/edge.js +35 -6
- package/prisma-generated/prisma-sqlite-client/index-browser.js +31 -2
- package/prisma-generated/prisma-sqlite-client/index.d.ts +8963 -5715
- package/prisma-generated/prisma-sqlite-client/index.js +35 -6
- package/prisma-generated/prisma-sqlite-client/package.json +1 -1
- package/prisma-generated/prisma-sqlite-client/schema.prisma +39 -0
- package/scripts/check-collections.mjs +18 -0
- package/scripts/generate-prisma-clients.mjs +20 -11
- package/src/application/WorkflowAuditLogPruneScheduler.ts +96 -0
- package/src/application/auth/AuthenticatedPrincipal.ts +4 -0
- package/src/application/commands/StartWorkflowRunCommandHandler.ts +4 -0
- package/src/application/contracts/WorkflowViewContracts.ts +11 -0
- package/src/application/contracts/WorkflowWebsocketMessage.ts +3 -1
- package/src/application/mapping/WorkflowDefinitionMapper.ts +44 -1
- package/src/application/runs/WorkflowRunRetentionPruneScheduler.ts +7 -1
- package/src/application/telemetry/OtelExecutionTelemetry.types.ts +5 -0
- package/src/application/telemetry/OtelExecutionTelemetryFactory.ts +4 -0
- package/src/application/telemetry/StoredTelemetrySpanScope.ts +6 -2
- package/src/application/telemetry/TelemetryRetentionTimestampFactory.ts +27 -17
- package/src/application/telemetry/TelemetrySpanPublisher.ts +11 -0
- package/src/application/websocket/TelemetrySpanWebsocketRelay.ts +31 -0
- package/src/applicationTokens.ts +20 -1
- package/src/audit/IAuditEmitter.ts +32 -0
- package/src/audit/PrismaWorkflowAuditLogRepository.ts +34 -0
- package/src/audit/WorkflowAuditLogWriter.ts +125 -0
- package/src/auth/managed/ManagedAuthConfig.ts +29 -0
- package/src/auth/managed/ManagedAuthMiddleware.ts +52 -0
- package/src/auth/managed/ManagedCorsMiddleware.ts +43 -0
- package/src/auth/managed/ManagedModeBootGuard.ts +27 -0
- package/src/auth/managed/index.ts +5 -0
- package/src/bootstrap/AppContainerFactory.ts +277 -29
- package/src/bootstrap/AppContainerLifecycle.ts +31 -0
- package/src/bootstrap/perf/BootTimer.ts +168 -0
- package/src/bootstrap/runtime/AppConfigFactory.ts +21 -65
- package/src/bootstrap/runtime/FrontendRuntime.ts +4 -1
- package/src/bootstrap/runtime/WorkerRuntime.ts +2 -1
- package/src/credentials/BrokerClient.ts +49 -0
- package/src/credentials/BrokerRefreshError.ts +12 -0
- package/src/credentials/BrokerRefreshInvalidGrantError.ts +13 -0
- package/src/credentials/ControlPlaneCatalogFetcher.ts +261 -0
- package/src/credentials/CredentialOAuth2MaterialReader.ts +136 -0
- package/src/credentials/InternalCredentialsListRegistrar.ts +48 -0
- package/src/credentials/InternalCredentialsPushRegistrar.ts +125 -0
- package/src/credentials/LocalOAuthFlowExecutor.ts +316 -0
- package/src/credentials/ManagedOAuthFlowExecutor.ts +94 -0
- package/src/credentials/ManagedOAuthRefreshInvalidGrantError.ts +13 -0
- package/src/credentials/catalogTypes.ts +4 -0
- package/src/credentials/refresh/CredentialDisconnectedError.ts +11 -0
- package/src/domain/credentials/CredentialBindingService.ts +54 -2
- package/src/domain/credentials/CredentialKeyRotatedError.ts +22 -0
- package/src/domain/credentials/CredentialSecretCipher.ts +68 -6
- package/src/domain/credentials/CredentialTypeRegistryImpl.ts +117 -10
- package/src/domain/credentials/OAuth2RedirectUriResolver.ts +79 -0
- package/src/domain/credentials/WorkflowCredentialNodeResolver.ts +14 -5
- package/src/domain/telemetry/TelemetryContracts.ts +7 -1
- package/src/domain/workflows/WorkflowActivationPreflight.ts +24 -1
- package/src/domain/workflows/WorkflowActivationPreflightRules.ts +40 -1
- package/src/index.ts +6 -0
- package/src/infrastructure/binary/LocalFilesystemBinaryStorageRegistry.ts +29 -1
- package/src/infrastructure/binary/S3BinaryStorage.ts +169 -0
- package/src/infrastructure/binary/S3BinaryStorageConfig.ts +17 -0
- package/src/infrastructure/config/CodemationPluginRegistrar.ts +3 -1
- package/src/infrastructure/persistence/CodemationDatabaseUrlParser.ts +41 -0
- package/src/infrastructure/persistence/InMemoryTelemetryArtifactStore.ts +8 -3
- package/src/infrastructure/persistence/InMemoryWorkflowRunRepository.ts +1 -0
- package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +21 -13
- package/src/infrastructure/persistence/PrismaTelemetryArtifactStore.ts +43 -8
- package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +33 -3
- package/src/infrastructure/persistence/PrismaWorkflowSnapshotRepository.ts +48 -0
- package/src/mcp/AgentMcpIntegrationImpl.ts +344 -0
- package/src/mcp/McpClientFactory.ts +29 -0
- package/src/mcp/McpConnectionPool.ts +184 -0
- package/src/mcp/McpConnectionPool.types.ts +12 -0
- package/src/mcp/McpServerCatalog.ts +104 -0
- package/src/mcp/index.ts +5 -0
- package/src/pairing/HmacRequestSigner.ts +32 -0
- package/src/pairing/IncomingHmacVerifier.ts +82 -0
- package/src/pairing/InternalHmacAuthMiddleware.ts +33 -0
- package/src/pairing/InternalPingRegistrar.ts +25 -0
- package/src/pairing/PairedFetch.ts +33 -0
- package/src/pairing/PairingConfigFactory.ts +35 -0
- package/src/pairing/PairingConfigToken.ts +6 -0
- package/src/pairing/index.ts +14 -0
- package/src/pairing/pairing.types.ts +18 -0
- package/src/pairing.ts +17 -0
- package/src/persistenceServer.ts +1 -0
- package/src/presentation/config/AppConfig.ts +7 -1
- package/src/presentation/config/CodemationAuthConfig.ts +1 -1
- package/src/presentation/config/CodemationAuthoring.types.ts +54 -5
- package/src/presentation/config/CodemationConfig.ts +3 -0
- package/src/presentation/config/CodemationConfigNormalizer.ts +39 -1
- package/src/presentation/config/CodemationPlugin.ts +2 -1
- package/src/presentation/frontend/CodemationFrontendAuthSnapshot.ts +5 -0
- package/src/presentation/frontend/CodemationFrontendAuthSnapshotFactory.ts +7 -1
- package/src/presentation/frontend/PublicFrontendBootstrap.ts +2 -0
- package/src/presentation/frontend/PublicFrontendBootstrapFactory.ts +5 -1
- package/src/presentation/frontend/PublicFrontendBootstrapJsonCodec.ts +4 -1
- package/src/presentation/http/ApiPaths.ts +4 -4
- package/src/presentation/http/ServerHttpErrorResponseFactory.ts +39 -2
- package/src/presentation/http/hono/CodemationHonoApiAppFactory.ts +33 -8
- package/src/presentation/http/hono/InternalHonoApiRouteRegistrar.ts +12 -0
- package/src/presentation/http/hono/registrars/ManagedMeHonoApiRouteRegistrar.ts +35 -0
- package/src/presentation/http/hono/registrars/OAuth2HonoApiRouteRegistrar.ts +2 -2
- package/src/presentation/http/routeHandlers/CredentialHttpRouteHandler.ts +28 -0
- package/src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.ts +98 -41
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +54 -7
- package/src/presentation/server/CodemationPluginDiscovery.ts +5 -0
- package/src/presentation/server/WorkflowDefinitionExportsResolver.ts +18 -0
- package/src/presentation/server/WorkflowModulePathFinder.ts +12 -1
- package/src/presentation/websocket/ManagedWebsocketAuthenticator.ts +50 -0
- package/src/presentation/websocket/WebsocketAuthenticator.types.ts +12 -0
- package/src/presentation/websocket/WorkflowWebsocketServer.ts +24 -3
- package/src/process/ExecaProcessRunner.ts +41 -0
- package/src/process/ProcessRunner.types.ts +39 -0
- package/src/server.ts +2 -0
- package/src/workflows/InternalWorkflowActivationRegistrar.ts +42 -0
- package/src/workflows/InternalWorkflowDetailRegistrar.ts +33 -0
- package/src/workflows/InternalWorkflowTestRunRegistrar.ts +91 -0
- package/src/workflows/InternalWorkflowsListRegistrar.ts +28 -0
- package/src/workflows/discovery/WorkflowDirectoryDiscoverer.ts +79 -0
- package/tsconfig.json +2 -0
- package/vitest.shared.ts +5 -0
- package/dist/ApiPaths-CLTHphYZ.js.map +0 -1
- package/dist/AppConfigFactory-CvpFScwB.js.map +0 -1
- package/dist/AppContainerFactory-BlLrm6_h.js.map +0 -1
- package/dist/CodemationAuthoring.types-DZl-sJaM.js.map +0 -1
- package/dist/CodemationConsumerConfigLoader-BeAUS144.js.map +0 -1
- package/dist/CredentialServices-CgxwguAv.js.map +0 -1
- package/dist/PublicFrontendBootstrapFactory-BMWqNM9a.d.ts +0 -45
- package/dist/PublicFrontendBootstrapJsonCodec-DzqvA0uo.js.map +0 -1
- package/dist/ServerLoggerFactory-BKSIh9Xv.js +0 -98
- package/dist/ServerLoggerFactory-BKSIh9Xv.js.map +0 -1
- package/dist/persistenceServer-CIVt3UOX.d.ts +0 -9
- package/src/domain/credentials/OAuth2ConnectServiceFactory.ts +0 -411
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import "./ItemsInputNormalizer-
|
|
3
|
-
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-
|
|
4
|
-
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-
|
|
5
|
-
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-
|
|
6
|
-
import "./LogLevelPolicyFactory-
|
|
7
|
-
import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-
|
|
8
|
-
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-
|
|
9
|
-
import "./CodemationConfigNormalizer-
|
|
10
|
-
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
11
|
-
import "./CredentialServices-
|
|
12
|
-
import "./CredentialContractsRegistry-
|
|
13
|
-
import "./TelemetryContracts-
|
|
14
|
-
import "./WorkflowViewContracts-
|
|
15
|
-
import { a as CollectionSummaryDto, f as UpsertLocalBootstrapUserResultDto, i as CollectionRowDto, o as ListCollectionRowsResponseDto, p as UserAccountDto, s as SyncCollectionsResponseDto, t as CollectionDetailDto } from "./CollectionContracts.types-
|
|
16
|
-
import {
|
|
17
|
-
import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-
|
|
18
|
-
import { t as
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
1
|
+
import "./index-DilAYwnH.js";
|
|
2
|
+
import { $ as PersistedRunState, R as Items, tt as RunCurrentState } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
+
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-DA3G3s6d.js";
|
|
4
|
+
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-CKVv9W9q.js";
|
|
5
|
+
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
6
|
+
import "./LogLevelPolicyFactory-ewCHLDLn.js";
|
|
7
|
+
import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CXG9Dxft.js";
|
|
8
|
+
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
|
|
9
|
+
import "./CodemationConfigNormalizer-BAKjetJ6.js";
|
|
10
|
+
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-nxOqvv46.js";
|
|
11
|
+
import "./CredentialServices-Be2I60Th.js";
|
|
12
|
+
import "./CredentialContractsRegistry-Bq2bq28t.js";
|
|
13
|
+
import "./TelemetryContracts-BtDx84Cp.js";
|
|
14
|
+
import "./WorkflowViewContracts-B7aFQcIw.js";
|
|
15
|
+
import { a as CollectionSummaryDto, f as UpsertLocalBootstrapUserResultDto, i as CollectionRowDto, o as ListCollectionRowsResponseDto, p as UserAccountDto, s as SyncCollectionsResponseDto, t as CollectionDetailDto } from "./CollectionContracts.types-DDyFYT_D.js";
|
|
16
|
+
import { S as Command, _ as AppContainerFactory, b as Query, c as WorkerRuntime, g as AppContainerLifecycle, h as DatabaseMigrations, l as FrontendRuntime, m as CollectionSchemaSyncerHolder, n as CodemationBootstrapRequest, r as ApplicationTokens, t as CodemationPluginListMerger, x as CommandBus, y as QueryBus } from "./CodemationPluginListMerger-DKLAHT2b.js";
|
|
17
|
+
import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-DnLoQ9Li.js";
|
|
18
|
+
import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-CY2FS-5g.js";
|
|
19
|
+
import "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
|
|
20
|
+
import { n as CodemationPostgresPrismaClientFactory } from "./persistenceServer-CeTHtC6E.js";
|
|
21
|
+
import { c as CodemationServerGateway } from "./server-C4bS62rg.js";
|
|
21
22
|
|
|
22
23
|
//#region src/application/queries/ListUserAccountsQuery.d.ts
|
|
23
24
|
declare class ListUserAccountsQuery extends Query<ReadonlyArray<UserAccountDto>> {}
|
|
@@ -29,6 +30,52 @@ declare class UpsertLocalBootstrapUserCommand extends Command<UpsertLocalBootstr
|
|
|
29
30
|
constructor(email: string, password: string);
|
|
30
31
|
}
|
|
31
32
|
//#endregion
|
|
33
|
+
//#region src/bootstrap/perf/BootTimer.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* Lightweight boot-phase timer. Designed for diagnosing slow `pnpm dev` cold starts.
|
|
36
|
+
*
|
|
37
|
+
* Usage: every meaningful boot phase wraps its async work in
|
|
38
|
+
* `await BootTimer.measureAsync("phase.name", async () => { ... })`
|
|
39
|
+
* (or the sync `measure` for non-async work). When `--trace-boot` is set on the CLI
|
|
40
|
+
* the timer records each phase in a tree, prints a pretty tree to stderr at the end
|
|
41
|
+
* of boot, and writes the same tree to `tmp/boot-trace.json` for diffing later.
|
|
42
|
+
*
|
|
43
|
+
* When disabled (default), every method is a near-zero-cost passthrough — no allocation,
|
|
44
|
+
* no Date.now() calls, no tree construction. Safe to leave instrumentation in production
|
|
45
|
+
* code paths.
|
|
46
|
+
*/
|
|
47
|
+
type BootTracePhase = Readonly<{
|
|
48
|
+
name: string;
|
|
49
|
+
ms: number;
|
|
50
|
+
pct: number;
|
|
51
|
+
children: ReadonlyArray<BootTracePhase>;
|
|
52
|
+
}>;
|
|
53
|
+
declare class BootTimer {
|
|
54
|
+
private static enabled;
|
|
55
|
+
private static root;
|
|
56
|
+
private static current;
|
|
57
|
+
/** Enable boot tracing for the lifetime of the current process. Idempotent. */
|
|
58
|
+
static enable(): void;
|
|
59
|
+
static isEnabled(): boolean;
|
|
60
|
+
/** Wrap an async phase. Pass-through when disabled. */
|
|
61
|
+
static measureAsync<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
62
|
+
/** Wrap a sync phase. Pass-through when disabled. */
|
|
63
|
+
static measure<T>(name: string, fn: () => T): T;
|
|
64
|
+
/**
|
|
65
|
+
* Manual start/stop for fire-and-forget phases (e.g. a spawned child process you only
|
|
66
|
+
* stop once a readiness probe succeeds). Returns the stop function.
|
|
67
|
+
*/
|
|
68
|
+
static start(name: string): () => void;
|
|
69
|
+
/** Print the tree to stderr and write JSON to the given path. Finalizes the root span. */
|
|
70
|
+
static finish(outputJsonPath?: string): Promise<void>;
|
|
71
|
+
/** Return a plain-object snapshot of the current tree (for tests / diffing). */
|
|
72
|
+
static snapshot(): BootTracePhase;
|
|
73
|
+
/** Test helper: reset all state. Do not call in production code. */
|
|
74
|
+
static reset(): void;
|
|
75
|
+
private static pushPhase;
|
|
76
|
+
private static popPhase;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
32
79
|
//#region src/application/collections/ListCollectionsQuery.d.ts
|
|
33
80
|
declare class ListCollectionsQuery extends Query<ReadonlyArray<CollectionSummaryDto>> {}
|
|
34
81
|
//#endregion
|
|
@@ -84,10 +131,52 @@ declare class SyncCollectionsCommand extends Command<SyncCollectionsResponseDto>
|
|
|
84
131
|
constructor(dryRun: boolean);
|
|
85
132
|
}
|
|
86
133
|
//#endregion
|
|
134
|
+
//#region src/application/contracts/RunContracts.d.ts
|
|
135
|
+
type CreateRunRequest = Readonly<{
|
|
136
|
+
workflowId?: string;
|
|
137
|
+
items?: Items;
|
|
138
|
+
synthesizeTriggerItems?: boolean;
|
|
139
|
+
currentState?: RunCurrentState;
|
|
140
|
+
startAt?: string;
|
|
141
|
+
stopAt?: string;
|
|
142
|
+
clearFromNodeId?: string;
|
|
143
|
+
mode?: "manual" | "debug";
|
|
144
|
+
sourceRunId?: string;
|
|
145
|
+
}>;
|
|
146
|
+
type RunCommandResult = Readonly<{
|
|
147
|
+
runId: string;
|
|
148
|
+
workflowId: string;
|
|
149
|
+
startedAt?: string;
|
|
150
|
+
status: string;
|
|
151
|
+
state: PersistedRunState | null;
|
|
152
|
+
}>;
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/application/commands/StartWorkflowRunCommand.d.ts
|
|
155
|
+
declare class StartWorkflowRunCommand extends Command<RunCommandResult> {
|
|
156
|
+
readonly body: CreateRunRequest;
|
|
157
|
+
constructor(body: CreateRunRequest);
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/application/ApplicationRequestError.d.ts
|
|
161
|
+
declare class ApplicationRequestError extends Error {
|
|
162
|
+
readonly status: number;
|
|
163
|
+
readonly payload: Readonly<{
|
|
164
|
+
error: string;
|
|
165
|
+
errors?: ReadonlyArray<string>;
|
|
166
|
+
}>;
|
|
167
|
+
constructor(status: number, message: string, errors?: ReadonlyArray<string>);
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/application/queries/GetRunStateQuery.d.ts
|
|
171
|
+
declare class GetRunStateQuery extends Query<PersistedRunState | undefined> {
|
|
172
|
+
readonly runId: string;
|
|
173
|
+
constructor(runId: string);
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
87
176
|
//#region src/presentation/config/CodemationPackageManifest.d.ts
|
|
88
177
|
interface CodemationPackageManifest {
|
|
89
178
|
readonly plugin?: string;
|
|
90
179
|
}
|
|
91
180
|
//#endregion
|
|
92
|
-
export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationTokens, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, CollectionSchemaSyncerHolder, type CommandBus, DatabaseMigrations, type DefineCodemationAppOptions, type DefinePluginOptions, DeleteCollectionRowCommand, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, InsertCollectionRowCommand, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, type PrismaDatabaseClient as PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
|
181
|
+
export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationRequestError, ApplicationTokens, BootTimer, type BootTracePhase, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, CollectionSchemaSyncerHolder, type CommandBus, DatabaseMigrations, type DefineCodemationAppOptions, type DefinePluginOptions, DeleteCollectionRowCommand, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, GetRunStateQuery, InsertCollectionRowCommand, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, type PrismaDatabaseClient as PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, type RunCommandResult, StartWorkflowRunCommand, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
|
93
182
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-
|
|
1
|
+
import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-NGkBcmmT.js";
|
|
2
2
|
import "./LogLevelPolicyFactory-DCUzIN6G.js";
|
|
3
|
-
import { t as ApiPaths } from "./ApiPaths-
|
|
4
|
-
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-
|
|
5
|
-
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
6
|
-
import "./ServerLoggerFactory-
|
|
3
|
+
import { t as ApiPaths } from "./ApiPaths-Dv1dcHu_.js";
|
|
4
|
+
import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CegIF_ne.js";
|
|
5
|
+
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-GYpBBvqE.js";
|
|
6
|
+
import { o as BootTimer } from "./ServerLoggerFactory-Ckk52S3w.js";
|
|
7
7
|
import "./decorateParam-BWxkAUSj.js";
|
|
8
8
|
import "./decorate-CXWmflG_.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import "./
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
9
|
+
import { f as ApplicationRequestError, m as ApplicationTokens } from "./CredentialServices-Dk8yypeL.js";
|
|
10
|
+
import "./CodemationTsyringeTypeInfoRegistrar-Bj6FJYFz.js";
|
|
11
|
+
import { D as FrontendAppConfigFactory, E as InternalAuthBootstrapFactory, F as StartWorkflowRunCommand, I as UpsertLocalBootstrapUserCommand, L as ListUserAccountsQuery, N as GetRunStateQuery, O as CodemationFrontendAuthSnapshotFactory, T as PublicFrontendBootstrapFactory, a as GetCollectionQuery, c as InsertCollectionRowCommand, d as FrontendRuntime, f as CollectionSchemaSyncerHolder, i as GetCollectionRowQuery, l as DeleteCollectionRowCommand, m as AppContainerLifecycle, n as ListCollectionsQuery, o as UpdateCollectionRowCommand, p as DatabaseMigrations, r as ListCollectionRowsQuery, s as SyncCollectionsCommand, t as AppContainerFactory, u as WorkerRuntime } from "./AppContainerFactory-DqKYCRNP.js";
|
|
12
|
+
import "./WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js";
|
|
13
|
+
import "./InternalPingRegistrar-DY3kSfxP.js";
|
|
14
|
+
import { r as CodemationPluginPackageMetadata, t as AppConfigFactory } from "./AppConfigFactory-Cx4qQvRk.js";
|
|
15
|
+
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-D1B1IEbt.js";
|
|
16
|
+
import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-C-hH4z6l.js";
|
|
17
|
+
import { r as CodemationServerGateway } from "./server-Y7kxwtCK.js";
|
|
16
18
|
import { workflow } from "@codemation/core-nodes";
|
|
17
19
|
|
|
18
|
-
export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, CodemationServerGateway, CollectionSchemaSyncerHolder, DatabaseMigrations, DeleteCollectionRowCommand, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, InsertCollectionRowCommand, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
|
20
|
+
export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationRequestError, ApplicationTokens, BootTimer, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, CodemationServerGateway, CollectionSchemaSyncerHolder, DatabaseMigrations, DeleteCollectionRowCommand, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, GetRunStateQuery, InsertCollectionRowCommand, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, StartWorkflowRunCommand, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
package/dist/mapping.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./ItemsInputNormalizer-
|
|
2
|
-
import { t as WorkflowPolicyUiPresentationFactory } from "./WorkflowPolicyUiPresentationFactory-
|
|
1
|
+
import "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
2
|
+
import { t as WorkflowPolicyUiPresentationFactory } from "./WorkflowPolicyUiPresentationFactory-6MyjCvBO.js";
|
|
3
3
|
export { WorkflowPolicyUiPresentationFactory };
|
package/dist/mapping.js
CHANGED
package/dist/nextServer.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as AppConfig } from "./CodemationAppContext-
|
|
4
|
-
import { l as Logger, u as LoggerFactory } from "./CodemationWhitelabelConfig-
|
|
5
|
-
import { n as logLevelPolicyFactory, t as LogLevelPolicyFactory } from "./LogLevelPolicyFactory-
|
|
6
|
-
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-
|
|
7
|
-
import "./CodemationConfigNormalizer-
|
|
8
|
-
import { a as
|
|
9
|
-
import "./CredentialContractsRegistry-
|
|
10
|
-
import "./TelemetryContracts-
|
|
11
|
-
import { i as WorkflowSummary, t as WorkflowDto } from "./WorkflowViewContracts-
|
|
12
|
-
import { _ as
|
|
13
|
-
import { t as AppConfigFactory } from "./AppConfigFactory-
|
|
14
|
-
import { n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-
|
|
15
|
-
import { t as
|
|
1
|
+
import { n as RunIntentService, t as OAuthFlowExecutor } from "./index-DilAYwnH.js";
|
|
2
|
+
import { D as WebhookInvocationMatch, F as ActivationIdFactory, I as BinaryAttachment, L as Item, X as WorkflowDefinition, o as BinaryStorage, q as RunIdFactory, w as WorkflowActivationPolicy } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
+
import { r as AppConfig } from "./CodemationAppContext-CKVv9W9q.js";
|
|
4
|
+
import { l as Logger, u as LoggerFactory } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
|
+
import { n as logLevelPolicyFactory, t as LogLevelPolicyFactory } from "./LogLevelPolicyFactory-ewCHLDLn.js";
|
|
6
|
+
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
|
|
7
|
+
import "./CodemationConfigNormalizer-BAKjetJ6.js";
|
|
8
|
+
import { a as CredentialSecretCipher, i as CredentialInstanceService, o as McpServerCatalog, r as CredentialBindingService, t as CredentialStore } from "./CredentialServices-Be2I60Th.js";
|
|
9
|
+
import "./CredentialContractsRegistry-Bq2bq28t.js";
|
|
10
|
+
import "./TelemetryContracts-BtDx84Cp.js";
|
|
11
|
+
import { i as WorkflowSummary, t as WorkflowDto } from "./WorkflowViewContracts-B7aFQcIw.js";
|
|
12
|
+
import { _ as AppContainerFactory, a as HonoApiRouteRegistrar, c as WorkerRuntime, d as ServerLoggerFactory, f as LogFilter, g as AppContainerLifecycle, h as DatabaseMigrations, i as ManagedCorsMiddleware, l as FrontendRuntime, n as CodemationBootstrapRequest, o as WorkflowDebuggerOverlayRepository, p as WorkflowRunRepository, r as ApplicationTokens, s as SessionVerifier, t as CodemationPluginListMerger, u as WorkflowRunRetentionPruneScheduler, v as WorkflowWebsocketServer, x as CommandBus, y as QueryBus } from "./CodemationPluginListMerger-DKLAHT2b.js";
|
|
13
|
+
import { t as AppConfigFactory } from "./AppConfigFactory-DnLoQ9Li.js";
|
|
14
|
+
import { n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-CY2FS-5g.js";
|
|
15
|
+
import { t as InternalHonoApiRouteRegistrar } from "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
|
|
16
|
+
import { t as WorkflowPolicyUiPresentationFactory } from "./WorkflowPolicyUiPresentationFactory-6MyjCvBO.js";
|
|
17
|
+
import { t as PairingConfig } from "./pairing.types-snfZ_OzB.js";
|
|
16
18
|
import { Hono } from "hono";
|
|
17
19
|
|
|
18
20
|
//#region src/application/dev/DevBootstrapSummaryJson.types.d.ts
|
|
@@ -91,7 +93,8 @@ interface DataMapper<TSource, TTarget> {
|
|
|
91
93
|
declare class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition, WorkflowDto> {
|
|
92
94
|
private readonly policyUi;
|
|
93
95
|
private readonly workflowActivationPolicy;
|
|
94
|
-
|
|
96
|
+
private readonly mcpCatalog;
|
|
97
|
+
constructor(policyUi: WorkflowPolicyUiPresentationFactory, workflowActivationPolicy: WorkflowActivationPolicy, mcpCatalog: McpServerCatalog);
|
|
95
98
|
map(workflow: WorkflowDefinition): Promise<WorkflowDto>;
|
|
96
99
|
mapSync(workflow: WorkflowDefinition): WorkflowDto;
|
|
97
100
|
toSummary(workflow: WorkflowDefinition): WorkflowSummary;
|
|
@@ -109,6 +112,7 @@ declare class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition,
|
|
|
109
112
|
* Omit optional port fields when undefined so persisted snapshot DTOs (which never serialize
|
|
110
113
|
* undefined keys) stay aligned with live workflow mapping.
|
|
111
114
|
*/
|
|
115
|
+
private readInspectorSummary;
|
|
112
116
|
private nodePortFieldsFromConfig;
|
|
113
117
|
private nodeTypeName;
|
|
114
118
|
}
|
|
@@ -148,7 +152,7 @@ declare class BinaryHttpRouteHandler {
|
|
|
148
152
|
//#region src/presentation/http/hono/CodemationHonoApiAppFactory.d.ts
|
|
149
153
|
declare class CodemationHonoApiApp {
|
|
150
154
|
private readonly app;
|
|
151
|
-
constructor(sessionVerifier: SessionVerifier, registrars: ReadonlyArray<HonoApiRouteRegistrar>, binaryHttpRouteHandler: BinaryHttpRouteHandler);
|
|
155
|
+
constructor(sessionVerifier: SessionVerifier, registrars: ReadonlyArray<HonoApiRouteRegistrar>, binaryHttpRouteHandler: BinaryHttpRouteHandler, internalRegistrars: ReadonlyArray<InternalHonoApiRouteRegistrar>, corsMiddlewareList: ReadonlyArray<ManagedCorsMiddleware>);
|
|
152
156
|
getHono(): Hono;
|
|
153
157
|
fetch(request: Request): Response | Promise<Response>;
|
|
154
158
|
}
|
|
@@ -157,7 +161,9 @@ declare class CodemationHonoApiApp {
|
|
|
157
161
|
declare class CredentialHttpRouteHandler {
|
|
158
162
|
private readonly queryBus;
|
|
159
163
|
private readonly commandBus;
|
|
160
|
-
|
|
164
|
+
private readonly sessionVerifier;
|
|
165
|
+
private readonly pairingConfig;
|
|
166
|
+
constructor(queryBus: QueryBus, commandBus: CommandBus, sessionVerifier: SessionVerifier, pairingConfig: PairingConfig | null);
|
|
161
167
|
getCredentialTypes(): Promise<Response>;
|
|
162
168
|
getCredentialFieldEnvStatus(): Promise<Response>;
|
|
163
169
|
getCredentialInstances(): Promise<Response>;
|
|
@@ -170,87 +176,36 @@ declare class CredentialHttpRouteHandler {
|
|
|
170
176
|
getWorkflowCredentialHealth(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
171
177
|
}
|
|
172
178
|
//#endregion
|
|
173
|
-
//#region src/domain/credentials/
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}>;
|
|
181
|
-
declare class OAuth2ProviderRegistry {
|
|
182
|
-
private static readonly googleProvider;
|
|
183
|
-
resolve(definition: CredentialTypeDefinition, publicConfig: JsonRecord): OAuth2ResolvedProvider;
|
|
184
|
-
resolveClientId(auth: CredentialOAuth2AuthDefinition, publicConfig: JsonRecord): string;
|
|
185
|
-
resolveClientSecretFieldKey(auth: CredentialOAuth2AuthDefinition): string;
|
|
186
|
-
private resolveBuiltInProvider;
|
|
187
|
-
private resolveTemplateProvider;
|
|
188
|
-
private expandTemplate;
|
|
189
|
-
private resolvePublicConfigProvider;
|
|
190
|
-
}
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region src/domain/credentials/OAuth2ConnectServiceFactory.d.ts
|
|
193
|
-
type OAuth2AuthRedirectResult = Readonly<{
|
|
194
|
-
instanceId: string;
|
|
195
|
-
redirectUri: string;
|
|
196
|
-
redirectUrl: string;
|
|
197
|
-
}>;
|
|
198
|
-
type OAuth2CallbackResult = Readonly<{
|
|
199
|
-
instanceId: string;
|
|
200
|
-
connectedEmail?: string;
|
|
201
|
-
}>;
|
|
202
|
-
declare class OAuth2ConnectService {
|
|
203
|
-
private readonly credentialStore;
|
|
204
|
-
private readonly credentialInstanceService;
|
|
205
|
-
private readonly credentialTypeRegistry;
|
|
206
|
-
private readonly credentialRuntimeMaterialService;
|
|
207
|
-
private readonly credentialFieldEnvOverlayService;
|
|
208
|
-
private readonly credentialMaterialResolver;
|
|
209
|
-
private readonly credentialSecretCipher;
|
|
210
|
-
private readonly credentialOAuth2ScopeResolver;
|
|
211
|
-
private readonly oauth2ProviderRegistry;
|
|
179
|
+
//#region src/domain/credentials/OAuth2RedirectUriResolver.d.ts
|
|
180
|
+
/**
|
|
181
|
+
* Resolves the canonical OAuth2 redirect URI from the public base URL or request origin.
|
|
182
|
+
* The redirect URI always points to `/api/oauth2/callback`, which is the URL operators
|
|
183
|
+
* register with their OAuth provider.
|
|
184
|
+
*/
|
|
185
|
+
declare class OAuth2RedirectUriResolver {
|
|
212
186
|
private readonly appConfig;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
createAuthRedirect(instanceId: string, requestOrigin: string): Promise<OAuth2AuthRedirectResult>;
|
|
216
|
-
handleCallback(args: Readonly<{
|
|
217
|
-
code?: string | null;
|
|
218
|
-
state?: string | null;
|
|
219
|
-
requestOrigin: string;
|
|
220
|
-
}>): Promise<OAuth2CallbackResult>;
|
|
221
|
-
getRedirectUri(requestOrigin: string): string;
|
|
187
|
+
constructor(appConfig: AppConfig);
|
|
188
|
+
resolve(requestOrigin: string): string;
|
|
222
189
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* forwarded headers otherwise throw TypeError: Invalid URL.
|
|
226
|
-
*
|
|
227
|
-
* Comma-separated values (proxy chains or copy-paste mistakes like `http,http`) use the
|
|
228
|
-
* first segment only; obviously invalid hostnames are rejected.
|
|
190
|
+
* Ensures the base URL has an http/https scheme. Comma-separated values (proxy chains) use
|
|
191
|
+
* the first segment only.
|
|
229
192
|
*/
|
|
230
|
-
private
|
|
231
|
-
private requireOAuth2Type;
|
|
232
|
-
private exchangeAuthorizationCode;
|
|
233
|
-
private mergeTokenMaterial;
|
|
234
|
-
private resolveExpiry;
|
|
235
|
-
private resolveGrantedScopes;
|
|
236
|
-
private resolveConnectedEmail;
|
|
237
|
-
private findEmail;
|
|
238
|
-
private parseJsonRecord;
|
|
239
|
-
private createTokenExchangeErrorMessage;
|
|
240
|
-
private createOpaqueValue;
|
|
241
|
-
private createPkceCodeChallenge;
|
|
193
|
+
private ensureAbsoluteUrl;
|
|
242
194
|
private normalizeBaseUrl;
|
|
243
195
|
}
|
|
244
196
|
//#endregion
|
|
245
197
|
//#region src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.d.ts
|
|
246
198
|
declare class OAuth2HttpRouteHandler {
|
|
247
|
-
private readonly
|
|
199
|
+
private readonly redirectUriResolver;
|
|
248
200
|
private readonly credentialInstanceService;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
201
|
+
private readonly oauthFlowExecutor;
|
|
202
|
+
private readonly credentialStore;
|
|
203
|
+
private readonly credentialSecretCipher;
|
|
204
|
+
constructor(redirectUriResolver: OAuth2RedirectUriResolver, credentialInstanceService: CredentialInstanceService, oauthFlowExecutor: OAuthFlowExecutor, credentialStore: CredentialStore, credentialSecretCipher: CredentialSecretCipher);
|
|
252
205
|
getRedirectUri(request: Request): Promise<Response>;
|
|
253
206
|
postDisconnect(request: Request): Promise<Response>;
|
|
207
|
+
postOAuthStart(request: Request): Promise<Response>;
|
|
208
|
+
getOAuthCallback(request: Request): Promise<Response>;
|
|
254
209
|
private resolveRequestOrigin;
|
|
255
210
|
/** Proxies may send comma-separated lists (chain); use the first host/proto only. */
|
|
256
211
|
private static firstCommaSeparatedValue;
|
package/dist/nextServer.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { n as logLevelPolicyFactory, t as LogLevelPolicyFactory } from "./LogLevelPolicyFactory-DCUzIN6G.js";
|
|
2
|
-
import "./ApiPaths-
|
|
3
|
-
import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, r as performanceLogPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-
|
|
2
|
+
import "./ApiPaths-Dv1dcHu_.js";
|
|
3
|
+
import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, r as performanceLogPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-Ckk52S3w.js";
|
|
4
4
|
import "./decorateParam-BWxkAUSj.js";
|
|
5
5
|
import "./decorate-CXWmflG_.js";
|
|
6
|
-
import { a as CredentialInstanceService,
|
|
7
|
-
import
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import
|
|
6
|
+
import { a as CredentialInstanceService, i as CredentialBindingService, m as ApplicationTokens } from "./CredentialServices-Dk8yypeL.js";
|
|
7
|
+
import "./CodemationTsyringeTypeInfoRegistrar-Bj6FJYFz.js";
|
|
8
|
+
import { A as WorkflowDefinitionMapper, C as CodemationHonoApiApp, D as FrontendAppConfigFactory, E as InternalAuthBootstrapFactory, P as RunBinaryAttachmentLookupService, S as CredentialHttpRouteHandler, T as PublicFrontendBootstrapFactory, _ as WorkflowHttpRouteHandler, b as RunHttpRouteHandler, d as FrontendRuntime, h as WorkflowRunRetentionPruneScheduler, k as WorkflowWebsocketServer, m as AppContainerLifecycle, p as DatabaseMigrations, t as AppContainerFactory, u as WorkerRuntime, v as WebhookHttpRouteHandler, w as BinaryHttpRouteHandler, x as OAuth2HttpRouteHandler, y as RequestToWebhookItemMapper } from "./AppContainerFactory-DqKYCRNP.js";
|
|
9
|
+
import { t as WorkflowPolicyUiPresentationFactory } from "./WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js";
|
|
10
|
+
import "./InternalPingRegistrar-DY3kSfxP.js";
|
|
11
|
+
import { t as AppConfigFactory } from "./AppConfigFactory-Cx4qQvRk.js";
|
|
12
|
+
import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-D1B1IEbt.js";
|
|
11
13
|
|
|
12
14
|
export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, FilteringLogger, FrontendAppConfigFactory, FrontendRuntime, InternalAuthBootstrapFactory, LogLevelPolicyFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, PublicFrontendBootstrapFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import "./index-DilAYwnH.js";
|
|
2
|
+
import { g as TypeToken } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
+
import { t as InternalHonoApiRouteRegistrar } from "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
|
|
4
|
+
import { i as PairingVerificationSuccess, n as PairingVerificationFailure, r as PairingVerificationResult, t as PairingConfig } from "./pairing.types-snfZ_OzB.js";
|
|
5
|
+
import { Hono, MiddlewareHandler } from "hono";
|
|
6
|
+
|
|
7
|
+
//#region src/pairing/HmacRequestSigner.d.ts
|
|
8
|
+
interface SignedHeaders {
|
|
9
|
+
readonly Authorization: string;
|
|
10
|
+
}
|
|
11
|
+
declare class HmacRequestSigner {
|
|
12
|
+
private readonly config;
|
|
13
|
+
constructor(config: PairingConfig);
|
|
14
|
+
sign(method: string, urlOrPath: string, body: string): SignedHeaders;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/pairing/PairedFetch.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Thin fetch wrapper that automatically HMAC-signs outgoing requests
|
|
20
|
+
* to the control plane using the workspace's pairing secret.
|
|
21
|
+
*
|
|
22
|
+
* Use this for any server-to-server request from the installation to the CP.
|
|
23
|
+
*/
|
|
24
|
+
declare class PairedFetch {
|
|
25
|
+
private readonly signer;
|
|
26
|
+
constructor(signer: HmacRequestSigner);
|
|
27
|
+
get(url: string): Promise<Response>;
|
|
28
|
+
post(url: string, body: unknown): Promise<Response>;
|
|
29
|
+
delete(url: string): Promise<Response>;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/pairing/IncomingHmacVerifier.d.ts
|
|
33
|
+
/**
|
|
34
|
+
* Verifies incoming HMAC-signed requests from the control plane.
|
|
35
|
+
* Mirrors the control-plane HmacVerifier — both sides follow docs/pairing-protocol.md.
|
|
36
|
+
*/
|
|
37
|
+
declare class IncomingHmacVerifier {
|
|
38
|
+
private readonly config;
|
|
39
|
+
private readonly usedNonces;
|
|
40
|
+
private readonly nonceTtlSeconds;
|
|
41
|
+
constructor(config: PairingConfig);
|
|
42
|
+
verify(method: string, url: string, body: string, authHeader: string | null): PairingVerificationResult;
|
|
43
|
+
private parseHeader;
|
|
44
|
+
private pruneExpiredNonces;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/pairing/InternalHmacAuthMiddleware.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* Hono middleware that verifies HMAC-signed requests on /internal/* routes.
|
|
50
|
+
* Rejects with 401 on any auth failure (failure mode is never leaked).
|
|
51
|
+
*
|
|
52
|
+
* Downstream handlers read the consumed body from `c.get("body")` when needed —
|
|
53
|
+
* do NOT call `c.req.text()` again after this middleware runs.
|
|
54
|
+
*/
|
|
55
|
+
declare class InternalHmacAuthMiddleware {
|
|
56
|
+
private readonly verifier;
|
|
57
|
+
constructor(verifier: IncomingHmacVerifier);
|
|
58
|
+
handle(): MiddlewareHandler;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/pairing/InternalPingRegistrar.d.ts
|
|
62
|
+
/**
|
|
63
|
+
* Registers GET /internal/ping — a smoke-test endpoint for verifying workspace pairing.
|
|
64
|
+
* Returns { pong: true, workspaceId } when the HMAC signature validates correctly.
|
|
65
|
+
*/
|
|
66
|
+
declare class InternalPingRegistrar implements InternalHonoApiRouteRegistrar {
|
|
67
|
+
private readonly hmacMiddleware;
|
|
68
|
+
private readonly pairingConfig;
|
|
69
|
+
constructor(hmacMiddleware: InternalHmacAuthMiddleware, pairingConfig: PairingConfig);
|
|
70
|
+
register(app: Hono): void;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/pairing/PairingConfigFactory.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* Reads pairing configuration from environment variables.
|
|
76
|
+
*
|
|
77
|
+
* Required env vars when pairing is enabled:
|
|
78
|
+
* WORKSPACE_ID — the workspace's database ID
|
|
79
|
+
* WORKSPACE_PAIRING_SECRET — base64-encoded 32-byte shared secret
|
|
80
|
+
* CONTROL_PLANE_URL — base URL of the control plane API
|
|
81
|
+
*
|
|
82
|
+
* Returns null if any required variable is absent (pairing disabled).
|
|
83
|
+
* See docs/pairing-protocol.md for full bootstrap instructions.
|
|
84
|
+
*/
|
|
85
|
+
declare class PairingConfigFactory {
|
|
86
|
+
create(env: Readonly<NodeJS.ProcessEnv>): PairingConfig | null;
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/pairing/PairingConfigToken.d.ts
|
|
90
|
+
declare const PairingConfigToken: TypeToken<PairingConfig>;
|
|
91
|
+
//#endregion
|
|
92
|
+
export { HmacRequestSigner, IncomingHmacVerifier, InternalHmacAuthMiddleware, InternalPingRegistrar, PairedFetch, type PairingConfig, PairingConfigFactory, PairingConfigToken, type PairingVerificationFailure, type PairingVerificationResult, type PairingVerificationSuccess, type SignedHeaders };
|
|
93
|
+
//# sourceMappingURL=pairing.d.ts.map
|
package/dist/pairing.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./decorateParam-BWxkAUSj.js";
|
|
2
|
+
import "./decorate-CXWmflG_.js";
|
|
3
|
+
import { a as PairedFetch, i as PairingConfigFactory, n as InternalHmacAuthMiddleware, o as HmacRequestSigner, r as IncomingHmacVerifier, s as PairingConfigToken, t as InternalPingRegistrar } from "./InternalPingRegistrar-DY3kSfxP.js";
|
|
4
|
+
|
|
5
|
+
export { HmacRequestSigner, IncomingHmacVerifier, InternalHmacAuthMiddleware, InternalPingRegistrar, PairedFetch, PairingConfigFactory, PairingConfigToken };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/pairing/pairing.types.d.ts
|
|
2
|
+
interface PairingConfig {
|
|
3
|
+
/** The workspace's database ID. */
|
|
4
|
+
readonly workspaceId: string;
|
|
5
|
+
/** Base64-encoded 32-byte raw secret shared with the control plane. */
|
|
6
|
+
readonly pairingSecret: string;
|
|
7
|
+
/** Base URL of the control plane API, e.g. https://api.codemation.io */
|
|
8
|
+
readonly controlPlaneUrl: string;
|
|
9
|
+
}
|
|
10
|
+
type PairingVerificationFailure = {
|
|
11
|
+
readonly failure: "missing" | "version" | "expired" | "workspace" | "signature" | "replay";
|
|
12
|
+
};
|
|
13
|
+
type PairingVerificationSuccess = {
|
|
14
|
+
readonly workspaceId: string;
|
|
15
|
+
};
|
|
16
|
+
type PairingVerificationResult = PairingVerificationSuccess | PairingVerificationFailure;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PairingVerificationSuccess as i, PairingVerificationFailure as n, PairingVerificationResult as r, PairingConfig as t };
|
|
19
|
+
//# sourceMappingURL=pairing.types-snfZ_OzB.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-7V6ThxGB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as require_client } from "./AppConfigFactory-Cx4qQvRk.js";
|
|
3
3
|
import { PrismaPg } from "@prisma/adapter-pg";
|
|
4
4
|
|
|
5
5
|
//#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts
|
|
@@ -12,4 +12,4 @@ var CodemationPostgresPrismaClientFactory = class {
|
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
export { CodemationPostgresPrismaClientFactory as t };
|
|
15
|
-
//# sourceMappingURL=persistenceServer-
|
|
15
|
+
//# sourceMappingURL=persistenceServer-C-hH4z6l.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistenceServer-
|
|
1
|
+
{"version":3,"file":"persistenceServer-C-hH4z6l.js","names":["PrismaClient"],"sources":["../src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts"],"sourcesContent":["import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"../../../prisma-generated/prisma-postgresql-client/client.js\";\n\nexport class CodemationPostgresPrismaClientFactory {\n static create(databaseUrl: string): PrismaClient {\n const adapter = new PrismaPg({ connectionString: databaseUrl });\n return new PrismaClient({ adapter });\n }\n}\n"],"mappings":";;;;;;AAGA,IAAa,wCAAb,MAAmD;CACjD,OAAO,OAAO,aAAmC;AAE/C,SAAO,IAAIA,2BAAa,EAAE,SADV,IAAI,SAAS,EAAE,kBAAkB,aAAa,CAAC,EAC5B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { i as AppPersistenceConfig } from "./CodemationAppContext-CKVv9W9q.js";
|
|
2
|
+
import { i as PrismaClient } from "./AppConfigFactory-DnLoQ9Li.js";
|
|
3
|
+
|
|
4
|
+
//#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.d.ts
|
|
5
|
+
declare class CodemationPostgresPrismaClientFactory {
|
|
6
|
+
static create(databaseUrl: string): PrismaClient;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/infrastructure/persistence/CodemationDatabaseUrlParser.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Parses `CODEMATION_DATABASE_URL` into an {@link AppPersistenceConfig}.
|
|
12
|
+
*
|
|
13
|
+
* Supported schemes (case-insensitive):
|
|
14
|
+
* - `sqlite://relative/path/to/file.db` → resolved relative to consumerRoot
|
|
15
|
+
* - `sqlite:///absolute/path/to/file.db` → leading slash = POSIX absolute
|
|
16
|
+
* - `sqlite://C:/path/file.db` → Windows-style absolute (path.isAbsolute()
|
|
17
|
+
* returns true for these)
|
|
18
|
+
* - `pgsql://user:pass@host:5432/dbname` → normalised to postgresql://
|
|
19
|
+
* - `postgresql://user:pass@host:5432/db` → pass-through (Prisma's expected scheme)
|
|
20
|
+
* - `postgres://user:pass@host:5432/db` → pass-through (common alias)
|
|
21
|
+
*
|
|
22
|
+
* Throws on any other scheme. Empty / whitespace input is also an error — callers
|
|
23
|
+
* should default before calling parse().
|
|
24
|
+
*/
|
|
25
|
+
declare class CodemationDatabaseUrlParser {
|
|
26
|
+
parse(url: string, consumerRoot: string): AppPersistenceConfig;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { CodemationPostgresPrismaClientFactory as n, CodemationDatabaseUrlParser as t };
|
|
30
|
+
//# sourceMappingURL=persistenceServer-CeTHtC6E.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import "./ItemsInputNormalizer-
|
|
3
|
-
import { i as AppPersistenceConfig } from "./CodemationAppContext-
|
|
4
|
-
import "./CodemationWhitelabelConfig-
|
|
5
|
-
import "./CodemationConfigNormalizer-
|
|
6
|
-
import { n as PrismaMigrationDeployer, r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-
|
|
7
|
-
import {
|
|
8
|
-
export { AppConfigFactory, AppPersistenceConfig, CodemationPostgresPrismaClientFactory, PrismaDatabaseClient as PrismaClient, PrismaMigrationDeployer };
|
|
1
|
+
import "./index-DilAYwnH.js";
|
|
2
|
+
import "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
+
import { i as AppPersistenceConfig } from "./CodemationAppContext-CKVv9W9q.js";
|
|
4
|
+
import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
|
+
import "./CodemationConfigNormalizer-BAKjetJ6.js";
|
|
6
|
+
import { n as PrismaMigrationDeployer, r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-DnLoQ9Li.js";
|
|
7
|
+
import { n as CodemationPostgresPrismaClientFactory, t as CodemationDatabaseUrlParser } from "./persistenceServer-CeTHtC6E.js";
|
|
8
|
+
export { AppConfigFactory, AppPersistenceConfig, CodemationDatabaseUrlParser, CodemationPostgresPrismaClientFactory, PrismaDatabaseClient as PrismaClient, PrismaMigrationDeployer };
|