@codemation/host 0.0.1
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/README.md +75 -0
- package/dist/CodemationConfig-XCkSV2dj.d.ts +168 -0
- package/dist/CodemationConsumerConfigLoader-Dmm2TzAA.d.ts +61 -0
- package/dist/CodemationConsumerConfigLoader-scS_RQMy.js +334 -0
- package/dist/CodemationConsumerConfigLoader-scS_RQMy.js.map +1 -0
- package/dist/CodemationFrontendBootstrapRequest-CE6DjOWJ.js +5768 -0
- package/dist/CodemationFrontendBootstrapRequest-CE6DjOWJ.js.map +1 -0
- package/dist/CodemationPluginListMerger-BNmaoXQL.js +49 -0
- package/dist/CodemationPluginListMerger-BNmaoXQL.js.map +1 -0
- package/dist/CodemationPluginListMerger-BRYqEk0y.d.ts +793 -0
- package/dist/CodemationWhitelabelConfig-DgbjgtrR.d.ts +48 -0
- package/dist/ConsoleLogger-ClPU7jtc.js +35 -0
- package/dist/ConsoleLogger-ClPU7jtc.js.map +1 -0
- package/dist/CredentialServices-BKBGe7l3.js +1030 -0
- package/dist/CredentialServices-BKBGe7l3.js.map +1 -0
- package/dist/CredentialServices-DpDpm8mL.d.ts +291 -0
- package/dist/LogLevelPolicy-4cq9z0TI.d.ts +37 -0
- package/dist/PrismaMigrationDeployer-B1E_gYz7.js +8212 -0
- package/dist/PrismaMigrationDeployer-B1E_gYz7.js.map +1 -0
- package/dist/ServerLoggerFactory-BRHxIDS7.js +340 -0
- package/dist/ServerLoggerFactory-BRHxIDS7.js.map +1 -0
- package/dist/WorkflowViewContracts-DCLpTn25.d.ts +47 -0
- package/dist/chunk-7V6ThxGB.js +39 -0
- package/dist/client-Yh7-CQud.d.ts +21995 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.js +15 -0
- package/dist/client.js.map +1 -0
- package/dist/consumer.d.ts +5 -0
- package/dist/consumer.js +7 -0
- package/dist/credentials.d.ts +50 -0
- package/dist/credentials.js +11 -0
- package/dist/credentials.js.map +1 -0
- package/dist/decorate-B-N_5S4p.js +10 -0
- package/dist/decorateParam-BTcc3KNk.js +15 -0
- package/dist/devServerSidecar.d.ts +52 -0
- package/dist/devServerSidecar.js +131 -0
- package/dist/devServerSidecar.js.map +1 -0
- package/dist/index-Bs4F1IsC.d.ts +1044 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +14 -0
- package/dist/nextServer.d.ts +89 -0
- package/dist/nextServer.js +127 -0
- package/dist/nextServer.js.map +1 -0
- package/dist/persistenceServer-K5eqlZm3.d.ts +36 -0
- package/dist/persistenceServer-W9uRw0dJ.js +19 -0
- package/dist/persistenceServer-W9uRw0dJ.js.map +1 -0
- package/dist/persistenceServer.d.ts +6 -0
- package/dist/persistenceServer.js +6 -0
- package/dist/server-BBdsATju.d.ts +132 -0
- package/dist/server-BiHSuA13.js +175 -0
- package/dist/server-BiHSuA13.js.map +1 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +13 -0
- package/package.json +152 -0
- package/playwright.config.ts +74 -0
- package/prisma/migrations/20260315063514_init/migration.sql +16 -0
- package/prisma/migrations/20260316090000_workflow_debugger_overlay/migration.sql +9 -0
- package/prisma/migrations/20260317120000_trigger_state_store/migration.sql +3 -0
- package/prisma/migrations/20260317153000_trigger_setup_state/migration.sql +8 -0
- package/prisma/migrations/20260318110000_credentials_v2/migration.sql +49 -0
- package/prisma/migrations/20260319110000_credential_oauth2_material/migration.sql +28 -0
- package/prisma/migrations/20260319200000_codemation_auth_tables/migration.sql +56 -0
- package/prisma/migrations/20260320140000_user_invites_account_status/migration.sql +20 -0
- package/prisma/migrations/20260325120000_workflow_activation/migration.sql +8 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema.prisma +179 -0
- package/prisma.config.ts +12 -0
- package/scripts/ensure-prisma-runtime-sourcemaps.mjs +42 -0
- package/scripts/integration-database-global-setup.mjs +30 -0
- package/src/application/ApplicationRequestError.ts +12 -0
- package/src/application/auth/AuthenticatedPrincipal.ts +5 -0
- package/src/application/auth/SessionVerifier.ts +5 -0
- package/src/application/binary/OverlayPinnedBinaryUploadService.ts +119 -0
- package/src/application/binary/RunBinaryAttachmentLookupService.ts +139 -0
- package/src/application/binary/RunStateBinaryStorageKeysCollector.ts +57 -0
- package/src/application/bus/Command.ts +3 -0
- package/src/application/bus/CommandBus.ts +5 -0
- package/src/application/bus/CommandHandler.ts +5 -0
- package/src/application/bus/DomainEvent.ts +1 -0
- package/src/application/bus/DomainEventBus.ts +5 -0
- package/src/application/bus/DomainEventHandler.ts +5 -0
- package/src/application/bus/Query.ts +3 -0
- package/src/application/bus/QueryBus.ts +5 -0
- package/src/application/bus/QueryHandler.ts +5 -0
- package/src/application/commands/AcceptUserInviteCommand.ts +10 -0
- package/src/application/commands/AcceptUserInviteCommandHandler.ts +19 -0
- package/src/application/commands/CopyRunToWorkflowDebuggerCommand.ts +14 -0
- package/src/application/commands/CopyRunToWorkflowDebuggerCommandHandler.ts +56 -0
- package/src/application/commands/CreateCredentialInstanceCommand.ts +9 -0
- package/src/application/commands/CreateCredentialInstanceCommandHandler.ts +28 -0
- package/src/application/commands/CredentialCommandHandlers.ts +10 -0
- package/src/application/commands/DeleteCredentialInstanceCommand.ts +7 -0
- package/src/application/commands/DeleteCredentialInstanceCommandHandler.ts +27 -0
- package/src/application/commands/HandleWebhookInvocationCommand.ts +12 -0
- package/src/application/commands/HandleWebhookInvocationCommandHandler.ts +42 -0
- package/src/application/commands/InviteUserCommand.ts +12 -0
- package/src/application/commands/InviteUserCommandHandler.ts +22 -0
- package/src/application/commands/RegenerateUserInviteCommand.ts +12 -0
- package/src/application/commands/RegenerateUserInviteCommandHandler.ts +24 -0
- package/src/application/commands/ReplaceMutableRunWorkflowSnapshotCommand.ts +12 -0
- package/src/application/commands/ReplaceMutableRunWorkflowSnapshotCommandHandler.ts +47 -0
- package/src/application/commands/ReplaceWorkflowDebuggerOverlayCommand.ts +14 -0
- package/src/application/commands/ReplaceWorkflowDebuggerOverlayCommandHandler.ts +35 -0
- package/src/application/commands/ReplayWorkflowNodeCommand.ts +12 -0
- package/src/application/commands/ReplayWorkflowNodeCommandHandler.ts +164 -0
- package/src/application/commands/SetPinnedNodeInputCommand.ts +13 -0
- package/src/application/commands/SetPinnedNodeInputCommandHandler.ts +50 -0
- package/src/application/commands/SetWorkflowActivationCommand.ts +10 -0
- package/src/application/commands/SetWorkflowActivationCommandHandler.ts +39 -0
- package/src/application/commands/StartWorkflowRunCommand.ts +8 -0
- package/src/application/commands/StartWorkflowRunCommandHandler.ts +286 -0
- package/src/application/commands/TestCredentialInstanceCommand.ts +9 -0
- package/src/application/commands/TestCredentialInstanceCommandHandler.ts +28 -0
- package/src/application/commands/UpdateCredentialInstanceCommand.ts +12 -0
- package/src/application/commands/UpdateCredentialInstanceCommandHandler.ts +28 -0
- package/src/application/commands/UpdateUserAccountStatusCommand.ts +12 -0
- package/src/application/commands/UpdateUserAccountStatusCommandHandler.ts +24 -0
- package/src/application/commands/UploadOverlayPinnedBinaryCommand.ts +16 -0
- package/src/application/commands/UploadOverlayPinnedBinaryCommandHandler.ts +31 -0
- package/src/application/commands/UpsertCredentialBindingCommand.ts +11 -0
- package/src/application/commands/UpsertCredentialBindingCommandHandler.ts +28 -0
- package/src/application/commands/UpsertLocalBootstrapUserCommand.ts +12 -0
- package/src/application/commands/UpsertLocalBootstrapUserCommandHandler.ts +24 -0
- package/src/application/commands/UserAccountCommandHandlers.ts +10 -0
- package/src/application/contracts/CredentialContractsRegistry.ts +88 -0
- package/src/application/contracts/RunContracts.ts +41 -0
- package/src/application/contracts/WorkflowDebuggerContracts.ts +12 -0
- package/src/application/contracts/WorkflowViewContracts.ts +40 -0
- package/src/application/contracts/WorkflowWebsocketMessage.ts +8 -0
- package/src/application/contracts/userDirectoryContracts.types.ts +60 -0
- package/src/application/dev/BootRuntimeSnapshotHolder.ts +19 -0
- package/src/application/dev/BootRuntimeSummary.types.ts +11 -0
- package/src/application/dev/DevBootstrapSummaryAssembler.ts +84 -0
- package/src/application/dev/DevBootstrapSummaryJson.types.ts +9 -0
- package/src/application/logging/LogFilter.ts +7 -0
- package/src/application/logging/Logger.ts +10 -0
- package/src/application/mapping/DataMapper.ts +3 -0
- package/src/application/mapping/WorkflowDefinitionMapper.ts +171 -0
- package/src/application/mapping/WorkflowPolicyUiPresentationFactory.ts +39 -0
- package/src/application/queries/CredentialQueryHandlers.ts +12 -0
- package/src/application/queries/GetCredentialFieldEnvStatusQuery.ts +5 -0
- package/src/application/queries/GetCredentialFieldEnvStatusQueryHandler.ts +52 -0
- package/src/application/queries/GetCredentialInstanceQuery.ts +9 -0
- package/src/application/queries/GetCredentialInstanceQueryHandler.ts +27 -0
- package/src/application/queries/GetCredentialInstanceWithSecretsQuery.ts +9 -0
- package/src/application/queries/GetCredentialInstanceWithSecretsQueryHandler.ts +27 -0
- package/src/application/queries/GetRunBinaryAttachmentQuery.ts +11 -0
- package/src/application/queries/GetRunBinaryAttachmentQueryHandler.ts +23 -0
- package/src/application/queries/GetRunStateQuery.ts +8 -0
- package/src/application/queries/GetRunStateQueryHandler.ts +21 -0
- package/src/application/queries/GetWorkflowCredentialHealthQuery.ts +9 -0
- package/src/application/queries/GetWorkflowCredentialHealthQueryHandler.ts +27 -0
- package/src/application/queries/GetWorkflowDebuggerOverlayQuery.ts +8 -0
- package/src/application/queries/GetWorkflowDebuggerOverlayQueryHandler.ts +28 -0
- package/src/application/queries/GetWorkflowDetailQuery.ts +8 -0
- package/src/application/queries/GetWorkflowDetailQueryHandler.ts +24 -0
- package/src/application/queries/GetWorkflowOverlayBinaryAttachmentQuery.ts +11 -0
- package/src/application/queries/GetWorkflowOverlayBinaryAttachmentQueryHandler.ts +23 -0
- package/src/application/queries/GetWorkflowSummariesQuery.ts +4 -0
- package/src/application/queries/GetWorkflowSummariesQueryHandler.ts +23 -0
- package/src/application/queries/ListCredentialInstancesQuery.ts +5 -0
- package/src/application/queries/ListCredentialInstancesQueryHandler.ts +27 -0
- package/src/application/queries/ListCredentialTypesQuery.ts +5 -0
- package/src/application/queries/ListCredentialTypesQueryHandler.ts +28 -0
- package/src/application/queries/ListUserAccountsQuery.ts +5 -0
- package/src/application/queries/ListUserAccountsQueryHandler.ts +22 -0
- package/src/application/queries/ListWorkflowRunsQuery.ts +8 -0
- package/src/application/queries/ListWorkflowRunsQueryHandler.ts +21 -0
- package/src/application/queries/UserAccountQueryHandlers.ts +4 -0
- package/src/application/queries/VerifyUserInviteQuery.ts +9 -0
- package/src/application/queries/VerifyUserInviteQueryHandler.ts +21 -0
- package/src/application/runs/WorkflowRunRetentionPruneScheduler.ts +98 -0
- package/src/application/websocket/WorkflowRunEventWebsocketRelay.ts +36 -0
- package/src/application/websocket/WorkflowWebsocketPublisher.ts +5 -0
- package/src/application/workflows/WebhookEndpointPathValidator.ts +35 -0
- package/src/application/workflows/WorkflowDebuggerOverlayStateFactory.ts +122 -0
- package/src/applicationTokens.ts +72 -0
- package/src/bootstrap/CodemationBootstrapRequest.ts +27 -0
- package/src/bootstrap/CodemationContainerFactory.ts +310 -0
- package/src/bootstrap/CodemationContainerRegistration.ts +23 -0
- package/src/bootstrap/CodemationContainerRegistrationRegistrar.ts +42 -0
- package/src/bootstrap/CodemationFrontendBootstrapRequest.ts +16 -0
- package/src/bootstrap/CodemationWorkerBootstrapRequest.ts +19 -0
- package/src/bootstrap/PreparedCodemationRuntime.ts +37 -0
- package/src/bootstrap/PreparedCodemationRuntimeFactory.ts +308 -0
- package/src/bootstrap/boot/CliRuntimeBootService.ts +27 -0
- package/src/bootstrap/boot/FrontendRuntimeBootService.ts +86 -0
- package/src/bootstrap/boot/WorkerRuntimeBootService.ts +64 -0
- package/src/bootstrap/runtime/AppConfigFactory.ts +57 -0
- package/src/bootstrap/runtime/ResolvedImplementationSelectionFactory.ts +118 -0
- package/src/client.ts +3 -0
- package/src/codemationApplication.ts +311 -0
- package/src/consumer.ts +4 -0
- package/src/credentials.ts +24 -0
- package/src/devServerSidecar.ts +10 -0
- package/src/domain/credentials/CredentialBindingService.ts +139 -0
- package/src/domain/credentials/CredentialFieldEnvOverlayService.ts +60 -0
- package/src/domain/credentials/CredentialInstanceService.ts +391 -0
- package/src/domain/credentials/CredentialMaterialResolver.ts +55 -0
- package/src/domain/credentials/CredentialRuntimeMaterialService.ts +39 -0
- package/src/domain/credentials/CredentialSecretCipher.ts +70 -0
- package/src/domain/credentials/CredentialServices.ts +145 -0
- package/src/domain/credentials/CredentialSessionServiceImpl.ts +119 -0
- package/src/domain/credentials/CredentialTestService.ts +73 -0
- package/src/domain/credentials/CredentialTypeRegistryImpl.ts +29 -0
- package/src/domain/credentials/OAuth2ConnectServiceFactory.ts +396 -0
- package/src/domain/credentials/OAuth2ProviderRegistry.ts +75 -0
- package/src/domain/credentials/WorkflowCredentialNodeResolver.ts +246 -0
- package/src/domain/runs/WorkflowRunRepository.ts +11 -0
- package/src/domain/users/UserAccountServiceRegistry.ts +315 -0
- package/src/domain/users/userLoginMethodLabels.types.ts +29 -0
- package/src/domain/workflows/WorkflowActivationPreflight.ts +32 -0
- package/src/domain/workflows/WorkflowActivationPreflightRules.ts +77 -0
- package/src/domain/workflows/WorkflowActivationRepository.ts +9 -0
- package/src/domain/workflows/WorkflowDebuggerOverlayRepository.ts +7 -0
- package/src/domain/workflows/WorkflowDebuggerOverlayState.ts +8 -0
- package/src/domain/workflows/WorkflowDefinitionRepository.ts +11 -0
- package/src/index.ts +58 -0
- package/src/infrastructure/auth/AuthJsSessionVerifier.ts +26 -0
- package/src/infrastructure/auth/DevelopmentSessionBypassVerifier.ts +12 -0
- package/src/infrastructure/binary/BinaryBodyNodeReadableFactory.ts +22 -0
- package/src/infrastructure/binary/CountingSha256Transform.ts +26 -0
- package/src/infrastructure/binary/LocalFilesystemBinaryStorageRegistry.ts +86 -0
- package/src/infrastructure/config/CodemationPluginRegistrar.ts +44 -0
- package/src/infrastructure/credentials/FrameworkBuiltinCredentialTypesRegistrar.ts +21 -0
- package/src/infrastructure/credentials/OpenAiApiKeyCredentialHealthTester.ts +89 -0
- package/src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.ts +15 -0
- package/src/infrastructure/credentials/OpenAiApiKeyCredentialTypeFactory.ts +47 -0
- package/src/infrastructure/di/HandlesCommandRegistry.ts +24 -0
- package/src/infrastructure/di/HandlesDomainEventRegistry.ts +24 -0
- package/src/infrastructure/di/HandlesQueryRegistry.ts +24 -0
- package/src/infrastructure/di/InMemoryCommandBus.ts +47 -0
- package/src/infrastructure/di/InMemoryDomainEventBus.ts +47 -0
- package/src/infrastructure/di/InMemoryQueryBus.ts +45 -0
- package/src/infrastructure/ids/CodemationIdFactory.ts +12 -0
- package/src/infrastructure/logging/BrowserLogger.ts +1 -0
- package/src/infrastructure/logging/BrowserLoggerFactory.ts +14 -0
- package/src/infrastructure/logging/ConsoleLogger.ts +41 -0
- package/src/infrastructure/logging/FilteringLogger.ts +38 -0
- package/src/infrastructure/logging/LogLevelPolicy.ts +148 -0
- package/src/infrastructure/logging/LogLevelPolicyFactory.ts +16 -0
- package/src/infrastructure/logging/PerformanceLogPolicy.ts +10 -0
- package/src/infrastructure/logging/PerformanceLogPolicyFactory.ts +14 -0
- package/src/infrastructure/logging/ServerLogger.ts +1 -0
- package/src/infrastructure/logging/ServerLoggerFactory.ts +28 -0
- package/src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts +9 -0
- package/src/infrastructure/persistence/CredentialPersistenceStore.ts +139 -0
- package/src/infrastructure/persistence/DatabasePersistenceResolver.ts +91 -0
- package/src/infrastructure/persistence/InMemoryTriggerSetupStateRepository.ts +23 -0
- package/src/infrastructure/persistence/InMemoryWorkflowActivationRepository.ts +18 -0
- package/src/infrastructure/persistence/InMemoryWorkflowDebuggerOverlayRepository.ts +16 -0
- package/src/infrastructure/persistence/InMemoryWorkflowRunRepository.ts +94 -0
- package/src/infrastructure/persistence/PrismaClientFactory.ts +26 -0
- package/src/infrastructure/persistence/PrismaCredentialStore.ts +368 -0
- package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +184 -0
- package/src/infrastructure/persistence/PrismaTriggerSetupStateRepository.ts +68 -0
- package/src/infrastructure/persistence/PrismaWorkflowActivationRepository.ts +36 -0
- package/src/infrastructure/persistence/PrismaWorkflowDebuggerOverlayRepository.ts +65 -0
- package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +243 -0
- package/src/infrastructure/persistence/RuntimeWorkflowActivationPolicy.ts +27 -0
- package/src/infrastructure/persistence/SchedulerPersistenceCompatibilityValidator.ts +20 -0
- package/src/infrastructure/persistence/WorkflowDefinitionRepositoryAdapter.ts +31 -0
- package/src/infrastructure/persistence/WorkflowRunRepository.ts +46 -0
- package/src/infrastructure/persistence/generated/prisma/client.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma/default.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma/edge.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma/index.d.ts +4766 -0
- package/src/infrastructure/persistence/generated/prisma/package.json +144 -0
- package/src/infrastructure/persistence/generated/prisma/query_compiler_fast_bg.wasm +0 -0
- package/src/infrastructure/persistence/generated/prisma/runtime/client.d.ts +3358 -0
- package/src/infrastructure/persistence/generated/prisma/runtime/index-browser.d.ts +90 -0
- package/src/infrastructure/persistence/generated/prisma/schema.prisma +35 -0
- package/src/infrastructure/persistence/generated/prisma/wasm-edge-light-loader.mjs +5 -0
- package/src/infrastructure/persistence/generated/prisma/wasm-worker-loader.mjs +5 -0
- package/src/infrastructure/persistence/generated/prisma-client/client.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/client.js +5 -0
- package/src/infrastructure/persistence/generated/prisma-client/default.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/default.js +5 -0
- package/src/infrastructure/persistence/generated/prisma-client/edge.d.ts +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/edge.js +299 -0
- package/src/infrastructure/persistence/generated/prisma-client/index-browser.js +325 -0
- package/src/infrastructure/persistence/generated/prisma-client/index.d.ts +21623 -0
- package/src/infrastructure/persistence/generated/prisma-client/index.js +299 -0
- package/src/infrastructure/persistence/generated/prisma-client/package.json +144 -0
- package/src/infrastructure/persistence/generated/prisma-client/query_compiler_fast_bg.js +2 -0
- package/src/infrastructure/persistence/generated/prisma-client/query_compiler_fast_bg.wasm +0 -0
- package/src/infrastructure/persistence/generated/prisma-client/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/client.d.ts +3358 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/client.js +86 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/client.js.map +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/index-browser.d.ts +90 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/index-browser.js +6 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/index-browser.js.map +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/wasm-compiler-edge.js +76 -0
- package/src/infrastructure/persistence/generated/prisma-client/runtime/wasm-compiler-edge.js.map +1 -0
- package/src/infrastructure/persistence/generated/prisma-client/schema.prisma +179 -0
- package/src/infrastructure/persistence/generated/prisma-client/wasm-edge-light-loader.mjs +5 -0
- package/src/infrastructure/persistence/generated/prisma-client/wasm-worker-loader.mjs +5 -0
- package/src/infrastructure/runtime/LiveWorkflowRepository.ts +14 -0
- package/src/infrastructure/runtime/WorkerRuntimeScheduler.ts +35 -0
- package/src/infrastructure/server/http/ServerHttpRouteParams.ts +1 -0
- package/src/infrastructure/webhooks/RequestToWebhookItemMapper.ts +128 -0
- package/src/nextServer.ts +31 -0
- package/src/persistenceServer.ts +5 -0
- package/src/presentation/config/AppConfig.ts +25 -0
- package/src/presentation/config/CodemationAppContext.ts +19 -0
- package/src/presentation/config/CodemationApplicationFacade.ts +5 -0
- package/src/presentation/config/CodemationAuthConfig.ts +31 -0
- package/src/presentation/config/CodemationClassToken.ts +3 -0
- package/src/presentation/config/CodemationConfig.ts +86 -0
- package/src/presentation/config/CodemationConfigNormalizer.ts +179 -0
- package/src/presentation/config/CodemationLogConfig.ts +22 -0
- package/src/presentation/config/CodemationPackageManifest.ts +9 -0
- package/src/presentation/config/CodemationPlugin.ts +20 -0
- package/src/presentation/config/CodemationPluginListMerger.ts +46 -0
- package/src/presentation/config/CodemationWhitelabelConfig.ts +9 -0
- package/src/presentation/config/CodemationWorkflowDiscovery.ts +3 -0
- package/src/presentation/http/ApiPaths.ts +165 -0
- package/src/presentation/http/CodemationServerGatewayFactory.ts +120 -0
- package/src/presentation/http/HttpRequestJsonBodyReader.ts +12 -0
- package/src/presentation/http/ServerHttpErrorResponseFactory.ts +33 -0
- package/src/presentation/http/ServerHttpRouteParams.ts +1 -0
- package/src/presentation/http/hono/CodemationHonoApiAppFactory.ts +64 -0
- package/src/presentation/http/hono/HonoApiRouteRegistrar.ts +5 -0
- package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +27 -0
- package/src/presentation/http/hono/registrars/BinaryHonoApiRouteRegistrar.ts +21 -0
- package/src/presentation/http/hono/registrars/CredentialHonoApiRouteRegistrar.ts +34 -0
- package/src/presentation/http/hono/registrars/DevHonoApiRouteRegistrar.ts +17 -0
- package/src/presentation/http/hono/registrars/OAuth2HonoApiRouteRegistrar.ts +18 -0
- package/src/presentation/http/hono/registrars/RunHonoApiRouteRegistrar.ts +31 -0
- package/src/presentation/http/hono/registrars/UserHonoApiRouteRegistrar.ts +24 -0
- package/src/presentation/http/hono/registrars/WebhookHonoApiRouteRegistrar.ts +23 -0
- package/src/presentation/http/hono/registrars/WhitelabelHonoApiRouteRegistrar.ts +18 -0
- package/src/presentation/http/hono/registrars/WorkflowHonoApiRouteRegistrar.ts +33 -0
- package/src/presentation/http/routeHandlers/BinaryHttpRouteHandlerFactory.ts +101 -0
- package/src/presentation/http/routeHandlers/CredentialHttpRouteHandler.ts +129 -0
- package/src/presentation/http/routeHandlers/DevBootstrapSummaryHttpRouteHandler.ts +21 -0
- package/src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.ts +129 -0
- package/src/presentation/http/routeHandlers/RunHttpRouteHandler.ts +82 -0
- package/src/presentation/http/routeHandlers/UserHttpRouteHandlerFactory.ts +109 -0
- package/src/presentation/http/routeHandlers/WebhookHttpRouteHandler.ts +42 -0
- package/src/presentation/http/routeHandlers/WhitelabelLogoHttpRouteHandler.ts +96 -0
- package/src/presentation/http/routeHandlers/WorkflowHttpRouteHandler.ts +104 -0
- package/src/presentation/server/CodemationConsumerAppResolver.ts +82 -0
- package/src/presentation/server/CodemationConsumerConfigExportsResolver.ts +33 -0
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +270 -0
- package/src/presentation/server/CodemationPluginDiscovery.ts +151 -0
- package/src/presentation/server/CodemationTsyringeParamInfoReader.ts +26 -0
- package/src/presentation/server/CodemationTsyringeTypeInfoRegistrar.ts +121 -0
- package/src/presentation/server/DevelopmentRuntimeRouteGuard.ts +59 -0
- package/src/presentation/server/DiscoveredWorkflowsEmptyMessageFactory.ts +11 -0
- package/src/presentation/server/WorkflowDefinitionExportsResolver.ts +24 -0
- package/src/presentation/server/WorkflowDiscoveryPathSegmentsComputer.ts +53 -0
- package/src/presentation/server/WorkflowModulePathFinder.ts +47 -0
- package/src/presentation/websocket/WorkflowWebsocketServer.ts +169 -0
- package/src/server.ts +14 -0
- package/tsconfig.json +10 -0
- package/vitest.shared.ts +45 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
Decimal,
|
|
10
|
+
DbNull,
|
|
11
|
+
JsonNull,
|
|
12
|
+
AnyNull,
|
|
13
|
+
NullTypes,
|
|
14
|
+
makeStrictEnum,
|
|
15
|
+
Public,
|
|
16
|
+
getRuntime,
|
|
17
|
+
skip
|
|
18
|
+
} = require('./runtime/index-browser.js')
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
const Prisma = {}
|
|
22
|
+
|
|
23
|
+
exports.Prisma = Prisma
|
|
24
|
+
exports.$Enums = {}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Prisma Client JS version: 7.5.0
|
|
28
|
+
* Query Engine version: 280c870be64f457428992c43c1f6d557fab6e29e
|
|
29
|
+
*/
|
|
30
|
+
Prisma.prismaVersion = {
|
|
31
|
+
client: "7.5.0",
|
|
32
|
+
engine: "280c870be64f457428992c43c1f6d557fab6e29e"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
Prisma.PrismaClientKnownRequestError = () => {
|
|
36
|
+
const runtimeName = getRuntime().prettyName;
|
|
37
|
+
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
38
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
39
|
+
)};
|
|
40
|
+
Prisma.PrismaClientUnknownRequestError = () => {
|
|
41
|
+
const runtimeName = getRuntime().prettyName;
|
|
42
|
+
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
43
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
44
|
+
)}
|
|
45
|
+
Prisma.PrismaClientRustPanicError = () => {
|
|
46
|
+
const runtimeName = getRuntime().prettyName;
|
|
47
|
+
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
48
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
49
|
+
)}
|
|
50
|
+
Prisma.PrismaClientInitializationError = () => {
|
|
51
|
+
const runtimeName = getRuntime().prettyName;
|
|
52
|
+
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
53
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
54
|
+
)}
|
|
55
|
+
Prisma.PrismaClientValidationError = () => {
|
|
56
|
+
const runtimeName = getRuntime().prettyName;
|
|
57
|
+
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
58
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
59
|
+
)}
|
|
60
|
+
Prisma.Decimal = Decimal
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Re-export of sql-template-tag
|
|
64
|
+
*/
|
|
65
|
+
Prisma.sql = () => {
|
|
66
|
+
const runtimeName = getRuntime().prettyName;
|
|
67
|
+
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
68
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
69
|
+
)}
|
|
70
|
+
Prisma.empty = () => {
|
|
71
|
+
const runtimeName = getRuntime().prettyName;
|
|
72
|
+
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
73
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
74
|
+
)}
|
|
75
|
+
Prisma.join = () => {
|
|
76
|
+
const runtimeName = getRuntime().prettyName;
|
|
77
|
+
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
78
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
79
|
+
)}
|
|
80
|
+
Prisma.raw = () => {
|
|
81
|
+
const runtimeName = getRuntime().prettyName;
|
|
82
|
+
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
83
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
84
|
+
)}
|
|
85
|
+
Prisma.validator = Public.validator
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Extensions
|
|
89
|
+
*/
|
|
90
|
+
Prisma.getExtensionContext = () => {
|
|
91
|
+
const runtimeName = getRuntime().prettyName;
|
|
92
|
+
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
93
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
94
|
+
)}
|
|
95
|
+
Prisma.defineExtension = () => {
|
|
96
|
+
const runtimeName = getRuntime().prettyName;
|
|
97
|
+
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
98
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
99
|
+
)}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Shorthand utilities for JSON filtering
|
|
103
|
+
*/
|
|
104
|
+
Prisma.DbNull = DbNull
|
|
105
|
+
Prisma.JsonNull = JsonNull
|
|
106
|
+
Prisma.AnyNull = AnyNull
|
|
107
|
+
|
|
108
|
+
Prisma.NullTypes = NullTypes
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Enums
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
117
|
+
ReadUncommitted: 'ReadUncommitted',
|
|
118
|
+
ReadCommitted: 'ReadCommitted',
|
|
119
|
+
RepeatableRead: 'RepeatableRead',
|
|
120
|
+
Serializable: 'Serializable'
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
exports.Prisma.RunScalarFieldEnum = {
|
|
124
|
+
runId: 'runId',
|
|
125
|
+
workflowId: 'workflowId',
|
|
126
|
+
startedAt: 'startedAt',
|
|
127
|
+
status: 'status',
|
|
128
|
+
parentJson: 'parentJson',
|
|
129
|
+
executionOptionsJson: 'executionOptionsJson',
|
|
130
|
+
updatedAt: 'updatedAt',
|
|
131
|
+
stateJson: 'stateJson'
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
exports.Prisma.WorkflowDebuggerOverlayScalarFieldEnum = {
|
|
135
|
+
workflowId: 'workflowId',
|
|
136
|
+
updatedAt: 'updatedAt',
|
|
137
|
+
copiedFromRunId: 'copiedFromRunId',
|
|
138
|
+
stateJson: 'stateJson'
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
exports.Prisma.WorkflowActivationScalarFieldEnum = {
|
|
142
|
+
workflowId: 'workflowId',
|
|
143
|
+
isActive: 'isActive',
|
|
144
|
+
updatedAt: 'updatedAt'
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
exports.Prisma.TriggerSetupStateScalarFieldEnum = {
|
|
148
|
+
workflowId: 'workflowId',
|
|
149
|
+
nodeId: 'nodeId',
|
|
150
|
+
updatedAt: 'updatedAt',
|
|
151
|
+
stateJson: 'stateJson'
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
exports.Prisma.CredentialInstanceScalarFieldEnum = {
|
|
155
|
+
instanceId: 'instanceId',
|
|
156
|
+
typeId: 'typeId',
|
|
157
|
+
displayName: 'displayName',
|
|
158
|
+
sourceKind: 'sourceKind',
|
|
159
|
+
publicConfigJson: 'publicConfigJson',
|
|
160
|
+
secretRefJson: 'secretRefJson',
|
|
161
|
+
tagsJson: 'tagsJson',
|
|
162
|
+
setupStatus: 'setupStatus',
|
|
163
|
+
createdAt: 'createdAt',
|
|
164
|
+
updatedAt: 'updatedAt'
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
exports.Prisma.CredentialSecretMaterialScalarFieldEnum = {
|
|
168
|
+
instanceId: 'instanceId',
|
|
169
|
+
encryptedJson: 'encryptedJson',
|
|
170
|
+
encryptionKeyId: 'encryptionKeyId',
|
|
171
|
+
schemaVersion: 'schemaVersion',
|
|
172
|
+
updatedAt: 'updatedAt'
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
exports.Prisma.CredentialOAuth2MaterialScalarFieldEnum = {
|
|
176
|
+
instanceId: 'instanceId',
|
|
177
|
+
encryptedJson: 'encryptedJson',
|
|
178
|
+
encryptionKeyId: 'encryptionKeyId',
|
|
179
|
+
schemaVersion: 'schemaVersion',
|
|
180
|
+
providerId: 'providerId',
|
|
181
|
+
connectedEmail: 'connectedEmail',
|
|
182
|
+
connectedAt: 'connectedAt',
|
|
183
|
+
scopesJson: 'scopesJson',
|
|
184
|
+
updatedAt: 'updatedAt'
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
exports.Prisma.CredentialOAuth2StateScalarFieldEnum = {
|
|
188
|
+
state: 'state',
|
|
189
|
+
instanceId: 'instanceId',
|
|
190
|
+
codeVerifier: 'codeVerifier',
|
|
191
|
+
providerId: 'providerId',
|
|
192
|
+
requestedScopesJson: 'requestedScopesJson',
|
|
193
|
+
createdAt: 'createdAt',
|
|
194
|
+
expiresAt: 'expiresAt'
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
exports.Prisma.CredentialBindingScalarFieldEnum = {
|
|
198
|
+
workflowId: 'workflowId',
|
|
199
|
+
nodeId: 'nodeId',
|
|
200
|
+
slotKey: 'slotKey',
|
|
201
|
+
instanceId: 'instanceId',
|
|
202
|
+
updatedAt: 'updatedAt'
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
exports.Prisma.CredentialTestResultScalarFieldEnum = {
|
|
206
|
+
testId: 'testId',
|
|
207
|
+
instanceId: 'instanceId',
|
|
208
|
+
status: 'status',
|
|
209
|
+
message: 'message',
|
|
210
|
+
detailsJson: 'detailsJson',
|
|
211
|
+
testedAt: 'testedAt',
|
|
212
|
+
expiresAt: 'expiresAt'
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
exports.Prisma.UserScalarFieldEnum = {
|
|
216
|
+
id: 'id',
|
|
217
|
+
name: 'name',
|
|
218
|
+
email: 'email',
|
|
219
|
+
emailVerified: 'emailVerified',
|
|
220
|
+
image: 'image',
|
|
221
|
+
passwordHash: 'passwordHash',
|
|
222
|
+
accountStatus: 'accountStatus'
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
exports.Prisma.UserInviteScalarFieldEnum = {
|
|
226
|
+
id: 'id',
|
|
227
|
+
userId: 'userId',
|
|
228
|
+
tokenHash: 'tokenHash',
|
|
229
|
+
expiresAt: 'expiresAt',
|
|
230
|
+
createdAt: 'createdAt',
|
|
231
|
+
revokedAt: 'revokedAt'
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
exports.Prisma.AccountScalarFieldEnum = {
|
|
235
|
+
id: 'id',
|
|
236
|
+
userId: 'userId',
|
|
237
|
+
type: 'type',
|
|
238
|
+
provider: 'provider',
|
|
239
|
+
providerAccountId: 'providerAccountId',
|
|
240
|
+
refresh_token: 'refresh_token',
|
|
241
|
+
access_token: 'access_token',
|
|
242
|
+
expires_at: 'expires_at',
|
|
243
|
+
token_type: 'token_type',
|
|
244
|
+
scope: 'scope',
|
|
245
|
+
id_token: 'id_token',
|
|
246
|
+
session_state: 'session_state'
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
exports.Prisma.SessionScalarFieldEnum = {
|
|
250
|
+
id: 'id',
|
|
251
|
+
sessionToken: 'sessionToken',
|
|
252
|
+
userId: 'userId',
|
|
253
|
+
expires: 'expires'
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
exports.Prisma.VerificationTokenScalarFieldEnum = {
|
|
257
|
+
identifier: 'identifier',
|
|
258
|
+
token: 'token',
|
|
259
|
+
expires: 'expires'
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
exports.Prisma.SortOrder = {
|
|
263
|
+
asc: 'asc',
|
|
264
|
+
desc: 'desc'
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
exports.Prisma.QueryMode = {
|
|
268
|
+
default: 'default',
|
|
269
|
+
insensitive: 'insensitive'
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
exports.Prisma.NullsOrder = {
|
|
273
|
+
first: 'first',
|
|
274
|
+
last: 'last'
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
exports.Prisma.ModelName = {
|
|
279
|
+
Run: 'Run',
|
|
280
|
+
WorkflowDebuggerOverlay: 'WorkflowDebuggerOverlay',
|
|
281
|
+
WorkflowActivation: 'WorkflowActivation',
|
|
282
|
+
TriggerSetupState: 'TriggerSetupState',
|
|
283
|
+
CredentialInstance: 'CredentialInstance',
|
|
284
|
+
CredentialSecretMaterial: 'CredentialSecretMaterial',
|
|
285
|
+
CredentialOAuth2Material: 'CredentialOAuth2Material',
|
|
286
|
+
CredentialOAuth2State: 'CredentialOAuth2State',
|
|
287
|
+
CredentialBinding: 'CredentialBinding',
|
|
288
|
+
CredentialTestResult: 'CredentialTestResult',
|
|
289
|
+
User: 'User',
|
|
290
|
+
UserInvite: 'UserInvite',
|
|
291
|
+
Account: 'Account',
|
|
292
|
+
Session: 'Session',
|
|
293
|
+
VerificationToken: 'VerificationToken'
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* This is a stub Prisma Client that will error at runtime if called.
|
|
298
|
+
*/
|
|
299
|
+
class PrismaClient {
|
|
300
|
+
constructor() {
|
|
301
|
+
return new Proxy(this, {
|
|
302
|
+
get(target, prop) {
|
|
303
|
+
let message
|
|
304
|
+
const runtime = getRuntime()
|
|
305
|
+
if (runtime.isEdge) {
|
|
306
|
+
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
307
|
+
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
308
|
+
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
309
|
+
`;
|
|
310
|
+
} else {
|
|
311
|
+
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message += `
|
|
315
|
+
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
|
316
|
+
|
|
317
|
+
throw new Error(message)
|
|
318
|
+
}
|
|
319
|
+
})
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
exports.PrismaClient = PrismaClient
|
|
324
|
+
|
|
325
|
+
Object.assign(exports, Prisma)
|