@contember/engine-actions 1.4.0-rc.7 → 2.0.0-alpha.10
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/dist/development/index.cjs +94 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +94 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs +30 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.js +30 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.js.map +1 -0
- package/dist/development/src/ImplementationException.cjs +6 -0
- package/dist/development/src/ImplementationException.cjs.map +1 -0
- package/dist/development/src/ImplementationException.js +6 -0
- package/dist/development/src/ImplementationException.js.map +1 -0
- package/dist/development/src/ListenerStoreProvider.cjs +25 -0
- package/dist/development/src/ListenerStoreProvider.cjs.map +1 -0
- package/dist/development/src/ListenerStoreProvider.js +25 -0
- package/dist/development/src/ListenerStoreProvider.js.map +1 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs +15 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.js +16 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.js.map +1 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs +16 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.js +16 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.js.map +1 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs +125 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js +125 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
- package/dist/development/src/dispatch/EventDispatcher.cjs +43 -0
- package/dist/development/src/dispatch/EventDispatcher.cjs.map +1 -0
- package/dist/development/src/dispatch/EventDispatcher.js +43 -0
- package/dist/development/src/dispatch/EventDispatcher.js.map +1 -0
- package/dist/development/src/dispatch/EventsRepository.cjs +104 -0
- package/dist/development/src/dispatch/EventsRepository.cjs.map +1 -0
- package/dist/development/src/dispatch/EventsRepository.js +104 -0
- package/dist/development/src/dispatch/EventsRepository.js.map +1 -0
- package/dist/development/src/dispatch/ProjectDispatcher.cjs +99 -0
- package/dist/development/src/dispatch/ProjectDispatcher.cjs.map +1 -0
- package/dist/development/src/dispatch/ProjectDispatcher.js +99 -0
- package/dist/development/src/dispatch/ProjectDispatcher.js.map +1 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs +16 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.js +16 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.js.map +1 -0
- package/dist/development/src/dispatch/WebhookFetcher.cjs +16 -0
- package/dist/development/src/dispatch/WebhookFetcher.cjs.map +1 -0
- package/dist/development/src/dispatch/WebhookFetcher.js +16 -0
- package/dist/development/src/dispatch/WebhookFetcher.js.map +1 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs +193 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.js +176 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +38 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +38 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs +39 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.js +39 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs +149 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js +132 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs +31 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.js +31 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs +48 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +48 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
- package/dist/{src/graphql/schema/actions.graphql.js → development/src/graphql/schema/actions.graphql.cjs} +5 -5
- package/dist/development/src/graphql/schema/actions.graphql.cjs.map +1 -0
- package/dist/development/src/graphql/schema/actions.graphql.js +93 -0
- package/dist/development/src/graphql/schema/actions.graphql.js.map +1 -0
- package/dist/{src/migrations/2023-03-10-145000-actions-variables.js → development/src/migrations/2023-03-10-145000-actions-variables.cjs} +4 -5
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
- package/dist/development/src/migrations/index.cjs +10 -0
- package/dist/development/src/migrations/index.cjs.map +1 -0
- package/dist/development/src/migrations/index.js +10 -0
- package/dist/development/src/migrations/index.js.map +1 -0
- package/dist/{src/migrations/snapshot.js → development/src/migrations/snapshot.cjs} +4 -5
- package/dist/development/src/migrations/snapshot.cjs.map +1 -0
- package/dist/development/src/migrations/snapshot.js +49 -0
- package/dist/development/src/migrations/snapshot.js.map +1 -0
- package/dist/development/src/model/EventsInProcessingQuery.cjs +14 -0
- package/dist/development/src/model/EventsInProcessingQuery.cjs.map +1 -0
- package/dist/development/src/model/EventsInProcessingQuery.js +14 -0
- package/dist/development/src/model/EventsInProcessingQuery.js.map +1 -0
- package/dist/development/src/model/EventsToProcessQuery.cjs +15 -0
- package/dist/development/src/model/EventsToProcessQuery.cjs.map +1 -0
- package/dist/development/src/model/EventsToProcessQuery.js +15 -0
- package/dist/development/src/model/EventsToProcessQuery.js.map +1 -0
- package/dist/development/src/model/EventsToProcessSpecification.cjs +8 -0
- package/dist/development/src/model/EventsToProcessSpecification.cjs.map +1 -0
- package/dist/development/src/model/EventsToProcessSpecification.js +8 -0
- package/dist/development/src/model/EventsToProcessSpecification.js.map +1 -0
- package/dist/development/src/model/FailedEventsQuery.cjs +14 -0
- package/dist/development/src/model/FailedEventsQuery.cjs.map +1 -0
- package/dist/development/src/model/FailedEventsQuery.js +14 -0
- package/dist/development/src/model/FailedEventsQuery.js.map +1 -0
- package/dist/development/src/model/SetVariableCommand.cjs +21 -0
- package/dist/development/src/model/SetVariableCommand.cjs.map +1 -0
- package/dist/development/src/model/SetVariableCommand.js +21 -0
- package/dist/development/src/model/SetVariableCommand.js.map +1 -0
- package/dist/development/src/model/VariablesManager.cjs +41 -0
- package/dist/development/src/model/VariablesManager.cjs.map +1 -0
- package/dist/development/src/model/VariablesManager.js +41 -0
- package/dist/development/src/model/VariablesManager.js.map +1 -0
- package/dist/development/src/model/VariablesQuery.cjs +10 -0
- package/dist/development/src/model/VariablesQuery.cjs.map +1 -0
- package/dist/development/src/model/VariablesQuery.js +10 -0
- package/dist/development/src/model/VariablesQuery.js.map +1 -0
- package/dist/development/src/triggers/TriggerHandler.cjs +126 -0
- package/dist/development/src/triggers/TriggerHandler.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerHandler.js +126 -0
- package/dist/development/src/triggers/TriggerHandler.js.map +1 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +21 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +21 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs +169 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.js +169 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersFactory.cjs +17 -0
- package/dist/development/src/triggers/TriggerListenersFactory.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersFactory.js +17 -0
- package/dist/development/src/triggers/TriggerListenersFactory.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersStore.cjs +24 -0
- package/dist/development/src/triggers/TriggerListenersStore.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersStore.js +24 -0
- package/dist/development/src/triggers/TriggerListenersStore.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs +134 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.js +134 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadManager.cjs +27 -0
- package/dist/development/src/triggers/TriggerPayloadManager.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadManager.js +27 -0
- package/dist/development/src/triggers/TriggerPayloadManager.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs +40 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.js +40 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.js.map +1 -0
- package/dist/development/src/utils/assertNever.cjs +7 -0
- package/dist/development/src/utils/assertNever.cjs.map +1 -0
- package/dist/development/src/utils/assertNever.js +7 -0
- package/dist/development/src/utils/assertNever.js.map +1 -0
- package/dist/development/src/utils/map.cjs +13 -0
- package/dist/development/src/utils/map.cjs.map +1 -0
- package/dist/development/src/utils/map.js +13 -0
- package/dist/development/src/utils/map.js.map +1 -0
- package/dist/production/index.cjs +94 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +94 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs +30 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.js +30 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.js.map +1 -0
- package/dist/production/src/ImplementationException.cjs +6 -0
- package/dist/production/src/ImplementationException.cjs.map +1 -0
- package/dist/production/src/ImplementationException.js +6 -0
- package/dist/production/src/ImplementationException.js.map +1 -0
- package/dist/production/src/ListenerStoreProvider.cjs +25 -0
- package/dist/production/src/ListenerStoreProvider.cjs.map +1 -0
- package/dist/production/src/ListenerStoreProvider.js +25 -0
- package/dist/production/src/ListenerStoreProvider.js.map +1 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs +15 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.js +16 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.js.map +1 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs +16 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.js +16 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.js.map +1 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs +125 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js +125 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
- package/dist/production/src/dispatch/EventDispatcher.cjs +43 -0
- package/dist/production/src/dispatch/EventDispatcher.cjs.map +1 -0
- package/dist/production/src/dispatch/EventDispatcher.js +43 -0
- package/dist/production/src/dispatch/EventDispatcher.js.map +1 -0
- package/dist/production/src/dispatch/EventsRepository.cjs +104 -0
- package/dist/production/src/dispatch/EventsRepository.cjs.map +1 -0
- package/dist/production/src/dispatch/EventsRepository.js +104 -0
- package/dist/production/src/dispatch/EventsRepository.js.map +1 -0
- package/dist/production/src/dispatch/ProjectDispatcher.cjs +99 -0
- package/dist/production/src/dispatch/ProjectDispatcher.cjs.map +1 -0
- package/dist/production/src/dispatch/ProjectDispatcher.js +99 -0
- package/dist/production/src/dispatch/ProjectDispatcher.js.map +1 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs +16 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.js +16 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.js.map +1 -0
- package/dist/production/src/dispatch/WebhookFetcher.cjs +16 -0
- package/dist/production/src/dispatch/WebhookFetcher.cjs.map +1 -0
- package/dist/production/src/dispatch/WebhookFetcher.js +16 -0
- package/dist/production/src/dispatch/WebhookFetcher.js.map +1 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs +193 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.js +176 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +38 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +38 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs +39 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.js +39 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs +149 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js +132 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs +31 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.js +31 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs +48 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +48 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
- package/dist/production/src/graphql/schema/actions.graphql.cjs +93 -0
- package/dist/production/src/graphql/schema/actions.graphql.cjs.map +1 -0
- package/dist/production/src/graphql/schema/actions.graphql.js +93 -0
- package/dist/production/src/graphql/schema/actions.graphql.js.map +1 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs +16 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
- package/dist/production/src/migrations/index.cjs +10 -0
- package/dist/production/src/migrations/index.cjs.map +1 -0
- package/dist/production/src/migrations/index.js +10 -0
- package/dist/production/src/migrations/index.js.map +1 -0
- package/dist/production/src/migrations/snapshot.cjs +48 -0
- package/dist/production/src/migrations/snapshot.cjs.map +1 -0
- package/dist/production/src/migrations/snapshot.js +49 -0
- package/dist/production/src/migrations/snapshot.js.map +1 -0
- package/dist/production/src/model/EventsInProcessingQuery.cjs +14 -0
- package/dist/production/src/model/EventsInProcessingQuery.cjs.map +1 -0
- package/dist/production/src/model/EventsInProcessingQuery.js +14 -0
- package/dist/production/src/model/EventsInProcessingQuery.js.map +1 -0
- package/dist/production/src/model/EventsToProcessQuery.cjs +15 -0
- package/dist/production/src/model/EventsToProcessQuery.cjs.map +1 -0
- package/dist/production/src/model/EventsToProcessQuery.js +15 -0
- package/dist/production/src/model/EventsToProcessQuery.js.map +1 -0
- package/dist/production/src/model/EventsToProcessSpecification.cjs +8 -0
- package/dist/production/src/model/EventsToProcessSpecification.cjs.map +1 -0
- package/dist/production/src/model/EventsToProcessSpecification.js +8 -0
- package/dist/production/src/model/EventsToProcessSpecification.js.map +1 -0
- package/dist/production/src/model/FailedEventsQuery.cjs +14 -0
- package/dist/production/src/model/FailedEventsQuery.cjs.map +1 -0
- package/dist/production/src/model/FailedEventsQuery.js +14 -0
- package/dist/production/src/model/FailedEventsQuery.js.map +1 -0
- package/dist/production/src/model/SetVariableCommand.cjs +21 -0
- package/dist/production/src/model/SetVariableCommand.cjs.map +1 -0
- package/dist/production/src/model/SetVariableCommand.js +21 -0
- package/dist/production/src/model/SetVariableCommand.js.map +1 -0
- package/dist/production/src/model/VariablesManager.cjs +41 -0
- package/dist/production/src/model/VariablesManager.cjs.map +1 -0
- package/dist/production/src/model/VariablesManager.js +41 -0
- package/dist/production/src/model/VariablesManager.js.map +1 -0
- package/dist/production/src/model/VariablesQuery.cjs +10 -0
- package/dist/production/src/model/VariablesQuery.cjs.map +1 -0
- package/dist/production/src/model/VariablesQuery.js +10 -0
- package/dist/production/src/model/VariablesQuery.js.map +1 -0
- package/dist/production/src/triggers/TriggerHandler.cjs +126 -0
- package/dist/production/src/triggers/TriggerHandler.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerHandler.js +126 -0
- package/dist/production/src/triggers/TriggerHandler.js.map +1 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +21 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +21 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs +169 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.js +169 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersFactory.cjs +17 -0
- package/dist/production/src/triggers/TriggerListenersFactory.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersFactory.js +17 -0
- package/dist/production/src/triggers/TriggerListenersFactory.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersStore.cjs +24 -0
- package/dist/production/src/triggers/TriggerListenersStore.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersStore.js +24 -0
- package/dist/production/src/triggers/TriggerListenersStore.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs +134 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.js +134 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadManager.cjs +27 -0
- package/dist/production/src/triggers/TriggerPayloadManager.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadManager.js +27 -0
- package/dist/production/src/triggers/TriggerPayloadManager.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs +40 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.js +40 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.js.map +1 -0
- package/dist/production/src/utils/assertNever.cjs +7 -0
- package/dist/production/src/utils/assertNever.cjs.map +1 -0
- package/dist/production/src/utils/assertNever.js +7 -0
- package/dist/production/src/utils/assertNever.js.map +1 -0
- package/dist/production/src/utils/map.cjs +13 -0
- package/dist/production/src/utils/map.cjs.map +1 -0
- package/dist/production/src/utils/map.js +13 -0
- package/dist/production/src/utils/map.js.map +1 -0
- package/dist/tests/src/uuid.d.ts +3 -0
- package/dist/tests/src/uuid.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts +28 -0
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts.map +1 -0
- package/dist/{src → types}/dispatch/types.d.ts +1 -1
- package/dist/types/dispatch/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/{src → types}/utils/map.d.ts.map +1 -1
- package/package.json +37 -24
- package/src/dispatch/types.ts +1 -1
- package/src/tsconfig.json +1 -1
- package/tests/cases/unit/webhookHandler.test.ts +1 -1
- package/tests/src/uuid.ts +4 -0
- package/tests/tsconfig.json +0 -3
- package/vitest.config.ts +3 -0
- package/dist/src/ActionsExecutionContainerHookFactory.js +0 -28
- package/dist/src/ActionsExecutionContainerHookFactory.js.map +0 -1
- package/dist/src/ImplementationException.js +0 -7
- package/dist/src/ImplementationException.js.map +0 -1
- package/dist/src/ListenerStoreProvider.js +0 -21
- package/dist/src/ListenerStoreProvider.js.map +0 -1
- package/dist/src/authorization/ActionsAuthorizationActions.d.ts +0 -27
- package/dist/src/authorization/ActionsAuthorizationActions.d.ts.map +0 -1
- package/dist/src/authorization/ActionsAuthorizationActions.js +0 -17
- package/dist/src/authorization/ActionsAuthorizationActions.js.map +0 -1
- package/dist/src/authorization/ActionsPermissionsFactory.js +0 -17
- package/dist/src/authorization/ActionsPermissionsFactory.js.map +0 -1
- package/dist/src/authorization/Identity.js +0 -3
- package/dist/src/authorization/Identity.js.map +0 -1
- package/dist/src/authorization/index.js +0 -20
- package/dist/src/authorization/index.js.map +0 -1
- package/dist/src/dispatch/DispatchWorkerSupervisor.js +0 -123
- package/dist/src/dispatch/DispatchWorkerSupervisor.js.map +0 -1
- package/dist/src/dispatch/EventDispatcher.js +0 -46
- package/dist/src/dispatch/EventDispatcher.js.map +0 -1
- package/dist/src/dispatch/EventsRepository.js +0 -138
- package/dist/src/dispatch/EventsRepository.js.map +0 -1
- package/dist/src/dispatch/ProjectDispatcher.js +0 -103
- package/dist/src/dispatch/ProjectDispatcher.js.map +0 -1
- package/dist/src/dispatch/TargetHandlerResolver.js +0 -17
- package/dist/src/dispatch/TargetHandlerResolver.js.map +0 -1
- package/dist/src/dispatch/WebhookFetcher.js +0 -17
- package/dist/src/dispatch/WebhookFetcher.js.map +0 -1
- package/dist/src/dispatch/WebhookTargetHandler.js +0 -203
- package/dist/src/dispatch/WebhookTargetHandler.js.map +0 -1
- package/dist/src/dispatch/types.d.ts.map +0 -1
- package/dist/src/dispatch/types.js +0 -3
- package/dist/src/dispatch/types.js.map +0 -1
- package/dist/src/graphql/http/ActionsApiMiddlewareFactory.js +0 -39
- package/dist/src/graphql/http/ActionsApiMiddlewareFactory.js.map +0 -1
- package/dist/src/graphql/http/ActionsContextResolver.js +0 -35
- package/dist/src/graphql/http/ActionsContextResolver.js.map +0 -1
- package/dist/src/graphql/http/ActionsGraphQLHandlerFactory.js +0 -21
- package/dist/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +0 -1
- package/dist/src/graphql/http/ActionsWebsocketControllerFactory.js +0 -154
- package/dist/src/graphql/http/ActionsWebsocketControllerFactory.js.map +0 -1
- package/dist/src/graphql/resolvers/ActionsContext.js +0 -3
- package/dist/src/graphql/resolvers/ActionsContext.js.map +0 -1
- package/dist/src/graphql/resolvers/ResolversFactory.js +0 -32
- package/dist/src/graphql/resolvers/ResolversFactory.js.map +0 -1
- package/dist/src/graphql/resolvers/index.js +0 -19
- package/dist/src/graphql/resolvers/index.js.map +0 -1
- package/dist/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +0 -18
- package/dist/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +0 -1
- package/dist/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +0 -18
- package/dist/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +0 -1
- package/dist/src/graphql/resolvers/mutation/index.js +0 -19
- package/dist/src/graphql/resolvers/mutation/index.js.map +0 -1
- package/dist/src/graphql/resolvers/query/EventsQueryResolver.js +0 -47
- package/dist/src/graphql/resolvers/query/EventsQueryResolver.js.map +0 -1
- package/dist/src/graphql/resolvers/query/VariablesQueryResolver.js +0 -18
- package/dist/src/graphql/resolvers/query/VariablesQueryResolver.js.map +0 -1
- package/dist/src/graphql/resolvers/query/index.js +0 -18
- package/dist/src/graphql/resolvers/query/index.js.map +0 -1
- package/dist/src/graphql/schema/actions.graphql.js.map +0 -1
- package/dist/src/graphql/schema/index.js +0 -3
- package/dist/src/graphql/schema/index.js.map +0 -1
- package/dist/src/index.js +0 -87
- package/dist/src/index.js.map +0 -1
- package/dist/src/migrations/2023-03-10-145000-actions-variables.js.map +0 -1
- package/dist/src/migrations/index.js +0 -13
- package/dist/src/migrations/index.js.map +0 -1
- package/dist/src/migrations/snapshot.js.map +0 -1
- package/dist/src/model/EventsInProcessingQuery.js +0 -22
- package/dist/src/model/EventsInProcessingQuery.js.map +0 -1
- package/dist/src/model/EventsToProcessQuery.js +0 -22
- package/dist/src/model/EventsToProcessQuery.js.map +0 -1
- package/dist/src/model/EventsToProcessSpecification.js +0 -14
- package/dist/src/model/EventsToProcessSpecification.js.map +0 -1
- package/dist/src/model/FailedEventsQuery.js +0 -22
- package/dist/src/model/FailedEventsQuery.js.map +0 -1
- package/dist/src/model/SetVariableCommand.js +0 -26
- package/dist/src/model/SetVariableCommand.js.map +0 -1
- package/dist/src/model/VariablesManager.js +0 -46
- package/dist/src/model/VariablesManager.js.map +0 -1
- package/dist/src/model/VariablesQuery.js +0 -13
- package/dist/src/model/VariablesQuery.js.map +0 -1
- package/dist/src/model/types.js +0 -3
- package/dist/src/model/types.js.map +0 -1
- package/dist/src/triggers/TriggerHandler.js +0 -130
- package/dist/src/triggers/TriggerHandler.js.map +0 -1
- package/dist/src/triggers/TriggerIndirectChangesFetcher.js +0 -24
- package/dist/src/triggers/TriggerIndirectChangesFetcher.js.map +0 -1
- package/dist/src/triggers/TriggerListeners.js +0 -3
- package/dist/src/triggers/TriggerListeners.js.map +0 -1
- package/dist/src/triggers/TriggerListenersBuilder.js +0 -169
- package/dist/src/triggers/TriggerListenersBuilder.js.map +0 -1
- package/dist/src/triggers/TriggerListenersFactory.js +0 -18
- package/dist/src/triggers/TriggerListenersFactory.js.map +0 -1
- package/dist/src/triggers/TriggerListenersStore.js +0 -30
- package/dist/src/triggers/TriggerListenersStore.js.map +0 -1
- package/dist/src/triggers/TriggerPayloadBuilder.js +0 -140
- package/dist/src/triggers/TriggerPayloadBuilder.js.map +0 -1
- package/dist/src/triggers/TriggerPayloadManager.js +0 -26
- package/dist/src/triggers/TriggerPayloadManager.js.map +0 -1
- package/dist/src/triggers/TriggerPayloadPersister.js +0 -46
- package/dist/src/triggers/TriggerPayloadPersister.js.map +0 -1
- package/dist/src/triggers/index.js +0 -24
- package/dist/src/triggers/index.js.map +0 -1
- package/dist/src/tsconfig.tsbuildinfo +0 -1
- package/dist/src/utils/assertNever.js +0 -8
- package/dist/src/utils/assertNever.js.map +0 -1
- package/dist/src/utils/map.js +0 -14
- package/dist/src/utils/map.js.map +0 -1
- package/dist/tests/cases/integration/triggers.manyHasManyWatch.test.d.ts +0 -2
- package/dist/tests/cases/integration/triggers.manyHasManyWatch.test.d.ts.map +0 -1
- package/dist/tests/cases/integration/triggers.manyHasManyWatch.test.js +0 -442
- package/dist/tests/cases/integration/triggers.manyHasManyWatch.test.js.map +0 -1
- package/dist/tests/cases/integration/triggers.manyHasOneWatch.test.d.ts +0 -2
- package/dist/tests/cases/integration/triggers.manyHasOneWatch.test.d.ts.map +0 -1
- package/dist/tests/cases/integration/triggers.manyHasOneWatch.test.js +0 -449
- package/dist/tests/cases/integration/triggers.manyHasOneWatch.test.js.map +0 -1
- package/dist/tests/cases/integration/triggers.rootWatch.test.d.ts +0 -2
- package/dist/tests/cases/integration/triggers.rootWatch.test.d.ts.map +0 -1
- package/dist/tests/cases/integration/triggers.rootWatch.test.js +0 -222
- package/dist/tests/cases/integration/triggers.rootWatch.test.js.map +0 -1
- package/dist/tests/cases/integration/utils.d.ts +0 -4
- package/dist/tests/cases/integration/utils.d.ts.map +0 -1
- package/dist/tests/cases/integration/utils.js +0 -12
- package/dist/tests/cases/integration/utils.js.map +0 -1
- package/dist/tests/cases/unit/generator.test.js +0 -627
- package/dist/tests/cases/unit/generator.test.js.map +0 -1
- package/dist/tests/cases/unit/webhookHandler.test.js +0 -394
- package/dist/tests/cases/unit/webhookHandler.test.js.map +0 -1
- package/dist/tests/src/gql.js +0 -14
- package/dist/tests/src/gql.js.map +0 -1
- package/tests/cases/integration/triggers.manyHasManyWatch.test.ts +0 -437
- package/tests/cases/integration/triggers.manyHasOneWatch.test.ts +0 -446
- package/tests/cases/integration/triggers.rootWatch.test.ts +0 -216
- package/tests/cases/integration/utils.ts +0 -9
- package/vite.config.js +0 -3
- /package/dist/{src → types}/ActionsExecutionContainerHookFactory.d.ts +0 -0
- /package/dist/{src → types}/ActionsExecutionContainerHookFactory.d.ts.map +0 -0
- /package/dist/{src → types}/ImplementationException.d.ts +0 -0
- /package/dist/{src → types}/ImplementationException.d.ts.map +0 -0
- /package/dist/{src → types}/ListenerStoreProvider.d.ts +0 -0
- /package/dist/{src → types}/ListenerStoreProvider.d.ts.map +0 -0
- /package/dist/{src → types}/authorization/ActionsPermissionsFactory.d.ts +0 -0
- /package/dist/{src → types}/authorization/ActionsPermissionsFactory.d.ts.map +0 -0
- /package/dist/{src → types}/authorization/Identity.d.ts +0 -0
- /package/dist/{src → types}/authorization/Identity.d.ts.map +0 -0
- /package/dist/{src → types}/authorization/index.d.ts +0 -0
- /package/dist/{src → types}/authorization/index.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/DispatchWorkerSupervisor.d.ts +0 -0
- /package/dist/{src → types}/dispatch/DispatchWorkerSupervisor.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/EventDispatcher.d.ts +0 -0
- /package/dist/{src → types}/dispatch/EventDispatcher.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/EventsRepository.d.ts +0 -0
- /package/dist/{src → types}/dispatch/EventsRepository.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/ProjectDispatcher.d.ts +0 -0
- /package/dist/{src → types}/dispatch/ProjectDispatcher.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/TargetHandlerResolver.d.ts +0 -0
- /package/dist/{src → types}/dispatch/TargetHandlerResolver.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/WebhookFetcher.d.ts +0 -0
- /package/dist/{src → types}/dispatch/WebhookFetcher.d.ts.map +0 -0
- /package/dist/{src → types}/dispatch/WebhookTargetHandler.d.ts +0 -0
- /package/dist/{src → types}/dispatch/WebhookTargetHandler.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/http/ActionsApiMiddlewareFactory.d.ts +0 -0
- /package/dist/{src → types}/graphql/http/ActionsApiMiddlewareFactory.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/http/ActionsContextResolver.d.ts +0 -0
- /package/dist/{src → types}/graphql/http/ActionsContextResolver.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/http/ActionsGraphQLHandlerFactory.d.ts +0 -0
- /package/dist/{src → types}/graphql/http/ActionsGraphQLHandlerFactory.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/http/ActionsWebsocketControllerFactory.d.ts +0 -0
- /package/dist/{src → types}/graphql/http/ActionsWebsocketControllerFactory.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/ActionsContext.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/ActionsContext.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/ResolversFactory.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/ResolversFactory.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/index.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/index.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/index.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/mutation/index.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/EventsQueryResolver.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/EventsQueryResolver.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/VariablesQueryResolver.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/VariablesQueryResolver.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/index.d.ts +0 -0
- /package/dist/{src → types}/graphql/resolvers/query/index.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/schema/actions.graphql.d.ts +0 -0
- /package/dist/{src → types}/graphql/schema/actions.graphql.d.ts.map +0 -0
- /package/dist/{src → types}/graphql/schema/index.d.ts +0 -0
- /package/dist/{src → types}/graphql/schema/index.d.ts.map +0 -0
- /package/dist/{src → types}/index.d.ts +0 -0
- /package/dist/{src → types}/index.d.ts.map +0 -0
- /package/dist/{src → types}/migrations/2023-03-10-145000-actions-variables.d.ts +0 -0
- /package/dist/{src → types}/migrations/2023-03-10-145000-actions-variables.d.ts.map +0 -0
- /package/dist/{src → types}/migrations/index.d.ts +0 -0
- /package/dist/{src → types}/migrations/index.d.ts.map +0 -0
- /package/dist/{src → types}/migrations/snapshot.d.ts +0 -0
- /package/dist/{src → types}/migrations/snapshot.d.ts.map +0 -0
- /package/dist/{src → types}/model/EventsInProcessingQuery.d.ts +0 -0
- /package/dist/{src → types}/model/EventsInProcessingQuery.d.ts.map +0 -0
- /package/dist/{src → types}/model/EventsToProcessQuery.d.ts +0 -0
- /package/dist/{src → types}/model/EventsToProcessQuery.d.ts.map +0 -0
- /package/dist/{src → types}/model/EventsToProcessSpecification.d.ts +0 -0
- /package/dist/{src → types}/model/EventsToProcessSpecification.d.ts.map +0 -0
- /package/dist/{src → types}/model/FailedEventsQuery.d.ts +0 -0
- /package/dist/{src → types}/model/FailedEventsQuery.d.ts.map +0 -0
- /package/dist/{src → types}/model/SetVariableCommand.d.ts +0 -0
- /package/dist/{src → types}/model/SetVariableCommand.d.ts.map +0 -0
- /package/dist/{src → types}/model/VariablesManager.d.ts +0 -0
- /package/dist/{src → types}/model/VariablesManager.d.ts.map +0 -0
- /package/dist/{src → types}/model/VariablesQuery.d.ts +0 -0
- /package/dist/{src → types}/model/VariablesQuery.d.ts.map +0 -0
- /package/dist/{src → types}/model/types.d.ts +0 -0
- /package/dist/{src → types}/model/types.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerHandler.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerHandler.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerIndirectChangesFetcher.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerIndirectChangesFetcher.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerListeners.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerListeners.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersBuilder.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersBuilder.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersFactory.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersFactory.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersStore.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerListenersStore.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadBuilder.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadBuilder.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadManager.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadManager.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadPersister.d.ts +0 -0
- /package/dist/{src → types}/triggers/TriggerPayloadPersister.d.ts.map +0 -0
- /package/dist/{src → types}/triggers/index.d.ts +0 -0
- /package/dist/{src → types}/triggers/index.d.ts.map +0 -0
- /package/dist/{src → types}/utils/assertNever.d.ts +0 -0
- /package/dist/{src → types}/utils/assertNever.d.ts.map +0 -0
- /package/dist/{src → types}/utils/map.d.ts +0 -0
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import { ActionsDefinition as actions, createSchema, SchemaDefinition as def } from '@contember/schema-definition'
|
|
2
|
-
import { test } from 'vitest'
|
|
3
|
-
import { executeDbTest } from '@contember/engine-api-tester'
|
|
4
|
-
import { gql } from '../../src/gql'
|
|
5
|
-
import { migrationsGroup } from '../../../src/migrations'
|
|
6
|
-
import { executionContainerFactoryFactory } from './utils'
|
|
7
|
-
|
|
8
|
-
namespace ActionsModel {
|
|
9
|
-
|
|
10
|
-
@actions.watch({
|
|
11
|
-
name: 'article_watch',
|
|
12
|
-
watch: `
|
|
13
|
-
title
|
|
14
|
-
category {
|
|
15
|
-
name
|
|
16
|
-
}
|
|
17
|
-
`,
|
|
18
|
-
webhook: 'http://foobar',
|
|
19
|
-
selection: `
|
|
20
|
-
title
|
|
21
|
-
category {
|
|
22
|
-
name
|
|
23
|
-
}
|
|
24
|
-
`,
|
|
25
|
-
})
|
|
26
|
-
export class Article {
|
|
27
|
-
title = def.stringColumn().unique()
|
|
28
|
-
category = def.manyHasOne(Category)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class Category {
|
|
32
|
-
name = def.stringColumn().unique()
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
test('triggers: many has one watch - field update', async () => {
|
|
37
|
-
const schema = createSchema(ActionsModel)
|
|
38
|
-
await executeDbTest({
|
|
39
|
-
executionContainerFactoryFactory,
|
|
40
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
41
|
-
schema: schema,
|
|
42
|
-
seed: [
|
|
43
|
-
{
|
|
44
|
-
query: gql`
|
|
45
|
-
mutation {
|
|
46
|
-
createArticle(data: {title: "Hello world", category: {create: {name: "Tutorials"}}}) {
|
|
47
|
-
ok
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
query: gql`
|
|
54
|
-
mutation {
|
|
55
|
-
updateCategory(by: {name: "Tutorials"}, data: {name: "Guides"}) {
|
|
56
|
-
ok
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`,
|
|
60
|
-
return: {
|
|
61
|
-
updateCategory: {
|
|
62
|
-
ok: true,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
expectSystemDatabase: {
|
|
66
|
-
actions_event: [{
|
|
67
|
-
payload: {
|
|
68
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
69
|
-
entity: 'Article',
|
|
70
|
-
events: [{
|
|
71
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
72
|
-
entity: 'Article',
|
|
73
|
-
values: {
|
|
74
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
75
|
-
title: 'Hello world',
|
|
76
|
-
category: '123e4567-e89b-12d3-a456-000000000004',
|
|
77
|
-
},
|
|
78
|
-
operation: 'create',
|
|
79
|
-
}],
|
|
80
|
-
trigger: 'article_watch',
|
|
81
|
-
operation: 'watch',
|
|
82
|
-
selection: {
|
|
83
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
84
|
-
title: 'Hello world',
|
|
85
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000004', name: 'Tutorials' },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
}, {
|
|
89
|
-
payload: {
|
|
90
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
91
|
-
entity: 'Article',
|
|
92
|
-
events: [{
|
|
93
|
-
id: '123e4567-e89b-12d3-a456-000000000004',
|
|
94
|
-
old: { name: 'Tutorials' },
|
|
95
|
-
path: ['category'],
|
|
96
|
-
entity: 'Category',
|
|
97
|
-
values: { name: 'Guides' },
|
|
98
|
-
operation: 'update',
|
|
99
|
-
}],
|
|
100
|
-
trigger: 'article_watch',
|
|
101
|
-
operation: 'watch',
|
|
102
|
-
selection: {
|
|
103
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
104
|
-
title: 'Hello world',
|
|
105
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000004', name: 'Guides' },
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
}],
|
|
109
|
-
},
|
|
110
|
-
})
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
test('triggers: many has one watch - field update - noop', async () => {
|
|
115
|
-
const schema = createSchema(ActionsModel)
|
|
116
|
-
await executeDbTest({
|
|
117
|
-
executionContainerFactoryFactory,
|
|
118
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
119
|
-
schema: schema,
|
|
120
|
-
seed: [
|
|
121
|
-
{
|
|
122
|
-
query: gql`
|
|
123
|
-
mutation {
|
|
124
|
-
createArticle(data: {title: "Hello world", category: {create: {name: "Tutorials"}}}) {
|
|
125
|
-
ok
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
`,
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
query: gql`
|
|
132
|
-
mutation {
|
|
133
|
-
updateCategory(by: {name: "Tutorials"}, data: {name: "Tutorials"}) {
|
|
134
|
-
ok
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
`,
|
|
138
|
-
return: {
|
|
139
|
-
updateCategory: {
|
|
140
|
-
ok: true,
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
expectSystemDatabase: {
|
|
144
|
-
actions_event: [{
|
|
145
|
-
payload: {
|
|
146
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
147
|
-
entity: 'Article',
|
|
148
|
-
events: [{
|
|
149
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
150
|
-
entity: 'Article',
|
|
151
|
-
values: {
|
|
152
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
153
|
-
title: 'Hello world',
|
|
154
|
-
category: '123e4567-e89b-12d3-a456-000000000004',
|
|
155
|
-
},
|
|
156
|
-
operation: 'create',
|
|
157
|
-
}],
|
|
158
|
-
trigger: 'article_watch',
|
|
159
|
-
operation: 'watch',
|
|
160
|
-
selection: {
|
|
161
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
162
|
-
title: 'Hello world',
|
|
163
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000004', name: 'Tutorials' },
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
}],
|
|
167
|
-
},
|
|
168
|
-
})
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
test('triggers: many has one watch - connect - noop', async () => {
|
|
173
|
-
const schema = createSchema(ActionsModel)
|
|
174
|
-
await executeDbTest({
|
|
175
|
-
executionContainerFactoryFactory,
|
|
176
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
177
|
-
schema: schema,
|
|
178
|
-
seed: [
|
|
179
|
-
{
|
|
180
|
-
query: gql`
|
|
181
|
-
mutation {
|
|
182
|
-
createArticle(data: {title: "Hello world"}) {
|
|
183
|
-
ok
|
|
184
|
-
}
|
|
185
|
-
createCategory(data: {name: "Tutorials"}) {
|
|
186
|
-
ok
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
`,
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
query: gql`
|
|
193
|
-
mutation {
|
|
194
|
-
updateArticle(by: {title: "Hello world"}, data: {category: {connect: {name: "Tutorials"}}}) {
|
|
195
|
-
ok
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
`,
|
|
199
|
-
return: {
|
|
200
|
-
updateArticle: {
|
|
201
|
-
ok: true,
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
expectSystemDatabase: {
|
|
205
|
-
actions_event: [{
|
|
206
|
-
payload: {
|
|
207
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
208
|
-
entity: 'Article',
|
|
209
|
-
events: [{
|
|
210
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
211
|
-
entity: 'Article',
|
|
212
|
-
values: {
|
|
213
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
214
|
-
title: 'Hello world',
|
|
215
|
-
category: null,
|
|
216
|
-
},
|
|
217
|
-
operation: 'create',
|
|
218
|
-
}],
|
|
219
|
-
trigger: 'article_watch',
|
|
220
|
-
operation: 'watch',
|
|
221
|
-
selection: {
|
|
222
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
223
|
-
title: 'Hello world',
|
|
224
|
-
category: null,
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
}, {
|
|
228
|
-
payload: {
|
|
229
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
230
|
-
entity: 'Article',
|
|
231
|
-
events: [{
|
|
232
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
233
|
-
old: { category: null },
|
|
234
|
-
entity: 'Article',
|
|
235
|
-
values: { category: '123e4567-e89b-12d3-a456-000000000006' },
|
|
236
|
-
operation: 'update',
|
|
237
|
-
}],
|
|
238
|
-
trigger: 'article_watch',
|
|
239
|
-
operation: 'watch',
|
|
240
|
-
selection: {
|
|
241
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
242
|
-
title: 'Hello world',
|
|
243
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000006', name: 'Tutorials' },
|
|
244
|
-
},
|
|
245
|
-
},
|
|
246
|
-
}],
|
|
247
|
-
},
|
|
248
|
-
})
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
test('triggers: many has one watch - connect - noop', async () => {
|
|
253
|
-
const schema = createSchema(ActionsModel)
|
|
254
|
-
await executeDbTest({
|
|
255
|
-
executionContainerFactoryFactory,
|
|
256
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
257
|
-
schema: schema,
|
|
258
|
-
seed: [
|
|
259
|
-
{
|
|
260
|
-
query: gql`
|
|
261
|
-
mutation {
|
|
262
|
-
createArticle(data: {title: "Hello world", category: {create: {name: "Tutorials"}}}) {
|
|
263
|
-
ok
|
|
264
|
-
}
|
|
265
|
-
createCategory(data: {name: "Tutorials"}) {
|
|
266
|
-
ok
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
`,
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
query: gql`
|
|
273
|
-
mutation {
|
|
274
|
-
updateArticle(by: {title: "Hello world"}, data: {category: {connect: {name: "Tutorials"}}}) {
|
|
275
|
-
ok
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
`,
|
|
279
|
-
return: {
|
|
280
|
-
updateArticle: {
|
|
281
|
-
ok: true,
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
expectSystemDatabase: {
|
|
285
|
-
actions_event: [{
|
|
286
|
-
payload: {
|
|
287
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
288
|
-
entity: 'Article',
|
|
289
|
-
events: [{
|
|
290
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
291
|
-
entity: 'Article',
|
|
292
|
-
values: {
|
|
293
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
294
|
-
title: 'Hello world',
|
|
295
|
-
category: '123e4567-e89b-12d3-a456-000000000004',
|
|
296
|
-
},
|
|
297
|
-
operation: 'create',
|
|
298
|
-
}],
|
|
299
|
-
trigger: 'article_watch',
|
|
300
|
-
operation: 'watch',
|
|
301
|
-
selection: {
|
|
302
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
303
|
-
title: 'Hello world',
|
|
304
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000004', name: 'Tutorials' },
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
}],
|
|
308
|
-
},
|
|
309
|
-
})
|
|
310
|
-
})
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
test('triggers: many has one watch - disconnect', async () => {
|
|
314
|
-
const schema = createSchema(ActionsModel)
|
|
315
|
-
await executeDbTest({
|
|
316
|
-
executionContainerFactoryFactory,
|
|
317
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
318
|
-
schema: schema,
|
|
319
|
-
seed: [
|
|
320
|
-
{
|
|
321
|
-
query: gql`
|
|
322
|
-
mutation {
|
|
323
|
-
createArticle(data: {title: "Hello world", category: {create: {name: "Tutorials"}}}) {
|
|
324
|
-
ok
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
`,
|
|
328
|
-
},
|
|
329
|
-
],
|
|
330
|
-
query: gql`
|
|
331
|
-
mutation {
|
|
332
|
-
updateArticle(by: {title: "Hello world"}, data: {category: {disconnect: true}}) {
|
|
333
|
-
ok
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
`,
|
|
337
|
-
return: {
|
|
338
|
-
updateArticle: {
|
|
339
|
-
ok: true,
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
expectSystemDatabase: {
|
|
343
|
-
actions_event: [{
|
|
344
|
-
payload: {
|
|
345
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
346
|
-
entity: 'Article',
|
|
347
|
-
events: [{
|
|
348
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
349
|
-
entity: 'Article',
|
|
350
|
-
values: {
|
|
351
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
352
|
-
title: 'Hello world',
|
|
353
|
-
category: '123e4567-e89b-12d3-a456-000000000004',
|
|
354
|
-
},
|
|
355
|
-
operation: 'create',
|
|
356
|
-
}],
|
|
357
|
-
trigger: 'article_watch',
|
|
358
|
-
operation: 'watch',
|
|
359
|
-
selection: {
|
|
360
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
361
|
-
title: 'Hello world',
|
|
362
|
-
category: { id: '123e4567-e89b-12d3-a456-000000000004', name: 'Tutorials' },
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
}, {
|
|
366
|
-
payload: {
|
|
367
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
368
|
-
entity: 'Article',
|
|
369
|
-
events: [{
|
|
370
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
371
|
-
old: { category: '123e4567-e89b-12d3-a456-000000000004' },
|
|
372
|
-
entity: 'Article',
|
|
373
|
-
values: { category: null },
|
|
374
|
-
operation: 'update',
|
|
375
|
-
}],
|
|
376
|
-
trigger: 'article_watch',
|
|
377
|
-
operation: 'watch',
|
|
378
|
-
selection: {
|
|
379
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
380
|
-
title: 'Hello world',
|
|
381
|
-
category: null,
|
|
382
|
-
},
|
|
383
|
-
},
|
|
384
|
-
}],
|
|
385
|
-
},
|
|
386
|
-
})
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
test('triggers: many has one watch - disconnect - noop', async () => {
|
|
392
|
-
const schema = createSchema(ActionsModel)
|
|
393
|
-
await executeDbTest({
|
|
394
|
-
executionContainerFactoryFactory,
|
|
395
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
396
|
-
schema: schema,
|
|
397
|
-
seed: [
|
|
398
|
-
{
|
|
399
|
-
query: gql`
|
|
400
|
-
mutation {
|
|
401
|
-
createArticle(data: {title: "Hello world"}) {
|
|
402
|
-
ok
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
`,
|
|
406
|
-
},
|
|
407
|
-
],
|
|
408
|
-
query: gql`
|
|
409
|
-
mutation {
|
|
410
|
-
updateArticle(by: {title: "Hello world"}, data: {category: {disconnect: true}}) {
|
|
411
|
-
ok
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
`,
|
|
415
|
-
return: {
|
|
416
|
-
updateArticle: {
|
|
417
|
-
ok: true,
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
expectSystemDatabase: {
|
|
421
|
-
actions_event: [{
|
|
422
|
-
payload: {
|
|
423
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
424
|
-
entity: 'Article',
|
|
425
|
-
events: [{
|
|
426
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
427
|
-
entity: 'Article',
|
|
428
|
-
values: {
|
|
429
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
430
|
-
title: 'Hello world',
|
|
431
|
-
category: null,
|
|
432
|
-
},
|
|
433
|
-
operation: 'create',
|
|
434
|
-
}],
|
|
435
|
-
trigger: 'article_watch',
|
|
436
|
-
operation: 'watch',
|
|
437
|
-
selection: {
|
|
438
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
439
|
-
title: 'Hello world',
|
|
440
|
-
category: null,
|
|
441
|
-
},
|
|
442
|
-
},
|
|
443
|
-
}],
|
|
444
|
-
},
|
|
445
|
-
})
|
|
446
|
-
})
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { ActionsDefinition as actions, createSchema, SchemaDefinition as def } from '@contember/schema-definition'
|
|
2
|
-
import { test } from 'vitest'
|
|
3
|
-
import { executeDbTest } from '@contember/engine-api-tester'
|
|
4
|
-
import { gql } from '../../src/gql'
|
|
5
|
-
import { migrationsGroup } from '../../../src/migrations'
|
|
6
|
-
import { executionContainerFactoryFactory } from './utils'
|
|
7
|
-
|
|
8
|
-
namespace ActionsModel {
|
|
9
|
-
|
|
10
|
-
@actions.watch({
|
|
11
|
-
name: 'article_watch',
|
|
12
|
-
watch: `
|
|
13
|
-
title
|
|
14
|
-
`,
|
|
15
|
-
webhook: 'http://foobar',
|
|
16
|
-
selection: `
|
|
17
|
-
title
|
|
18
|
-
`,
|
|
19
|
-
})
|
|
20
|
-
export class Article {
|
|
21
|
-
title = def.stringColumn().unique()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
test('triggers: root watch', async () => {
|
|
27
|
-
const schema = createSchema(ActionsModel)
|
|
28
|
-
await executeDbTest({
|
|
29
|
-
executionContainerFactoryFactory,
|
|
30
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
31
|
-
schema: schema,
|
|
32
|
-
seed: [
|
|
33
|
-
{
|
|
34
|
-
query: gql`
|
|
35
|
-
mutation {
|
|
36
|
-
createArticle(data: {title: "Hello world"}) {
|
|
37
|
-
ok
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
query: gql`
|
|
44
|
-
mutation {
|
|
45
|
-
updateArticle(by: {title: "Hello world"}, data: {title: "Hi!"}) {
|
|
46
|
-
ok
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
`,
|
|
50
|
-
return: {
|
|
51
|
-
updateArticle: {
|
|
52
|
-
ok: true,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
expectSystemDatabase: {
|
|
56
|
-
actions_event: [{
|
|
57
|
-
payload: {
|
|
58
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
59
|
-
entity: 'Article',
|
|
60
|
-
events: [{
|
|
61
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
62
|
-
entity: 'Article',
|
|
63
|
-
values: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
64
|
-
operation: 'create',
|
|
65
|
-
}],
|
|
66
|
-
trigger: 'article_watch',
|
|
67
|
-
operation: 'watch',
|
|
68
|
-
selection: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
69
|
-
},
|
|
70
|
-
log: [],
|
|
71
|
-
}, {
|
|
72
|
-
payload: {
|
|
73
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
74
|
-
entity: 'Article',
|
|
75
|
-
events: [{
|
|
76
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
77
|
-
old: { title: 'Hello world' },
|
|
78
|
-
entity: 'Article',
|
|
79
|
-
values: { title: 'Hi!' },
|
|
80
|
-
operation: 'update',
|
|
81
|
-
}],
|
|
82
|
-
trigger: 'article_watch',
|
|
83
|
-
operation: 'watch',
|
|
84
|
-
selection: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hi!' },
|
|
85
|
-
},
|
|
86
|
-
log: [],
|
|
87
|
-
}],
|
|
88
|
-
},
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
test('triggers: root watch - noop', async () => {
|
|
94
|
-
const schema = createSchema(ActionsModel)
|
|
95
|
-
await executeDbTest({
|
|
96
|
-
executionContainerFactoryFactory,
|
|
97
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
98
|
-
schema: schema,
|
|
99
|
-
seed: [
|
|
100
|
-
{
|
|
101
|
-
query: gql`
|
|
102
|
-
mutation {
|
|
103
|
-
createArticle(data: {title: "Hello world"}) {
|
|
104
|
-
ok
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
`,
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
query: gql`
|
|
111
|
-
mutation {
|
|
112
|
-
updateArticle(by: {title: "Hello world"}, data: {title: "Hello world"}) {
|
|
113
|
-
ok
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
`,
|
|
117
|
-
return: {
|
|
118
|
-
updateArticle: {
|
|
119
|
-
ok: true,
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
expectSystemDatabase: {
|
|
123
|
-
actions_event: [{
|
|
124
|
-
id: '123e4567-e89b-12d3-a456-000000000004',
|
|
125
|
-
transaction_id: '123e4567-e89b-12d3-a456-000000000002',
|
|
126
|
-
num_retries: 0,
|
|
127
|
-
state: 'created',
|
|
128
|
-
stage_id: '123e4567-e89b-12d3-a456-000000000001',
|
|
129
|
-
schema_id: 1,
|
|
130
|
-
target: 'article_watch_target',
|
|
131
|
-
trigger: 'article_watch',
|
|
132
|
-
priority: 0,
|
|
133
|
-
payload: {
|
|
134
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
135
|
-
entity: 'Article',
|
|
136
|
-
events: [{
|
|
137
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
138
|
-
entity: 'Article',
|
|
139
|
-
values: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
140
|
-
operation: 'create',
|
|
141
|
-
}],
|
|
142
|
-
trigger: 'article_watch',
|
|
143
|
-
operation: 'watch',
|
|
144
|
-
selection: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
145
|
-
},
|
|
146
|
-
log: [],
|
|
147
|
-
}],
|
|
148
|
-
},
|
|
149
|
-
})
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
test('triggers: root delete', async () => {
|
|
154
|
-
const schema = createSchema(ActionsModel)
|
|
155
|
-
await executeDbTest({
|
|
156
|
-
executionContainerFactoryFactory,
|
|
157
|
-
migrationGroups: { 'contember/actions': migrationsGroup },
|
|
158
|
-
schema: schema,
|
|
159
|
-
seed: [
|
|
160
|
-
{
|
|
161
|
-
query: gql`
|
|
162
|
-
mutation {
|
|
163
|
-
createArticle(data: {title: "Hello world"}) {
|
|
164
|
-
ok
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
`,
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
query: gql`
|
|
171
|
-
mutation {
|
|
172
|
-
deleteArticle(by: {title: "Hello world"}) {
|
|
173
|
-
ok
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
`,
|
|
177
|
-
return: {
|
|
178
|
-
deleteArticle: {
|
|
179
|
-
ok: true,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
expectSystemDatabase: {
|
|
183
|
-
actions_event: [{
|
|
184
|
-
payload: {
|
|
185
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
186
|
-
entity: 'Article',
|
|
187
|
-
events: [{
|
|
188
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
189
|
-
entity: 'Article',
|
|
190
|
-
values: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
191
|
-
operation: 'create',
|
|
192
|
-
}],
|
|
193
|
-
trigger: 'article_watch',
|
|
194
|
-
operation: 'watch',
|
|
195
|
-
selection: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
196
|
-
},
|
|
197
|
-
log: [],
|
|
198
|
-
}, {
|
|
199
|
-
payload: {
|
|
200
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
201
|
-
entity: 'Article',
|
|
202
|
-
events: [{
|
|
203
|
-
id: '123e4567-e89b-12d3-a456-000000000003',
|
|
204
|
-
entity: 'Article',
|
|
205
|
-
operation: 'delete',
|
|
206
|
-
}],
|
|
207
|
-
trigger: 'article_watch',
|
|
208
|
-
operation: 'watch',
|
|
209
|
-
selection: { id: '123e4567-e89b-12d3-a456-000000000003', title: 'Hello world' },
|
|
210
|
-
},
|
|
211
|
-
log: [],
|
|
212
|
-
}],
|
|
213
|
-
},
|
|
214
|
-
})
|
|
215
|
-
})
|
|
216
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionsExecutionContainerHookFactory, ListenerStoreProvider } from '../../../src'
|
|
2
|
-
import { ExecutionContainerFactory } from '@contember/engine-content-api'
|
|
3
|
-
import { Providers } from '@contember/schema-utils'
|
|
4
|
-
|
|
5
|
-
export const executionContainerFactoryFactory = (providers: Providers) => {
|
|
6
|
-
const factory = new ExecutionContainerFactory(providers)
|
|
7
|
-
factory.hooks.push(new ActionsExecutionContainerHookFactory(new ListenerStoreProvider()).create())
|
|
8
|
-
return factory
|
|
9
|
-
}
|
package/vite.config.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|