@quadnix/octo 0.0.21 → 0.0.23
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/app.type.d.ts +124 -27
- package/dist/app.type.js +77 -7
- package/dist/app.type.js.map +1 -1
- package/dist/decorators/action.decorator.d.ts +7 -8
- package/dist/decorators/action.decorator.js +45 -44
- package/dist/decorators/action.decorator.js.map +1 -1
- package/dist/decorators/anchor.decorator.d.ts +2 -2
- package/dist/decorators/anchor.decorator.js +16 -11
- package/dist/decorators/anchor.decorator.js.map +1 -1
- package/dist/decorators/enable-hook.decorator.js +2 -2
- package/dist/decorators/enable-hook.decorator.js.map +1 -1
- package/dist/decorators/event-source.decorator.d.ts +1 -1
- package/dist/decorators/event-source.decorator.js +7 -2
- package/dist/decorators/event-source.decorator.js.map +1 -1
- package/dist/decorators/factory.decorator.d.ts +32 -1
- package/dist/decorators/factory.decorator.js +35 -3
- package/dist/decorators/factory.decorator.js.map +1 -1
- package/dist/decorators/model.decorator.d.ts +3 -2
- package/dist/decorators/model.decorator.js +24 -11
- package/dist/decorators/model.decorator.js.map +1 -1
- package/dist/decorators/module.decorator.d.ts +4 -71
- package/dist/decorators/module.decorator.js +18 -58
- package/dist/decorators/module.decorator.js.map +1 -1
- package/dist/decorators/on-event.decorator.d.ts +1 -1
- package/dist/decorators/on-event.decorator.js +7 -2
- package/dist/decorators/on-event.decorator.js.map +1 -1
- package/dist/decorators/overlay.decorator.d.ts +3 -2
- package/dist/decorators/overlay.decorator.js +23 -11
- package/dist/decorators/overlay.decorator.js.map +1 -1
- package/dist/decorators/resource.decorator.d.ts +3 -2
- package/dist/decorators/resource.decorator.js +23 -11
- package/dist/decorators/resource.decorator.js.map +1 -1
- package/dist/decorators/validate.decorator.d.ts +4 -4
- package/dist/decorators/validate.decorator.js +16 -2
- package/dist/decorators/validate.decorator.js.map +1 -1
- package/dist/errors/container.error.d.ts +11 -0
- package/dist/errors/container.error.js +20 -0
- package/dist/errors/container.error.js.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.js +7 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/input.error.d.ts +11 -0
- package/dist/errors/input.error.js +21 -0
- package/dist/errors/input.error.js.map +1 -0
- package/dist/errors/module.error.d.ts +4 -0
- package/dist/errors/module.error.js +8 -0
- package/dist/errors/module.error.js.map +1 -0
- package/dist/errors/node.error.d.ts +36 -0
- package/dist/errors/node.error.js +60 -0
- package/dist/errors/node.error.js.map +1 -0
- package/dist/errors/schema.error.d.ts +4 -0
- package/dist/errors/schema.error.js +8 -0
- package/dist/errors/schema.error.js.map +1 -0
- package/dist/errors/transaction.error.d.ts +35 -0
- package/dist/errors/transaction.error.js +58 -0
- package/dist/errors/transaction.error.js.map +1 -0
- package/dist/events/action.event.d.ts +13 -0
- package/dist/events/action.event.js +11 -0
- package/dist/events/action.event.js.map +1 -0
- package/dist/events/event.model.d.ts +6 -12
- package/dist/events/event.model.js +5 -11
- package/dist/events/event.model.js.map +1 -1
- package/dist/events/hook/commit.hook.event.d.ts +25 -0
- package/dist/events/hook/commit.hook.event.js +26 -0
- package/dist/events/hook/commit.hook.event.js.map +1 -0
- package/dist/events/hook/hook.event.d.ts +9 -0
- package/dist/events/hook/hook.event.js +10 -0
- package/dist/events/hook/hook.event.js.map +1 -0
- package/dist/events/hook/index.d.ts +4 -0
- package/dist/events/hook/index.js +5 -0
- package/dist/events/hook/index.js.map +1 -0
- package/dist/events/hook/model.hook.event.d.ts +25 -0
- package/dist/events/hook/model.hook.event.js +26 -0
- package/dist/events/hook/model.hook.event.js.map +1 -0
- package/dist/events/hook/resource.hook.event.d.ts +25 -0
- package/dist/events/hook/resource.hook.event.js +26 -0
- package/dist/events/hook/resource.hook.event.js.map +1 -0
- package/dist/events/index.d.ts +7 -0
- package/dist/events/index.js +8 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/module.event.d.ts +1 -6
- package/dist/events/module.event.js +0 -5
- package/dist/events/module.event.js.map +1 -1
- package/dist/events/registration.event.d.ts +9 -51
- package/dist/events/registration.event.js +16 -64
- package/dist/events/registration.event.js.map +1 -1
- package/dist/events/serialization.event.d.ts +24 -37
- package/dist/events/serialization.event.js +49 -33
- package/dist/events/serialization.event.js.map +1 -1
- package/dist/events/transaction.event.d.ts +45 -26
- package/dist/events/transaction.event.js +43 -25
- package/dist/events/transaction.event.js.map +1 -1
- package/dist/{decorators → functions/container}/container.d.ts +45 -31
- package/dist/{decorators → functions/container}/container.js +90 -58
- package/dist/functions/container/container.js.map +1 -0
- package/dist/{decorators → functions/container}/test-container.d.ts +5 -13
- package/dist/{decorators → functions/container}/test-container.js +31 -43
- package/dist/functions/container/test-container.js.map +1 -0
- package/dist/functions/dependency/dependency.d.ts +6 -6
- package/dist/functions/dependency/dependency.js +4 -3
- package/dist/functions/dependency/dependency.js.map +1 -1
- package/dist/functions/diff/diff-metadata.d.ts +4 -6
- package/dist/functions/diff/diff-metadata.js +4 -3
- package/dist/functions/diff/diff-metadata.js.map +1 -1
- package/dist/functions/diff/diff.d.ts +12 -7
- package/dist/functions/diff/diff.js +9 -12
- package/dist/functions/diff/diff.js.map +1 -1
- package/dist/functions/diff/diff.utility.d.ts +24 -24
- package/dist/functions/diff/diff.utility.js +46 -25
- package/dist/functions/diff/diff.utility.js.map +1 -1
- package/dist/functions/hook/commit.hook.d.ts +14 -3
- package/dist/functions/hook/commit.hook.js +16 -16
- package/dist/functions/hook/commit.hook.js.map +1 -1
- package/dist/functions/hook/hook.interface.d.ts +7 -6
- package/dist/functions/hook/model-action.hook.d.ts +17 -5
- package/dist/functions/hook/model-action.hook.js +20 -39
- package/dist/functions/hook/model-action.hook.js.map +1 -1
- package/dist/functions/hook/resource-action.hook.d.ts +17 -5
- package/dist/functions/hook/resource-action.hook.js +18 -18
- package/dist/functions/hook/resource-action.hook.js.map +1 -1
- package/dist/functions/node/node-action.abstract.d.ts +7 -0
- package/dist/functions/node/node-action.abstract.js +20 -0
- package/dist/functions/node/node-action.abstract.js.map +1 -0
- package/dist/functions/node/node.abstract.d.ts +93 -0
- package/dist/functions/node/node.abstract.js +342 -0
- package/dist/functions/node/node.abstract.js.map +1 -0
- package/dist/functions/node/node.interface.d.ts +176 -0
- package/dist/functions/node/node.interface.js +2 -0
- package/dist/functions/node/node.interface.js.map +1 -0
- package/dist/functions/schema/schema.d.ts +4 -0
- package/dist/functions/schema/schema.js +38 -0
- package/dist/functions/schema/schema.js.map +1 -0
- package/dist/index.d.ts +31 -33
- package/dist/index.js +32 -16
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +34 -22
- package/dist/main.js +92 -53
- package/dist/main.js.map +1 -1
- package/dist/models/account/account.model.d.ts +23 -0
- package/dist/models/account/account.model.js +67 -0
- package/dist/models/account/account.model.js.map +1 -0
- package/dist/models/account/account.schema.d.ts +7 -0
- package/dist/models/account/account.schema.js +12 -0
- package/dist/models/account/account.schema.js.map +1 -0
- package/dist/models/app/app.model.d.ts +6 -15
- package/dist/models/app/app.model.js +26 -31
- package/dist/models/app/app.model.js.map +1 -1
- package/dist/models/app/app.schema.d.ts +3 -0
- package/dist/models/app/app.schema.js +21 -0
- package/dist/models/app/app.schema.js.map +1 -0
- package/dist/models/deployment/deployment.model.d.ts +6 -13
- package/dist/models/deployment/deployment.model.js +11 -16
- package/dist/models/deployment/deployment.model.js.map +1 -1
- package/dist/models/deployment/deployment.schema.d.ts +7 -0
- package/dist/models/deployment/deployment.schema.js +25 -0
- package/dist/models/deployment/deployment.schema.js.map +1 -0
- package/dist/models/environment/environment.model.d.ts +5 -15
- package/dist/models/environment/environment.model.js +10 -28
- package/dist/models/environment/environment.model.js.map +1 -1
- package/dist/models/environment/environment.schema.d.ts +13 -0
- package/dist/models/environment/environment.schema.js +38 -0
- package/dist/models/environment/environment.schema.js.map +1 -0
- package/dist/models/execution/execution.model.d.ts +6 -14
- package/dist/models/execution/execution.model.js +15 -28
- package/dist/models/execution/execution.model.js.map +1 -1
- package/dist/models/execution/execution.schema.d.ts +14 -0
- package/dist/models/execution/execution.schema.js +34 -0
- package/dist/models/execution/execution.schema.js.map +1 -0
- package/dist/models/filesystem/filesystem.model.d.ts +10 -0
- package/dist/models/filesystem/filesystem.model.js +43 -0
- package/dist/models/filesystem/filesystem.model.js.map +1 -0
- package/dist/models/filesystem/filesystem.schema.d.ts +3 -0
- package/dist/models/filesystem/filesystem.schema.js +21 -0
- package/dist/models/filesystem/filesystem.schema.js.map +1 -0
- package/dist/models/image/image.model.d.ts +7 -41
- package/dist/models/image/image.model.js +17 -32
- package/dist/models/image/image.model.js.map +1 -1
- package/dist/models/image/image.schema.d.ts +9 -0
- package/dist/models/image/image.schema.js +31 -0
- package/dist/models/image/image.schema.js.map +1 -0
- package/dist/models/model-action.interface.d.ts +5 -19
- package/dist/models/model.abstract.d.ts +28 -316
- package/dist/models/model.abstract.js +180 -557
- package/dist/models/model.abstract.js.map +1 -1
- package/dist/models/model.interface.d.ts +42 -21
- package/dist/models/pipeline/pipeline.model.d.ts +5 -8
- package/dist/models/pipeline/pipeline.model.js +10 -16
- package/dist/models/pipeline/pipeline.model.js.map +1 -1
- package/dist/models/pipeline/pipeline.schema.d.ts +4 -0
- package/dist/models/pipeline/pipeline.schema.js +22 -0
- package/dist/models/pipeline/pipeline.schema.js.map +1 -0
- package/dist/models/region/region.model.d.ts +8 -9
- package/dist/models/region/region.model.js +25 -17
- package/dist/models/region/region.model.js.map +1 -1
- package/dist/models/region/region.schema.d.ts +3 -0
- package/dist/models/region/region.schema.js +21 -0
- package/dist/models/region/region.schema.js.map +1 -0
- package/dist/models/server/server.model.d.ts +5 -11
- package/dist/models/server/server.model.js +13 -16
- package/dist/models/server/server.model.js.map +1 -1
- package/dist/models/server/server.schema.d.ts +6 -0
- package/dist/models/server/server.schema.js +24 -0
- package/dist/models/server/server.schema.js.map +1 -0
- package/dist/models/service/service.model.d.ts +4 -10
- package/dist/models/service/service.model.js +12 -16
- package/dist/models/service/service.model.js.map +1 -1
- package/dist/models/service/service.schema.d.ts +6 -0
- package/dist/models/service/service.schema.js +24 -0
- package/dist/models/service/service.schema.js.map +1 -0
- package/dist/models/subnet/subnet.model.d.ts +10 -35
- package/dist/models/subnet/subnet.model.js +16 -47
- package/dist/models/subnet/subnet.model.js.map +1 -1
- package/dist/models/subnet/subnet.schema.d.ts +33 -0
- package/dist/models/subnet/subnet.schema.js +48 -0
- package/dist/models/subnet/subnet.schema.js.map +1 -0
- package/dist/modules/module.abstract.d.ts +21 -0
- package/dist/modules/module.abstract.js +14 -0
- package/dist/modules/module.abstract.js.map +1 -0
- package/dist/modules/module.container.d.ts +32 -18
- package/dist/modules/module.container.js +134 -81
- package/dist/modules/module.container.js.map +1 -1
- package/dist/modules/module.interface.d.ts +15 -2
- package/dist/modules/test-module.container.d.ts +33 -15
- package/dist/modules/test-module.container.js +264 -35
- package/dist/modules/test-module.container.js.map +1 -1
- package/dist/overlays/anchor.abstract.d.ts +13 -8
- package/dist/overlays/anchor.abstract.js.map +1 -1
- package/dist/overlays/anchor.interface.d.ts +5 -8
- package/dist/overlays/anchor.schema.d.ts +8 -0
- package/dist/overlays/anchor.schema.js +9 -0
- package/dist/overlays/anchor.schema.js.map +1 -0
- package/dist/overlays/overlay-data.repository.d.ts +3 -6
- package/dist/overlays/overlay-data.repository.js +17 -38
- package/dist/overlays/overlay-data.repository.js.map +1 -1
- package/dist/overlays/overlay.abstract.d.ts +15 -17
- package/dist/overlays/overlay.abstract.js +30 -44
- package/dist/overlays/overlay.abstract.js.map +1 -1
- package/dist/overlays/overlay.interface.d.ts +3 -7
- package/dist/overlays/overlay.schema.d.ts +8 -0
- package/dist/overlays/overlay.schema.js +9 -0
- package/dist/overlays/overlay.schema.js.map +1 -0
- package/dist/resources/resource-action.interface.d.ts +4 -3
- package/dist/resources/resource-data.repository.d.ts +16 -7
- package/dist/resources/resource-data.repository.js +118 -42
- package/dist/resources/resource-data.repository.js.map +1 -1
- package/dist/resources/resource.abstract.d.ts +56 -16
- package/dist/resources/resource.abstract.js +326 -19
- package/dist/resources/resource.abstract.js.map +1 -1
- package/dist/resources/resource.interface.d.ts +39 -8
- package/dist/resources/resource.schema.d.ts +14 -0
- package/dist/resources/resource.schema.js +11 -0
- package/dist/resources/resource.schema.js.map +1 -0
- package/dist/services/capture/capture.service.d.ts +6 -7
- package/dist/services/capture/capture.service.js +8 -5
- package/dist/services/capture/capture.service.js.map +1 -1
- package/dist/services/event/event.service.d.ts +3 -4
- package/dist/services/event/event.service.js +7 -9
- package/dist/services/event/event.service.js.map +1 -1
- package/dist/services/input/input.service.d.ts +62 -6
- package/dist/services/input/input.service.js +290 -14
- package/dist/services/input/input.service.js.map +1 -1
- package/dist/services/schema-translation/schema-translation.service.d.ts +13 -0
- package/dist/services/schema-translation/schema-translation.service.js +42 -0
- package/dist/services/schema-translation/schema-translation.service.js.map +1 -0
- package/dist/services/serialization/model/model-serialization.service.d.ts +1 -4
- package/dist/services/serialization/model/model-serialization.service.js +37 -33
- package/dist/services/serialization/model/model-serialization.service.js.map +1 -1
- package/dist/services/serialization/resource/resource-serialization.service.d.ts +5 -5
- package/dist/services/serialization/resource/resource-serialization.service.js +71 -96
- package/dist/services/serialization/resource/resource-serialization.service.js.map +1 -1
- package/dist/services/state-management/local.state-provider.d.ts +0 -1
- package/dist/services/state-management/local.state-provider.js +5 -7
- package/dist/services/state-management/local.state-provider.js.map +1 -1
- package/dist/services/state-management/state-management.service.d.ts +2 -3
- package/dist/services/state-management/state-management.service.js +19 -9
- package/dist/services/state-management/state-management.service.js.map +1 -1
- package/dist/services/state-management/state-provider.interface.d.ts +0 -1
- package/dist/services/state-management/test.state-provider.d.ts +0 -1
- package/dist/services/state-management/test.state-provider.js +2 -1
- package/dist/services/state-management/test.state-provider.js.map +1 -1
- package/dist/services/transaction/transaction.service.d.ts +18 -14
- package/dist/services/transaction/transaction.service.js +261 -132
- package/dist/services/transaction/transaction.service.js.map +1 -1
- package/dist/services/validation/validation.service.d.ts +2 -3
- package/dist/services/validation/validation.service.js +27 -12
- package/dist/services/validation/validation.service.js.map +1 -1
- package/dist/utilities/node/node.utility.d.ts +4 -0
- package/dist/utilities/node/node.utility.js +22 -0
- package/dist/utilities/node/node.utility.js.map +1 -0
- package/dist/utilities/object/object.utility.d.ts +3 -0
- package/dist/utilities/object/object.utility.js +33 -0
- package/dist/utilities/object/object.utility.js.map +1 -1
- package/dist/utilities/test-helpers/test-classes.d.ts +57 -0
- package/dist/utilities/test-helpers/test-classes.js +76 -0
- package/dist/utilities/test-helpers/test-classes.js.map +1 -0
- package/dist/utilities/test-helpers/test-models.d.ts +41 -0
- package/dist/utilities/test-helpers/test-models.js +224 -0
- package/dist/utilities/test-helpers/test-models.js.map +1 -0
- package/dist/utilities/test-helpers/test-overlays.d.ts +10 -0
- package/dist/utilities/test-helpers/test-overlays.js +53 -0
- package/dist/utilities/test-helpers/test-overlays.js.map +1 -0
- package/dist/utilities/test-helpers/test-resources.d.ts +22 -0
- package/dist/utilities/test-helpers/test-resources.js +162 -0
- package/dist/utilities/test-helpers/test-resources.js.map +1 -0
- package/dist/utilities/validation/validation.utility.d.ts +31 -3
- package/dist/utilities/validation/validation.utility.js +121 -2
- package/dist/utilities/validation/validation.utility.js.map +1 -1
- package/package.json +6 -6
- package/dist/decorators/container.js.map +0 -1
- package/dist/decorators/test-container.js.map +0 -1
- package/dist/events/error.event.d.ts +0 -35
- package/dist/events/error.event.js +0 -36
- package/dist/events/error.event.js.map +0 -1
- package/dist/events/hook.event.d.ts +0 -194
- package/dist/events/hook.event.js +0 -195
- package/dist/events/hook.event.js.map +0 -1
- package/dist/models/app/app.interface.d.ts +0 -9
- package/dist/models/app/app.interface.js +0 -2
- package/dist/models/app/app.interface.js.map +0 -1
- package/dist/models/deployment/deployment.interface.d.ts +0 -9
- package/dist/models/deployment/deployment.interface.js +0 -2
- package/dist/models/deployment/deployment.interface.js.map +0 -1
- package/dist/models/environment/environment.interface.d.ts +0 -12
- package/dist/models/environment/environment.interface.js +0 -2
- package/dist/models/environment/environment.interface.js.map +0 -1
- package/dist/models/execution/execution.interface.d.ts +0 -14
- package/dist/models/execution/execution.interface.js +0 -2
- package/dist/models/execution/execution.interface.js.map +0 -1
- package/dist/models/image/image.interface.d.ts +0 -12
- package/dist/models/image/image.interface.js +0 -2
- package/dist/models/image/image.interface.js.map +0 -1
- package/dist/models/pipeline/pipeline.interface.d.ts +0 -10
- package/dist/models/pipeline/pipeline.interface.js +0 -2
- package/dist/models/pipeline/pipeline.interface.js.map +0 -1
- package/dist/models/region/region.interface.d.ts +0 -9
- package/dist/models/region/region.interface.js +0 -2
- package/dist/models/region/region.interface.js.map +0 -1
- package/dist/models/server/server.interface.d.ts +0 -9
- package/dist/models/server/server.interface.js +0 -2
- package/dist/models/server/server.interface.js.map +0 -1
- package/dist/models/service/service.interface.d.ts +0 -9
- package/dist/models/service/service.interface.js +0 -2
- package/dist/models/service/service.interface.js.map +0 -1
- package/dist/models/subnet/subnet.interface.d.ts +0 -13
- package/dist/models/subnet/subnet.interface.js +0 -2
- package/dist/models/subnet/subnet.interface.js.map +0 -1
- package/dist/overlays/overlay.service.d.ts +0 -18
- package/dist/overlays/overlay.service.js +0 -45
- package/dist/overlays/overlay.service.js.map +0 -1
- package/dist/resources/shared-resource.abstract.d.ts +0 -13
- package/dist/resources/shared-resource.abstract.js +0 -47
- package/dist/resources/shared-resource.abstract.js.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HookEvent } from './hook.event.js';
|
|
2
|
+
/**
|
|
3
|
+
* The ResourceActionHookEvent class is the superclass for all events emitting in relation to resource action hooks.
|
|
4
|
+
*
|
|
5
|
+
* @group Events
|
|
6
|
+
* @returns The Event instance.
|
|
7
|
+
*/
|
|
8
|
+
export class ResourceActionHookEvent extends HookEvent {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This hook event is emitted when a post-resource action hook callback is done executing.
|
|
12
|
+
*
|
|
13
|
+
* @group Events
|
|
14
|
+
* @returns The Event instance.
|
|
15
|
+
*/
|
|
16
|
+
export class PostResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* This hook event is emitted when a pre-resource action hook callback is done executing.
|
|
20
|
+
*
|
|
21
|
+
* @group Events
|
|
22
|
+
* @returns The Event instance.
|
|
23
|
+
*/
|
|
24
|
+
export class PreResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=resource.hook.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/resource.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,OAAO,uBAAwB,SAAQ,SAAS;CAAG;AAEzD;;;;;GAKG;AACH,MAAM,OAAO,uCAAwC,SAAQ,uBAAuB;CAAG;AAEvF;;;;;GAKG;AACH,MAAM,OAAO,sCAAuC,SAAQ,uBAAuB;CAAG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './action.event.js';
|
|
2
|
+
export * from './event.model.js';
|
|
3
|
+
export * from './hook/index.js';
|
|
4
|
+
export * from './module.event.js';
|
|
5
|
+
export * from './registration.event.js';
|
|
6
|
+
export * from './serialization.event.js';
|
|
7
|
+
export * from './transaction.event.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './action.event.js';
|
|
2
|
+
export * from './event.model.js';
|
|
3
|
+
export * from './hook/index.js';
|
|
4
|
+
export * from './module.event.js';
|
|
5
|
+
export * from './registration.event.js';
|
|
6
|
+
export * from './serialization.event.js';
|
|
7
|
+
export * from './transaction.event.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -3,13 +3,8 @@ import { Event } from './event.model.js';
|
|
|
3
3
|
* This event is emitted when a module's `onInit()` method is run.
|
|
4
4
|
* It emits the name of the module.
|
|
5
5
|
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* const myEvent = new ModuleEvent('MyModule');
|
|
9
|
-
* EventService.getInstance().emit(myEvent);
|
|
10
|
-
* ```
|
|
11
6
|
* @group Events
|
|
12
7
|
* @returns The Event instance.
|
|
13
8
|
*/
|
|
14
|
-
export declare class ModuleEvent extends Event<
|
|
9
|
+
export declare class ModuleEvent extends Event<void> {
|
|
15
10
|
}
|
|
@@ -3,11 +3,6 @@ import { Event } from './event.model.js';
|
|
|
3
3
|
* This event is emitted when a module's `onInit()` method is run.
|
|
4
4
|
* It emits the name of the module.
|
|
5
5
|
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* const myEvent = new ModuleEvent('MyModule');
|
|
9
|
-
* EventService.getInstance().emit(myEvent);
|
|
10
|
-
* ```
|
|
11
6
|
* @group Events
|
|
12
7
|
* @returns The Event instance.
|
|
13
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.event.js","sourceRoot":"","sources":["../../src/events/module.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"module.event.js","sourceRoot":"","sources":["../../src/events/module.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAW;CAAG"}
|
|
@@ -3,31 +3,15 @@ import { Event } from './event.model.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* The RegistrationEvent class is the superclass for all events in relation to class registration.
|
|
5
5
|
*
|
|
6
|
-
* :::warning Warning
|
|
7
|
-
* It is not a good practice to create an event from this class directly,
|
|
8
|
-
* but should rather create one from one of the subclasses.
|
|
9
|
-
* This promotes a more accurate classification of events.
|
|
10
|
-
* :::
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const myEvent = new RegistrationEvent('MyClass');
|
|
15
|
-
* EventService.getInstance().emit(myEvent);
|
|
16
|
-
* ```
|
|
17
6
|
* @group Events
|
|
18
7
|
* @returns The Event instance.
|
|
19
8
|
*/
|
|
20
|
-
export declare class RegistrationEvent extends Event<
|
|
9
|
+
export declare class RegistrationEvent extends Event<void> {
|
|
21
10
|
}
|
|
22
11
|
/**
|
|
23
|
-
* This event is emitted when a class with `@Anchor()` decorator is registered.
|
|
12
|
+
* This event is emitted when a class with `@Anchor('my-package')` decorator is registered.
|
|
24
13
|
* It emits the name of the class.
|
|
25
14
|
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const myEvent = new AnchorRegistrationEvent('MyClass');
|
|
29
|
-
* EventService.getInstance().emit(myEvent);
|
|
30
|
-
* ```
|
|
31
15
|
* @group Events
|
|
32
16
|
* @returns The Event instance.
|
|
33
17
|
*/
|
|
@@ -35,14 +19,9 @@ export declare class AnchorRegistrationEvent extends RegistrationEvent {
|
|
|
35
19
|
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
36
20
|
}
|
|
37
21
|
/**
|
|
38
|
-
* This event is emitted when a class with `@Action(
|
|
39
|
-
* It emits the name of the class.
|
|
22
|
+
* This event is emitted when a class with `@Action(ModelClass)` decorator is registered.
|
|
23
|
+
* It emits the name of the model class and the name of the action.
|
|
40
24
|
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const myEvent = new ModelActionRegistrationEvent('MyClass');
|
|
44
|
-
* EventService.getInstance().emit(myEvent);
|
|
45
|
-
* ```
|
|
46
25
|
* @group Events
|
|
47
26
|
* @returns The Event instance.
|
|
48
27
|
*/
|
|
@@ -50,14 +29,9 @@ export declare class ModelActionRegistrationEvent extends RegistrationEvent {
|
|
|
50
29
|
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
51
30
|
}
|
|
52
31
|
/**
|
|
53
|
-
* This event is emitted when a class with `@Model()` decorator is registered.
|
|
32
|
+
* This event is emitted when a class with `@Model('my-package')` decorator is registered.
|
|
54
33
|
* It emits the name of the class.
|
|
55
34
|
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* const myEvent = new ModelRegistrationEvent('MyClass');
|
|
59
|
-
* EventService.getInstance().emit(myEvent);
|
|
60
|
-
* ```
|
|
61
35
|
* @group Events
|
|
62
36
|
* @returns The Event instance.
|
|
63
37
|
*/
|
|
@@ -65,14 +39,9 @@ export declare class ModelRegistrationEvent extends RegistrationEvent {
|
|
|
65
39
|
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
66
40
|
}
|
|
67
41
|
/**
|
|
68
|
-
* This event is emitted when a class with `@Overlay()` decorator is registered.
|
|
42
|
+
* This event is emitted when a class with `@Overlay('my-package')` decorator is registered.
|
|
69
43
|
* It emits the name of the class.
|
|
70
44
|
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```ts
|
|
73
|
-
* const myEvent = new OverlayRegistrationEvent('MyClass');
|
|
74
|
-
* EventService.getInstance().emit(myEvent);
|
|
75
|
-
* ```
|
|
76
45
|
* @group Events
|
|
77
46
|
* @returns The Event instance.
|
|
78
47
|
*/
|
|
@@ -80,15 +49,9 @@ export declare class OverlayRegistrationEvent extends RegistrationEvent {
|
|
|
80
49
|
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
81
50
|
}
|
|
82
51
|
/**
|
|
83
|
-
* This event is emitted when a class with `@Action(
|
|
84
|
-
*
|
|
85
|
-
* It emits the name of the class.
|
|
52
|
+
* This event is emitted when a class with `@Action(ResourceClass)` decorator is registered.
|
|
53
|
+
* It emits the name of the resource class and the name of the action.
|
|
86
54
|
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* const myEvent = new ResourceActionRegistrationEvent('MyClass');
|
|
90
|
-
* EventService.getInstance().emit(myEvent);
|
|
91
|
-
* ```
|
|
92
55
|
* @group Events
|
|
93
56
|
* @returns The Event instance.
|
|
94
57
|
*/
|
|
@@ -96,14 +59,9 @@ export declare class ResourceActionRegistrationEvent extends RegistrationEvent {
|
|
|
96
59
|
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
97
60
|
}
|
|
98
61
|
/**
|
|
99
|
-
* This event is emitted when a class with `@Resource()` decorator is registered.
|
|
62
|
+
* This event is emitted when a class with `@Resource('my-package')` decorator is registered.
|
|
100
63
|
* It emits the name of the class.
|
|
101
64
|
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```ts
|
|
104
|
-
* const myEvent = new ResourceRegistrationEvent('MyClass');
|
|
105
|
-
* EventService.getInstance().emit(myEvent);
|
|
106
|
-
* ```
|
|
107
65
|
* @group Events
|
|
108
66
|
* @returns The Event instance.
|
|
109
67
|
*/
|
|
@@ -6,31 +6,15 @@ import { Event } from './event.model.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* The RegistrationEvent class is the superclass for all events in relation to class registration.
|
|
8
8
|
*
|
|
9
|
-
* :::warning Warning
|
|
10
|
-
* It is not a good practice to create an event from this class directly,
|
|
11
|
-
* but should rather create one from one of the subclasses.
|
|
12
|
-
* This promotes a more accurate classification of events.
|
|
13
|
-
* :::
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const myEvent = new RegistrationEvent('MyClass');
|
|
18
|
-
* EventService.getInstance().emit(myEvent);
|
|
19
|
-
* ```
|
|
20
9
|
* @group Events
|
|
21
10
|
* @returns The Event instance.
|
|
22
11
|
*/
|
|
23
12
|
export class RegistrationEvent extends Event {
|
|
24
13
|
}
|
|
25
14
|
/**
|
|
26
|
-
* This event is emitted when a class with `@Anchor()` decorator is registered.
|
|
15
|
+
* This event is emitted when a class with `@Anchor('my-package')` decorator is registered.
|
|
27
16
|
* It emits the name of the class.
|
|
28
17
|
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* const myEvent = new AnchorRegistrationEvent('MyClass');
|
|
32
|
-
* EventService.getInstance().emit(myEvent);
|
|
33
|
-
* ```
|
|
34
18
|
* @group Events
|
|
35
19
|
* @returns The Event instance.
|
|
36
20
|
*/
|
|
@@ -40,21 +24,15 @@ export class AnchorRegistrationEvent extends RegistrationEvent {
|
|
|
40
24
|
descriptor.value = function (...args) {
|
|
41
25
|
originalMethod.apply(this, args);
|
|
42
26
|
if (args[1].prototype instanceof AAnchor) {
|
|
43
|
-
|
|
44
|
-
eventService.emit(event);
|
|
27
|
+
eventService.emit(new AnchorRegistrationEvent(args[0]));
|
|
45
28
|
}
|
|
46
29
|
};
|
|
47
30
|
}
|
|
48
31
|
}
|
|
49
32
|
/**
|
|
50
|
-
* This event is emitted when a class with `@Action(
|
|
51
|
-
* It emits the name of the class.
|
|
33
|
+
* This event is emitted when a class with `@Action(ModelClass)` decorator is registered.
|
|
34
|
+
* It emits the name of the model class and the name of the action.
|
|
52
35
|
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* const myEvent = new ModelActionRegistrationEvent('MyClass');
|
|
56
|
-
* EventService.getInstance().emit(myEvent);
|
|
57
|
-
* ```
|
|
58
36
|
* @group Events
|
|
59
37
|
* @returns The Event instance.
|
|
60
38
|
*/
|
|
@@ -63,22 +41,16 @@ export class ModelActionRegistrationEvent extends RegistrationEvent {
|
|
|
63
41
|
const originalMethod = descriptor.value;
|
|
64
42
|
descriptor.value = function (...args) {
|
|
65
43
|
originalMethod.apply(this, args);
|
|
66
|
-
for (const action of args[
|
|
67
|
-
|
|
68
|
-
eventService.emit(event);
|
|
44
|
+
for (const action of args[1]) {
|
|
45
|
+
eventService.emit(new ModelActionRegistrationEvent(`${args[0].name}:${action.constructor.name}`));
|
|
69
46
|
}
|
|
70
47
|
};
|
|
71
48
|
}
|
|
72
49
|
}
|
|
73
50
|
/**
|
|
74
|
-
* This event is emitted when a class with `@Model()` decorator is registered.
|
|
51
|
+
* This event is emitted when a class with `@Model('my-package')` decorator is registered.
|
|
75
52
|
* It emits the name of the class.
|
|
76
53
|
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```ts
|
|
79
|
-
* const myEvent = new ModelRegistrationEvent('MyClass');
|
|
80
|
-
* EventService.getInstance().emit(myEvent);
|
|
81
|
-
* ```
|
|
82
54
|
* @group Events
|
|
83
55
|
* @returns The Event instance.
|
|
84
56
|
*/
|
|
@@ -88,21 +60,15 @@ export class ModelRegistrationEvent extends RegistrationEvent {
|
|
|
88
60
|
descriptor.value = function (...args) {
|
|
89
61
|
originalMethod.apply(this, args);
|
|
90
62
|
if (args[1].prototype instanceof AModel) {
|
|
91
|
-
|
|
92
|
-
eventService.emit(event);
|
|
63
|
+
eventService.emit(new ModelRegistrationEvent(args[0]));
|
|
93
64
|
}
|
|
94
65
|
};
|
|
95
66
|
}
|
|
96
67
|
}
|
|
97
68
|
/**
|
|
98
|
-
* This event is emitted when a class with `@Overlay()` decorator is registered.
|
|
69
|
+
* This event is emitted when a class with `@Overlay('my-package')` decorator is registered.
|
|
99
70
|
* It emits the name of the class.
|
|
100
71
|
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```ts
|
|
103
|
-
* const myEvent = new OverlayRegistrationEvent('MyClass');
|
|
104
|
-
* EventService.getInstance().emit(myEvent);
|
|
105
|
-
* ```
|
|
106
72
|
* @group Events
|
|
107
73
|
* @returns The Event instance.
|
|
108
74
|
*/
|
|
@@ -112,22 +78,15 @@ export class OverlayRegistrationEvent extends RegistrationEvent {
|
|
|
112
78
|
descriptor.value = function (...args) {
|
|
113
79
|
originalMethod.apply(this, args);
|
|
114
80
|
if (args[1].prototype instanceof AOverlay) {
|
|
115
|
-
|
|
116
|
-
eventService.emit(event);
|
|
81
|
+
eventService.emit(new OverlayRegistrationEvent(args[0]));
|
|
117
82
|
}
|
|
118
83
|
};
|
|
119
84
|
}
|
|
120
85
|
}
|
|
121
86
|
/**
|
|
122
|
-
* This event is emitted when a class with `@Action(
|
|
123
|
-
*
|
|
124
|
-
* It emits the name of the class.
|
|
87
|
+
* This event is emitted when a class with `@Action(ResourceClass)` decorator is registered.
|
|
88
|
+
* It emits the name of the resource class and the name of the action.
|
|
125
89
|
*
|
|
126
|
-
* @example
|
|
127
|
-
* ```ts
|
|
128
|
-
* const myEvent = new ResourceActionRegistrationEvent('MyClass');
|
|
129
|
-
* EventService.getInstance().emit(myEvent);
|
|
130
|
-
* ```
|
|
131
90
|
* @group Events
|
|
132
91
|
* @returns The Event instance.
|
|
133
92
|
*/
|
|
@@ -136,22 +95,16 @@ export class ResourceActionRegistrationEvent extends RegistrationEvent {
|
|
|
136
95
|
const originalMethod = descriptor.value;
|
|
137
96
|
descriptor.value = function (...args) {
|
|
138
97
|
originalMethod.apply(this, args);
|
|
139
|
-
for (const action of args[
|
|
140
|
-
|
|
141
|
-
eventService.emit(event);
|
|
98
|
+
for (const action of args[1]) {
|
|
99
|
+
eventService.emit(new ResourceActionRegistrationEvent(`${args[0].name}:${action.constructor.name}`));
|
|
142
100
|
}
|
|
143
101
|
};
|
|
144
102
|
}
|
|
145
103
|
}
|
|
146
104
|
/**
|
|
147
|
-
* This event is emitted when a class with `@Resource()` decorator is registered.
|
|
105
|
+
* This event is emitted when a class with `@Resource('my-package')` decorator is registered.
|
|
148
106
|
* It emits the name of the class.
|
|
149
107
|
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```ts
|
|
152
|
-
* const myEvent = new ResourceRegistrationEvent('MyClass');
|
|
153
|
-
* EventService.getInstance().emit(myEvent);
|
|
154
|
-
* ```
|
|
155
108
|
* @group Events
|
|
156
109
|
* @returns The Event instance.
|
|
157
110
|
*/
|
|
@@ -161,8 +114,7 @@ export class ResourceRegistrationEvent extends RegistrationEvent {
|
|
|
161
114
|
descriptor.value = function (...args) {
|
|
162
115
|
originalMethod.apply(this, args);
|
|
163
116
|
if (args[1].prototype instanceof AResource) {
|
|
164
|
-
|
|
165
|
-
eventService.emit(event);
|
|
117
|
+
eventService.emit(new ResourceRegistrationEvent(args[0]));
|
|
166
118
|
}
|
|
167
119
|
};
|
|
168
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration.event.js","sourceRoot":"","sources":["../../src/events/registration.event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registration.event.js","sourceRoot":"","sources":["../../src/events/registration.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAK9D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAW;CAAG;AAErD;;;;;;GAMG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iBAAiB;IAC5D,MAAM,CAAU,SAAS,CAAC,YAA0B,EAAE,UAA8B;QAClF,MAAM,cAAc,GAE0C,UAAU,CAAC,KAAK,CAAC;QAE/E,UAAU,CAAC,KAAK,GAAG,UACjB,GAAG,IAA4D;YAE/D,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAEjC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,OAAO,EAAE,CAAC;gBACzC,YAAY,CAAC,IAAI,CAAC,IAAI,uBAAuB,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AAS,EAAE,CAAC;gBAC3C,YAAY,CAAC,IAAI,CAAC,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,72 +1,59 @@
|
|
|
1
|
+
import type { ModelSerializedOutput, ResourceSerializedOutput } from '../app.type.js';
|
|
2
|
+
import type { EventService } from '../services/event/event.service.js';
|
|
1
3
|
import { Event } from './event.model.js';
|
|
2
4
|
/**
|
|
3
5
|
* The SerializationEvent class is the superclass for all events in relation to serialization and deserialization.
|
|
4
6
|
*
|
|
5
|
-
* :::warning Warning
|
|
6
|
-
* It is not a good practice to create an event from this class directly,
|
|
7
|
-
* but should rather create one from one of the subclasses.
|
|
8
|
-
* This promotes a more accurate classification of events.
|
|
9
|
-
* :::
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const myEvent = new SerializationEvent();
|
|
14
|
-
* EventService.getInstance().emit(myEvent);
|
|
15
|
-
* ```
|
|
16
7
|
* @group Events
|
|
17
8
|
* @returns The Event instance.
|
|
18
9
|
*/
|
|
19
|
-
export declare class SerializationEvent extends Event<
|
|
10
|
+
export declare class SerializationEvent<T> extends Event<T> {
|
|
20
11
|
}
|
|
21
12
|
/**
|
|
22
13
|
* This event is emitted when models are deserialized from serialized output.
|
|
23
14
|
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const myEvent = new ModelDeserializedEvent();
|
|
27
|
-
* EventService.getInstance().emit(myEvent);
|
|
28
|
-
* ```
|
|
29
15
|
* @group Events
|
|
30
16
|
* @returns The Event instance.
|
|
31
17
|
*/
|
|
32
|
-
export declare class ModelDeserializedEvent extends SerializationEvent {
|
|
18
|
+
export declare class ModelDeserializedEvent extends SerializationEvent<ModelSerializedOutput> {
|
|
19
|
+
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
33
20
|
}
|
|
34
21
|
/**
|
|
35
22
|
* This event is emitted when models are serialized to an output.
|
|
36
23
|
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const myEvent = new ModelSerializedEvent();
|
|
40
|
-
* EventService.getInstance().emit(myEvent);
|
|
41
|
-
* ```
|
|
42
24
|
* @group Events
|
|
43
25
|
* @returns The Event instance.
|
|
44
26
|
*/
|
|
45
|
-
export declare class ModelSerializedEvent extends SerializationEvent {
|
|
27
|
+
export declare class ModelSerializedEvent extends SerializationEvent<ModelSerializedOutput> {
|
|
28
|
+
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
46
29
|
}
|
|
47
30
|
/**
|
|
48
31
|
* This event is emitted when resources are deserialized from serialized output.
|
|
49
32
|
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const myEvent = new ResourceDeserializedEvent();
|
|
53
|
-
* EventService.getInstance().emit(myEvent);
|
|
54
|
-
* ```
|
|
55
33
|
* @group Events
|
|
56
34
|
* @returns The Event instance.
|
|
57
35
|
*/
|
|
58
|
-
export declare class ResourceDeserializedEvent extends SerializationEvent
|
|
36
|
+
export declare class ResourceDeserializedEvent extends SerializationEvent<{
|
|
37
|
+
actual: ResourceSerializedOutput;
|
|
38
|
+
old: ResourceSerializedOutput;
|
|
39
|
+
}> {
|
|
40
|
+
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* This event is emitted when actual resources are serialized to an output.
|
|
44
|
+
*
|
|
45
|
+
* @group Events
|
|
46
|
+
* @returns The Event instance.
|
|
47
|
+
*/
|
|
48
|
+
export declare class ActualResourceSerializedEvent extends SerializationEvent<ResourceSerializedOutput> {
|
|
49
|
+
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
59
50
|
}
|
|
60
51
|
/**
|
|
61
|
-
* This event is emitted when resources are serialized to an output.
|
|
52
|
+
* This event is emitted when new resources are serialized to an output.
|
|
62
53
|
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const myEvent = new ResourceSerializedEvent();
|
|
66
|
-
* EventService.getInstance().emit(myEvent);
|
|
67
|
-
* ```
|
|
68
54
|
* @group Events
|
|
69
55
|
* @returns The Event instance.
|
|
70
56
|
*/
|
|
71
|
-
export declare class
|
|
57
|
+
export declare class NewResourceSerializedEvent extends SerializationEvent<ResourceSerializedOutput> {
|
|
58
|
+
static registrar(eventService: EventService, descriptor: PropertyDescriptor): void;
|
|
72
59
|
}
|
|
@@ -2,17 +2,6 @@ import { Event } from './event.model.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* The SerializationEvent class is the superclass for all events in relation to serialization and deserialization.
|
|
4
4
|
*
|
|
5
|
-
* :::warning Warning
|
|
6
|
-
* It is not a good practice to create an event from this class directly,
|
|
7
|
-
* but should rather create one from one of the subclasses.
|
|
8
|
-
* This promotes a more accurate classification of events.
|
|
9
|
-
* :::
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const myEvent = new SerializationEvent();
|
|
14
|
-
* EventService.getInstance().emit(myEvent);
|
|
15
|
-
* ```
|
|
16
5
|
* @group Events
|
|
17
6
|
* @returns The Event instance.
|
|
18
7
|
*/
|
|
@@ -21,53 +10,80 @@ export class SerializationEvent extends Event {
|
|
|
21
10
|
/**
|
|
22
11
|
* This event is emitted when models are deserialized from serialized output.
|
|
23
12
|
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const myEvent = new ModelDeserializedEvent();
|
|
27
|
-
* EventService.getInstance().emit(myEvent);
|
|
28
|
-
* ```
|
|
29
13
|
* @group Events
|
|
30
14
|
* @returns The Event instance.
|
|
31
15
|
*/
|
|
32
16
|
export class ModelDeserializedEvent extends SerializationEvent {
|
|
17
|
+
static registrar(eventService, descriptor) {
|
|
18
|
+
const originalMethod = descriptor.value;
|
|
19
|
+
descriptor.value = async function (...args) {
|
|
20
|
+
const result = await originalMethod.apply(this, args);
|
|
21
|
+
eventService.emit(new ModelDeserializedEvent(undefined, args[0]));
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
33
25
|
}
|
|
34
26
|
/**
|
|
35
27
|
* This event is emitted when models are serialized to an output.
|
|
36
28
|
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const myEvent = new ModelSerializedEvent();
|
|
40
|
-
* EventService.getInstance().emit(myEvent);
|
|
41
|
-
* ```
|
|
42
29
|
* @group Events
|
|
43
30
|
* @returns The Event instance.
|
|
44
31
|
*/
|
|
45
32
|
export class ModelSerializedEvent extends SerializationEvent {
|
|
33
|
+
static registrar(eventService, descriptor) {
|
|
34
|
+
const originalMethod = descriptor.value;
|
|
35
|
+
descriptor.value = async function (...args) {
|
|
36
|
+
const result = await originalMethod.apply(this, args);
|
|
37
|
+
eventService.emit(new ModelSerializedEvent(undefined, result));
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
46
41
|
}
|
|
47
42
|
/**
|
|
48
43
|
* This event is emitted when resources are deserialized from serialized output.
|
|
49
44
|
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const myEvent = new ResourceDeserializedEvent();
|
|
53
|
-
* EventService.getInstance().emit(myEvent);
|
|
54
|
-
* ```
|
|
55
45
|
* @group Events
|
|
56
46
|
* @returns The Event instance.
|
|
57
47
|
*/
|
|
58
48
|
export class ResourceDeserializedEvent extends SerializationEvent {
|
|
49
|
+
static registrar(eventService, descriptor) {
|
|
50
|
+
const originalMethod = descriptor.value;
|
|
51
|
+
descriptor.value = async function (...args) {
|
|
52
|
+
await originalMethod.apply(this, args);
|
|
53
|
+
eventService.emit(new ResourceDeserializedEvent(undefined, { actual: args[0], old: args[1] }));
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* This event is emitted when actual resources are serialized to an output.
|
|
59
|
+
*
|
|
60
|
+
* @group Events
|
|
61
|
+
* @returns The Event instance.
|
|
62
|
+
*/
|
|
63
|
+
export class ActualResourceSerializedEvent extends SerializationEvent {
|
|
64
|
+
static registrar(eventService, descriptor) {
|
|
65
|
+
const originalMethod = descriptor.value;
|
|
66
|
+
descriptor.value = async function (...args) {
|
|
67
|
+
const result = await originalMethod.apply(this, args);
|
|
68
|
+
eventService.emit(new ActualResourceSerializedEvent(undefined, result));
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
73
|
/**
|
|
61
|
-
* This event is emitted when resources are serialized to an output.
|
|
74
|
+
* This event is emitted when new resources are serialized to an output.
|
|
62
75
|
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const myEvent = new ResourceSerializedEvent();
|
|
66
|
-
* EventService.getInstance().emit(myEvent);
|
|
67
|
-
* ```
|
|
68
76
|
* @group Events
|
|
69
77
|
* @returns The Event instance.
|
|
70
78
|
*/
|
|
71
|
-
export class
|
|
79
|
+
export class NewResourceSerializedEvent extends SerializationEvent {
|
|
80
|
+
static registrar(eventService, descriptor) {
|
|
81
|
+
const originalMethod = descriptor.value;
|
|
82
|
+
descriptor.value = async function (...args) {
|
|
83
|
+
const result = await originalMethod.apply(this, args);
|
|
84
|
+
eventService.emit(new NewResourceSerializedEvent(undefined, result));
|
|
85
|
+
return result;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
72
88
|
}
|
|
73
89
|
//# sourceMappingURL=serialization.event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.event.js","sourceRoot":"","sources":["../../src/events/serialization.event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serialization.event.js","sourceRoot":"","sources":["../../src/events/serialization.event.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,OAAO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