Skip to content

Commit 7deb4d5

Browse files
authored
Merge pull request #2276 from Cratis:fix/crash
Fix/crash
2 parents 5ff714d + 3373b26 commit 7deb4d5

File tree

18 files changed

+779
-384
lines changed

18 files changed

+779
-384
lines changed

Directory.Packages.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<PackageVersion Include="Microsoft.Extensions.Resilience" Version="9.10.0" />
2222
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
2323
<!-- Cratis -->
24-
<PackageVersion Include="Cratis.Fundamentals" Version="7.2.2" />
25-
<PackageVersion Include="Cratis.Metrics.Roslyn" Version="7.2.2" />
26-
<PackageVersion Include="Cratis.Applications" Version="17.22.13" />
27-
<PackageVersion Include="Cratis.Applications.MongoDB" Version="17.22.13" />
28-
<PackageVersion Include="Cratis.Applications.Orleans" Version="17.22.13" />
29-
<PackageVersion Include="Cratis.Applications.Orleans.MongoDB" Version="17.22.13" />
30-
<PackageVersion Include="Cratis.Applications.ProxyGenerator.Build" Version="17.22.13" />
31-
<PackageVersion Include="Cratis.Applications.Swagger" Version="17.22.13" />
24+
<PackageVersion Include="Cratis.Fundamentals" Version="7.2.3" />
25+
<PackageVersion Include="Cratis.Metrics.Roslyn" Version="7.2.3" />
26+
<PackageVersion Include="Cratis.Applications" Version="17.23.2" />
27+
<PackageVersion Include="Cratis.Applications.MongoDB" Version="17.23.2" />
28+
<PackageVersion Include="Cratis.Applications.Orleans" Version="17.23.2" />
29+
<PackageVersion Include="Cratis.Applications.Orleans.MongoDB" Version="17.23.2" />
30+
<PackageVersion Include="Cratis.Applications.ProxyGenerator.Build" Version="17.23.2" />
31+
<PackageVersion Include="Cratis.Applications.Swagger" Version="17.23.2" />
3232
<!-- Orleans -->
3333
<PackageVersion Include="Microsoft.Orleans.Core.Abstractions" Version="9.2.1" />
3434
<PackageVersion Include="Microsoft.Orleans.Clustering.AzureStorage" Version="9.2.1" />

