@contember/engine-system-api 2.1.0-alpha.37 → 2.1.0-alpha.39
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 +73 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +70 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/SystemContainer.cjs +82 -0
- package/dist/development/src/SystemContainer.cjs.map +1 -0
- package/dist/development/src/SystemContainer.js +82 -0
- package/dist/development/src/SystemContainer.js.map +1 -0
- package/dist/development/src/migrations/2018-08-04-102200-init.cjs +36 -0
- package/dist/development/src/migrations/2018-08-04-102200-init.cjs.map +1 -0
- package/dist/development/src/migrations/2018-08-04-102200-init.js +37 -0
- package/dist/development/src/migrations/2018-08-04-102200-init.js.map +1 -0
- package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.cjs +98 -0
- package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.cjs.map +1 -0
- package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.js +99 -0
- package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.js.map +1 -0
- package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.cjs +16 -0
- package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.cjs.map +1 -0
- package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.js +17 -0
- package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.js.map +1 -0
- package/dist/development/src/migrations/2019-02-04-154500-event-rebase.cjs +58 -0
- package/dist/development/src/migrations/2019-02-04-154500-event-rebase.cjs.map +1 -0
- package/dist/development/src/migrations/2019-02-04-154500-event-rebase.js +59 -0
- package/dist/development/src/migrations/2019-02-04-154500-event-rebase.js.map +1 -0
- package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs +11 -0
- package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs.map +1 -0
- package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.js +12 -0
- package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.js.map +1 -0
- package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs +65 -0
- package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs.map +1 -0
- package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.js +66 -0
- package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.js.map +1 -0
- package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs +20 -0
- package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs.map +1 -0
- package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.js +21 -0
- package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.js.map +1 -0
- package/dist/development/src/migrations/2020-03-27-130000-project-migrations.cjs +21 -0
- package/dist/development/src/migrations/2020-03-27-130000-project-migrations.cjs.map +1 -0
- package/dist/development/src/migrations/2020-03-27-130000-project-migrations.js +22 -0
- package/dist/development/src/migrations/2020-03-27-130000-project-migrations.js.map +1 -0
- package/dist/development/src/migrations/2020-05-06-150000-composed-primary.cjs +188 -0
- package/dist/development/src/migrations/2020-05-06-150000-composed-primary.cjs.map +1 -0
- package/dist/development/src/migrations/2020-05-06-150000-composed-primary.js +189 -0
- package/dist/development/src/migrations/2020-05-06-150000-composed-primary.js.map +1 -0
- package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.cjs +128 -0
- package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.cjs.map +1 -0
- package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.js +129 -0
- package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.js.map +1 -0
- package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.cjs +14 -0
- package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.cjs.map +1 -0
- package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.js +15 -0
- package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.js.map +1 -0
- package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.cjs +286 -0
- package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.cjs.map +1 -0
- package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.js +287 -0
- package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.js.map +1 -0
- package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs +44 -0
- package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs.map +1 -0
- package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js +45 -0
- package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js.map +1 -0
- package/dist/development/src/migrations/2021-12-21-155500-events-up.cjs +14 -0
- package/dist/development/src/migrations/2021-12-21-155500-events-up.cjs.map +1 -0
- package/dist/development/src/migrations/2021-12-21-155500-events-up.js +15 -0
- package/dist/development/src/migrations/2021-12-21-155500-events-up.js.map +1 -0
- package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.cjs +15 -0
- package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.cjs.map +1 -0
- package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.js +16 -0
- package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.js.map +1 -0
- package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.cjs +10 -0
- package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.cjs.map +1 -0
- package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.js +11 -0
- package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.js.map +1 -0
- package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs +49 -0
- package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs.map +1 -0
- package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.js +50 -0
- package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.js.map +1 -0
- package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.cjs +59 -0
- package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.cjs.map +1 -0
- package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.js +60 -0
- package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.js.map +1 -0
- package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.cjs +67 -0
- package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.cjs.map +1 -0
- package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.js +68 -0
- package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.js.map +1 -0
- package/dist/development/src/migrations/2023-10-19-173000-fix-unique.cjs +45 -0
- package/dist/development/src/migrations/2023-10-19-173000-fix-unique.cjs.map +1 -0
- package/dist/development/src/migrations/2023-10-19-173000-fix-unique.js +46 -0
- package/dist/development/src/migrations/2023-10-19-173000-fix-unique.js.map +1 -0
- package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs +11 -0
- package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs.map +1 -0
- package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.js +12 -0
- package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.js.map +1 -0
- package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs +15 -0
- package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs.map +1 -0
- package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.js +16 -0
- package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.js.map +1 -0
- package/dist/development/src/migrations/2024-06-28-153000-schema.cjs +18 -0
- package/dist/development/src/migrations/2024-06-28-153000-schema.cjs.map +1 -0
- package/dist/development/src/migrations/2024-06-28-153000-schema.js +19 -0
- package/dist/development/src/migrations/2024-06-28-153000-schema.js.map +1 -0
- package/dist/development/src/migrations/2024-06-28-153001-schema-init.cjs +12 -0
- package/dist/development/src/migrations/2024-06-28-153001-schema-init.cjs.map +1 -0
- package/dist/development/src/migrations/2024-06-28-153001-schema-init.js +13 -0
- package/dist/development/src/migrations/2024-06-28-153001-schema-init.js.map +1 -0
- package/dist/development/src/migrations/2024-07-29-150000-event-data-index.cjs +11 -0
- package/dist/development/src/migrations/2024-07-29-150000-event-data-index.cjs.map +1 -0
- package/dist/development/src/migrations/2024-07-29-150000-event-data-index.js +12 -0
- package/dist/development/src/migrations/2024-07-29-150000-event-data-index.js.map +1 -0
- package/dist/development/src/migrations/2025-03-14-110000-fix-missing-index.cjs +63 -0
- package/dist/development/src/migrations/2025-03-14-110000-fix-missing-index.cjs.map +1 -0
- package/dist/development/src/migrations/2025-03-14-110000-fix-missing-index.js +64 -0
- package/dist/development/src/migrations/2025-03-14-110000-fix-missing-index.js.map +1 -0
- package/dist/development/src/migrations/runner.cjs +106 -0
- package/dist/development/src/migrations/runner.cjs.map +1 -0
- package/dist/development/src/migrations/runner.js +106 -0
- package/dist/development/src/migrations/runner.js.map +1 -0
- package/dist/development/src/migrations/snapshot-factory.cjs +44 -0
- package/dist/development/src/migrations/snapshot-factory.cjs.map +1 -0
- package/dist/development/src/migrations/snapshot-factory.js +44 -0
- package/dist/development/src/migrations/snapshot-factory.js.map +1 -0
- package/dist/development/src/migrations/snapshot.cjs +184 -0
- package/dist/development/src/migrations/snapshot.cjs.map +1 -0
- package/dist/development/src/migrations/snapshot.js +185 -0
- package/dist/development/src/migrations/snapshot.js.map +1 -0
- package/dist/development/src/model/ProjectInitializer.cjs +45 -0
- package/dist/development/src/model/ProjectInitializer.cjs.map +1 -0
- package/dist/development/src/model/ProjectInitializer.js +45 -0
- package/dist/development/src/model/ProjectInitializer.js.map +1 -0
- package/dist/development/src/model/ProjectTruncateExecutor.cjs +31 -0
- package/dist/development/src/model/ProjectTruncateExecutor.cjs.map +1 -0
- package/dist/development/src/model/ProjectTruncateExecutor.js +31 -0
- package/dist/development/src/model/ProjectTruncateExecutor.js.map +1 -0
- package/dist/development/src/model/authorization/AuthorizationActions.cjs +14 -0
- package/dist/development/src/model/authorization/AuthorizationActions.cjs.map +1 -0
- package/dist/development/src/model/authorization/AuthorizationActions.js +15 -0
- package/dist/development/src/model/authorization/AuthorizationActions.js.map +1 -0
- package/dist/development/src/model/authorization/Identity.cjs +10 -0
- package/dist/development/src/model/authorization/Identity.cjs.map +1 -0
- package/dist/development/src/model/authorization/Identity.js +10 -0
- package/dist/development/src/model/authorization/Identity.js.map +1 -0
- package/dist/development/src/model/authorization/PermissionsFactory.cjs +17 -0
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -0
- package/dist/development/src/model/authorization/PermissionsFactory.js +17 -0
- package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -0
- package/dist/development/src/model/authorization/StagePermissionsFactory.cjs +56 -0
- package/dist/development/src/model/authorization/StagePermissionsFactory.cjs.map +1 -0
- package/dist/development/src/model/authorization/StagePermissionsFactory.js +56 -0
- package/dist/development/src/model/authorization/StagePermissionsFactory.js.map +1 -0
- package/dist/development/src/model/authorization/StageScope.cjs +19 -0
- package/dist/development/src/model/authorization/StageScope.cjs.map +1 -0
- package/dist/development/src/model/authorization/StageScope.js +19 -0
- package/dist/development/src/model/authorization/StageScope.js.map +1 -0
- package/dist/development/src/model/authorization/SwitchEvaluatorNode.cjs +14 -0
- package/dist/development/src/model/authorization/SwitchEvaluatorNode.cjs.map +1 -0
- package/dist/development/src/model/authorization/SwitchEvaluatorNode.js +14 -0
- package/dist/development/src/model/authorization/SwitchEvaluatorNode.js.map +1 -0
- package/dist/development/src/model/commands/CommandBus.cjs +16 -0
- package/dist/development/src/model/commands/CommandBus.cjs.map +1 -0
- package/dist/development/src/model/commands/CommandBus.js +16 -0
- package/dist/development/src/model/commands/CommandBus.js.map +1 -0
- package/dist/development/src/model/commands/events/TruncateEventsCommand.cjs +10 -0
- package/dist/development/src/model/commands/events/TruncateEventsCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/events/TruncateEventsCommand.js +10 -0
- package/dist/development/src/model/commands/events/TruncateEventsCommand.js.map +1 -0
- package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.cjs +16 -0
- package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.js +16 -0
- package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.js.map +1 -0
- package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.cjs +38 -0
- package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.js +38 -0
- package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.js.map +1 -0
- package/dist/development/src/model/commands/migrations/SaveMigrationCommand.cjs +28 -0
- package/dist/development/src/model/commands/migrations/SaveMigrationCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/migrations/SaveMigrationCommand.js +28 -0
- package/dist/development/src/model/commands/migrations/SaveMigrationCommand.js.map +1 -0
- package/dist/development/src/model/commands/schema/SaveSchemaCommand.cjs +28 -0
- package/dist/development/src/model/commands/schema/SaveSchemaCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/schema/SaveSchemaCommand.js +28 -0
- package/dist/development/src/model/commands/schema/SaveSchemaCommand.js.map +1 -0
- package/dist/development/src/model/commands/stages/CreateStageCommand.cjs +22 -0
- package/dist/development/src/model/commands/stages/CreateStageCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/stages/CreateStageCommand.js +22 -0
- package/dist/development/src/model/commands/stages/CreateStageCommand.js.map +1 -0
- package/dist/development/src/model/database/DatabaseContext.cjs +29 -0
- package/dist/development/src/model/database/DatabaseContext.cjs.map +1 -0
- package/dist/development/src/model/database/DatabaseContext.js +29 -0
- package/dist/development/src/model/database/DatabaseContext.js.map +1 -0
- package/dist/development/src/model/dtos/ExecutedMigration.cjs +21 -0
- package/dist/development/src/model/dtos/ExecutedMigration.cjs.map +1 -0
- package/dist/development/src/model/dtos/ExecutedMigration.js +21 -0
- package/dist/development/src/model/dtos/ExecutedMigration.js.map +1 -0
- package/dist/development/src/model/events/EventResponseBuilder.cjs +59 -0
- package/dist/development/src/model/events/EventResponseBuilder.cjs.map +1 -0
- package/dist/development/src/model/events/EventResponseBuilder.js +59 -0
- package/dist/development/src/model/events/EventResponseBuilder.js.map +1 -0
- package/dist/development/src/model/events/EventResponseHelper.cjs +25 -0
- package/dist/development/src/model/events/EventResponseHelper.cjs.map +1 -0
- package/dist/development/src/model/events/EventResponseHelper.js +25 -0
- package/dist/development/src/model/events/EventResponseHelper.js.map +1 -0
- package/dist/development/src/model/events/identityUtils.cjs +16 -0
- package/dist/development/src/model/events/identityUtils.cjs.map +1 -0
- package/dist/development/src/model/events/identityUtils.js +16 -0
- package/dist/development/src/model/events/identityUtils.js.map +1 -0
- package/dist/development/src/model/events/types.cjs +69 -0
- package/dist/development/src/model/events/types.cjs.map +1 -0
- package/dist/development/src/model/events/types.js +69 -0
- package/dist/development/src/model/events/types.js.map +1 -0
- package/dist/development/src/model/helpers/modelHelpers.cjs +28 -0
- package/dist/development/src/model/helpers/modelHelpers.cjs.map +1 -0
- package/dist/development/src/model/helpers/modelHelpers.js +28 -0
- package/dist/development/src/model/helpers/modelHelpers.js.map +1 -0
- package/dist/development/src/model/helpers/stageHelpers.cjs +7 -0
- package/dist/development/src/model/helpers/stageHelpers.cjs.map +1 -0
- package/dist/development/src/model/helpers/stageHelpers.js +7 -0
- package/dist/development/src/model/helpers/stageHelpers.js.map +1 -0
- package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs +35 -0
- package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs.map +1 -0
- package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.js +35 -0
- package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.js.map +1 -0
- package/dist/development/src/model/migrations/ExecutedMigrationsResolver.cjs +17 -0
- package/dist/development/src/model/migrations/ExecutedMigrationsResolver.cjs.map +1 -0
- package/dist/development/src/model/migrations/ExecutedMigrationsResolver.js +17 -0
- package/dist/development/src/model/migrations/ExecutedMigrationsResolver.js.map +1 -0
- package/dist/development/src/model/migrations/MigrationAlterer.cjs +52 -0
- package/dist/development/src/model/migrations/MigrationAlterer.cjs.map +1 -0
- package/dist/development/src/model/migrations/MigrationAlterer.js +52 -0
- package/dist/development/src/model/migrations/MigrationAlterer.js.map +1 -0
- package/dist/development/src/model/migrations/ProjectMigrator.cjs +245 -0
- package/dist/development/src/model/migrations/ProjectMigrator.cjs.map +1 -0
- package/dist/development/src/model/migrations/ProjectMigrator.js +245 -0
- package/dist/development/src/model/migrations/ProjectMigrator.js.map +1 -0
- package/dist/development/src/model/migrations/SchemaProvider.cjs +55 -0
- package/dist/development/src/model/migrations/SchemaProvider.cjs.map +1 -0
- package/dist/development/src/model/migrations/SchemaProvider.js +55 -0
- package/dist/development/src/model/migrations/SchemaProvider.js.map +1 -0
- package/dist/development/src/model/queries/events/EventQueryHelpers.cjs +48 -0
- package/dist/development/src/model/queries/events/EventQueryHelpers.cjs.map +1 -0
- package/dist/development/src/model/queries/events/EventQueryHelpers.js +48 -0
- package/dist/development/src/model/queries/events/EventQueryHelpers.js.map +1 -0
- package/dist/development/src/model/queries/events/EventsQuery.cjs +66 -0
- package/dist/development/src/model/queries/events/EventsQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/events/EventsQuery.js +66 -0
- package/dist/development/src/model/queries/events/EventsQuery.js.map +1 -0
- package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.cjs +15 -0
- package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.js +15 -0
- package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.js.map +1 -0
- package/dist/development/src/model/queries/events/OldValuesQuery.cjs +15 -0
- package/dist/development/src/model/queries/events/OldValuesQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/events/OldValuesQuery.js +15 -0
- package/dist/development/src/model/queries/events/OldValuesQuery.js.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs +18 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js +18 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.cjs +19 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.js +19 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.js.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs +18 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs.map +1 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js +18 -0
- package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js.map +1 -0
- package/dist/development/src/model/queries/schema/SchemaQuery.cjs +34 -0
- package/dist/development/src/model/queries/schema/SchemaQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/schema/SchemaQuery.js +34 -0
- package/dist/development/src/model/queries/schema/SchemaQuery.js.map +1 -0
- package/dist/development/src/model/queries/stages/StageBySlugQuery.cjs +17 -0
- package/dist/development/src/model/queries/stages/StageBySlugQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/stages/StageBySlugQuery.js +17 -0
- package/dist/development/src/model/queries/stages/StageBySlugQuery.js.map +1 -0
- package/dist/development/src/model/queries/stages/StageQueryFactory.cjs +8 -0
- package/dist/development/src/model/queries/stages/StageQueryFactory.cjs.map +1 -0
- package/dist/development/src/model/queries/stages/StageQueryFactory.js +8 -0
- package/dist/development/src/model/queries/stages/StageQueryFactory.js.map +1 -0
- package/dist/development/src/model/queries/stages/StagesQuery.cjs +12 -0
- package/dist/development/src/model/queries/stages/StagesQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/stages/StagesQuery.js +12 -0
- package/dist/development/src/model/queries/stages/StagesQuery.js.map +1 -0
- package/dist/development/src/model/stages/StageCreator.cjs +20 -0
- package/dist/development/src/model/stages/StageCreator.cjs.map +1 -0
- package/dist/development/src/model/stages/StageCreator.js +20 -0
- package/dist/development/src/model/stages/StageCreator.js.map +1 -0
- package/dist/development/src/resolvers/ResolverFactory.cjs +92 -0
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -0
- package/dist/development/src/resolvers/ResolverFactory.js +92 -0
- package/dist/development/src/resolvers/ResolverFactory.js.map +1 -0
- package/dist/development/src/resolvers/SystemResolverContext.cjs +37 -0
- package/dist/development/src/resolvers/SystemResolverContext.cjs.map +1 -0
- package/dist/development/src/resolvers/SystemResolverContext.js +37 -0
- package/dist/development/src/resolvers/SystemResolverContext.js.map +1 -0
- package/dist/development/src/resolvers/mutation/MigrateMutationResolver.cjs +113 -0
- package/dist/development/src/resolvers/mutation/MigrateMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/MigrateMutationResolver.js +113 -0
- package/dist/development/src/resolvers/mutation/MigrateMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.cjs +48 -0
- package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.js +48 -0
- package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/TruncateMutationResolver.cjs +15 -0
- package/dist/development/src/resolvers/mutation/TruncateMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/TruncateMutationResolver.js +15 -0
- package/dist/development/src/resolvers/mutation/TruncateMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/EventsQueryResolver.cjs +45 -0
- package/dist/development/src/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/EventsQueryResolver.js +45 -0
- package/dist/development/src/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs +29 -0
- package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.js +29 -0
- package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/SchemaQueryResolver.cjs +23 -0
- package/dist/development/src/resolvers/query/SchemaQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/SchemaQueryResolver.js +23 -0
- package/dist/development/src/resolvers/query/SchemaQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/StagesQueryResolver.cjs +19 -0
- package/dist/development/src/resolvers/query/StagesQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/StagesQueryResolver.js +19 -0
- package/dist/development/src/resolvers/query/StagesQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/types/EventOldValuesResolver.cjs +10 -0
- package/dist/development/src/resolvers/types/EventOldValuesResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/types/EventOldValuesResolver.js +10 -0
- package/dist/development/src/resolvers/types/EventOldValuesResolver.js.map +1 -0
- package/dist/development/src/resolvers/types/OldValuesHelpers.cjs +21 -0
- package/dist/development/src/resolvers/types/OldValuesHelpers.cjs.map +1 -0
- package/dist/development/src/resolvers/types/OldValuesHelpers.js +21 -0
- package/dist/development/src/resolvers/types/OldValuesHelpers.js.map +1 -0
- package/dist/development/src/schema/dev.graphql.cjs +56 -0
- package/dist/development/src/schema/dev.graphql.cjs.map +1 -0
- package/dist/development/src/schema/dev.graphql.js +57 -0
- package/dist/development/src/schema/dev.graphql.js.map +1 -0
- package/dist/development/src/schema/system.graphql.cjs +211 -0
- package/dist/development/src/schema/system.graphql.cjs.map +1 -0
- package/dist/development/src/schema/system.graphql.js +212 -0
- package/dist/development/src/schema/system.graphql.js.map +1 -0
- package/dist/development/src/schema/types.cjs +46 -0
- package/dist/development/src/schema/types.cjs.map +1 -0
- package/dist/development/src/schema/types.js +46 -0
- package/dist/development/src/schema/types.js.map +1 -0
- package/dist/development/src/utils/MapSet.cjs +43 -0
- package/dist/development/src/utils/MapSet.cjs.map +1 -0
- package/dist/development/src/utils/MapSet.js +43 -0
- package/dist/development/src/utils/MapSet.js.map +1 -0
- package/dist/development/src/utils/Response.cjs +21 -0
- package/dist/development/src/utils/Response.cjs.map +1 -0
- package/dist/development/src/utils/Response.js +21 -0
- package/dist/development/src/utils/Response.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/batchQuery.cjs +22 -0
- package/dist/development/src/utils/batchQuery.cjs.map +1 -0
- package/dist/development/src/utils/batchQuery.js +22 -0
- package/dist/development/src/utils/batchQuery.js.map +1 -0
- package/dist/development/src/utils/exceptions.cjs +9 -0
- package/dist/development/src/utils/exceptions.cjs.map +1 -0
- package/dist/development/src/utils/exceptions.js +9 -0
- package/dist/development/src/utils/exceptions.js.map +1 -0
- package/dist/development/src/utils/tick.cjs +5 -0
- package/dist/development/src/utils/tick.cjs.map +1 -0
- package/dist/development/src/utils/tick.js +5 -0
- package/dist/development/src/utils/tick.js.map +1 -0
- package/dist/development/src/utils/tuple.cjs +5 -0
- package/dist/development/src/utils/tuple.cjs.map +1 -0
- package/dist/development/src/utils/tuple.js +5 -0
- package/dist/development/src/utils/tuple.js.map +1 -0
- package/dist/production/index.cjs +73 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +70 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/SystemContainer.cjs +82 -0
- package/dist/production/src/SystemContainer.cjs.map +1 -0
- package/dist/production/src/SystemContainer.js +82 -0
- package/dist/production/src/SystemContainer.js.map +1 -0
- package/dist/production/src/migrations/2018-08-04-102200-init.cjs +36 -0
- package/dist/production/src/migrations/2018-08-04-102200-init.cjs.map +1 -0
- package/dist/production/src/migrations/2018-08-04-102200-init.js +37 -0
- package/dist/production/src/migrations/2018-08-04-102200-init.js.map +1 -0
- package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.cjs +98 -0
- package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.cjs.map +1 -0
- package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.js +99 -0
- package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.js.map +1 -0
- package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.cjs +16 -0
- package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.cjs.map +1 -0
- package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.js +17 -0
- package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.js.map +1 -0
- package/dist/production/src/migrations/2019-02-04-154500-event-rebase.cjs +58 -0
- package/dist/production/src/migrations/2019-02-04-154500-event-rebase.cjs.map +1 -0
- package/dist/production/src/migrations/2019-02-04-154500-event-rebase.js +59 -0
- package/dist/production/src/migrations/2019-02-04-154500-event-rebase.js.map +1 -0
- package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs +11 -0
- package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs.map +1 -0
- package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.js +12 -0
- package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.js.map +1 -0
- package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs +65 -0
- package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs.map +1 -0
- package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.js +66 -0
- package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.js.map +1 -0
- package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs +20 -0
- package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs.map +1 -0
- package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.js +21 -0
- package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.js.map +1 -0
- package/dist/production/src/migrations/2020-03-27-130000-project-migrations.cjs +21 -0
- package/dist/production/src/migrations/2020-03-27-130000-project-migrations.cjs.map +1 -0
- package/dist/production/src/migrations/2020-03-27-130000-project-migrations.js +22 -0
- package/dist/production/src/migrations/2020-03-27-130000-project-migrations.js.map +1 -0
- package/dist/production/src/migrations/2020-05-06-150000-composed-primary.cjs +188 -0
- package/dist/production/src/migrations/2020-05-06-150000-composed-primary.cjs.map +1 -0
- package/dist/production/src/migrations/2020-05-06-150000-composed-primary.js +189 -0
- package/dist/production/src/migrations/2020-05-06-150000-composed-primary.js.map +1 -0
- package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.cjs +128 -0
- package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.cjs.map +1 -0
- package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.js +129 -0
- package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.js.map +1 -0
- package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.cjs +14 -0
- package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.cjs.map +1 -0
- package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.js +15 -0
- package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.js.map +1 -0
- package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.cjs +286 -0
- package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.cjs.map +1 -0
- package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.js +287 -0
- package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.js.map +1 -0
- package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs +44 -0
- package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs.map +1 -0
- package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js +45 -0
- package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js.map +1 -0
- package/dist/production/src/migrations/2021-12-21-155500-events-up.cjs +14 -0
- package/dist/production/src/migrations/2021-12-21-155500-events-up.cjs.map +1 -0
- package/dist/production/src/migrations/2021-12-21-155500-events-up.js +15 -0
- package/dist/production/src/migrations/2021-12-21-155500-events-up.js.map +1 -0
- package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.cjs +15 -0
- package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.cjs.map +1 -0
- package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.js +16 -0
- package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.js.map +1 -0
- package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.cjs +10 -0
- package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.cjs.map +1 -0
- package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.js +11 -0
- package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.js.map +1 -0
- package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs +49 -0
- package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs.map +1 -0
- package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.js +50 -0
- package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.js.map +1 -0
- package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.cjs +59 -0
- package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.cjs.map +1 -0
- package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.js +60 -0
- package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.js.map +1 -0
- package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.cjs +67 -0
- package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.cjs.map +1 -0
- package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.js +68 -0
- package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.js.map +1 -0
- package/dist/production/src/migrations/2023-10-19-173000-fix-unique.cjs +45 -0
- package/dist/production/src/migrations/2023-10-19-173000-fix-unique.cjs.map +1 -0
- package/dist/production/src/migrations/2023-10-19-173000-fix-unique.js +46 -0
- package/dist/production/src/migrations/2023-10-19-173000-fix-unique.js.map +1 -0
- package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs +11 -0
- package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs.map +1 -0
- package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.js +12 -0
- package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.js.map +1 -0
- package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs +15 -0
- package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs.map +1 -0
- package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.js +16 -0
- package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.js.map +1 -0
- package/dist/production/src/migrations/2024-06-28-153000-schema.cjs +18 -0
- package/dist/production/src/migrations/2024-06-28-153000-schema.cjs.map +1 -0
- package/dist/production/src/migrations/2024-06-28-153000-schema.js +19 -0
- package/dist/production/src/migrations/2024-06-28-153000-schema.js.map +1 -0
- package/dist/production/src/migrations/2024-06-28-153001-schema-init.cjs +12 -0
- package/dist/production/src/migrations/2024-06-28-153001-schema-init.cjs.map +1 -0
- package/dist/production/src/migrations/2024-06-28-153001-schema-init.js +13 -0
- package/dist/production/src/migrations/2024-06-28-153001-schema-init.js.map +1 -0
- package/dist/production/src/migrations/2024-07-29-150000-event-data-index.cjs +11 -0
- package/dist/production/src/migrations/2024-07-29-150000-event-data-index.cjs.map +1 -0
- package/dist/production/src/migrations/2024-07-29-150000-event-data-index.js +12 -0
- package/dist/production/src/migrations/2024-07-29-150000-event-data-index.js.map +1 -0
- package/dist/production/src/migrations/2025-03-14-110000-fix-missing-index.cjs +63 -0
- package/dist/production/src/migrations/2025-03-14-110000-fix-missing-index.cjs.map +1 -0
- package/dist/production/src/migrations/2025-03-14-110000-fix-missing-index.js +64 -0
- package/dist/production/src/migrations/2025-03-14-110000-fix-missing-index.js.map +1 -0
- package/dist/production/src/migrations/runner.cjs +106 -0
- package/dist/production/src/migrations/runner.cjs.map +1 -0
- package/dist/production/src/migrations/runner.js +106 -0
- package/dist/production/src/migrations/runner.js.map +1 -0
- package/dist/production/src/migrations/snapshot-factory.cjs +44 -0
- package/dist/production/src/migrations/snapshot-factory.cjs.map +1 -0
- package/dist/production/src/migrations/snapshot-factory.js +44 -0
- package/dist/production/src/migrations/snapshot-factory.js.map +1 -0
- package/dist/production/src/migrations/snapshot.cjs +184 -0
- package/dist/production/src/migrations/snapshot.cjs.map +1 -0
- package/dist/production/src/migrations/snapshot.js +185 -0
- package/dist/production/src/migrations/snapshot.js.map +1 -0
- package/dist/production/src/model/ProjectInitializer.cjs +45 -0
- package/dist/production/src/model/ProjectInitializer.cjs.map +1 -0
- package/dist/production/src/model/ProjectInitializer.js +45 -0
- package/dist/production/src/model/ProjectInitializer.js.map +1 -0
- package/dist/production/src/model/ProjectTruncateExecutor.cjs +31 -0
- package/dist/production/src/model/ProjectTruncateExecutor.cjs.map +1 -0
- package/dist/production/src/model/ProjectTruncateExecutor.js +31 -0
- package/dist/production/src/model/ProjectTruncateExecutor.js.map +1 -0
- package/dist/production/src/model/authorization/AuthorizationActions.cjs +14 -0
- package/dist/production/src/model/authorization/AuthorizationActions.cjs.map +1 -0
- package/dist/production/src/model/authorization/AuthorizationActions.js +15 -0
- package/dist/production/src/model/authorization/AuthorizationActions.js.map +1 -0
- package/dist/production/src/model/authorization/Identity.cjs +10 -0
- package/dist/production/src/model/authorization/Identity.cjs.map +1 -0
- package/dist/production/src/model/authorization/Identity.js +10 -0
- package/dist/production/src/model/authorization/Identity.js.map +1 -0
- package/dist/production/src/model/authorization/PermissionsFactory.cjs +17 -0
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -0
- package/dist/production/src/model/authorization/PermissionsFactory.js +17 -0
- package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -0
- package/dist/production/src/model/authorization/StagePermissionsFactory.cjs +56 -0
- package/dist/production/src/model/authorization/StagePermissionsFactory.cjs.map +1 -0
- package/dist/production/src/model/authorization/StagePermissionsFactory.js +56 -0
- package/dist/production/src/model/authorization/StagePermissionsFactory.js.map +1 -0
- package/dist/production/src/model/authorization/StageScope.cjs +19 -0
- package/dist/production/src/model/authorization/StageScope.cjs.map +1 -0
- package/dist/production/src/model/authorization/StageScope.js +19 -0
- package/dist/production/src/model/authorization/StageScope.js.map +1 -0
- package/dist/production/src/model/authorization/SwitchEvaluatorNode.cjs +14 -0
- package/dist/production/src/model/authorization/SwitchEvaluatorNode.cjs.map +1 -0
- package/dist/production/src/model/authorization/SwitchEvaluatorNode.js +14 -0
- package/dist/production/src/model/authorization/SwitchEvaluatorNode.js.map +1 -0
- package/dist/production/src/model/commands/CommandBus.cjs +16 -0
- package/dist/production/src/model/commands/CommandBus.cjs.map +1 -0
- package/dist/production/src/model/commands/CommandBus.js +16 -0
- package/dist/production/src/model/commands/CommandBus.js.map +1 -0
- package/dist/production/src/model/commands/events/TruncateEventsCommand.cjs +10 -0
- package/dist/production/src/model/commands/events/TruncateEventsCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/events/TruncateEventsCommand.js +10 -0
- package/dist/production/src/model/commands/events/TruncateEventsCommand.js.map +1 -0
- package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.cjs +16 -0
- package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.js +16 -0
- package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.js.map +1 -0
- package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.cjs +38 -0
- package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.js +38 -0
- package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.js.map +1 -0
- package/dist/production/src/model/commands/migrations/SaveMigrationCommand.cjs +28 -0
- package/dist/production/src/model/commands/migrations/SaveMigrationCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/migrations/SaveMigrationCommand.js +28 -0
- package/dist/production/src/model/commands/migrations/SaveMigrationCommand.js.map +1 -0
- package/dist/production/src/model/commands/schema/SaveSchemaCommand.cjs +28 -0
- package/dist/production/src/model/commands/schema/SaveSchemaCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/schema/SaveSchemaCommand.js +28 -0
- package/dist/production/src/model/commands/schema/SaveSchemaCommand.js.map +1 -0
- package/dist/production/src/model/commands/stages/CreateStageCommand.cjs +22 -0
- package/dist/production/src/model/commands/stages/CreateStageCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/stages/CreateStageCommand.js +22 -0
- package/dist/production/src/model/commands/stages/CreateStageCommand.js.map +1 -0
- package/dist/production/src/model/database/DatabaseContext.cjs +29 -0
- package/dist/production/src/model/database/DatabaseContext.cjs.map +1 -0
- package/dist/production/src/model/database/DatabaseContext.js +29 -0
- package/dist/production/src/model/database/DatabaseContext.js.map +1 -0
- package/dist/production/src/model/dtos/ExecutedMigration.cjs +21 -0
- package/dist/production/src/model/dtos/ExecutedMigration.cjs.map +1 -0
- package/dist/production/src/model/dtos/ExecutedMigration.js +21 -0
- package/dist/production/src/model/dtos/ExecutedMigration.js.map +1 -0
- package/dist/production/src/model/events/EventResponseBuilder.cjs +59 -0
- package/dist/production/src/model/events/EventResponseBuilder.cjs.map +1 -0
- package/dist/production/src/model/events/EventResponseBuilder.js +59 -0
- package/dist/production/src/model/events/EventResponseBuilder.js.map +1 -0
- package/dist/production/src/model/events/EventResponseHelper.cjs +25 -0
- package/dist/production/src/model/events/EventResponseHelper.cjs.map +1 -0
- package/dist/production/src/model/events/EventResponseHelper.js +25 -0
- package/dist/production/src/model/events/EventResponseHelper.js.map +1 -0
- package/dist/production/src/model/events/identityUtils.cjs +16 -0
- package/dist/production/src/model/events/identityUtils.cjs.map +1 -0
- package/dist/production/src/model/events/identityUtils.js +16 -0
- package/dist/production/src/model/events/identityUtils.js.map +1 -0
- package/dist/production/src/model/events/types.cjs +69 -0
- package/dist/production/src/model/events/types.cjs.map +1 -0
- package/dist/production/src/model/events/types.js +69 -0
- package/dist/production/src/model/events/types.js.map +1 -0
- package/dist/production/src/model/helpers/modelHelpers.cjs +28 -0
- package/dist/production/src/model/helpers/modelHelpers.cjs.map +1 -0
- package/dist/production/src/model/helpers/modelHelpers.js +28 -0
- package/dist/production/src/model/helpers/modelHelpers.js.map +1 -0
- package/dist/production/src/model/helpers/stageHelpers.cjs +7 -0
- package/dist/production/src/model/helpers/stageHelpers.cjs.map +1 -0
- package/dist/production/src/model/helpers/stageHelpers.js +7 -0
- package/dist/production/src/model/helpers/stageHelpers.js.map +1 -0
- package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs +35 -0
- package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs.map +1 -0
- package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.js +35 -0
- package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.js.map +1 -0
- package/dist/production/src/model/migrations/ExecutedMigrationsResolver.cjs +17 -0
- package/dist/production/src/model/migrations/ExecutedMigrationsResolver.cjs.map +1 -0
- package/dist/production/src/model/migrations/ExecutedMigrationsResolver.js +17 -0
- package/dist/production/src/model/migrations/ExecutedMigrationsResolver.js.map +1 -0
- package/dist/production/src/model/migrations/MigrationAlterer.cjs +52 -0
- package/dist/production/src/model/migrations/MigrationAlterer.cjs.map +1 -0
- package/dist/production/src/model/migrations/MigrationAlterer.js +52 -0
- package/dist/production/src/model/migrations/MigrationAlterer.js.map +1 -0
- package/dist/production/src/model/migrations/ProjectMigrator.cjs +245 -0
- package/dist/production/src/model/migrations/ProjectMigrator.cjs.map +1 -0
- package/dist/production/src/model/migrations/ProjectMigrator.js +245 -0
- package/dist/production/src/model/migrations/ProjectMigrator.js.map +1 -0
- package/dist/production/src/model/migrations/SchemaProvider.cjs +55 -0
- package/dist/production/src/model/migrations/SchemaProvider.cjs.map +1 -0
- package/dist/production/src/model/migrations/SchemaProvider.js +55 -0
- package/dist/production/src/model/migrations/SchemaProvider.js.map +1 -0
- package/dist/production/src/model/queries/events/EventQueryHelpers.cjs +48 -0
- package/dist/production/src/model/queries/events/EventQueryHelpers.cjs.map +1 -0
- package/dist/production/src/model/queries/events/EventQueryHelpers.js +48 -0
- package/dist/production/src/model/queries/events/EventQueryHelpers.js.map +1 -0
- package/dist/production/src/model/queries/events/EventsQuery.cjs +66 -0
- package/dist/production/src/model/queries/events/EventsQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/events/EventsQuery.js +66 -0
- package/dist/production/src/model/queries/events/EventsQuery.js.map +1 -0
- package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.cjs +15 -0
- package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.js +15 -0
- package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.js.map +1 -0
- package/dist/production/src/model/queries/events/OldValuesQuery.cjs +15 -0
- package/dist/production/src/model/queries/events/OldValuesQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/events/OldValuesQuery.js +15 -0
- package/dist/production/src/model/queries/events/OldValuesQuery.js.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs +18 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js +18 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.cjs +19 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.js +19 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.js.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs +18 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs.map +1 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js +18 -0
- package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js.map +1 -0
- package/dist/production/src/model/queries/schema/SchemaQuery.cjs +34 -0
- package/dist/production/src/model/queries/schema/SchemaQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/schema/SchemaQuery.js +34 -0
- package/dist/production/src/model/queries/schema/SchemaQuery.js.map +1 -0
- package/dist/production/src/model/queries/stages/StageBySlugQuery.cjs +17 -0
- package/dist/production/src/model/queries/stages/StageBySlugQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/stages/StageBySlugQuery.js +17 -0
- package/dist/production/src/model/queries/stages/StageBySlugQuery.js.map +1 -0
- package/dist/production/src/model/queries/stages/StageQueryFactory.cjs +8 -0
- package/dist/production/src/model/queries/stages/StageQueryFactory.cjs.map +1 -0
- package/dist/production/src/model/queries/stages/StageQueryFactory.js +8 -0
- package/dist/production/src/model/queries/stages/StageQueryFactory.js.map +1 -0
- package/dist/production/src/model/queries/stages/StagesQuery.cjs +12 -0
- package/dist/production/src/model/queries/stages/StagesQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/stages/StagesQuery.js +12 -0
- package/dist/production/src/model/queries/stages/StagesQuery.js.map +1 -0
- package/dist/production/src/model/stages/StageCreator.cjs +20 -0
- package/dist/production/src/model/stages/StageCreator.cjs.map +1 -0
- package/dist/production/src/model/stages/StageCreator.js +20 -0
- package/dist/production/src/model/stages/StageCreator.js.map +1 -0
- package/dist/production/src/resolvers/ResolverFactory.cjs +92 -0
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -0
- package/dist/production/src/resolvers/ResolverFactory.js +92 -0
- package/dist/production/src/resolvers/ResolverFactory.js.map +1 -0
- package/dist/production/src/resolvers/SystemResolverContext.cjs +37 -0
- package/dist/production/src/resolvers/SystemResolverContext.cjs.map +1 -0
- package/dist/production/src/resolvers/SystemResolverContext.js +37 -0
- package/dist/production/src/resolvers/SystemResolverContext.js.map +1 -0
- package/dist/production/src/resolvers/mutation/MigrateMutationResolver.cjs +113 -0
- package/dist/production/src/resolvers/mutation/MigrateMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/MigrateMutationResolver.js +113 -0
- package/dist/production/src/resolvers/mutation/MigrateMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.cjs +48 -0
- package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.js +48 -0
- package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/TruncateMutationResolver.cjs +15 -0
- package/dist/production/src/resolvers/mutation/TruncateMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/TruncateMutationResolver.js +15 -0
- package/dist/production/src/resolvers/mutation/TruncateMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/EventsQueryResolver.cjs +45 -0
- package/dist/production/src/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/EventsQueryResolver.js +45 -0
- package/dist/production/src/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs +29 -0
- package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.js +29 -0
- package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/SchemaQueryResolver.cjs +23 -0
- package/dist/production/src/resolvers/query/SchemaQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/SchemaQueryResolver.js +23 -0
- package/dist/production/src/resolvers/query/SchemaQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/StagesQueryResolver.cjs +19 -0
- package/dist/production/src/resolvers/query/StagesQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/StagesQueryResolver.js +19 -0
- package/dist/production/src/resolvers/query/StagesQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/types/EventOldValuesResolver.cjs +10 -0
- package/dist/production/src/resolvers/types/EventOldValuesResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/types/EventOldValuesResolver.js +10 -0
- package/dist/production/src/resolvers/types/EventOldValuesResolver.js.map +1 -0
- package/dist/production/src/resolvers/types/OldValuesHelpers.cjs +21 -0
- package/dist/production/src/resolvers/types/OldValuesHelpers.cjs.map +1 -0
- package/dist/production/src/resolvers/types/OldValuesHelpers.js +21 -0
- package/dist/production/src/resolvers/types/OldValuesHelpers.js.map +1 -0
- package/dist/production/src/schema/dev.graphql.cjs +56 -0
- package/dist/production/src/schema/dev.graphql.cjs.map +1 -0
- package/dist/production/src/schema/dev.graphql.js +57 -0
- package/dist/production/src/schema/dev.graphql.js.map +1 -0
- package/dist/production/src/schema/system.graphql.cjs +211 -0
- package/dist/production/src/schema/system.graphql.cjs.map +1 -0
- package/dist/production/src/schema/system.graphql.js +212 -0
- package/dist/production/src/schema/system.graphql.js.map +1 -0
- package/dist/production/src/schema/types.cjs +46 -0
- package/dist/production/src/schema/types.cjs.map +1 -0
- package/dist/production/src/schema/types.js +46 -0
- package/dist/production/src/schema/types.js.map +1 -0
- package/dist/production/src/utils/MapSet.cjs +43 -0
- package/dist/production/src/utils/MapSet.cjs.map +1 -0
- package/dist/production/src/utils/MapSet.js +43 -0
- package/dist/production/src/utils/MapSet.js.map +1 -0
- package/dist/production/src/utils/Response.cjs +21 -0
- package/dist/production/src/utils/Response.cjs.map +1 -0
- package/dist/production/src/utils/Response.js +21 -0
- package/dist/production/src/utils/Response.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/batchQuery.cjs +22 -0
- package/dist/production/src/utils/batchQuery.cjs.map +1 -0
- package/dist/production/src/utils/batchQuery.js +22 -0
- package/dist/production/src/utils/batchQuery.js.map +1 -0
- package/dist/production/src/utils/exceptions.cjs +9 -0
- package/dist/production/src/utils/exceptions.cjs.map +1 -0
- package/dist/production/src/utils/exceptions.js +9 -0
- package/dist/production/src/utils/exceptions.js.map +1 -0
- package/dist/production/src/utils/tick.cjs +5 -0
- package/dist/production/src/utils/tick.cjs.map +1 -0
- package/dist/production/src/utils/tick.js +5 -0
- package/dist/production/src/utils/tick.js.map +1 -0
- package/dist/production/src/utils/tuple.cjs +5 -0
- package/dist/production/src/utils/tuple.cjs.map +1 -0
- package/dist/production/src/utils/tuple.js +5 -0
- package/dist/production/src/utils/tuple.js.map +1 -0
- package/dist/tests/cases/migrations/2020-05-06-150000-composed-primary.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2020-05-06-150000-composed-primary.test.d.ts.map +1 -0
- package/dist/tests/cases/migrations/2020-06-01-103000-event-trigger-perf.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2020-06-01-103000-event-trigger-perf.test.d.ts.map +1 -0
- package/dist/tests/cases/migrations/2022-10-03-110000-table-on-delete.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2022-10-03-110000-table-on-delete.test.d.ts.map +1 -0
- package/dist/tests/cases/migrations/2023-09-11-174000-fix-on-delete.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2023-09-11-174000-fix-on-delete.test.d.ts.map +1 -0
- package/dist/tests/cases/migrations/2023-10-19-173000-fix-unique.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2023-10-19-173000-fix-unique.test.d.ts.map +1 -0
- package/dist/tests/cases/migrations/2025-03-14-110000-fix-missing-index.test.d.ts +2 -0
- package/dist/tests/cases/migrations/2025-03-14-110000-fix-missing-index.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/eventsQuery.test.d.ts +2 -0
- package/dist/tests/cases/unit/eventsQuery.test.d.ts.map +1 -0
- package/dist/tests/src/constants.d.ts +2 -0
- package/dist/tests/src/constants.d.ts.map +1 -0
- package/dist/tests/src/utils.d.ts +6 -0
- package/dist/tests/src/utils.d.ts.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 -0
- package/dist/types/StagingDisabledError.d.ts +3 -0
- package/dist/types/StagingDisabledError.d.ts.map +1 -0
- package/dist/types/SystemContainer.d.ts +79 -0
- package/dist/types/SystemContainer.d.ts.map +1 -0
- package/dist/types/bin/runMigrations.d.ts +2 -0
- package/dist/types/bin/runMigrations.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/migrations/2018-08-04-102200-init.d.ts +3 -0
- package/dist/types/migrations/2018-08-04-102200-init.d.ts.map +1 -0
- package/dist/types/migrations/2018-08-05-130501-trigger-event-function.d.ts +3 -0
- package/dist/types/migrations/2018-08-05-130501-trigger-event-function.d.ts.map +1 -0
- package/dist/types/migrations/2019-01-14-143432-event-trx-id.d.ts +3 -0
- package/dist/types/migrations/2019-01-14-143432-event-trx-id.d.ts.map +1 -0
- package/dist/types/migrations/2019-02-04-154500-event-rebase.d.ts +3 -0
- package/dist/types/migrations/2019-02-04-154500-event-rebase.d.ts.map +1 -0
- package/dist/types/migrations/2019-03-18-104147-event-run-migration-struct.d.ts +3 -0
- package/dist/types/migrations/2019-03-18-104147-event-run-migration-struct.d.ts.map +1 -0
- package/dist/types/migrations/2019-07-29-103000-trigger-event-function-fix.d.ts +3 -0
- package/dist/types/migrations/2019-07-29-103000-trigger-event-function-fix.d.ts.map +1 -0
- package/dist/types/migrations/2019-11-28-100000-missing-setting-fallback.d.ts +3 -0
- package/dist/types/migrations/2019-11-28-100000-missing-setting-fallback.d.ts.map +1 -0
- package/dist/types/migrations/2020-03-27-130000-project-migrations.d.ts +4 -0
- package/dist/types/migrations/2020-03-27-130000-project-migrations.d.ts.map +1 -0
- package/dist/types/migrations/2020-05-06-150000-composed-primary.d.ts +5 -0
- package/dist/types/migrations/2020-05-06-150000-composed-primary.d.ts.map +1 -0
- package/dist/types/migrations/2020-06-01-103000-event-trigger-perf.d.ts +5 -0
- package/dist/types/migrations/2020-06-01-103000-event-trigger-perf.d.ts.map +1 -0
- package/dist/types/migrations/2021-03-23-110000-timestamp-fix.d.ts +3 -0
- package/dist/types/migrations/2021-03-23-110000-timestamp-fix.d.ts.map +1 -0
- package/dist/types/migrations/2021-05-07-155800-event-log-rework.d.ts +5 -0
- package/dist/types/migrations/2021-05-07-155800-event-log-rework.d.ts.map +1 -0
- package/dist/types/migrations/2021-05-19-1232000-event-log-fix-constraint.d.ts +5 -0
- package/dist/types/migrations/2021-05-19-1232000-event-log-fix-constraint.d.ts.map +1 -0
- package/dist/types/migrations/2021-12-21-155500-events-up.d.ts +3 -0
- package/dist/types/migrations/2021-12-21-155500-events-up.d.ts.map +1 -0
- package/dist/types/migrations/2022-02-08-132600-fn-search-path.d.ts +3 -0
- package/dist/types/migrations/2022-02-08-132600-fn-search-path.d.ts.map +1 -0
- package/dist/types/migrations/2022-02-08-140500-drop-deadcode.d.ts +3 -0
- package/dist/types/migrations/2022-02-08-140500-drop-deadcode.d.ts.map +1 -0
- package/dist/types/migrations/2022-02-08-144400-dynamic-stage-schema.d.ts +3 -0
- package/dist/types/migrations/2022-02-08-144400-dynamic-stage-schema.d.ts.map +1 -0
- package/dist/types/migrations/2022-10-03-110000-table-on-delete.d.ts +4 -0
- package/dist/types/migrations/2022-10-03-110000-table-on-delete.d.ts.map +1 -0
- package/dist/types/migrations/2023-09-11-174000-fix-on-delete.d.ts +4 -0
- package/dist/types/migrations/2023-09-11-174000-fix-on-delete.d.ts.map +1 -0
- package/dist/types/migrations/2023-10-19-173000-fix-unique.d.ts +4 -0
- package/dist/types/migrations/2023-10-19-173000-fix-unique.d.ts.map +1 -0
- package/dist/types/migrations/2023-10-24-140000-schema-nullable-checksum.d.ts +3 -0
- package/dist/types/migrations/2023-10-24-140000-schema-nullable-checksum.d.ts.map +1 -0
- package/dist/types/migrations/2024-06-28-150000-migrations-drop-sequence.d.ts +3 -0
- package/dist/types/migrations/2024-06-28-150000-migrations-drop-sequence.d.ts.map +1 -0
- package/dist/types/migrations/2024-06-28-153000-schema.d.ts +3 -0
- package/dist/types/migrations/2024-06-28-153000-schema.d.ts.map +1 -0
- package/dist/types/migrations/2024-06-28-153001-schema-init.d.ts +4 -0
- package/dist/types/migrations/2024-06-28-153001-schema-init.d.ts.map +1 -0
- package/dist/types/migrations/2024-07-29-150000-event-data-index.d.ts +3 -0
- package/dist/types/migrations/2024-07-29-150000-event-data-index.d.ts.map +1 -0
- package/dist/types/migrations/2025-03-14-110000-fix-missing-index.d.ts +4 -0
- package/dist/types/migrations/2025-03-14-110000-fix-missing-index.d.ts.map +1 -0
- package/dist/types/migrations/index.d.ts +3 -0
- package/dist/types/migrations/index.d.ts.map +1 -0
- package/dist/types/migrations/runner.d.ts +17 -0
- package/dist/types/migrations/runner.d.ts.map +1 -0
- package/dist/types/migrations/snapshot-factory.d.ts +6 -0
- package/dist/types/migrations/snapshot-factory.d.ts.map +1 -0
- package/dist/types/migrations/snapshot.d.ts +3 -0
- package/dist/types/migrations/snapshot.d.ts.map +1 -0
- package/dist/types/migrations/types.d.ts +9 -0
- package/dist/types/migrations/types.d.ts.map +1 -0
- package/dist/types/model/ProjectInitializer.d.ts +15 -0
- package/dist/types/model/ProjectInitializer.d.ts.map +1 -0
- package/dist/types/model/ProjectTruncateExecutor.d.ts +7 -0
- package/dist/types/model/ProjectTruncateExecutor.d.ts.map +1 -0
- package/dist/types/model/SchemaGetter.d.ts +6 -0
- package/dist/types/model/SchemaGetter.d.ts.map +1 -0
- package/dist/types/model/authorization/AuthorizationActions.d.ts +27 -0
- package/dist/types/model/authorization/AuthorizationActions.d.ts.map +1 -0
- package/dist/types/model/authorization/Identity.d.ts +6 -0
- package/dist/types/model/authorization/Identity.d.ts.map +1 -0
- package/dist/types/model/authorization/PermissionsFactory.d.ts +5 -0
- package/dist/types/model/authorization/PermissionsFactory.d.ts.map +1 -0
- package/dist/types/model/authorization/StagePermissionsFactory.d.ts +9 -0
- package/dist/types/model/authorization/StagePermissionsFactory.d.ts.map +1 -0
- package/dist/types/model/authorization/StageScope.d.ts +10 -0
- package/dist/types/model/authorization/StageScope.d.ts.map +1 -0
- package/dist/types/model/authorization/SwitchEvaluatorNode.d.ts +8 -0
- package/dist/types/model/authorization/SwitchEvaluatorNode.d.ts.map +1 -0
- package/dist/types/model/authorization/index.d.ts +4 -0
- package/dist/types/model/authorization/index.d.ts.map +1 -0
- package/dist/types/model/commands/Command.d.ts +15 -0
- package/dist/types/model/commands/Command.d.ts.map +1 -0
- package/dist/types/model/commands/CommandBus.d.ts +11 -0
- package/dist/types/model/commands/CommandBus.d.ts.map +1 -0
- package/dist/types/model/commands/events/TruncateEventsCommand.d.ts +5 -0
- package/dist/types/model/commands/events/TruncateEventsCommand.d.ts.map +1 -0
- package/dist/types/model/commands/events/index.d.ts +2 -0
- package/dist/types/model/commands/events/index.d.ts.map +1 -0
- package/dist/types/model/commands/index.d.ts +6 -0
- package/dist/types/model/commands/index.d.ts.map +1 -0
- package/dist/types/model/commands/migrations/DeleteMigrationCommand.d.ts +7 -0
- package/dist/types/model/commands/migrations/DeleteMigrationCommand.d.ts.map +1 -0
- package/dist/types/model/commands/migrations/ModifyMigrationCommand.d.ts +9 -0
- package/dist/types/model/commands/migrations/ModifyMigrationCommand.d.ts.map +1 -0
- package/dist/types/model/commands/migrations/SaveMigrationCommand.d.ts +8 -0
- package/dist/types/model/commands/migrations/SaveMigrationCommand.d.ts.map +1 -0
- package/dist/types/model/commands/migrations/index.d.ts +3 -0
- package/dist/types/model/commands/migrations/index.d.ts.map +1 -0
- package/dist/types/model/commands/schema/SaveSchemaCommand.d.ts +8 -0
- package/dist/types/model/commands/schema/SaveSchemaCommand.d.ts.map +1 -0
- package/dist/types/model/commands/stages/CreateStageCommand.d.ts +8 -0
- package/dist/types/model/commands/stages/CreateStageCommand.d.ts.map +1 -0
- package/dist/types/model/commands/stages/TruncateStagesCommand.d.ts +5 -0
- package/dist/types/model/commands/stages/TruncateStagesCommand.d.ts.map +1 -0
- package/dist/types/model/commands/stages/index.d.ts +3 -0
- package/dist/types/model/commands/stages/index.d.ts.map +1 -0
- package/dist/types/model/database/DatabaseContext.d.ts +19 -0
- package/dist/types/model/database/DatabaseContext.d.ts.map +1 -0
- package/dist/types/model/database/index.d.ts +2 -0
- package/dist/types/model/database/index.d.ts.map +1 -0
- package/dist/types/model/dependencies/content/ContentQueryExecutor.d.ts +36 -0
- package/dist/types/model/dependencies/content/ContentQueryExecutor.d.ts.map +1 -0
- package/dist/types/model/dependencies/index.d.ts +3 -0
- package/dist/types/model/dependencies/index.d.ts.map +1 -0
- package/dist/types/model/dependencies/tenant/IdentityFetcher.d.ts +18 -0
- package/dist/types/model/dependencies/tenant/IdentityFetcher.d.ts.map +1 -0
- package/dist/types/model/dependencies/tenant/index.d.ts +2 -0
- package/dist/types/model/dependencies/tenant/index.d.ts.map +1 -0
- package/dist/types/model/dtos/ExecutedMigration.d.ts +13 -0
- package/dist/types/model/dtos/ExecutedMigration.d.ts.map +1 -0
- package/dist/types/model/dtos/Stage.d.ts +7 -0
- package/dist/types/model/dtos/Stage.d.ts.map +1 -0
- package/dist/types/model/dtos/index.d.ts +3 -0
- package/dist/types/model/dtos/index.d.ts.map +1 -0
- package/dist/types/model/events/EventResponseBuilder.d.ts +10 -0
- package/dist/types/model/events/EventResponseBuilder.d.ts.map +1 -0
- package/dist/types/model/events/EventResponseHelper.d.ts +22 -0
- package/dist/types/model/events/EventResponseHelper.d.ts.map +1 -0
- package/dist/types/model/events/identityUtils.d.ts +3 -0
- package/dist/types/model/events/identityUtils.d.ts.map +1 -0
- package/dist/types/model/events/index.d.ts +3 -0
- package/dist/types/model/events/index.d.ts.map +1 -0
- package/dist/types/model/events/types.d.ts +56 -0
- package/dist/types/model/events/types.d.ts.map +1 -0
- package/dist/types/model/helpers/index.d.ts +3 -0
- package/dist/types/model/helpers/index.d.ts.map +1 -0
- package/dist/types/model/helpers/modelHelpers.d.ts +3 -0
- package/dist/types/model/helpers/modelHelpers.d.ts.map +1 -0
- package/dist/types/model/helpers/stageHelpers.d.ts +3 -0
- package/dist/types/model/helpers/stageHelpers.d.ts.map +1 -0
- package/dist/types/model/index.d.ts +14 -0
- package/dist/types/model/index.d.ts.map +1 -0
- package/dist/types/model/metadata/SchemaDatabaseMetadataResolverStore.d.ts +16 -0
- package/dist/types/model/metadata/SchemaDatabaseMetadataResolverStore.d.ts.map +1 -0
- package/dist/types/model/metadata/index.d.ts +2 -0
- package/dist/types/model/metadata/index.d.ts.map +1 -0
- package/dist/types/model/migrations/ExecutedMigrationsResolver.d.ts +7 -0
- package/dist/types/model/migrations/ExecutedMigrationsResolver.d.ts.map +1 -0
- package/dist/types/model/migrations/MigrationAlterer.d.ts +18 -0
- package/dist/types/model/migrations/MigrationAlterer.d.ts.map +1 -0
- package/dist/types/model/migrations/MigrationInput.d.ts +18 -0
- package/dist/types/model/migrations/MigrationInput.d.ts.map +1 -0
- package/dist/types/model/migrations/ProjectMigrator.d.ts +63 -0
- package/dist/types/model/migrations/ProjectMigrator.d.ts.map +1 -0
- package/dist/types/model/migrations/SchemaProvider.d.ts +28 -0
- package/dist/types/model/migrations/SchemaProvider.d.ts.map +1 -0
- package/dist/types/model/migrations/index.d.ts +5 -0
- package/dist/types/model/migrations/index.d.ts.map +1 -0
- package/dist/types/model/queries/events/EventQueryHelpers.d.ts +14 -0
- package/dist/types/model/queries/events/EventQueryHelpers.d.ts.map +1 -0
- package/dist/types/model/queries/events/EventsQuery.d.ts +12 -0
- package/dist/types/model/queries/events/EventsQuery.d.ts.map +1 -0
- package/dist/types/model/queries/events/LatestTransactionIdByStageQuery.d.ts +7 -0
- package/dist/types/model/queries/events/LatestTransactionIdByStageQuery.d.ts.map +1 -0
- package/dist/types/model/queries/events/OldValuesQuery.d.ts +7 -0
- package/dist/types/model/queries/events/OldValuesQuery.d.ts.map +1 -0
- package/dist/types/model/queries/events/index.d.ts +4 -0
- package/dist/types/model/queries/events/index.d.ts.map +1 -0
- package/dist/types/model/queries/index.d.ts +5 -0
- package/dist/types/model/queries/index.d.ts.map +1 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationByVersionQuery.d.ts +8 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationByVersionQuery.d.ts.map +1 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationsQuery.d.ts +8 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationsQuery.d.ts.map +1 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationsQueryHelper.d.ts +14 -0
- package/dist/types/model/queries/migrations/ExecutedMigrationsQueryHelper.d.ts.map +1 -0
- package/dist/types/model/queries/migrations/index.d.ts +4 -0
- package/dist/types/model/queries/migrations/index.d.ts.map +1 -0
- package/dist/types/model/queries/schema/SchemaQuery.d.ts +8 -0
- package/dist/types/model/queries/schema/SchemaQuery.d.ts.map +1 -0
- package/dist/types/model/queries/schema/index.d.ts +2 -0
- package/dist/types/model/queries/schema/index.d.ts.map +1 -0
- package/dist/types/model/queries/stages/StageBySlugQuery.d.ts +12 -0
- package/dist/types/model/queries/stages/StageBySlugQuery.d.ts.map +1 -0
- package/dist/types/model/queries/stages/StageQueryFactory.d.ts +4 -0
- package/dist/types/model/queries/stages/StageQueryFactory.d.ts.map +1 -0
- package/dist/types/model/queries/stages/StagesQuery.d.ts +7 -0
- package/dist/types/model/queries/stages/StagesQuery.d.ts.map +1 -0
- package/dist/types/model/queries/stages/index.d.ts +4 -0
- package/dist/types/model/queries/stages/index.d.ts.map +1 -0
- package/dist/types/model/stages/StageCreator.d.ts +7 -0
- package/dist/types/model/stages/StageCreator.d.ts.map +1 -0
- package/dist/types/model/stages/index.d.ts +2 -0
- package/dist/types/model/stages/index.d.ts.map +1 -0
- package/dist/types/resolvers/Resolver.d.ts +16 -0
- package/dist/types/resolvers/Resolver.d.ts.map +1 -0
- package/dist/types/resolvers/ResolverFactory.d.ts +20 -0
- package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -0
- package/dist/types/resolvers/SystemResolverContext.d.ts +21 -0
- package/dist/types/resolvers/SystemResolverContext.d.ts.map +1 -0
- package/dist/types/resolvers/index.d.ts +6 -0
- package/dist/types/resolvers/index.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/MigrateMutationResolver.d.ts +13 -0
- package/dist/types/resolvers/mutation/MigrateMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/MigrationAlterMutationResolver.d.ts +12 -0
- package/dist/types/resolvers/mutation/MigrationAlterMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/TruncateMutationResolver.d.ts +11 -0
- package/dist/types/resolvers/mutation/TruncateMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/index.d.ts +4 -0
- package/dist/types/resolvers/mutation/index.d.ts.map +1 -0
- package/dist/types/resolvers/query/EventsQueryResolver.d.ts +11 -0
- package/dist/types/resolvers/query/EventsQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/ExecutedMigrationsQueryResolver.d.ts +8 -0
- package/dist/types/resolvers/query/ExecutedMigrationsQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/SchemaQueryResolver.d.ts +7 -0
- package/dist/types/resolvers/query/SchemaQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/StagesQueryResolver.d.ts +8 -0
- package/dist/types/resolvers/query/StagesQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/index.d.ts +4 -0
- package/dist/types/resolvers/query/index.d.ts.map +1 -0
- package/dist/types/resolvers/types/EventOldValuesResolver.d.ts +6 -0
- package/dist/types/resolvers/types/EventOldValuesResolver.d.ts.map +1 -0
- package/dist/types/resolvers/types/OldValuesHelpers.d.ts +3 -0
- package/dist/types/resolvers/types/OldValuesHelpers.d.ts.map +1 -0
- package/dist/types/resolvers/types/index.d.ts +2 -0
- package/dist/types/resolvers/types/index.d.ts.map +1 -0
- package/dist/types/schema/dev.graphql.d.ts +4 -0
- package/dist/types/schema/dev.graphql.d.ts.map +1 -0
- package/dist/types/schema/index.d.ts +6 -0
- package/dist/types/schema/index.d.ts.map +1 -0
- package/dist/types/schema/system.graphql.d.ts +4 -0
- package/dist/types/schema/system.graphql.d.ts.map +1 -0
- package/dist/types/schema/types.d.ts +566 -0
- package/dist/types/schema/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/types/types.d.ts +12 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/MapSet.d.ts +10 -0
- package/dist/types/utils/MapSet.d.ts.map +1 -0
- package/dist/types/utils/Response.d.ts +13 -0
- package/dist/types/utils/Response.d.ts.map +1 -0
- package/dist/types/utils/assertNever.d.ts +2 -0
- package/dist/types/utils/assertNever.d.ts.map +1 -0
- package/dist/types/utils/batchQuery.d.ts +3 -0
- package/dist/types/utils/batchQuery.d.ts.map +1 -0
- package/dist/types/utils/exceptions.d.ts +5 -0
- package/dist/types/utils/exceptions.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/providers.d.ts +3 -0
- package/dist/types/utils/providers.d.ts.map +1 -0
- package/dist/types/utils/set.d.ts +3 -0
- package/dist/types/utils/set.d.ts.map +1 -0
- package/dist/types/utils/tick.d.ts +2 -0
- package/dist/types/utils/tick.d.ts.map +1 -0
- package/dist/types/utils/tuple.d.ts +2 -0
- package/dist/types/utils/tuple.d.ts.map +1 -0
- package/dist/types/utils/uuid.d.ts +4 -0
- package/dist/types/utils/uuid.d.ts.map +1 -0
- package/package.json +19 -19
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
class SaveSchemaCommand {
|
|
5
|
+
constructor(input) {
|
|
6
|
+
this.input = input;
|
|
7
|
+
}
|
|
8
|
+
async execute({ db }) {
|
|
9
|
+
if (!this.input.meta.updatedAt) {
|
|
10
|
+
throw new Error("Cannot persist empty schema");
|
|
11
|
+
}
|
|
12
|
+
await Database.InsertBuilder.create().into("schema").values({
|
|
13
|
+
schema: this.input.schema,
|
|
14
|
+
updated_at: this.input.meta.updatedAt.toISOString(),
|
|
15
|
+
checksum: this.input.meta.checksum,
|
|
16
|
+
version: this.input.meta.version,
|
|
17
|
+
migration_id: this.input.meta.id
|
|
18
|
+
}).onConflict(Database.ConflictActionType.update, ["id"], {
|
|
19
|
+
schema: (expr) => expr.select(["excluded", "schema"]),
|
|
20
|
+
updated_at: (expr) => expr.select(["excluded", "updated_at"]),
|
|
21
|
+
checksum: (expr) => expr.select(["excluded", "checksum"]),
|
|
22
|
+
version: (expr) => expr.select(["excluded", "version"]),
|
|
23
|
+
migration_id: (expr) => expr.select(["excluded", "migration_id"])
|
|
24
|
+
}).execute(db);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.SaveSchemaCommand = SaveSchemaCommand;
|
|
28
|
+
//# sourceMappingURL=SaveSchemaCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveSchemaCommand.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/commands/schema/SaveSchemaCommand.ts"],"sourcesContent":["import { ConflictActionType, InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { SchemaWithMeta } from '../../migrations'\n\nexport class SaveSchemaCommand implements Command<void> {\n\tconstructor(private readonly input: SchemaWithMeta) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<void> {\n\t\tif (!this.input.meta.updatedAt) {\n\t\t\tthrow new Error('Cannot persist empty schema')\n\t\t}\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('schema')\n\t\t\t.values({\n\t\t\t\tschema: this.input.schema,\n\t\t\t\tupdated_at: this.input.meta.updatedAt.toISOString(),\n\t\t\t\tchecksum: this.input.meta.checksum,\n\t\t\t\tversion: this.input.meta.version,\n\t\t\t\tmigration_id: this.input.meta.id,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['id'], {\n\t\t\t\tschema: expr => expr.select(['excluded', 'schema']),\n\t\t\t\tupdated_at: expr => expr.select(['excluded', 'updated_at']),\n\t\t\t\tchecksum: expr => expr.select(['excluded', 'checksum']),\n\t\t\t\tversion: expr => expr.select(['excluded', 'version']),\n\t\t\t\tmigration_id: expr => expr.select(['excluded', 'migration_id']),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAIO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,OAAuB;AAAvB,SAAA,QAAA;AAAA,EAAwB;AAAA,EAErD,MAAa,QAAQ,EAAE,MAAmC;AACzD,QAAI,CAAC,KAAK,MAAM,KAAK,WAAW;AAC/B,YAAM,IAAI,MAAM,6BAA6B;AAAA,IAC9C;AAEA,UAAMA,SAAAA,cAAc,OAAA,EAClB,KAAK,QAAQ,EACb,OAAO;AAAA,MACP,QAAQ,KAAK,MAAM;AAAA,MACnB,YAAY,KAAK,MAAM,KAAK,UAAU,YAAA;AAAA,MACtC,UAAU,KAAK,MAAM,KAAK;AAAA,MAC1B,SAAS,KAAK,MAAM,KAAK;AAAA,MACzB,cAAc,KAAK,MAAM,KAAK;AAAA,IAAA,CAC9B,EACA,WAAWC,SAAAA,mBAAmB,QAAQ,CAAC,IAAI,GAAG;AAAA,MAC9C,QAAQ,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,QAAQ,CAAC;AAAA,MAClD,YAAY,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,YAAY,CAAC;AAAA,MAC1D,UAAU,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,UAAU,CAAC;AAAA,MACtD,SAAS,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,SAAS,CAAC;AAAA,MACpD,cAAc,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,cAAc,CAAC;AAAA,IAAA,CAC9D,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InsertBuilder as InsertBuilder$1, ConflictActionType } from "@contember/database";
|
|
2
|
+
class SaveSchemaCommand {
|
|
3
|
+
constructor(input) {
|
|
4
|
+
this.input = input;
|
|
5
|
+
}
|
|
6
|
+
async execute({ db }) {
|
|
7
|
+
if (!this.input.meta.updatedAt) {
|
|
8
|
+
throw new Error("Cannot persist empty schema");
|
|
9
|
+
}
|
|
10
|
+
await InsertBuilder$1.create().into("schema").values({
|
|
11
|
+
schema: this.input.schema,
|
|
12
|
+
updated_at: this.input.meta.updatedAt.toISOString(),
|
|
13
|
+
checksum: this.input.meta.checksum,
|
|
14
|
+
version: this.input.meta.version,
|
|
15
|
+
migration_id: this.input.meta.id
|
|
16
|
+
}).onConflict(ConflictActionType.update, ["id"], {
|
|
17
|
+
schema: (expr) => expr.select(["excluded", "schema"]),
|
|
18
|
+
updated_at: (expr) => expr.select(["excluded", "updated_at"]),
|
|
19
|
+
checksum: (expr) => expr.select(["excluded", "checksum"]),
|
|
20
|
+
version: (expr) => expr.select(["excluded", "version"]),
|
|
21
|
+
migration_id: (expr) => expr.select(["excluded", "migration_id"])
|
|
22
|
+
}).execute(db);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
SaveSchemaCommand
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=SaveSchemaCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveSchemaCommand.js","sources":["../../../../../../../packages/engine-system-api/src/model/commands/schema/SaveSchemaCommand.ts"],"sourcesContent":["import { ConflictActionType, InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { SchemaWithMeta } from '../../migrations'\n\nexport class SaveSchemaCommand implements Command<void> {\n\tconstructor(private readonly input: SchemaWithMeta) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<void> {\n\t\tif (!this.input.meta.updatedAt) {\n\t\t\tthrow new Error('Cannot persist empty schema')\n\t\t}\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('schema')\n\t\t\t.values({\n\t\t\t\tschema: this.input.schema,\n\t\t\t\tupdated_at: this.input.meta.updatedAt.toISOString(),\n\t\t\t\tchecksum: this.input.meta.checksum,\n\t\t\t\tversion: this.input.meta.version,\n\t\t\t\tmigration_id: this.input.meta.id,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['id'], {\n\t\t\t\tschema: expr => expr.select(['excluded', 'schema']),\n\t\t\t\tupdated_at: expr => expr.select(['excluded', 'updated_at']),\n\t\t\t\tchecksum: expr => expr.select(['excluded', 'checksum']),\n\t\t\t\tversion: expr => expr.select(['excluded', 'version']),\n\t\t\t\tmigration_id: expr => expr.select(['excluded', 'migration_id']),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAIO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,OAAuB;AAAvB,SAAA,QAAA;AAAA,EAAwB;AAAA,EAErD,MAAa,QAAQ,EAAE,MAAmC;AACzD,QAAI,CAAC,KAAK,MAAM,KAAK,WAAW;AAC/B,YAAM,IAAI,MAAM,6BAA6B;AAAA,IAC9C;AAEA,UAAMA,gBAAc,OAAA,EAClB,KAAK,QAAQ,EACb,OAAO;AAAA,MACP,QAAQ,KAAK,MAAM;AAAA,MACnB,YAAY,KAAK,MAAM,KAAK,UAAU,YAAA;AAAA,MACtC,UAAU,KAAK,MAAM,KAAK;AAAA,MAC1B,SAAS,KAAK,MAAM,KAAK;AAAA,MACzB,cAAc,KAAK,MAAM,KAAK;AAAA,IAAA,CAC9B,EACA,WAAW,mBAAmB,QAAQ,CAAC,IAAI,GAAG;AAAA,MAC9C,QAAQ,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,QAAQ,CAAC;AAAA,MAClD,YAAY,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,YAAY,CAAC;AAAA,MAC1D,UAAU,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,UAAU,CAAC;AAAA,MACtD,SAAS,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,SAAS,CAAC;AAAA,MACpD,cAAc,CAAA,SAAQ,KAAK,OAAO,CAAC,YAAY,cAAc,CAAC;AAAA,IAAA,CAC9D,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
const stageHelpers = require("../../helpers/stageHelpers.cjs");
|
|
5
|
+
require("@contember/schema-utils");
|
|
6
|
+
class CreateStageCommand {
|
|
7
|
+
constructor(stage) {
|
|
8
|
+
this.stage = stage;
|
|
9
|
+
}
|
|
10
|
+
async execute({ db, providers }) {
|
|
11
|
+
const schemaName = this.stage.schema ?? stageHelpers.formatSchemaName(this.stage);
|
|
12
|
+
await Database.InsertBuilder.create().into("stage").values({
|
|
13
|
+
id: providers.uuid(),
|
|
14
|
+
name: this.stage.name,
|
|
15
|
+
slug: this.stage.slug,
|
|
16
|
+
schema: schemaName
|
|
17
|
+
}).execute(db);
|
|
18
|
+
await db.query("CREATE SCHEMA IF NOT EXISTS " + Database.wrapIdentifier(schemaName));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.CreateStageCommand = CreateStageCommand;
|
|
22
|
+
//# sourceMappingURL=CreateStageCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateStageCommand.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/commands/stages/CreateStageCommand.ts"],"sourcesContent":["import { InsertBuilder, wrapIdentifier } from '@contember/database'\nimport { StageConfig } from '../../../types'\nimport { Command } from '../Command'\nimport { formatSchemaName } from '../../helpers'\n\nexport class CreateStageCommand implements Command<void> {\n\tconstructor(private readonly stage: StageConfig) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst schemaName = this.stage.schema ?? formatSchemaName(this.stage)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('stage')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.stage.name,\n\t\t\t\tslug: this.stage.slug,\n\t\t\t\tschema: schemaName,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tawait db.query('CREATE SCHEMA IF NOT EXISTS ' + wrapIdentifier(schemaName))\n\t}\n}\n"],"names":["formatSchemaName","InsertBuilder","wrapIdentifier"],"mappings":";;;;;AAKO,MAAM,mBAA4C;AAAA,EACxD,YAA6B,OAAoB;AAApB,SAAA,QAAA;AAAA,EAAqB;AAAA,EAElD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,aAAa,KAAK,MAAM,UAAUA,aAAAA,iBAAiB,KAAK,KAAK;AACnE,UAAMC,SAAAA,cAAc,OAAA,EAClB,KAAK,OAAO,EACZ,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,MAAM,KAAK,MAAM;AAAA,MACjB,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ;AAAA,IAAA,CACR,EACA,QAAQ,EAAE;AAEZ,UAAM,GAAG,MAAM,iCAAiCC,SAAAA,eAAe,UAAU,CAAC;AAAA,EAC3E;AACD;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InsertBuilder as InsertBuilder$1, wrapIdentifier } from "@contember/database";
|
|
2
|
+
import { formatSchemaName } from "../../helpers/stageHelpers.js";
|
|
3
|
+
import "@contember/schema-utils";
|
|
4
|
+
class CreateStageCommand {
|
|
5
|
+
constructor(stage) {
|
|
6
|
+
this.stage = stage;
|
|
7
|
+
}
|
|
8
|
+
async execute({ db, providers }) {
|
|
9
|
+
const schemaName = this.stage.schema ?? formatSchemaName(this.stage);
|
|
10
|
+
await InsertBuilder$1.create().into("stage").values({
|
|
11
|
+
id: providers.uuid(),
|
|
12
|
+
name: this.stage.name,
|
|
13
|
+
slug: this.stage.slug,
|
|
14
|
+
schema: schemaName
|
|
15
|
+
}).execute(db);
|
|
16
|
+
await db.query("CREATE SCHEMA IF NOT EXISTS " + wrapIdentifier(schemaName));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
CreateStageCommand
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=CreateStageCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateStageCommand.js","sources":["../../../../../../../packages/engine-system-api/src/model/commands/stages/CreateStageCommand.ts"],"sourcesContent":["import { InsertBuilder, wrapIdentifier } from '@contember/database'\nimport { StageConfig } from '../../../types'\nimport { Command } from '../Command'\nimport { formatSchemaName } from '../../helpers'\n\nexport class CreateStageCommand implements Command<void> {\n\tconstructor(private readonly stage: StageConfig) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst schemaName = this.stage.schema ?? formatSchemaName(this.stage)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('stage')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.stage.name,\n\t\t\t\tslug: this.stage.slug,\n\t\t\t\tschema: schemaName,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tawait db.query('CREATE SCHEMA IF NOT EXISTS ' + wrapIdentifier(schemaName))\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAKO,MAAM,mBAA4C;AAAA,EACxD,YAA6B,OAAoB;AAApB,SAAA,QAAA;AAAA,EAAqB;AAAA,EAElD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,aAAa,KAAK,MAAM,UAAU,iBAAiB,KAAK,KAAK;AACnE,UAAMA,gBAAc,OAAA,EAClB,KAAK,OAAO,EACZ,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,MAAM,KAAK,MAAM;AAAA,MACjB,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ;AAAA,IAAA,CACR,EACA,QAAQ,EAAE;AAEZ,UAAM,GAAG,MAAM,iCAAiC,eAAe,UAAU,CAAC;AAAA,EAC3E;AACD;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
const CommandBus = require("../commands/CommandBus.cjs");
|
|
5
|
+
require("@contember/schema-migrations");
|
|
6
|
+
require("@contember/schema-utils");
|
|
7
|
+
class DatabaseContextFactory {
|
|
8
|
+
constructor(schemaName, providers) {
|
|
9
|
+
this.schemaName = schemaName;
|
|
10
|
+
this.providers = providers;
|
|
11
|
+
}
|
|
12
|
+
create(connection) {
|
|
13
|
+
const client = new Database.Client(connection, this.schemaName, { module: "system" });
|
|
14
|
+
return createDatabaseContext(client, this.providers);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const createDatabaseContext = (client, providers) => ({
|
|
18
|
+
client,
|
|
19
|
+
queryHandler: client.createQueryHandler(),
|
|
20
|
+
transaction: (cb) => client.transaction(async (client2) => {
|
|
21
|
+
await client2.query(Database.Connection.REPEATABLE_READ);
|
|
22
|
+
return cb(createDatabaseContext(client2, providers));
|
|
23
|
+
}),
|
|
24
|
+
scope: (cb) => client.scope((client2) => cb(createDatabaseContext(client2, providers))),
|
|
25
|
+
commandBus: new CommandBus.CommandBus(client, providers),
|
|
26
|
+
locked: (lock, cb) => client.locked(lock, (client2) => cb(createDatabaseContext(client2, providers)))
|
|
27
|
+
});
|
|
28
|
+
exports.DatabaseContextFactory = DatabaseContextFactory;
|
|
29
|
+
//# sourceMappingURL=DatabaseContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseContext.cjs","sources":["../../../../../../packages/engine-system-api/src/model/database/DatabaseContext.ts"],"sourcesContent":["import { Client, Connection, DatabaseQueryable } from '@contember/database'\nimport { QueryHandler } from '@contember/queryable'\nimport { UuidProvider } from '../../utils'\nimport { CommandBus } from '../commands'\n\nexport interface DatabaseContext<ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike> {\n\tclient: Client<ConnectionType>\n\tqueryHandler: QueryHandler<DatabaseQueryable>\n\ttransaction: <T>(cb: (db: DatabaseContext<Connection.TransactionLike>) => Promise<T> | T) => Promise<T>\n\tscope: <T>(cb: (db: DatabaseContext<ConnectionType & Connection.AcquiredConnectionLike>) => Promise<T> | T) => Promise<T>\n\tlocked: <T>(lock: number, cb: (db: DatabaseContext<Connection.ConnectionLike>) => Promise<T> | T) => Promise<T>\n\tcommandBus: CommandBus\n}\n\nexport class DatabaseContextFactory {\n\tconstructor(\n\t\tpublic readonly schemaName: string,\n\t\tprivate readonly providers: UuidProvider,\n\t) {}\n\n\tpublic create(connection: Connection.ConnectionLike): DatabaseContext {\n\t\tconst client = new Client(connection, this.schemaName, { module: 'system' })\n\t\treturn createDatabaseContext(client, this.providers)\n\t}\n}\n\nconst createDatabaseContext = <ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike>(\n\tclient: Client<ConnectionType>,\n\tproviders: UuidProvider,\n): DatabaseContext<ConnectionType> => ({\n\tclient,\n\tqueryHandler: client.createQueryHandler(),\n\ttransaction: cb =>\n\t\tclient.transaction(async client => {\n\t\t\tawait client.query(Connection.REPEATABLE_READ)\n\t\t\treturn cb(createDatabaseContext(client, providers))\n\t\t}),\n\tscope: cb => client.scope(client => cb(createDatabaseContext(client, providers))),\n\tcommandBus: new CommandBus(client, providers),\n\tlocked: (lock, cb) => client.locked(lock, client => cb(createDatabaseContext(client, providers))),\n})\n"],"names":["Client","client","Connection","CommandBus"],"mappings":";;;;;;AAcO,MAAM,uBAAuB;AAAA,EACnC,YACiB,YACC,WAChB;AAFe,SAAA,aAAA;AACC,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,OAAO,YAAwD;AACrE,UAAM,SAAS,IAAIA,SAAAA,OAAO,YAAY,KAAK,YAAY,EAAE,QAAQ,UAAU;AAC3E,WAAO,sBAAsB,QAAQ,KAAK,SAAS;AAAA,EACpD;AACD;AAEA,MAAM,wBAAwB,CAC7B,QACA,eACsC;AAAA,EACtC;AAAA,EACA,cAAc,OAAO,mBAAA;AAAA,EACrB,aAAa,CAAA,OACZ,OAAO,YAAY,OAAMC,YAAU;AAClC,UAAMA,QAAO,MAAMC,SAAAA,WAAW,eAAe;AAC7C,WAAO,GAAG,sBAAsBD,SAAQ,SAAS,CAAC;AAAA,EACnD,CAAC;AAAA,EACF,OAAO,CAAA,OAAM,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AAAA,EAChF,YAAY,IAAIE,WAAAA,WAAW,QAAQ,SAAS;AAAA,EAC5C,QAAQ,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM,CAAAF,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AACjG;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Client, Connection } from "@contember/database";
|
|
2
|
+
import { CommandBus } from "../commands/CommandBus.js";
|
|
3
|
+
import "@contember/schema-migrations";
|
|
4
|
+
import "@contember/schema-utils";
|
|
5
|
+
class DatabaseContextFactory {
|
|
6
|
+
constructor(schemaName, providers) {
|
|
7
|
+
this.schemaName = schemaName;
|
|
8
|
+
this.providers = providers;
|
|
9
|
+
}
|
|
10
|
+
create(connection) {
|
|
11
|
+
const client = new Client(connection, this.schemaName, { module: "system" });
|
|
12
|
+
return createDatabaseContext(client, this.providers);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const createDatabaseContext = (client, providers) => ({
|
|
16
|
+
client,
|
|
17
|
+
queryHandler: client.createQueryHandler(),
|
|
18
|
+
transaction: (cb) => client.transaction(async (client2) => {
|
|
19
|
+
await client2.query(Connection.REPEATABLE_READ);
|
|
20
|
+
return cb(createDatabaseContext(client2, providers));
|
|
21
|
+
}),
|
|
22
|
+
scope: (cb) => client.scope((client2) => cb(createDatabaseContext(client2, providers))),
|
|
23
|
+
commandBus: new CommandBus(client, providers),
|
|
24
|
+
locked: (lock, cb) => client.locked(lock, (client2) => cb(createDatabaseContext(client2, providers)))
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
DatabaseContextFactory
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=DatabaseContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseContext.js","sources":["../../../../../../packages/engine-system-api/src/model/database/DatabaseContext.ts"],"sourcesContent":["import { Client, Connection, DatabaseQueryable } from '@contember/database'\nimport { QueryHandler } from '@contember/queryable'\nimport { UuidProvider } from '../../utils'\nimport { CommandBus } from '../commands'\n\nexport interface DatabaseContext<ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike> {\n\tclient: Client<ConnectionType>\n\tqueryHandler: QueryHandler<DatabaseQueryable>\n\ttransaction: <T>(cb: (db: DatabaseContext<Connection.TransactionLike>) => Promise<T> | T) => Promise<T>\n\tscope: <T>(cb: (db: DatabaseContext<ConnectionType & Connection.AcquiredConnectionLike>) => Promise<T> | T) => Promise<T>\n\tlocked: <T>(lock: number, cb: (db: DatabaseContext<Connection.ConnectionLike>) => Promise<T> | T) => Promise<T>\n\tcommandBus: CommandBus\n}\n\nexport class DatabaseContextFactory {\n\tconstructor(\n\t\tpublic readonly schemaName: string,\n\t\tprivate readonly providers: UuidProvider,\n\t) {}\n\n\tpublic create(connection: Connection.ConnectionLike): DatabaseContext {\n\t\tconst client = new Client(connection, this.schemaName, { module: 'system' })\n\t\treturn createDatabaseContext(client, this.providers)\n\t}\n}\n\nconst createDatabaseContext = <ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike>(\n\tclient: Client<ConnectionType>,\n\tproviders: UuidProvider,\n): DatabaseContext<ConnectionType> => ({\n\tclient,\n\tqueryHandler: client.createQueryHandler(),\n\ttransaction: cb =>\n\t\tclient.transaction(async client => {\n\t\t\tawait client.query(Connection.REPEATABLE_READ)\n\t\t\treturn cb(createDatabaseContext(client, providers))\n\t\t}),\n\tscope: cb => client.scope(client => cb(createDatabaseContext(client, providers))),\n\tcommandBus: new CommandBus(client, providers),\n\tlocked: (lock, cb) => client.locked(lock, client => cb(createDatabaseContext(client, providers))),\n})\n"],"names":["client"],"mappings":";;;;AAcO,MAAM,uBAAuB;AAAA,EACnC,YACiB,YACC,WAChB;AAFe,SAAA,aAAA;AACC,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,OAAO,YAAwD;AACrE,UAAM,SAAS,IAAI,OAAO,YAAY,KAAK,YAAY,EAAE,QAAQ,UAAU;AAC3E,WAAO,sBAAsB,QAAQ,KAAK,SAAS;AAAA,EACpD;AACD;AAEA,MAAM,wBAAwB,CAC7B,QACA,eACsC;AAAA,EACtC;AAAA,EACA,cAAc,OAAO,mBAAA;AAAA,EACrB,aAAa,CAAA,OACZ,OAAO,YAAY,OAAMA,YAAU;AAClC,UAAMA,QAAO,MAAM,WAAW,eAAe;AAC7C,WAAO,GAAG,sBAAsBA,SAAQ,SAAS,CAAC;AAAA,EACnD,CAAC;AAAA,EACF,OAAO,CAAA,OAAM,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AAAA,EAChF,YAAY,IAAI,WAAW,QAAQ,SAAS;AAAA,EAC5C,QAAQ,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AACjG;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const schemaMigrations = require("@contember/schema-migrations");
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
7
|
+
class ExecutedMigration {
|
|
8
|
+
constructor(id, name, formatVersion, modifications, executedAt, checksum, type) {
|
|
9
|
+
this.id = id;
|
|
10
|
+
this.name = name;
|
|
11
|
+
this.formatVersion = formatVersion;
|
|
12
|
+
this.modifications = modifications;
|
|
13
|
+
this.executedAt = executedAt;
|
|
14
|
+
this.checksum = checksum;
|
|
15
|
+
this.type = type;
|
|
16
|
+
__publicField(this, "version");
|
|
17
|
+
this.version = schemaMigrations.MigrationVersionHelper.extractVersion(name);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ExecutedMigration = ExecutedMigration;
|
|
21
|
+
//# sourceMappingURL=ExecutedMigration.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutedMigration.cjs","sources":["../../../../../../packages/engine-system-api/src/model/dtos/ExecutedMigration.ts"],"sourcesContent":["import { Migration, MigrationVersionHelper } from '@contember/schema-migrations'\n\nexport class ExecutedMigration implements Migration {\n\tpublic readonly version: string\n\n\tconstructor(\n\t\tpublic readonly id: number,\n\t\tpublic readonly name: string,\n\t\tpublic readonly formatVersion: number,\n\t\tpublic readonly modifications: Migration.Modification[],\n\t\tpublic readonly executedAt: Date,\n\t\tpublic readonly checksum: string | null,\n\t\tpublic readonly type: 'schema' | 'content',\n\t) {\n\t\tthis.version = MigrationVersionHelper.extractVersion(name)\n\t}\n}\n"],"names":["MigrationVersionHelper"],"mappings":";;;;;;AAEO,MAAM,kBAAuC;AAAA,EAGnD,YACiB,IACA,MACA,eACA,eACA,YACA,UACA,MACf;AAPe,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,gBAAA;AACA,SAAA,gBAAA;AACA,SAAA,aAAA;AACA,SAAA,WAAA;AACA,SAAA,OAAA;AATjB,kBAAA,MAAgB,SAAA;AAWf,SAAK,UAAUA,wCAAuB,eAAe,IAAI;AAAA,EAC1D;AACD;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MigrationVersionHelper } from "@contember/schema-migrations";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
5
|
+
class ExecutedMigration {
|
|
6
|
+
constructor(id, name, formatVersion, modifications, executedAt, checksum, type) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.formatVersion = formatVersion;
|
|
10
|
+
this.modifications = modifications;
|
|
11
|
+
this.executedAt = executedAt;
|
|
12
|
+
this.checksum = checksum;
|
|
13
|
+
this.type = type;
|
|
14
|
+
__publicField(this, "version");
|
|
15
|
+
this.version = MigrationVersionHelper.extractVersion(name);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
ExecutedMigration
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ExecutedMigration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutedMigration.js","sources":["../../../../../../packages/engine-system-api/src/model/dtos/ExecutedMigration.ts"],"sourcesContent":["import { Migration, MigrationVersionHelper } from '@contember/schema-migrations'\n\nexport class ExecutedMigration implements Migration {\n\tpublic readonly version: string\n\n\tconstructor(\n\t\tpublic readonly id: number,\n\t\tpublic readonly name: string,\n\t\tpublic readonly formatVersion: number,\n\t\tpublic readonly modifications: Migration.Modification[],\n\t\tpublic readonly executedAt: Date,\n\t\tpublic readonly checksum: string | null,\n\t\tpublic readonly type: 'schema' | 'content',\n\t) {\n\t\tthis.version = MigrationVersionHelper.extractVersion(name)\n\t}\n}\n"],"names":[],"mappings":";;;;AAEO,MAAM,kBAAuC;AAAA,EAGnD,YACiB,IACA,MACA,eACA,eACA,YACA,UACA,MACf;AAPe,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,gBAAA;AACA,SAAA,gBAAA;AACA,SAAA,aAAA;AACA,SAAA,WAAA;AACA,SAAA,OAAA;AATjB,kBAAA,MAAgB,SAAA;AAWf,SAAK,UAAU,uBAAuB,eAAe,IAAI;AAAA,EAC1D;AACD;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const types = require("./types.cjs");
|
|
4
|
+
const types$1 = require("../../schema/types.cjs");
|
|
5
|
+
require("../../schema/dev.graphql.cjs");
|
|
6
|
+
require("../../schema/system.graphql.cjs");
|
|
7
|
+
const assertNever = require("../../utils/assertNever.cjs");
|
|
8
|
+
const identityUtils = require("./identityUtils.cjs");
|
|
9
|
+
const EventResponseHelper = require("./EventResponseHelper.cjs");
|
|
10
|
+
class EventResponseBuilder {
|
|
11
|
+
constructor(identityFetcher) {
|
|
12
|
+
this.identityFetcher = identityFetcher;
|
|
13
|
+
}
|
|
14
|
+
async buildResponse(events) {
|
|
15
|
+
const apiEventTypeMapping = {
|
|
16
|
+
[types.EventType.create]: types$1.EventType.Create,
|
|
17
|
+
[types.EventType.update]: types$1.EventType.Update,
|
|
18
|
+
[types.EventType.delete]: types$1.EventType.Delete
|
|
19
|
+
};
|
|
20
|
+
const identityIds = events.map((it) => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index);
|
|
21
|
+
const identities = await this.identityFetcher.fetchIdentities(identityIds);
|
|
22
|
+
const identitiesMap = Object.fromEntries(identities.map((it) => [it.identityId, it]));
|
|
23
|
+
return events.map((it) => {
|
|
24
|
+
const commonData = {
|
|
25
|
+
createdAt: it.createdAt,
|
|
26
|
+
appliedAt: it.appliedAt,
|
|
27
|
+
id: it.id,
|
|
28
|
+
type: apiEventTypeMapping[it.type],
|
|
29
|
+
description: this.formatDescription(it),
|
|
30
|
+
transactionId: it.transactionId,
|
|
31
|
+
identityId: it.identityId,
|
|
32
|
+
identityDescription: identityUtils.formatIdentity(identitiesMap[it.identityId])
|
|
33
|
+
};
|
|
34
|
+
switch (it.type) {
|
|
35
|
+
case types.EventType.create:
|
|
36
|
+
return (() => EventResponseHelper.appendCreateSpecificData(commonData, it))();
|
|
37
|
+
case types.EventType.update:
|
|
38
|
+
return (() => EventResponseHelper.appendUpdateSpecificData(commonData, it))();
|
|
39
|
+
case types.EventType.delete:
|
|
40
|
+
return (() => EventResponseHelper.appendDeleteSpecificData(commonData, it))();
|
|
41
|
+
}
|
|
42
|
+
assertNever.assertNever();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
formatDescription(event) {
|
|
46
|
+
switch (event.type) {
|
|
47
|
+
case types.EventType.create:
|
|
48
|
+
return `Creating ${event.tableName}#${event.rowId.join(";")}`;
|
|
49
|
+
case types.EventType.update:
|
|
50
|
+
return `Updating ${event.tableName}#${event.rowId.join(";")}`;
|
|
51
|
+
case types.EventType.delete:
|
|
52
|
+
return `Deleting ${event.tableName}#${event.rowId.join(";")}`;
|
|
53
|
+
default:
|
|
54
|
+
return assertNever.assertNever();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.EventResponseBuilder = EventResponseBuilder;
|
|
59
|
+
//# sourceMappingURL=EventResponseBuilder.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseBuilder.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseBuilder.ts"],"sourcesContent":["import { ContentEvent, EventType } from './types'\nimport { CreateEvent, DeleteEvent, EventType as ApiEventType, UpdateEvent } from '../../schema'\nimport { assertNever } from '../../utils'\nimport { IdentityFetcher } from '../dependencies'\nimport { formatIdentity } from './identityUtils'\nimport { appendCreateSpecificData, appendDeleteSpecificData, appendUpdateSpecificData } from './EventResponseHelper'\n\nexport class EventResponseBuilder {\n\tconstructor(private readonly identityFetcher: IdentityFetcher) {}\n\n\tpublic async buildResponse(events: ContentEvent[]): Promise<(CreateEvent | DeleteEvent | UpdateEvent)[]> {\n\t\tconst apiEventTypeMapping = {\n\t\t\t[EventType.create]: ApiEventType.Create,\n\t\t\t[EventType.update]: ApiEventType.Update,\n\t\t\t[EventType.delete]: ApiEventType.Delete,\n\t\t}\n\t\tconst identityIds = events.map(it => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index)\n\t\tconst identities = await this.identityFetcher.fetchIdentities(identityIds)\n\t\tconst identitiesMap = Object.fromEntries(identities.map(it => [it.identityId, it]))\n\n\t\treturn events.map(it => {\n\t\t\tconst commonData = {\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\tappliedAt: it.appliedAt,\n\t\t\t\tid: it.id,\n\t\t\t\ttype: apiEventTypeMapping[it.type],\n\t\t\t\tdescription: this.formatDescription(it),\n\t\t\t\ttransactionId: it.transactionId,\n\t\t\t\tidentityId: it.identityId,\n\t\t\t\tidentityDescription: formatIdentity(identitiesMap[it.identityId]),\n\t\t\t}\n\t\t\tswitch (it.type) {\n\t\t\t\tcase EventType.create:\n\t\t\t\t\treturn ((): CreateEvent => appendCreateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.update:\n\t\t\t\t\treturn ((): UpdateEvent => appendUpdateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.delete:\n\t\t\t\t\treturn ((): DeleteEvent => appendDeleteSpecificData(commonData, it))()\n\t\t\t}\n\t\t\tassertNever(it)\n\t\t})\n\t}\n\n\tprivate formatDescription(event: ContentEvent): string {\n\t\tswitch (event.type) {\n\t\t\tcase EventType.create:\n\t\t\t\treturn `Creating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.update:\n\t\t\t\treturn `Updating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.delete:\n\t\t\t\treturn `Deleting ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tdefault:\n\t\t\t\treturn assertNever(event)\n\t\t}\n\t}\n}\n"],"names":["EventType","ApiEventType","formatIdentity","appendCreateSpecificData","appendUpdateSpecificData","appendDeleteSpecificData","assertNever"],"mappings":";;;;;;;;;AAOO,MAAM,qBAAqB;AAAA,EACjC,YAA6B,iBAAkC;AAAlC,SAAA,kBAAA;AAAA,EAAmC;AAAA,EAEhE,MAAa,cAAc,QAA8E;AACxG,UAAM,sBAAsB;AAAA,MAC3B,CAACA,MAAAA,UAAU,MAAM,GAAGC,QAAAA,UAAa;AAAA,MACjC,CAACD,MAAAA,UAAU,MAAM,GAAGC,QAAAA,UAAa;AAAA,MACjC,CAACD,MAAAA,UAAU,MAAM,GAAGC,kBAAa;AAAA,IAAA;AAElC,UAAM,cAAc,OAAO,IAAI,CAAA,OAAM,GAAG,UAAU,EAAE,OAAO,CAAC,IAAI,OAAO,QAAQ,IAAI,QAAQ,EAAE,MAAM,KAAK;AACxG,UAAM,aAAa,MAAM,KAAK,gBAAgB,gBAAgB,WAAW;AACzE,UAAM,gBAAgB,OAAO,YAAY,WAAW,IAAI,CAAA,OAAM,CAAC,GAAG,YAAY,EAAE,CAAC,CAAC;AAElF,WAAO,OAAO,IAAI,CAAA,OAAM;AACvB,YAAM,aAAa;AAAA,QAClB,WAAW,GAAG;AAAA,QACd,WAAW,GAAG;AAAA,QACd,IAAI,GAAG;AAAA,QACP,MAAM,oBAAoB,GAAG,IAAI;AAAA,QACjC,aAAa,KAAK,kBAAkB,EAAE;AAAA,QACtC,eAAe,GAAG;AAAA,QAClB,YAAY,GAAG;AAAA,QACf,qBAAqBC,cAAAA,eAAe,cAAc,GAAG,UAAU,CAAC;AAAA,MAAA;AAEjE,cAAQ,GAAG,MAAA;AAAA,QACV,KAAKF,MAAAA,UAAU;AACd,kBAAQ,MAAmBG,oBAAAA,yBAAyB,YAAY,EAAE,GAAA;AAAA,QACnE,KAAKH,MAAAA,UAAU;AACd,kBAAQ,MAAmBI,oBAAAA,yBAAyB,YAAY,EAAE,GAAA;AAAA,QACnE,KAAKJ,MAAAA,UAAU;AACd,kBAAQ,MAAmBK,oBAAAA,yBAAyB,YAAY,EAAE,GAAA;AAAA,MAAG;AAEvEC,kBAAAA,YAAc;AAAA,IACf,CAAC;AAAA,EACF;AAAA,EAEQ,kBAAkB,OAA6B;AACtD,YAAQ,MAAM,MAAA;AAAA,MACb,KAAKN,MAAAA,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAKA,MAAAA,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAKA,MAAAA,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D;AACC,eAAOM,YAAAA,YAAiB;AAAA,IAAA;AAAA,EAE3B;AACD;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EventType } from "./types.js";
|
|
2
|
+
import { EventType as EventType$1 } from "../../schema/types.js";
|
|
3
|
+
import "../../schema/dev.graphql.js";
|
|
4
|
+
import "../../schema/system.graphql.js";
|
|
5
|
+
import { assertNever } from "../../utils/assertNever.js";
|
|
6
|
+
import { formatIdentity } from "./identityUtils.js";
|
|
7
|
+
import { appendDeleteSpecificData, appendUpdateSpecificData, appendCreateSpecificData } from "./EventResponseHelper.js";
|
|
8
|
+
class EventResponseBuilder {
|
|
9
|
+
constructor(identityFetcher) {
|
|
10
|
+
this.identityFetcher = identityFetcher;
|
|
11
|
+
}
|
|
12
|
+
async buildResponse(events) {
|
|
13
|
+
const apiEventTypeMapping = {
|
|
14
|
+
[EventType.create]: EventType$1.Create,
|
|
15
|
+
[EventType.update]: EventType$1.Update,
|
|
16
|
+
[EventType.delete]: EventType$1.Delete
|
|
17
|
+
};
|
|
18
|
+
const identityIds = events.map((it) => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index);
|
|
19
|
+
const identities = await this.identityFetcher.fetchIdentities(identityIds);
|
|
20
|
+
const identitiesMap = Object.fromEntries(identities.map((it) => [it.identityId, it]));
|
|
21
|
+
return events.map((it) => {
|
|
22
|
+
const commonData = {
|
|
23
|
+
createdAt: it.createdAt,
|
|
24
|
+
appliedAt: it.appliedAt,
|
|
25
|
+
id: it.id,
|
|
26
|
+
type: apiEventTypeMapping[it.type],
|
|
27
|
+
description: this.formatDescription(it),
|
|
28
|
+
transactionId: it.transactionId,
|
|
29
|
+
identityId: it.identityId,
|
|
30
|
+
identityDescription: formatIdentity(identitiesMap[it.identityId])
|
|
31
|
+
};
|
|
32
|
+
switch (it.type) {
|
|
33
|
+
case EventType.create:
|
|
34
|
+
return (() => appendCreateSpecificData(commonData, it))();
|
|
35
|
+
case EventType.update:
|
|
36
|
+
return (() => appendUpdateSpecificData(commonData, it))();
|
|
37
|
+
case EventType.delete:
|
|
38
|
+
return (() => appendDeleteSpecificData(commonData, it))();
|
|
39
|
+
}
|
|
40
|
+
assertNever();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
formatDescription(event) {
|
|
44
|
+
switch (event.type) {
|
|
45
|
+
case EventType.create:
|
|
46
|
+
return `Creating ${event.tableName}#${event.rowId.join(";")}`;
|
|
47
|
+
case EventType.update:
|
|
48
|
+
return `Updating ${event.tableName}#${event.rowId.join(";")}`;
|
|
49
|
+
case EventType.delete:
|
|
50
|
+
return `Deleting ${event.tableName}#${event.rowId.join(";")}`;
|
|
51
|
+
default:
|
|
52
|
+
return assertNever();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
EventResponseBuilder
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=EventResponseBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseBuilder.js","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseBuilder.ts"],"sourcesContent":["import { ContentEvent, EventType } from './types'\nimport { CreateEvent, DeleteEvent, EventType as ApiEventType, UpdateEvent } from '../../schema'\nimport { assertNever } from '../../utils'\nimport { IdentityFetcher } from '../dependencies'\nimport { formatIdentity } from './identityUtils'\nimport { appendCreateSpecificData, appendDeleteSpecificData, appendUpdateSpecificData } from './EventResponseHelper'\n\nexport class EventResponseBuilder {\n\tconstructor(private readonly identityFetcher: IdentityFetcher) {}\n\n\tpublic async buildResponse(events: ContentEvent[]): Promise<(CreateEvent | DeleteEvent | UpdateEvent)[]> {\n\t\tconst apiEventTypeMapping = {\n\t\t\t[EventType.create]: ApiEventType.Create,\n\t\t\t[EventType.update]: ApiEventType.Update,\n\t\t\t[EventType.delete]: ApiEventType.Delete,\n\t\t}\n\t\tconst identityIds = events.map(it => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index)\n\t\tconst identities = await this.identityFetcher.fetchIdentities(identityIds)\n\t\tconst identitiesMap = Object.fromEntries(identities.map(it => [it.identityId, it]))\n\n\t\treturn events.map(it => {\n\t\t\tconst commonData = {\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\tappliedAt: it.appliedAt,\n\t\t\t\tid: it.id,\n\t\t\t\ttype: apiEventTypeMapping[it.type],\n\t\t\t\tdescription: this.formatDescription(it),\n\t\t\t\ttransactionId: it.transactionId,\n\t\t\t\tidentityId: it.identityId,\n\t\t\t\tidentityDescription: formatIdentity(identitiesMap[it.identityId]),\n\t\t\t}\n\t\t\tswitch (it.type) {\n\t\t\t\tcase EventType.create:\n\t\t\t\t\treturn ((): CreateEvent => appendCreateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.update:\n\t\t\t\t\treturn ((): UpdateEvent => appendUpdateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.delete:\n\t\t\t\t\treturn ((): DeleteEvent => appendDeleteSpecificData(commonData, it))()\n\t\t\t}\n\t\t\tassertNever(it)\n\t\t})\n\t}\n\n\tprivate formatDescription(event: ContentEvent): string {\n\t\tswitch (event.type) {\n\t\t\tcase EventType.create:\n\t\t\t\treturn `Creating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.update:\n\t\t\t\treturn `Updating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.delete:\n\t\t\t\treturn `Deleting ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tdefault:\n\t\t\t\treturn assertNever(event)\n\t\t}\n\t}\n}\n"],"names":["ApiEventType"],"mappings":";;;;;;;AAOO,MAAM,qBAAqB;AAAA,EACjC,YAA6B,iBAAkC;AAAlC,SAAA,kBAAA;AAAA,EAAmC;AAAA,EAEhE,MAAa,cAAc,QAA8E;AACxG,UAAM,sBAAsB;AAAA,MAC3B,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,MACjC,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,MACjC,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,IAAA;AAElC,UAAM,cAAc,OAAO,IAAI,CAAA,OAAM,GAAG,UAAU,EAAE,OAAO,CAAC,IAAI,OAAO,QAAQ,IAAI,QAAQ,EAAE,MAAM,KAAK;AACxG,UAAM,aAAa,MAAM,KAAK,gBAAgB,gBAAgB,WAAW;AACzE,UAAM,gBAAgB,OAAO,YAAY,WAAW,IAAI,CAAA,OAAM,CAAC,GAAG,YAAY,EAAE,CAAC,CAAC;AAElF,WAAO,OAAO,IAAI,CAAA,OAAM;AACvB,YAAM,aAAa;AAAA,QAClB,WAAW,GAAG;AAAA,QACd,WAAW,GAAG;AAAA,QACd,IAAI,GAAG;AAAA,QACP,MAAM,oBAAoB,GAAG,IAAI;AAAA,QACjC,aAAa,KAAK,kBAAkB,EAAE;AAAA,QACtC,eAAe,GAAG;AAAA,QAClB,YAAY,GAAG;AAAA,QACf,qBAAqB,eAAe,cAAc,GAAG,UAAU,CAAC;AAAA,MAAA;AAEjE,cAAQ,GAAG,MAAA;AAAA,QACV,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAA;AAAA,QACnE,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAA;AAAA,QACnE,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAA;AAAA,MAAG;AAEvE,kBAAc;AAAA,IACf,CAAC;AAAA,EACF;AAAA,EAEQ,kBAAkB,OAA6B;AACtD,YAAQ,MAAM,MAAA;AAAA,MACb,KAAK,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAK,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAK,UAAU;AACd,eAAO,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D;AACC,eAAO,YAAiB;AAAA,IAAA;AAAA,EAE3B;AACD;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const appendUpdateSpecificData = (commonData, event) => ({
|
|
4
|
+
...commonData,
|
|
5
|
+
tableName: event.tableName,
|
|
6
|
+
primaryKey: event.rowId,
|
|
7
|
+
diffValues: event.values,
|
|
8
|
+
oldValues: {}
|
|
9
|
+
});
|
|
10
|
+
const appendCreateSpecificData = (commonData, event) => ({
|
|
11
|
+
...commonData,
|
|
12
|
+
tableName: event.tableName,
|
|
13
|
+
primaryKey: event.rowId,
|
|
14
|
+
newValues: event.values
|
|
15
|
+
});
|
|
16
|
+
const appendDeleteSpecificData = (commonData, event) => ({
|
|
17
|
+
...commonData,
|
|
18
|
+
tableName: event.tableName,
|
|
19
|
+
primaryKey: event.rowId,
|
|
20
|
+
oldValues: {}
|
|
21
|
+
});
|
|
22
|
+
exports.appendCreateSpecificData = appendCreateSpecificData;
|
|
23
|
+
exports.appendDeleteSpecificData = appendDeleteSpecificData;
|
|
24
|
+
exports.appendUpdateSpecificData = appendUpdateSpecificData;
|
|
25
|
+
//# sourceMappingURL=EventResponseHelper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseHelper.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseHelper.ts"],"sourcesContent":["import { CreateEvent, DeleteEvent, UpdateEvent } from './types'\n\nexport const appendUpdateSpecificData = <T>(commonData: T, event: UpdateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tdiffValues: event.values,\n\toldValues: {},\n})\n\nexport const appendCreateSpecificData = <T>(commonData: T, event: CreateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tnewValues: event.values,\n})\n\nexport const appendDeleteSpecificData = <T>(commonData: T, event: DeleteEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\toldValues: {},\n})\n"],"names":[],"mappings":";;AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAA;AACZ;AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAClB;AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAA;AACZ;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const appendUpdateSpecificData = (commonData, event) => ({
|
|
2
|
+
...commonData,
|
|
3
|
+
tableName: event.tableName,
|
|
4
|
+
primaryKey: event.rowId,
|
|
5
|
+
diffValues: event.values,
|
|
6
|
+
oldValues: {}
|
|
7
|
+
});
|
|
8
|
+
const appendCreateSpecificData = (commonData, event) => ({
|
|
9
|
+
...commonData,
|
|
10
|
+
tableName: event.tableName,
|
|
11
|
+
primaryKey: event.rowId,
|
|
12
|
+
newValues: event.values
|
|
13
|
+
});
|
|
14
|
+
const appendDeleteSpecificData = (commonData, event) => ({
|
|
15
|
+
...commonData,
|
|
16
|
+
tableName: event.tableName,
|
|
17
|
+
primaryKey: event.rowId,
|
|
18
|
+
oldValues: {}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
appendCreateSpecificData,
|
|
22
|
+
appendDeleteSpecificData,
|
|
23
|
+
appendUpdateSpecificData
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=EventResponseHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseHelper.js","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseHelper.ts"],"sourcesContent":["import { CreateEvent, DeleteEvent, UpdateEvent } from './types'\n\nexport const appendUpdateSpecificData = <T>(commonData: T, event: UpdateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tdiffValues: event.values,\n\toldValues: {},\n})\n\nexport const appendCreateSpecificData = <T>(commonData: T, event: CreateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tnewValues: event.values,\n})\n\nexport const appendDeleteSpecificData = <T>(commonData: T, event: DeleteEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\toldValues: {},\n})\n"],"names":[],"mappings":"AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAA;AACZ;AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAClB;AAEO,MAAM,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAA;AACZ;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const assertNever = require("../../utils/assertNever.cjs");
|
|
4
|
+
const formatIdentity = (identity) => {
|
|
5
|
+
if (!identity) {
|
|
6
|
+
return "(unknown)";
|
|
7
|
+
}
|
|
8
|
+
if (identity.type === "person") {
|
|
9
|
+
return identity.person.name;
|
|
10
|
+
} else if (identity.type === "apiKey") {
|
|
11
|
+
return `API key (${identity.description})`;
|
|
12
|
+
}
|
|
13
|
+
assertNever.assertNever();
|
|
14
|
+
};
|
|
15
|
+
exports.formatIdentity = formatIdentity;
|
|
16
|
+
//# sourceMappingURL=identityUtils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityUtils.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/identityUtils.ts"],"sourcesContent":["import { TenantIdentity } from '../dependencies/tenant/IdentityFetcher'\nimport { assertNever } from '../../utils'\n\nexport const formatIdentity = (identity: TenantIdentity): string => {\n\tif (!identity) {\n\t\treturn '(unknown)'\n\t}\n\tif (identity.type === 'person') {\n\t\treturn identity.person.name\n\t} else if (identity.type === 'apiKey') {\n\t\treturn `API key (${identity.description})`\n\t}\n\tassertNever(identity)\n}\n"],"names":["assertNever"],"mappings":";;;AAGO,MAAM,iBAAiB,CAAC,aAAqC;AACnE,MAAI,CAAC,UAAU;AACd,WAAO;AAAA,EACR;AACA,MAAI,SAAS,SAAS,UAAU;AAC/B,WAAO,SAAS,OAAO;AAAA,EACxB,WAAW,SAAS,SAAS,UAAU;AACtC,WAAO,YAAY,SAAS,WAAW;AAAA,EACxC;AACAA,cAAAA,YAAoB;AACrB;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { assertNever } from "../../utils/assertNever.js";
|
|
2
|
+
const formatIdentity = (identity) => {
|
|
3
|
+
if (!identity) {
|
|
4
|
+
return "(unknown)";
|
|
5
|
+
}
|
|
6
|
+
if (identity.type === "person") {
|
|
7
|
+
return identity.person.name;
|
|
8
|
+
} else if (identity.type === "apiKey") {
|
|
9
|
+
return `API key (${identity.description})`;
|
|
10
|
+
}
|
|
11
|
+
assertNever();
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
formatIdentity
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=identityUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityUtils.js","sources":["../../../../../../packages/engine-system-api/src/model/events/identityUtils.ts"],"sourcesContent":["import { TenantIdentity } from '../dependencies/tenant/IdentityFetcher'\nimport { assertNever } from '../../utils'\n\nexport const formatIdentity = (identity: TenantIdentity): string => {\n\tif (!identity) {\n\t\treturn '(unknown)'\n\t}\n\tif (identity.type === 'person') {\n\t\treturn identity.person.name\n\t} else if (identity.type === 'apiKey') {\n\t\treturn `API key (${identity.description})`\n\t}\n\tassertNever(identity)\n}\n"],"names":[],"mappings":";AAGO,MAAM,iBAAiB,CAAC,aAAqC;AACnE,MAAI,CAAC,UAAU;AACd,WAAO;AAAA,EACR;AACA,MAAI,SAAS,SAAS,UAAU;AAC/B,WAAO,SAAS,OAAO;AAAA,EACxB,WAAW,SAAS,SAAS,UAAU;AACtC,WAAO,YAAY,SAAS,WAAW;AAAA,EACxC;AACA,cAAoB;AACrB;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
6
|
+
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
7
|
+
EventType2["delete"] = "delete";
|
|
8
|
+
EventType2["update"] = "update";
|
|
9
|
+
EventType2["create"] = "create";
|
|
10
|
+
return EventType2;
|
|
11
|
+
})(EventType || {});
|
|
12
|
+
class UpdateEvent {
|
|
13
|
+
constructor(id, createdAt, appliedAt, identityId, transactionId, rowId, tableName, values) {
|
|
14
|
+
this.id = id;
|
|
15
|
+
this.createdAt = createdAt;
|
|
16
|
+
this.appliedAt = appliedAt;
|
|
17
|
+
this.identityId = identityId;
|
|
18
|
+
this.transactionId = transactionId;
|
|
19
|
+
this.rowId = rowId;
|
|
20
|
+
this.tableName = tableName;
|
|
21
|
+
this.values = values;
|
|
22
|
+
__publicField(
|
|
23
|
+
this,
|
|
24
|
+
"type",
|
|
25
|
+
"update"
|
|
26
|
+
/* update */
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
class CreateEvent {
|
|
31
|
+
constructor(id, createdAt, appliedAt, identityId, transactionId, rowId, tableName, values) {
|
|
32
|
+
this.id = id;
|
|
33
|
+
this.createdAt = createdAt;
|
|
34
|
+
this.appliedAt = appliedAt;
|
|
35
|
+
this.identityId = identityId;
|
|
36
|
+
this.transactionId = transactionId;
|
|
37
|
+
this.rowId = rowId;
|
|
38
|
+
this.tableName = tableName;
|
|
39
|
+
this.values = values;
|
|
40
|
+
__publicField(
|
|
41
|
+
this,
|
|
42
|
+
"type",
|
|
43
|
+
"create"
|
|
44
|
+
/* create */
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class DeleteEvent {
|
|
49
|
+
constructor(id, createdAt, appliedAt, identityId, transactionId, rowId, tableName) {
|
|
50
|
+
this.id = id;
|
|
51
|
+
this.createdAt = createdAt;
|
|
52
|
+
this.appliedAt = appliedAt;
|
|
53
|
+
this.identityId = identityId;
|
|
54
|
+
this.transactionId = transactionId;
|
|
55
|
+
this.rowId = rowId;
|
|
56
|
+
this.tableName = tableName;
|
|
57
|
+
__publicField(
|
|
58
|
+
this,
|
|
59
|
+
"type",
|
|
60
|
+
"delete"
|
|
61
|
+
/* delete */
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.CreateEvent = CreateEvent;
|
|
66
|
+
exports.DeleteEvent = DeleteEvent;
|
|
67
|
+
exports.EventType = EventType;
|
|
68
|
+
exports.UpdateEvent = UpdateEvent;
|
|
69
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/types.ts"],"sourcesContent":["export enum EventType {\n\tdelete = 'delete',\n\tupdate = 'update',\n\tcreate = 'create',\n}\n\nexport type ContentEvent = UpdateEvent | CreateEvent | DeleteEvent\n\nexport interface Event {\n\treadonly type: EventType\n\treadonly id: string\n\treadonly createdAt: Date\n\treadonly transactionId: string\n\t// readonly errors?: string[]\n}\n\nexport class UpdateEvent implements Event {\n\tpublic readonly type = EventType.update\n\n\tconstructor(\n\t\tpublic readonly id: string,\n\t\tpublic readonly createdAt: Date,\n\t\tpublic readonly appliedAt: Date,\n\t\tpublic readonly identityId: string,\n\t\tpublic readonly transactionId: string,\n\t\tpublic readonly rowId: string[],\n\t\tpublic readonly tableName: string,\n\t\tpublic readonly values: { [column: string]: any },\n\t) {\n\t}\n}\n\nexport class CreateEvent implements Event {\n\tpublic readonly type = EventType.create\n\n\tconstructor(\n\t\tpublic readonly id: string,\n\t\tpublic readonly createdAt: Date,\n\t\tpublic readonly appliedAt: Date,\n\t\tpublic readonly identityId: string,\n\t\tpublic readonly transactionId: string,\n\t\tpublic readonly rowId: string[],\n\t\tpublic readonly tableName: string,\n\t\tpublic readonly values: { [column: string]: any },\n\t) {\n\t}\n}\n\nexport class DeleteEvent implements Event {\n\tpublic readonly type = EventType.delete\n\n\tconstructor(\n\t\tpublic readonly id: string,\n\t\tpublic readonly createdAt: Date,\n\t\tpublic readonly appliedAt: Date,\n\t\tpublic readonly identityId: string,\n\t\tpublic readonly transactionId: string,\n\t\tpublic readonly rowId: string[],\n\t\tpublic readonly tableName: string,\n\t) {\n\t}\n}\n"],"names":["EventType"],"mappings":";;;;;AAAO,IAAK,8BAAAA,eAAL;AACNA,aAAA,QAAA,IAAS;AACTA,aAAA,QAAA,IAAS;AACTA,aAAA,QAAA,IAAS;AAHE,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAgBL,MAAM,YAA6B;AAAA,EAGzC,YACiB,IACA,WACA,WACA,YACA,eACA,OACA,WACA,QACf;AARe,SAAA,KAAA;AACA,SAAA,YAAA;AACA,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,gBAAA;AACA,SAAA,QAAA;AACA,SAAA,YAAA;AACA,SAAA,SAAA;AAVjB;AAAA,MAAA;AAAA,MAAgB;AAAA,MAAO;AAAA;AAAA,IAAA;AAAA,EAYvB;AACD;AAEO,MAAM,YAA6B;AAAA,EAGzC,YACiB,IACA,WACA,WACA,YACA,eACA,OACA,WACA,QACf;AARe,SAAA,KAAA;AACA,SAAA,YAAA;AACA,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,gBAAA;AACA,SAAA,QAAA;AACA,SAAA,YAAA;AACA,SAAA,SAAA;AAVjB;AAAA,MAAA;AAAA,MAAgB;AAAA,MAAO;AAAA;AAAA,IAAA;AAAA,EAYvB;AACD;AAEO,MAAM,YAA6B;AAAA,EAGzC,YACiB,IACA,WACA,WACA,YACA,eACA,OACA,WACf;AAPe,SAAA,KAAA;AACA,SAAA,YAAA;AACA,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,gBAAA;AACA,SAAA,QAAA;AACA,SAAA,YAAA;AATjB;AAAA,MAAA;AAAA,MAAgB;AAAA,MAAO;AAAA;AAAA,IAAA;AAAA,EAWvB;AACD;;;;;"}
|