@contember/engine-system-api 2.1.0-alpha.36 → 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,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
class SchemaQuery extends Database.DatabaseQuery {
|
|
5
|
+
constructor(currentHash) {
|
|
6
|
+
super();
|
|
7
|
+
this.currentHash = currentHash;
|
|
8
|
+
}
|
|
9
|
+
async fetch(queryable) {
|
|
10
|
+
const query = Database.SelectBuilder.create().from("schema").select(new Database.Literal("*")).where({
|
|
11
|
+
id: "single"
|
|
12
|
+
}).match((it) => {
|
|
13
|
+
if (!this.currentHash) {
|
|
14
|
+
return it;
|
|
15
|
+
}
|
|
16
|
+
return it.where((it2) => it2.raw("checksum != ?", this.currentHash));
|
|
17
|
+
});
|
|
18
|
+
const row = this.fetchOneOrNull(await query.getResult(queryable.db));
|
|
19
|
+
if (!row) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
schema: row.schema,
|
|
24
|
+
meta: {
|
|
25
|
+
checksum: row.checksum,
|
|
26
|
+
version: row.version,
|
|
27
|
+
updatedAt: row.updated_at,
|
|
28
|
+
id: row.migration_id
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SchemaQuery = SchemaQuery;
|
|
34
|
+
//# sourceMappingURL=SchemaQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaQuery.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/queries/schema/SchemaQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\nimport { Schema } from '@contember/schema'\nimport { SchemaWithMeta } from '../../migrations'\n\nexport class SchemaQuery extends DatabaseQuery<SchemaWithMeta | null> {\n\tconstructor(\n\t\tprivate readonly currentHash?: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<SchemaWithMeta | null> {\n\t\tconst query = SelectBuilder.create<{\n\t\t\tschema: Schema\n\t\t\tchecksum: string\n\t\t\tversion: string\n\t\t\tupdated_at: Date\n\t\t\tmigration_id: number\n\t\t}>()\n\t\t\t.from('schema')\n\t\t\t.select(new Literal('*'))\n\t\t\t.where({\n\t\t\t\tid: 'single',\n\t\t\t})\n\t\t\t.match(it => {\n\t\t\t\tif (!this.currentHash) {\n\t\t\t\t\treturn it\n\t\t\t\t}\n\t\t\t\treturn it.where(it => it.raw('checksum != ?', this.currentHash))\n\t\t\t})\n\n\t\tconst row = this.fetchOneOrNull(await query.getResult(queryable.db))\n\t\tif (!row) {\n\t\t\treturn null\n\t\t}\n\t\treturn {\n\t\t\tschema: row.schema,\n\t\t\tmeta: {\n\t\t\t\tchecksum: row.checksum,\n\t\t\t\tversion: row.version,\n\t\t\t\tupdatedAt: row.updated_at,\n\t\t\t\tid: row.migration_id,\n\t\t\t},\n\t\t}\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder","Literal","it"],"mappings":";;;AAIO,MAAM,oBAAoBA,SAAAA,cAAqC;AAAA,EACrE,YACkB,aAChB;AACD,UAAA;AAFiB,SAAA,cAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAA8D;AACzE,UAAM,QAAQC,SAAAA,cAAc,OAAA,EAO1B,KAAK,QAAQ,EACb,OAAO,IAAIC,SAAAA,QAAQ,GAAG,CAAC,EACvB,MAAM;AAAA,MACN,IAAI;AAAA,IAAA,CACJ,EACA,MAAM,CAAA,OAAM;AACZ,UAAI,CAAC,KAAK,aAAa;AACtB,eAAO;AAAA,MACR;AACA,aAAO,GAAG,MAAM,CAAAC,QAAMA,IAAG,IAAI,iBAAiB,KAAK,WAAW,CAAC;AAAA,IAChE,CAAC;AAEF,UAAM,MAAM,KAAK,eAAe,MAAM,MAAM,UAAU,UAAU,EAAE,CAAC;AACnE,QAAI,CAAC,KAAK;AACT,aAAO;AAAA,IACR;AACA,WAAO;AAAA,MACN,QAAQ,IAAI;AAAA,MACZ,MAAM;AAAA,QACL,UAAU,IAAI;AAAA,QACd,SAAS,IAAI;AAAA,QACb,WAAW,IAAI;AAAA,QACf,IAAI,IAAI;AAAA,MAAA;AAAA,IACT;AAAA,EAEF;AACD;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DatabaseQuery, SelectBuilder, Literal } from "@contember/database";
|
|
2
|
+
class SchemaQuery extends DatabaseQuery {
|
|
3
|
+
constructor(currentHash) {
|
|
4
|
+
super();
|
|
5
|
+
this.currentHash = currentHash;
|
|
6
|
+
}
|
|
7
|
+
async fetch(queryable) {
|
|
8
|
+
const query = SelectBuilder.create().from("schema").select(new Literal("*")).where({
|
|
9
|
+
id: "single"
|
|
10
|
+
}).match((it) => {
|
|
11
|
+
if (!this.currentHash) {
|
|
12
|
+
return it;
|
|
13
|
+
}
|
|
14
|
+
return it.where((it2) => it2.raw("checksum != ?", this.currentHash));
|
|
15
|
+
});
|
|
16
|
+
const row = this.fetchOneOrNull(await query.getResult(queryable.db));
|
|
17
|
+
if (!row) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
schema: row.schema,
|
|
22
|
+
meta: {
|
|
23
|
+
checksum: row.checksum,
|
|
24
|
+
version: row.version,
|
|
25
|
+
updatedAt: row.updated_at,
|
|
26
|
+
id: row.migration_id
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
SchemaQuery
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SchemaQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaQuery.js","sources":["../../../../../../../packages/engine-system-api/src/model/queries/schema/SchemaQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\nimport { Schema } from '@contember/schema'\nimport { SchemaWithMeta } from '../../migrations'\n\nexport class SchemaQuery extends DatabaseQuery<SchemaWithMeta | null> {\n\tconstructor(\n\t\tprivate readonly currentHash?: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<SchemaWithMeta | null> {\n\t\tconst query = SelectBuilder.create<{\n\t\t\tschema: Schema\n\t\t\tchecksum: string\n\t\t\tversion: string\n\t\t\tupdated_at: Date\n\t\t\tmigration_id: number\n\t\t}>()\n\t\t\t.from('schema')\n\t\t\t.select(new Literal('*'))\n\t\t\t.where({\n\t\t\t\tid: 'single',\n\t\t\t})\n\t\t\t.match(it => {\n\t\t\t\tif (!this.currentHash) {\n\t\t\t\t\treturn it\n\t\t\t\t}\n\t\t\t\treturn it.where(it => it.raw('checksum != ?', this.currentHash))\n\t\t\t})\n\n\t\tconst row = this.fetchOneOrNull(await query.getResult(queryable.db))\n\t\tif (!row) {\n\t\t\treturn null\n\t\t}\n\t\treturn {\n\t\t\tschema: row.schema,\n\t\t\tmeta: {\n\t\t\t\tchecksum: row.checksum,\n\t\t\t\tversion: row.version,\n\t\t\t\tupdatedAt: row.updated_at,\n\t\t\t\tid: row.migration_id,\n\t\t\t},\n\t\t}\n\t}\n}\n"],"names":["it"],"mappings":";AAIO,MAAM,oBAAoB,cAAqC;AAAA,EACrE,YACkB,aAChB;AACD,UAAA;AAFiB,SAAA,cAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAA8D;AACzE,UAAM,QAAQ,cAAc,OAAA,EAO1B,KAAK,QAAQ,EACb,OAAO,IAAI,QAAQ,GAAG,CAAC,EACvB,MAAM;AAAA,MACN,IAAI;AAAA,IAAA,CACJ,EACA,MAAM,CAAA,OAAM;AACZ,UAAI,CAAC,KAAK,aAAa;AACtB,eAAO;AAAA,MACR;AACA,aAAO,GAAG,MAAM,CAAAA,QAAMA,IAAG,IAAI,iBAAiB,KAAK,WAAW,CAAC;AAAA,IAChE,CAAC;AAEF,UAAM,MAAM,KAAK,eAAe,MAAM,MAAM,UAAU,UAAU,EAAE,CAAC;AACnE,QAAI,CAAC,KAAK;AACT,aAAO;AAAA,IACR;AACA,WAAO;AAAA,MACN,QAAQ,IAAI;AAAA,MACZ,MAAM;AAAA,QACL,UAAU,IAAI;AAAA,QACd,SAAS,IAAI;AAAA,QACb,WAAW,IAAI;AAAA,QACf,IAAI,IAAI;AAAA,MAAA;AAAA,IACT;AAAA,EAEF;AACD;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
const StageQueryFactory = require("./StageQueryFactory.cjs");
|
|
5
|
+
class StageBySlugQuery extends Database.DatabaseQuery {
|
|
6
|
+
constructor(slug) {
|
|
7
|
+
super();
|
|
8
|
+
this.slug = slug;
|
|
9
|
+
}
|
|
10
|
+
async fetch(queryable) {
|
|
11
|
+
let selectBuilder = StageQueryFactory.prepareStageQueryBuilder().where({ slug: this.slug });
|
|
12
|
+
const rows = await selectBuilder.getResult(queryable.db);
|
|
13
|
+
return this.fetchOneOrNull(rows);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.StageBySlugQuery = StageBySlugQuery;
|
|
17
|
+
//# sourceMappingURL=StageBySlugQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageBySlugQuery.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StageBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { prepareStageQueryBuilder } from './StageQueryFactory'\nimport { Stage } from '../../dtos'\n\nclass StageBySlugQuery extends DatabaseQuery<StageBySlugQuery.Result> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<StageBySlugQuery.Result> {\n\t\tlet selectBuilder = prepareStageQueryBuilder().where({ slug: this.slug })\n\n\t\tconst rows = await selectBuilder.getResult(queryable.db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nnamespace StageBySlugQuery {\n\texport type Result = null | Stage\n}\n\nexport { StageBySlugQuery }\n"],"names":["DatabaseQuery","prepareStageQueryBuilder"],"mappings":";;;;AAIA,MAAM,yBAAyBA,SAAAA,cAAuC;AAAA,EACrE,YAA6B,MAAc;AAC1C,UAAA;AAD4B,SAAA,OAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,WAAgE;AAC3E,QAAI,gBAAgBC,kBAAAA,2BAA2B,MAAM,EAAE,MAAM,KAAK,MAAM;AAExE,UAAM,OAAO,MAAM,cAAc,UAAU,UAAU,EAAE;AAEvD,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DatabaseQuery } from "@contember/database";
|
|
2
|
+
import { prepareStageQueryBuilder } from "./StageQueryFactory.js";
|
|
3
|
+
class StageBySlugQuery extends DatabaseQuery {
|
|
4
|
+
constructor(slug) {
|
|
5
|
+
super();
|
|
6
|
+
this.slug = slug;
|
|
7
|
+
}
|
|
8
|
+
async fetch(queryable) {
|
|
9
|
+
let selectBuilder = prepareStageQueryBuilder().where({ slug: this.slug });
|
|
10
|
+
const rows = await selectBuilder.getResult(queryable.db);
|
|
11
|
+
return this.fetchOneOrNull(rows);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
StageBySlugQuery
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=StageBySlugQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageBySlugQuery.js","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StageBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { prepareStageQueryBuilder } from './StageQueryFactory'\nimport { Stage } from '../../dtos'\n\nclass StageBySlugQuery extends DatabaseQuery<StageBySlugQuery.Result> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<StageBySlugQuery.Result> {\n\t\tlet selectBuilder = prepareStageQueryBuilder().where({ slug: this.slug })\n\n\t\tconst rows = await selectBuilder.getResult(queryable.db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nnamespace StageBySlugQuery {\n\texport type Result = null | Stage\n}\n\nexport { StageBySlugQuery }\n"],"names":[],"mappings":";;AAIA,MAAM,yBAAyB,cAAuC;AAAA,EACrE,YAA6B,MAAc;AAC1C,UAAA;AAD4B,SAAA,OAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,WAAgE;AAC3E,QAAI,gBAAgB,2BAA2B,MAAM,EAAE,MAAM,KAAK,MAAM;AAExE,UAAM,OAAO,MAAM,cAAc,UAAU,UAAU,EAAE;AAEvD,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
const prepareStageQueryBuilder = () => {
|
|
5
|
+
return Database.SelectBuilder.create().select("id").select("name").select("slug").select("schema").from("stage");
|
|
6
|
+
};
|
|
7
|
+
exports.prepareStageQueryBuilder = prepareStageQueryBuilder;
|
|
8
|
+
//# sourceMappingURL=StageQueryFactory.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageQueryFactory.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StageQueryFactory.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { Stage } from '../../dtos'\n\nexport const prepareStageQueryBuilder = () => {\n\treturn SelectBuilder.create<Stage>()\n\t\t.select('id')\n\t\t.select('name')\n\t\t.select('slug')\n\t\t.select('schema')\n\t\t.from('stage')\n}\n"],"names":["SelectBuilder"],"mappings":";;;AAGO,MAAM,2BAA2B,MAAM;AAC7C,SAAOA,SAAAA,cAAc,OAAA,EACnB,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,OAAO;AACf;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectBuilder } from "@contember/database";
|
|
2
|
+
const prepareStageQueryBuilder = () => {
|
|
3
|
+
return SelectBuilder.create().select("id").select("name").select("slug").select("schema").from("stage");
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
prepareStageQueryBuilder
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=StageQueryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageQueryFactory.js","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StageQueryFactory.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { Stage } from '../../dtos'\n\nexport const prepareStageQueryBuilder = () => {\n\treturn SelectBuilder.create<Stage>()\n\t\t.select('id')\n\t\t.select('name')\n\t\t.select('slug')\n\t\t.select('schema')\n\t\t.from('stage')\n}\n"],"names":[],"mappings":";AAGO,MAAM,2BAA2B,MAAM;AAC7C,SAAO,cAAc,OAAA,EACnB,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,OAAO;AACf;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
const StageQueryFactory = require("./StageQueryFactory.cjs");
|
|
5
|
+
class StagesQuery extends Database.DatabaseQuery {
|
|
6
|
+
async fetch(queryable) {
|
|
7
|
+
const select = StageQueryFactory.prepareStageQueryBuilder();
|
|
8
|
+
return await select.getResult(queryable.db);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.StagesQuery = StagesQuery;
|
|
12
|
+
//# sourceMappingURL=StagesQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StagesQuery.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StagesQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { prepareStageQueryBuilder } from './StageQueryFactory'\nimport { Stage } from '../../dtos'\n\nclass StagesQuery extends DatabaseQuery<Stage[]> {\n\tasync fetch(queryable: DatabaseQueryable): Promise<Stage[]> {\n\t\tconst select = prepareStageQueryBuilder()\n\n\t\treturn await select.getResult(queryable.db)\n\t}\n}\n\nexport { StagesQuery }\n"],"names":["DatabaseQuery","prepareStageQueryBuilder"],"mappings":";;;;AAIA,MAAM,oBAAoBA,SAAAA,cAAuB;AAAA,EAChD,MAAM,MAAM,WAAgD;AAC3D,UAAM,SAASC,kBAAAA,yBAAA;AAEf,WAAO,MAAM,OAAO,UAAU,UAAU,EAAE;AAAA,EAC3C;AACD;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DatabaseQuery } from "@contember/database";
|
|
2
|
+
import { prepareStageQueryBuilder } from "./StageQueryFactory.js";
|
|
3
|
+
class StagesQuery extends DatabaseQuery {
|
|
4
|
+
async fetch(queryable) {
|
|
5
|
+
const select = prepareStageQueryBuilder();
|
|
6
|
+
return await select.getResult(queryable.db);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
StagesQuery
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=StagesQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StagesQuery.js","sources":["../../../../../../../packages/engine-system-api/src/model/queries/stages/StagesQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { prepareStageQueryBuilder } from './StageQueryFactory'\nimport { Stage } from '../../dtos'\n\nclass StagesQuery extends DatabaseQuery<Stage[]> {\n\tasync fetch(queryable: DatabaseQueryable): Promise<Stage[]> {\n\t\tconst select = prepareStageQueryBuilder()\n\n\t\treturn await select.getResult(queryable.db)\n\t}\n}\n\nexport { StagesQuery }\n"],"names":[],"mappings":";;AAIA,MAAM,oBAAoB,cAAuB;AAAA,EAChD,MAAM,MAAM,WAAgD;AAC3D,UAAM,SAAS,yBAAA;AAEf,WAAO,MAAM,OAAO,UAAU,UAAU,EAAE;AAAA,EAC3C;AACD;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("@contember/database");
|
|
4
|
+
require("@contember/schema-migrations");
|
|
5
|
+
const CreateStageCommand = require("../commands/stages/CreateStageCommand.cjs");
|
|
6
|
+
require("../../schema/dev.graphql.cjs");
|
|
7
|
+
require("../../schema/system.graphql.cjs");
|
|
8
|
+
const StageBySlugQuery = require("../queries/stages/StageBySlugQuery.cjs");
|
|
9
|
+
class StageCreator {
|
|
10
|
+
async createStage(db, stage) {
|
|
11
|
+
const stageRow = await db.queryHandler.fetch(new StageBySlugQuery.StageBySlugQuery(stage.slug));
|
|
12
|
+
if (stageRow) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
await db.commandBus.execute(new CreateStageCommand.CreateStageCommand(stage));
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.StageCreator = StageCreator;
|
|
20
|
+
//# sourceMappingURL=StageCreator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageCreator.cjs","sources":["../../../../../../packages/engine-system-api/src/model/stages/StageCreator.ts"],"sourcesContent":["import { CreateStageCommand } from '../commands'\nimport { StageBySlugQuery } from '../queries'\nimport { StageConfig } from '../../types'\nimport { DatabaseContext } from '../database'\n\nclass StageCreator {\n\tpublic async createStage(\n\t\tdb: DatabaseContext,\n\t\tstage: StageConfig,\n\t): Promise<boolean> {\n\t\tconst stageRow = await db.queryHandler.fetch(new StageBySlugQuery(stage.slug))\n\t\tif (stageRow) {\n\t\t\treturn false\n\t\t}\n\t\tawait db.commandBus.execute(new CreateStageCommand(stage))\n\t\treturn true\n\t}\n}\n\nexport { StageCreator }\n"],"names":["StageBySlugQuery","CreateStageCommand"],"mappings":";;;;;;;;AAKA,MAAM,aAAa;AAAA,EAClB,MAAa,YACZ,IACA,OACmB;AACnB,UAAM,WAAW,MAAM,GAAG,aAAa,MAAM,IAAIA,iBAAAA,iBAAiB,MAAM,IAAI,CAAC;AAC7E,QAAI,UAAU;AACb,aAAO;AAAA,IACR;AACA,UAAM,GAAG,WAAW,QAAQ,IAAIC,mBAAAA,mBAAmB,KAAK,CAAC;AACzD,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "@contember/database";
|
|
2
|
+
import "@contember/schema-migrations";
|
|
3
|
+
import { CreateStageCommand } from "../commands/stages/CreateStageCommand.js";
|
|
4
|
+
import "../../schema/dev.graphql.js";
|
|
5
|
+
import "../../schema/system.graphql.js";
|
|
6
|
+
import { StageBySlugQuery } from "../queries/stages/StageBySlugQuery.js";
|
|
7
|
+
class StageCreator {
|
|
8
|
+
async createStage(db, stage) {
|
|
9
|
+
const stageRow = await db.queryHandler.fetch(new StageBySlugQuery(stage.slug));
|
|
10
|
+
if (stageRow) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
await db.commandBus.execute(new CreateStageCommand(stage));
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
StageCreator
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=StageCreator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageCreator.js","sources":["../../../../../../packages/engine-system-api/src/model/stages/StageCreator.ts"],"sourcesContent":["import { CreateStageCommand } from '../commands'\nimport { StageBySlugQuery } from '../queries'\nimport { StageConfig } from '../../types'\nimport { DatabaseContext } from '../database'\n\nclass StageCreator {\n\tpublic async createStage(\n\t\tdb: DatabaseContext,\n\t\tstage: StageConfig,\n\t): Promise<boolean> {\n\t\tconst stageRow = await db.queryHandler.fetch(new StageBySlugQuery(stage.slug))\n\t\tif (stageRow) {\n\t\t\treturn false\n\t\t}\n\t\tawait db.commandBus.execute(new CreateStageCommand(stage))\n\t\treturn true\n\t}\n}\n\nexport { StageCreator }\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,aAAa;AAAA,EAClB,MAAa,YACZ,IACA,OACmB;AACnB,UAAM,WAAW,MAAM,GAAG,aAAa,MAAM,IAAI,iBAAiB,MAAM,IAAI,CAAC;AAC7E,QAAI,UAAU;AACb,aAAO;AAAA,IACR;AACA,UAAM,GAAG,WAAW,QAAQ,IAAI,mBAAmB,KAAK,CAAC;AACzD,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const types = require("../schema/types.cjs");
|
|
4
|
+
require("../schema/dev.graphql.cjs");
|
|
5
|
+
require("../schema/system.graphql.cjs");
|
|
6
|
+
const assertNever = require("../utils/assertNever.cjs");
|
|
7
|
+
const graphqlUtils = require("@contember/graphql-utils");
|
|
8
|
+
const graphql = require("graphql");
|
|
9
|
+
class ResolverFactory {
|
|
10
|
+
constructor(stagesQueryResolver, executedMigrationsQueryResolver, migrateMutationResolver, truncateMutationResolver, migrationAlterMutationResolver, eventsQueryResolver, eventOldValuesResolver, schemaQueryResolver) {
|
|
11
|
+
this.stagesQueryResolver = stagesQueryResolver;
|
|
12
|
+
this.executedMigrationsQueryResolver = executedMigrationsQueryResolver;
|
|
13
|
+
this.migrateMutationResolver = migrateMutationResolver;
|
|
14
|
+
this.truncateMutationResolver = truncateMutationResolver;
|
|
15
|
+
this.migrationAlterMutationResolver = migrationAlterMutationResolver;
|
|
16
|
+
this.eventsQueryResolver = eventsQueryResolver;
|
|
17
|
+
this.eventOldValuesResolver = eventOldValuesResolver;
|
|
18
|
+
this.schemaQueryResolver = schemaQueryResolver;
|
|
19
|
+
}
|
|
20
|
+
create(debugMode) {
|
|
21
|
+
const resolvers = {
|
|
22
|
+
DateTime: graphqlUtils.DateTimeType,
|
|
23
|
+
Json: graphqlUtils.JSONType,
|
|
24
|
+
PrimaryKey: PrimaryKeyType,
|
|
25
|
+
Schema: SchemaType,
|
|
26
|
+
Event: {
|
|
27
|
+
__resolveType: (obj) => {
|
|
28
|
+
switch (obj.type) {
|
|
29
|
+
case types.EventType.Create:
|
|
30
|
+
return "CreateEvent";
|
|
31
|
+
case types.EventType.Update:
|
|
32
|
+
return "UpdateEvent";
|
|
33
|
+
case types.EventType.Delete:
|
|
34
|
+
return "DeleteEvent";
|
|
35
|
+
case null:
|
|
36
|
+
case void 0:
|
|
37
|
+
return null;
|
|
38
|
+
default:
|
|
39
|
+
return assertNever.assertNever(obj.type);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
Query: {
|
|
44
|
+
stages: this.stagesQueryResolver.stages.bind(this.stagesQueryResolver),
|
|
45
|
+
executedMigrations: this.executedMigrationsQueryResolver.executedMigrations.bind(this.executedMigrationsQueryResolver),
|
|
46
|
+
events: this.eventsQueryResolver.events.bind(this.eventsQueryResolver),
|
|
47
|
+
schema: this.schemaQueryResolver.schema.bind(this.schemaQueryResolver)
|
|
48
|
+
},
|
|
49
|
+
Mutation: {
|
|
50
|
+
migrate: this.migrateMutationResolver.migrate.bind(this.migrateMutationResolver)
|
|
51
|
+
},
|
|
52
|
+
DeleteEvent: {
|
|
53
|
+
oldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver)
|
|
54
|
+
},
|
|
55
|
+
UpdateEvent: {
|
|
56
|
+
oldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver)
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
if (debugMode) {
|
|
60
|
+
resolvers.Mutation.truncate = this.truncateMutationResolver.truncate.bind(this.truncateMutationResolver);
|
|
61
|
+
resolvers.Mutation.migrationDelete = this.migrationAlterMutationResolver.migrationDelete.bind(this.migrationAlterMutationResolver);
|
|
62
|
+
resolvers.Mutation.migrationModify = this.migrationAlterMutationResolver.migrationModify.bind(this.migrationAlterMutationResolver);
|
|
63
|
+
resolvers.Mutation.forceMigrate = this.migrateMutationResolver.migrateForce.bind(this.migrateMutationResolver);
|
|
64
|
+
}
|
|
65
|
+
return resolvers;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const parseValue = (value) => {
|
|
69
|
+
if (typeof value === "string" && value !== "" || typeof value === "number" && Number.isFinite(value) && Math.floor(value) === value) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
throw new graphql.GraphQLError("PrimaryKey cannot represent value: " + JSON.stringify(value));
|
|
73
|
+
};
|
|
74
|
+
const SchemaType = graphqlUtils.createJsonLikeType("Schema", "Content schema custom scalar type");
|
|
75
|
+
const PrimaryKeyType = new graphql.GraphQLScalarType({
|
|
76
|
+
name: "PrimaryKey",
|
|
77
|
+
description: "PrimaryKey custom scalar type. Can be Int or String",
|
|
78
|
+
serialize: parseValue,
|
|
79
|
+
parseValue,
|
|
80
|
+
parseLiteral(ast) {
|
|
81
|
+
if (ast.kind === graphql.Kind.STRING) {
|
|
82
|
+
return ast.value;
|
|
83
|
+
}
|
|
84
|
+
if (ast.kind === graphql.Kind.INT) {
|
|
85
|
+
return Number.parseInt(ast.value, 10);
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
exports.PrimaryKeyType = PrimaryKeyType;
|
|
91
|
+
exports.ResolverFactory = ResolverFactory;
|
|
92
|
+
//# sourceMappingURL=ResolverFactory.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolverFactory.cjs","sources":["../../../../../packages/engine-system-api/src/resolvers/ResolverFactory.ts"],"sourcesContent":["import { EventsQueryResolver, ExecutedMigrationsQueryResolver, StagesQueryResolver } from './query'\nimport { Event, EventType, Resolvers } from '../schema'\nimport { assertNever } from '../utils'\nimport { MigrateMutationResolver, MigrationAlterMutationResolver, TruncateMutationResolver } from './mutation'\nimport { createJsonLikeType, DateTimeType, JSONType } from '@contember/graphql-utils'\nimport { EventOldValuesResolver } from './types'\nimport { GraphQLError, GraphQLScalarType, Kind } from 'graphql'\nimport { SchemaQueryResolver } from './query/SchemaQueryResolver'\n\nexport class ResolverFactory {\n\tpublic constructor(\n\t\tprivate readonly stagesQueryResolver: StagesQueryResolver,\n\t\tprivate readonly executedMigrationsQueryResolver: ExecutedMigrationsQueryResolver,\n\t\tprivate readonly migrateMutationResolver: MigrateMutationResolver,\n\t\tprivate readonly truncateMutationResolver: TruncateMutationResolver,\n\t\tprivate readonly migrationAlterMutationResolver: MigrationAlterMutationResolver,\n\t\tprivate readonly eventsQueryResolver: EventsQueryResolver,\n\t\tprivate readonly eventOldValuesResolver: EventOldValuesResolver,\n\t\tprivate readonly schemaQueryResolver: SchemaQueryResolver,\n\t) {}\n\n\tcreate(debugMode: boolean): Resolvers {\n\t\tconst resolvers: Resolvers & Required<Pick<Resolvers, 'Mutation'>> = {\n\t\t\tDateTime: DateTimeType,\n\t\t\tJson: JSONType,\n\t\t\tPrimaryKey: PrimaryKeyType,\n\t\t\tSchema: SchemaType,\n\t\t\tEvent: {\n\t\t\t\t__resolveType: (obj: Event) => {\n\t\t\t\t\tswitch (obj.type) {\n\t\t\t\t\t\tcase EventType.Create:\n\t\t\t\t\t\t\treturn 'CreateEvent'\n\t\t\t\t\t\tcase EventType.Update:\n\t\t\t\t\t\t\treturn 'UpdateEvent'\n\t\t\t\t\t\tcase EventType.Delete:\n\t\t\t\t\t\t\treturn 'DeleteEvent'\n\t\t\t\t\t\tcase null:\n\t\t\t\t\t\tcase undefined:\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn assertNever(obj.type)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\tQuery: {\n\t\t\t\tstages: this.stagesQueryResolver.stages.bind(this.stagesQueryResolver),\n\t\t\t\texecutedMigrations: this.executedMigrationsQueryResolver.executedMigrations.bind(this.executedMigrationsQueryResolver),\n\t\t\t\tevents: this.eventsQueryResolver.events.bind(this.eventsQueryResolver),\n\t\t\t\tschema: this.schemaQueryResolver.schema.bind(this.schemaQueryResolver),\n\t\t\t},\n\t\t\tMutation: {\n\t\t\t\tmigrate: this.migrateMutationResolver.migrate.bind(this.migrateMutationResolver),\n\t\t\t},\n\t\t\tDeleteEvent: {\n\t\t\t\toldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver),\n\t\t\t},\n\t\t\tUpdateEvent: {\n\t\t\t\toldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver),\n\t\t\t},\n\t\t}\n\t\tif (debugMode) {\n\t\t\tresolvers.Mutation.truncate = this.truncateMutationResolver.truncate.bind(this.truncateMutationResolver)\n\t\t\tresolvers.Mutation.migrationDelete = this.migrationAlterMutationResolver.migrationDelete.bind(this.migrationAlterMutationResolver)\n\t\t\tresolvers.Mutation.migrationModify = this.migrationAlterMutationResolver.migrationModify.bind(this.migrationAlterMutationResolver)\n\t\t\tresolvers.Mutation.forceMigrate = this.migrateMutationResolver.migrateForce.bind(this.migrateMutationResolver)\n\t\t}\n\t\treturn resolvers\n\t}\n}\n\nconst parseValue = (value: any) => {\n\tif ((typeof value === 'string' && value !== '') || typeof value === 'number' && Number.isFinite(value) && Math.floor(value) === value) {\n\t\treturn value\n\t}\n\tthrow new GraphQLError('PrimaryKey cannot represent value: ' + JSON.stringify(value))\n}\n\nconst SchemaType = createJsonLikeType('Schema', 'Content schema custom scalar type')\n\nexport const PrimaryKeyType = new GraphQLScalarType({\n\tname: 'PrimaryKey',\n\tdescription: 'PrimaryKey custom scalar type. Can be Int or String',\n\tserialize: parseValue,\n\tparseValue: parseValue,\n\tparseLiteral(ast) {\n\t\tif (ast.kind === Kind.STRING) {\n\t\t\treturn ast.value\n\t\t}\n\t\tif (ast.kind === Kind.INT) {\n\t\t\treturn Number.parseInt(ast.value, 10)\n\t\t}\n\t\treturn null\n\t},\n})\n"],"names":["DateTimeType","JSONType","EventType","assertNever","GraphQLError","createJsonLikeType","GraphQLScalarType","Kind"],"mappings":";;;;;;;;AASO,MAAM,gBAAgB;AAAA,EACrB,YACW,qBACA,iCACA,yBACA,0BACA,gCACA,qBACA,wBACA,qBAChB;AARgB,SAAA,sBAAA;AACA,SAAA,kCAAA;AACA,SAAA,0BAAA;AACA,SAAA,2BAAA;AACA,SAAA,iCAAA;AACA,SAAA,sBAAA;AACA,SAAA,yBAAA;AACA,SAAA,sBAAA;AAAA,EACf;AAAA,EAEH,OAAO,WAA+B;AACrC,UAAM,YAA+D;AAAA,MACpE,UAAUA,aAAAA;AAAAA,MACV,MAAMC,aAAAA;AAAAA,MACN,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,OAAO;AAAA,QACN,eAAe,CAAC,QAAe;AAC9B,kBAAQ,IAAI,MAAA;AAAA,YACX,KAAKC,MAAAA,UAAU;AACd,qBAAO;AAAA,YACR,KAAKA,MAAAA,UAAU;AACd,qBAAO;AAAA,YACR,KAAKA,MAAAA,UAAU;AACd,qBAAO;AAAA,YACR,KAAK;AAAA,YACL,KAAK;AACJ,qBAAO;AAAA,YACR;AACC,qBAAOC,YAAAA,YAAY,IAAI,IAAI;AAAA,UAAA;AAAA,QAE9B;AAAA,MAAA;AAAA,MAED,OAAO;AAAA,QACN,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,QACrE,oBAAoB,KAAK,gCAAgC,mBAAmB,KAAK,KAAK,+BAA+B;AAAA,QACrH,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,QACrE,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,MAAA;AAAA,MAEtE,UAAU;AAAA,QACT,SAAS,KAAK,wBAAwB,QAAQ,KAAK,KAAK,uBAAuB;AAAA,MAAA;AAAA,MAEhF,aAAa;AAAA,QACZ,WAAW,KAAK,uBAAuB,UAAU,KAAK,KAAK,sBAAsB;AAAA,MAAA;AAAA,MAElF,aAAa;AAAA,QACZ,WAAW,KAAK,uBAAuB,UAAU,KAAK,KAAK,sBAAsB;AAAA,MAAA;AAAA,IAClF;AAED,QAAI,WAAW;AACd,gBAAU,SAAS,WAAW,KAAK,yBAAyB,SAAS,KAAK,KAAK,wBAAwB;AACvG,gBAAU,SAAS,kBAAkB,KAAK,+BAA+B,gBAAgB,KAAK,KAAK,8BAA8B;AACjI,gBAAU,SAAS,kBAAkB,KAAK,+BAA+B,gBAAgB,KAAK,KAAK,8BAA8B;AACjI,gBAAU,SAAS,eAAe,KAAK,wBAAwB,aAAa,KAAK,KAAK,uBAAuB;AAAA,IAC9G;AACA,WAAO;AAAA,EACR;AACD;AAEA,MAAM,aAAa,CAAC,UAAe;AAClC,MAAK,OAAO,UAAU,YAAY,UAAU,MAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,KAAK,MAAM,KAAK,MAAM,OAAO;AACtI,WAAO;AAAA,EACR;AACA,QAAM,IAAIC,QAAAA,aAAa,wCAAwC,KAAK,UAAU,KAAK,CAAC;AACrF;AAEA,MAAM,aAAaC,aAAAA,mBAAmB,UAAU,mCAAmC;AAE5E,MAAM,iBAAiB,IAAIC,QAAAA,kBAAkB;AAAA,EACnD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EACA,aAAa,KAAK;AACjB,QAAI,IAAI,SAASC,QAAAA,KAAK,QAAQ;AAC7B,aAAO,IAAI;AAAA,IACZ;AACA,QAAI,IAAI,SAASA,QAAAA,KAAK,KAAK;AAC1B,aAAO,OAAO,SAAS,IAAI,OAAO,EAAE;AAAA,IACrC;AACA,WAAO;AAAA,EACR;AACD,CAAC;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { EventType } from "../schema/types.js";
|
|
2
|
+
import "../schema/dev.graphql.js";
|
|
3
|
+
import "../schema/system.graphql.js";
|
|
4
|
+
import { assertNever } from "../utils/assertNever.js";
|
|
5
|
+
import { createJsonLikeType, JSONType, DateTimeType } from "@contember/graphql-utils";
|
|
6
|
+
import { GraphQLScalarType, Kind, GraphQLError } from "graphql";
|
|
7
|
+
class ResolverFactory {
|
|
8
|
+
constructor(stagesQueryResolver, executedMigrationsQueryResolver, migrateMutationResolver, truncateMutationResolver, migrationAlterMutationResolver, eventsQueryResolver, eventOldValuesResolver, schemaQueryResolver) {
|
|
9
|
+
this.stagesQueryResolver = stagesQueryResolver;
|
|
10
|
+
this.executedMigrationsQueryResolver = executedMigrationsQueryResolver;
|
|
11
|
+
this.migrateMutationResolver = migrateMutationResolver;
|
|
12
|
+
this.truncateMutationResolver = truncateMutationResolver;
|
|
13
|
+
this.migrationAlterMutationResolver = migrationAlterMutationResolver;
|
|
14
|
+
this.eventsQueryResolver = eventsQueryResolver;
|
|
15
|
+
this.eventOldValuesResolver = eventOldValuesResolver;
|
|
16
|
+
this.schemaQueryResolver = schemaQueryResolver;
|
|
17
|
+
}
|
|
18
|
+
create(debugMode) {
|
|
19
|
+
const resolvers = {
|
|
20
|
+
DateTime: DateTimeType,
|
|
21
|
+
Json: JSONType,
|
|
22
|
+
PrimaryKey: PrimaryKeyType,
|
|
23
|
+
Schema: SchemaType,
|
|
24
|
+
Event: {
|
|
25
|
+
__resolveType: (obj) => {
|
|
26
|
+
switch (obj.type) {
|
|
27
|
+
case EventType.Create:
|
|
28
|
+
return "CreateEvent";
|
|
29
|
+
case EventType.Update:
|
|
30
|
+
return "UpdateEvent";
|
|
31
|
+
case EventType.Delete:
|
|
32
|
+
return "DeleteEvent";
|
|
33
|
+
case null:
|
|
34
|
+
case void 0:
|
|
35
|
+
return null;
|
|
36
|
+
default:
|
|
37
|
+
return assertNever(obj.type);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
Query: {
|
|
42
|
+
stages: this.stagesQueryResolver.stages.bind(this.stagesQueryResolver),
|
|
43
|
+
executedMigrations: this.executedMigrationsQueryResolver.executedMigrations.bind(this.executedMigrationsQueryResolver),
|
|
44
|
+
events: this.eventsQueryResolver.events.bind(this.eventsQueryResolver),
|
|
45
|
+
schema: this.schemaQueryResolver.schema.bind(this.schemaQueryResolver)
|
|
46
|
+
},
|
|
47
|
+
Mutation: {
|
|
48
|
+
migrate: this.migrateMutationResolver.migrate.bind(this.migrateMutationResolver)
|
|
49
|
+
},
|
|
50
|
+
DeleteEvent: {
|
|
51
|
+
oldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver)
|
|
52
|
+
},
|
|
53
|
+
UpdateEvent: {
|
|
54
|
+
oldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver)
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
if (debugMode) {
|
|
58
|
+
resolvers.Mutation.truncate = this.truncateMutationResolver.truncate.bind(this.truncateMutationResolver);
|
|
59
|
+
resolvers.Mutation.migrationDelete = this.migrationAlterMutationResolver.migrationDelete.bind(this.migrationAlterMutationResolver);
|
|
60
|
+
resolvers.Mutation.migrationModify = this.migrationAlterMutationResolver.migrationModify.bind(this.migrationAlterMutationResolver);
|
|
61
|
+
resolvers.Mutation.forceMigrate = this.migrateMutationResolver.migrateForce.bind(this.migrateMutationResolver);
|
|
62
|
+
}
|
|
63
|
+
return resolvers;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const parseValue = (value) => {
|
|
67
|
+
if (typeof value === "string" && value !== "" || typeof value === "number" && Number.isFinite(value) && Math.floor(value) === value) {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
throw new GraphQLError("PrimaryKey cannot represent value: " + JSON.stringify(value));
|
|
71
|
+
};
|
|
72
|
+
const SchemaType = createJsonLikeType("Schema", "Content schema custom scalar type");
|
|
73
|
+
const PrimaryKeyType = new GraphQLScalarType({
|
|
74
|
+
name: "PrimaryKey",
|
|
75
|
+
description: "PrimaryKey custom scalar type. Can be Int or String",
|
|
76
|
+
serialize: parseValue,
|
|
77
|
+
parseValue,
|
|
78
|
+
parseLiteral(ast) {
|
|
79
|
+
if (ast.kind === Kind.STRING) {
|
|
80
|
+
return ast.value;
|
|
81
|
+
}
|
|
82
|
+
if (ast.kind === Kind.INT) {
|
|
83
|
+
return Number.parseInt(ast.value, 10);
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
export {
|
|
89
|
+
PrimaryKeyType,
|
|
90
|
+
ResolverFactory
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=ResolverFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolverFactory.js","sources":["../../../../../packages/engine-system-api/src/resolvers/ResolverFactory.ts"],"sourcesContent":["import { EventsQueryResolver, ExecutedMigrationsQueryResolver, StagesQueryResolver } from './query'\nimport { Event, EventType, Resolvers } from '../schema'\nimport { assertNever } from '../utils'\nimport { MigrateMutationResolver, MigrationAlterMutationResolver, TruncateMutationResolver } from './mutation'\nimport { createJsonLikeType, DateTimeType, JSONType } from '@contember/graphql-utils'\nimport { EventOldValuesResolver } from './types'\nimport { GraphQLError, GraphQLScalarType, Kind } from 'graphql'\nimport { SchemaQueryResolver } from './query/SchemaQueryResolver'\n\nexport class ResolverFactory {\n\tpublic constructor(\n\t\tprivate readonly stagesQueryResolver: StagesQueryResolver,\n\t\tprivate readonly executedMigrationsQueryResolver: ExecutedMigrationsQueryResolver,\n\t\tprivate readonly migrateMutationResolver: MigrateMutationResolver,\n\t\tprivate readonly truncateMutationResolver: TruncateMutationResolver,\n\t\tprivate readonly migrationAlterMutationResolver: MigrationAlterMutationResolver,\n\t\tprivate readonly eventsQueryResolver: EventsQueryResolver,\n\t\tprivate readonly eventOldValuesResolver: EventOldValuesResolver,\n\t\tprivate readonly schemaQueryResolver: SchemaQueryResolver,\n\t) {}\n\n\tcreate(debugMode: boolean): Resolvers {\n\t\tconst resolvers: Resolvers & Required<Pick<Resolvers, 'Mutation'>> = {\n\t\t\tDateTime: DateTimeType,\n\t\t\tJson: JSONType,\n\t\t\tPrimaryKey: PrimaryKeyType,\n\t\t\tSchema: SchemaType,\n\t\t\tEvent: {\n\t\t\t\t__resolveType: (obj: Event) => {\n\t\t\t\t\tswitch (obj.type) {\n\t\t\t\t\t\tcase EventType.Create:\n\t\t\t\t\t\t\treturn 'CreateEvent'\n\t\t\t\t\t\tcase EventType.Update:\n\t\t\t\t\t\t\treturn 'UpdateEvent'\n\t\t\t\t\t\tcase EventType.Delete:\n\t\t\t\t\t\t\treturn 'DeleteEvent'\n\t\t\t\t\t\tcase null:\n\t\t\t\t\t\tcase undefined:\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn assertNever(obj.type)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\tQuery: {\n\t\t\t\tstages: this.stagesQueryResolver.stages.bind(this.stagesQueryResolver),\n\t\t\t\texecutedMigrations: this.executedMigrationsQueryResolver.executedMigrations.bind(this.executedMigrationsQueryResolver),\n\t\t\t\tevents: this.eventsQueryResolver.events.bind(this.eventsQueryResolver),\n\t\t\t\tschema: this.schemaQueryResolver.schema.bind(this.schemaQueryResolver),\n\t\t\t},\n\t\t\tMutation: {\n\t\t\t\tmigrate: this.migrateMutationResolver.migrate.bind(this.migrateMutationResolver),\n\t\t\t},\n\t\t\tDeleteEvent: {\n\t\t\t\toldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver),\n\t\t\t},\n\t\t\tUpdateEvent: {\n\t\t\t\toldValues: this.eventOldValuesResolver.oldValues.bind(this.eventOldValuesResolver),\n\t\t\t},\n\t\t}\n\t\tif (debugMode) {\n\t\t\tresolvers.Mutation.truncate = this.truncateMutationResolver.truncate.bind(this.truncateMutationResolver)\n\t\t\tresolvers.Mutation.migrationDelete = this.migrationAlterMutationResolver.migrationDelete.bind(this.migrationAlterMutationResolver)\n\t\t\tresolvers.Mutation.migrationModify = this.migrationAlterMutationResolver.migrationModify.bind(this.migrationAlterMutationResolver)\n\t\t\tresolvers.Mutation.forceMigrate = this.migrateMutationResolver.migrateForce.bind(this.migrateMutationResolver)\n\t\t}\n\t\treturn resolvers\n\t}\n}\n\nconst parseValue = (value: any) => {\n\tif ((typeof value === 'string' && value !== '') || typeof value === 'number' && Number.isFinite(value) && Math.floor(value) === value) {\n\t\treturn value\n\t}\n\tthrow new GraphQLError('PrimaryKey cannot represent value: ' + JSON.stringify(value))\n}\n\nconst SchemaType = createJsonLikeType('Schema', 'Content schema custom scalar type')\n\nexport const PrimaryKeyType = new GraphQLScalarType({\n\tname: 'PrimaryKey',\n\tdescription: 'PrimaryKey custom scalar type. Can be Int or String',\n\tserialize: parseValue,\n\tparseValue: parseValue,\n\tparseLiteral(ast) {\n\t\tif (ast.kind === Kind.STRING) {\n\t\t\treturn ast.value\n\t\t}\n\t\tif (ast.kind === Kind.INT) {\n\t\t\treturn Number.parseInt(ast.value, 10)\n\t\t}\n\t\treturn null\n\t},\n})\n"],"names":[],"mappings":";;;;;;AASO,MAAM,gBAAgB;AAAA,EACrB,YACW,qBACA,iCACA,yBACA,0BACA,gCACA,qBACA,wBACA,qBAChB;AARgB,SAAA,sBAAA;AACA,SAAA,kCAAA;AACA,SAAA,0BAAA;AACA,SAAA,2BAAA;AACA,SAAA,iCAAA;AACA,SAAA,sBAAA;AACA,SAAA,yBAAA;AACA,SAAA,sBAAA;AAAA,EACf;AAAA,EAEH,OAAO,WAA+B;AACrC,UAAM,YAA+D;AAAA,MACpE,UAAU;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,OAAO;AAAA,QACN,eAAe,CAAC,QAAe;AAC9B,kBAAQ,IAAI,MAAA;AAAA,YACX,KAAK,UAAU;AACd,qBAAO;AAAA,YACR,KAAK,UAAU;AACd,qBAAO;AAAA,YACR,KAAK,UAAU;AACd,qBAAO;AAAA,YACR,KAAK;AAAA,YACL,KAAK;AACJ,qBAAO;AAAA,YACR;AACC,qBAAO,YAAY,IAAI,IAAI;AAAA,UAAA;AAAA,QAE9B;AAAA,MAAA;AAAA,MAED,OAAO;AAAA,QACN,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,QACrE,oBAAoB,KAAK,gCAAgC,mBAAmB,KAAK,KAAK,+BAA+B;AAAA,QACrH,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,QACrE,QAAQ,KAAK,oBAAoB,OAAO,KAAK,KAAK,mBAAmB;AAAA,MAAA;AAAA,MAEtE,UAAU;AAAA,QACT,SAAS,KAAK,wBAAwB,QAAQ,KAAK,KAAK,uBAAuB;AAAA,MAAA;AAAA,MAEhF,aAAa;AAAA,QACZ,WAAW,KAAK,uBAAuB,UAAU,KAAK,KAAK,sBAAsB;AAAA,MAAA;AAAA,MAElF,aAAa;AAAA,QACZ,WAAW,KAAK,uBAAuB,UAAU,KAAK,KAAK,sBAAsB;AAAA,MAAA;AAAA,IAClF;AAED,QAAI,WAAW;AACd,gBAAU,SAAS,WAAW,KAAK,yBAAyB,SAAS,KAAK,KAAK,wBAAwB;AACvG,gBAAU,SAAS,kBAAkB,KAAK,+BAA+B,gBAAgB,KAAK,KAAK,8BAA8B;AACjI,gBAAU,SAAS,kBAAkB,KAAK,+BAA+B,gBAAgB,KAAK,KAAK,8BAA8B;AACjI,gBAAU,SAAS,eAAe,KAAK,wBAAwB,aAAa,KAAK,KAAK,uBAAuB;AAAA,IAC9G;AACA,WAAO;AAAA,EACR;AACD;AAEA,MAAM,aAAa,CAAC,UAAe;AAClC,MAAK,OAAO,UAAU,YAAY,UAAU,MAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,KAAK,MAAM,KAAK,MAAM,OAAO;AACtI,WAAO;AAAA,EACR;AACA,QAAM,IAAI,aAAa,wCAAwC,KAAK,UAAU,KAAK,CAAC;AACrF;AAEA,MAAM,aAAa,mBAAmB,UAAU,mCAAmC;AAE5E,MAAM,iBAAiB,IAAI,kBAAkB;AAAA,EACnD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EACA,aAAa,KAAK;AACjB,QAAI,IAAI,SAAS,KAAK,QAAQ;AAC7B,aAAO,IAAI;AAAA,IACZ;AACA,QAAI,IAAI,SAAS,KAAK,KAAK;AAC1B,aAAO,OAAO,SAAS,IAAI,OAAO,EAAE;AAAA,IACrC;AACA,WAAO;AAAA,EACR;AACD,CAAC;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const graphqlUtils = require("@contember/graphql-utils");
|
|
4
|
+
const StagePermissionsFactory = require("../model/authorization/StagePermissionsFactory.cjs");
|
|
5
|
+
const StageScope = require("../model/authorization/StageScope.cjs");
|
|
6
|
+
class SystemResolverContextFactory {
|
|
7
|
+
constructor(authorizator) {
|
|
8
|
+
this.authorizator = authorizator;
|
|
9
|
+
}
|
|
10
|
+
async create({ getSchema, identity, project, db }) {
|
|
11
|
+
const stagePermissionsFactory = new StagePermissionsFactory.StagePermissionsFactory(getSchema);
|
|
12
|
+
const loaders = /* @__PURE__ */ new Map();
|
|
13
|
+
return {
|
|
14
|
+
project,
|
|
15
|
+
identity,
|
|
16
|
+
getSchema,
|
|
17
|
+
authorizator: this.authorizator,
|
|
18
|
+
db,
|
|
19
|
+
requireAccess: async (action, stage, message) => {
|
|
20
|
+
if (!await this.authorizator.isAllowed(identity, new StageScope.StageScope(stage, stagePermissionsFactory), action)) {
|
|
21
|
+
throw new graphqlUtils.ForbiddenError(message || "Forbidden");
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
getLoader: (loaderFactory) => {
|
|
25
|
+
const loader = loaders.get(loaderFactory);
|
|
26
|
+
if (loader) {
|
|
27
|
+
return loader;
|
|
28
|
+
}
|
|
29
|
+
const newLoader = loaderFactory(db);
|
|
30
|
+
loaders.set(loaderFactory, newLoader);
|
|
31
|
+
return newLoader;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.SystemResolverContextFactory = SystemResolverContextFactory;
|
|
37
|
+
//# sourceMappingURL=SystemResolverContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemResolverContext.cjs","sources":["../../../../../packages/engine-system-api/src/resolvers/SystemResolverContext.ts"],"sourcesContent":["import { Authorizator } from '@contember/authorization'\nimport { ForbiddenError } from '@contember/graphql-utils'\nimport { DatabaseContext, Identity } from '../model'\nimport { ProjectConfig } from '../types'\nimport { StagePermissionsFactory } from '../model/authorization/StagePermissionsFactory'\nimport { StageScope } from '../model/authorization/StageScope'\nimport { ItemLoader } from '../utils/batchQuery'\nimport { SchemaGetter } from '../model/SchemaGetter'\n\nexport class SystemResolverContextFactory {\n\tconstructor(\n\t\tprivate readonly authorizator: Authorizator<Identity>,\n\t) {}\n\n\tpublic async create(\n\t\t{ getSchema, identity, project, db }: Pick<SystemResolverContext, 'getSchema' | 'db' | 'identity' | 'project'>,\n\t): Promise<SystemResolverContext> {\n\t\tconst stagePermissionsFactory = new StagePermissionsFactory(getSchema)\n\t\tconst loaders = new Map<LoaderFactory<any, any>, ItemLoader<any, any>>()\n\t\treturn {\n\t\t\tproject,\n\t\t\tidentity,\n\t\t\tgetSchema,\n\t\t\tauthorizator: this.authorizator,\n\t\t\tdb,\n\t\t\trequireAccess: async (action, stage, message?) => {\n\t\t\t\tif (!(await this.authorizator.isAllowed(identity, new StageScope(stage, stagePermissionsFactory), action))) {\n\t\t\t\t\tthrow new ForbiddenError(message || 'Forbidden')\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetLoader: loaderFactory => {\n\t\t\t\tconst loader = loaders.get(loaderFactory)\n\t\t\t\tif (loader) {\n\t\t\t\t\treturn loader\n\t\t\t\t}\n\t\t\t\tconst newLoader = loaderFactory(db)\n\t\t\t\tloaders.set(loaderFactory, newLoader)\n\t\t\t\treturn newLoader\n\t\t\t},\n\t\t}\n\t}\n}\n\nexport type LoaderFactory<Args, Item> = (db: DatabaseContext) => ItemLoader<Args, Item>\n\nexport interface SystemResolverContext {\n\treadonly project: ProjectConfig\n\treadonly getSchema: SchemaGetter\n\treadonly identity: Identity\n\treadonly db: DatabaseContext\n\treadonly authorizator: Authorizator<Identity>\n\treadonly requireAccess: (action: Authorizator.Action, stage: string, message?: string) => Promise<void>\n\treadonly getLoader: <Args, Item>(loaderFactory: LoaderFactory<Args, Item>) => ItemLoader<Args, Item>\n}\n"],"names":["StagePermissionsFactory","StageScope","ForbiddenError"],"mappings":";;;;;AASO,MAAM,6BAA6B;AAAA,EACzC,YACkB,cAChB;AADgB,SAAA,eAAA;AAAA,EACf;AAAA,EAEH,MAAa,OACZ,EAAE,WAAW,UAAU,SAAS,MACC;AACjC,UAAM,0BAA0B,IAAIA,wBAAAA,wBAAwB,SAAS;AACrE,UAAM,8BAAc,IAAA;AACpB,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,KAAK;AAAA,MACnB;AAAA,MACA,eAAe,OAAO,QAAQ,OAAO,YAAa;AACjD,YAAI,CAAE,MAAM,KAAK,aAAa,UAAU,UAAU,IAAIC,WAAAA,WAAW,OAAO,uBAAuB,GAAG,MAAM,GAAI;AAC3G,gBAAM,IAAIC,aAAAA,eAAe,WAAW,WAAW;AAAA,QAChD;AAAA,MACD;AAAA,MACA,WAAW,CAAA,kBAAiB;AAC3B,cAAM,SAAS,QAAQ,IAAI,aAAa;AACxC,YAAI,QAAQ;AACX,iBAAO;AAAA,QACR;AACA,cAAM,YAAY,cAAc,EAAE;AAClC,gBAAQ,IAAI,eAAe,SAAS;AACpC,eAAO;AAAA,MACR;AAAA,IAAA;AAAA,EAEF;AACD;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ForbiddenError } from "@contember/graphql-utils";
|
|
2
|
+
import { StagePermissionsFactory } from "../model/authorization/StagePermissionsFactory.js";
|
|
3
|
+
import { StageScope } from "../model/authorization/StageScope.js";
|
|
4
|
+
class SystemResolverContextFactory {
|
|
5
|
+
constructor(authorizator) {
|
|
6
|
+
this.authorizator = authorizator;
|
|
7
|
+
}
|
|
8
|
+
async create({ getSchema, identity, project, db }) {
|
|
9
|
+
const stagePermissionsFactory = new StagePermissionsFactory(getSchema);
|
|
10
|
+
const loaders = /* @__PURE__ */ new Map();
|
|
11
|
+
return {
|
|
12
|
+
project,
|
|
13
|
+
identity,
|
|
14
|
+
getSchema,
|
|
15
|
+
authorizator: this.authorizator,
|
|
16
|
+
db,
|
|
17
|
+
requireAccess: async (action, stage, message) => {
|
|
18
|
+
if (!await this.authorizator.isAllowed(identity, new StageScope(stage, stagePermissionsFactory), action)) {
|
|
19
|
+
throw new ForbiddenError(message || "Forbidden");
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
getLoader: (loaderFactory) => {
|
|
23
|
+
const loader = loaders.get(loaderFactory);
|
|
24
|
+
if (loader) {
|
|
25
|
+
return loader;
|
|
26
|
+
}
|
|
27
|
+
const newLoader = loaderFactory(db);
|
|
28
|
+
loaders.set(loaderFactory, newLoader);
|
|
29
|
+
return newLoader;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
SystemResolverContextFactory
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=SystemResolverContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemResolverContext.js","sources":["../../../../../packages/engine-system-api/src/resolvers/SystemResolverContext.ts"],"sourcesContent":["import { Authorizator } from '@contember/authorization'\nimport { ForbiddenError } from '@contember/graphql-utils'\nimport { DatabaseContext, Identity } from '../model'\nimport { ProjectConfig } from '../types'\nimport { StagePermissionsFactory } from '../model/authorization/StagePermissionsFactory'\nimport { StageScope } from '../model/authorization/StageScope'\nimport { ItemLoader } from '../utils/batchQuery'\nimport { SchemaGetter } from '../model/SchemaGetter'\n\nexport class SystemResolverContextFactory {\n\tconstructor(\n\t\tprivate readonly authorizator: Authorizator<Identity>,\n\t) {}\n\n\tpublic async create(\n\t\t{ getSchema, identity, project, db }: Pick<SystemResolverContext, 'getSchema' | 'db' | 'identity' | 'project'>,\n\t): Promise<SystemResolverContext> {\n\t\tconst stagePermissionsFactory = new StagePermissionsFactory(getSchema)\n\t\tconst loaders = new Map<LoaderFactory<any, any>, ItemLoader<any, any>>()\n\t\treturn {\n\t\t\tproject,\n\t\t\tidentity,\n\t\t\tgetSchema,\n\t\t\tauthorizator: this.authorizator,\n\t\t\tdb,\n\t\t\trequireAccess: async (action, stage, message?) => {\n\t\t\t\tif (!(await this.authorizator.isAllowed(identity, new StageScope(stage, stagePermissionsFactory), action))) {\n\t\t\t\t\tthrow new ForbiddenError(message || 'Forbidden')\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetLoader: loaderFactory => {\n\t\t\t\tconst loader = loaders.get(loaderFactory)\n\t\t\t\tif (loader) {\n\t\t\t\t\treturn loader\n\t\t\t\t}\n\t\t\t\tconst newLoader = loaderFactory(db)\n\t\t\t\tloaders.set(loaderFactory, newLoader)\n\t\t\t\treturn newLoader\n\t\t\t},\n\t\t}\n\t}\n}\n\nexport type LoaderFactory<Args, Item> = (db: DatabaseContext) => ItemLoader<Args, Item>\n\nexport interface SystemResolverContext {\n\treadonly project: ProjectConfig\n\treadonly getSchema: SchemaGetter\n\treadonly identity: Identity\n\treadonly db: DatabaseContext\n\treadonly authorizator: Authorizator<Identity>\n\treadonly requireAccess: (action: Authorizator.Action, stage: string, message?: string) => Promise<void>\n\treadonly getLoader: <Args, Item>(loaderFactory: LoaderFactory<Args, Item>) => ItemLoader<Args, Item>\n}\n"],"names":[],"mappings":";;;AASO,MAAM,6BAA6B;AAAA,EACzC,YACkB,cAChB;AADgB,SAAA,eAAA;AAAA,EACf;AAAA,EAEH,MAAa,OACZ,EAAE,WAAW,UAAU,SAAS,MACC;AACjC,UAAM,0BAA0B,IAAI,wBAAwB,SAAS;AACrE,UAAM,8BAAc,IAAA;AACpB,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,KAAK;AAAA,MACnB;AAAA,MACA,eAAe,OAAO,QAAQ,OAAO,YAAa;AACjD,YAAI,CAAE,MAAM,KAAK,aAAa,UAAU,UAAU,IAAI,WAAW,OAAO,uBAAuB,GAAG,MAAM,GAAI;AAC3G,gBAAM,IAAI,eAAe,WAAW,WAAW;AAAA,QAChD;AAAA,MACD;AAAA,MACA,WAAW,CAAA,kBAAiB;AAC3B,cAAM,SAAS,QAAQ,IAAI,aAAa;AACxC,YAAI,QAAQ;AACX,iBAAO;AAAA,QACR;AACA,cAAM,YAAY,cAAc,EAAE;AAClC,gBAAQ,IAAI,eAAe,SAAS;AACpC,eAAO;AAAA,MACR;AAAA,IAAA;AAAA,EAEF;AACD;"}
|