Source/Workbench/Web/Api/EventSequences/Append.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Causation } from '../Auditing/Causation';
1213
import { EventType } from '../Events/EventType';
1314
import { Identity } from '../Identities/Identity';
@@ -47,6 +48,18 @@ export class Append extends Command<IAppend> implements IAppend {
4748
readonly route: string = '/api/event-store/{eventStore}/{namespace}/sequence/{eventSequenceId}';
4849
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
4950
readonly validation: CommandValidator = new AppendValidator();
51+
readonly propertyDescriptors: PropertyDescriptor[] = [
52+
new PropertyDescriptor('eventStore', String),
53+
new PropertyDescriptor('namespace', String),
54+
new PropertyDescriptor('eventSequenceId', String),
55+
new PropertyDescriptor('eventSourceId', String),
56+
new PropertyDescriptor('eventStreamType', String),
57+
new PropertyDescriptor('eventStreamId', String),
58+
new PropertyDescriptor('eventType', EventType),
59+
new PropertyDescriptor('content', Object),
60+
new PropertyDescriptor('causation', Causation),
61+
new PropertyDescriptor('causedBy', Identity),
62+
];
5063

5164
private _eventStore!: string;
5265
private _namespace!: string;

Source/Workbench/Web/Api/EventSequences/AppendMany.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Causation } from '../Auditing/Causation';
1213
import { Identity } from '../Identities/Identity';
1314
import { EventToAppend } from './EventToAppend';
@@ -41,6 +42,15 @@ export class AppendMany extends Command<IAppendMany> implements IAppendMany {
4142
readonly route: string = '/api/event-store/{eventStore}/{namespace}/sequence/{eventSequenceId}/append-many';
4243
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
4344
readonly validation: CommandValidator = new AppendManyValidator();
45+
readonly propertyDescriptors: PropertyDescriptor[] = [
46+
new PropertyDescriptor('eventStore', String),
47+
new PropertyDescriptor('namespace', String),
48+
new PropertyDescriptor('eventSequenceId', String),
49+
new PropertyDescriptor('eventSourceId', String),
50+
new PropertyDescriptor('events', EventToAppend),
51+
new PropertyDescriptor('causation', Causation),
52+
new PropertyDescriptor('causedBy', Identity),
53+
];
4454

4555
private _eventStore!: string;
4656
private _namespace!: string;

Source/Workbench/Web/Api/EventSequences/Redact.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Causation } from '../Auditing/Causation';
1213
import { Identity } from '../Identities/Identity';
1314
import Handlebars from 'handlebars';
@@ -40,6 +41,15 @@ export class Redact extends Command<IRedact> implements IRedact {
4041
readonly route: string = '/api/event-store/{eventStore}/{namespace}/sequence/{eventSequenceId}/redact-event';
4142
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
4243
readonly validation: CommandValidator = new RedactValidator();
44+
readonly propertyDescriptors: PropertyDescriptor[] = [
45+
new PropertyDescriptor('eventStore', String),
46+
new PropertyDescriptor('namespace', String),
47+
new PropertyDescriptor('eventSequenceId', String),
48+
new PropertyDescriptor('sequenceNumber', Number),
49+
new PropertyDescriptor('reason', String),
50+
new PropertyDescriptor('causation', Causation),
51+
new PropertyDescriptor('causedBy', Identity),
52+
];
4353

4454
private _eventStore!: string;
4555
private _namespace!: string;

Source/Workbench/Web/Api/EventSequences/RedactMany.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Causation } from '../Auditing/Causation';
1213
import { Identity } from '../Identities/Identity';
1314
import Handlebars from 'handlebars';
@@ -42,6 +43,16 @@ export class RedactMany extends Command<IRedactMany> implements IRedactMany {
4243
readonly route: string = '/api/event-store/{eventStore}/{namespace}/sequence/{eventSequenceId}/redact-events';
4344
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
4445
readonly validation: CommandValidator = new RedactManyValidator();
46+
readonly propertyDescriptors: PropertyDescriptor[] = [
47+
new PropertyDescriptor('eventStore', String),
48+
new PropertyDescriptor('namespace', String),
49+
new PropertyDescriptor('eventSequenceId', String),
50+
new PropertyDescriptor('eventSourceId', String),
51+
new PropertyDescriptor('reason', String),
52+
new PropertyDescriptor('eventTypes', String),
53+
new PropertyDescriptor('causation', Causation),
54+
new PropertyDescriptor('causedBy', Identity),
55+
];
4556

4657
private _eventStore!: string;
4758
private _namespace!: string;

Source/Workbench/Web/Api/EventStores/AddEventStore.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import Handlebars from 'handlebars';
1213

1314
const routeTemplate = Handlebars.compile('/api/event-stores/add');
@@ -26,6 +27,9 @@ export class AddEventStore extends Command<IAddEventStore> implements IAddEventS
2627
readonly route: string = '/api/event-stores/add';
2728
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
2829
readonly validation: CommandValidator = new AddEventStoreValidator();
30+
readonly propertyDescriptors: PropertyDescriptor[] = [
31+
new PropertyDescriptor('name', String),
32+
];
2933

3034
private _name!: string;
3135

Source/Workbench/Web/Api/Events/Register.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { EventTypeRegistration } from './EventTypeRegistration';
1213
import Handlebars from 'handlebars';
1314

@@ -29,6 +30,10 @@ export class Register extends Command<IRegister> implements IRegister {
2930
readonly route: string = '/api/event-store/{eventStore}/types';
3031
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
3132
readonly validation: CommandValidator = new RegisterValidator();
33+
readonly propertyDescriptors: PropertyDescriptor[] = [
34+
new PropertyDescriptor('eventStore', String),
35+
new PropertyDescriptor('types', EventTypeRegistration),
36+
];
3237

3338
private _eventStore!: string;
3439
private _types!: EventTypeRegistration[];

Source/Workbench/Web/Api/Jobs/DeleteJob.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Guid } from '@cratis/fundamentals';
1213
import Handlebars from 'handlebars';
1314

@@ -31,6 +32,11 @@ export class DeleteJob extends Command<IDeleteJob> implements IDeleteJob {
3132
readonly route: string = '/api/event-store/{eventStore}/{namespace}/jobs/{jobId}/delete';
3233
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
3334
readonly validation: CommandValidator = new DeleteJobValidator();
35+
readonly propertyDescriptors: PropertyDescriptor[] = [
36+
new PropertyDescriptor('eventStore', String),
37+
new PropertyDescriptor('namespace', String),
38+
new PropertyDescriptor('jobId', Guid),
39+
];
3440

3541
private _eventStore!: string;
3642
private _namespace!: string;

Source/Workbench/Web/Api/Jobs/ResumeJob.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Guid } from '@cratis/fundamentals';
1213
import Handlebars from 'handlebars';
1314

@@ -31,6 +32,11 @@ export class ResumeJob extends Command<IResumeJob> implements IResumeJob {
3132
readonly route: string = '/api/event-store/{eventStore}/{namespace}/jobs/{jobId}/resume';
3233
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
3334
readonly validation: CommandValidator = new ResumeJobValidator();
35+
readonly propertyDescriptors: PropertyDescriptor[] = [
36+
new PropertyDescriptor('eventStore', String),
37+
new PropertyDescriptor('namespace', String),
38+
new PropertyDescriptor('jobId', Guid),
39+
];
3440

3541
private _eventStore!: string;
3642
private _namespace!: string;

Source/Workbench/Web/Api/Jobs/StopJob.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { Command, CommandPropertyValidators, CommandValidator } from '@cratis/applications/commands';
99
import { useCommand, SetCommandValues, ClearCommandValues } from '@cratis/applications.react/commands';
1010
import { Validator } from '@cratis/applications/validation';
11+
import { PropertyDescriptor } from '@cratis/applications/reflection';
1112
import { Guid } from '@cratis/fundamentals';
1213
import Handlebars from 'handlebars';
1314

@@ -31,6 +32,11 @@ export class StopJob extends Command<IStopJob> implements IStopJob {
3132
readonly route: string = '/api/event-store/{eventStore}/{namespace}/jobs/{jobId}/stop';
3233
readonly routeTemplate: Handlebars.TemplateDelegate = routeTemplate;
3334
readonly validation: CommandValidator = new StopJobValidator();
35+
readonly propertyDescriptors: PropertyDescriptor[] = [
36+
new PropertyDescriptor('eventStore', String),
37+
new PropertyDescriptor('namespace', String),
38+
new PropertyDescriptor('jobId', Guid),
39+
];
3440

3541
private _eventStore!: string;
3642
private _namespace!: string;

0 commit comments

Comments
 (0)