@afora/core 0.0.2 → 0.0.4
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/README.md +220 -733
- package/dist/core/application/application.d.ts +9 -1
- package/dist/core/application/exceptions.d.ts +28 -0
- package/dist/core/application/registry.d.ts +33 -0
- package/dist/core/application/start.d.ts +75 -0
- package/dist/core/application/types/application.interface.d.ts +229 -7
- package/dist/core/blueprint/types/blueprint.interface.d.ts +66 -11
- package/dist/core/blueprint/types/slice.interface.d.ts +7 -2
- package/dist/core/command/command.d.ts +25 -0
- package/dist/core/command/exceptions.d.ts +33 -0
- package/dist/core/command/types/command.interface.d.ts +108 -0
- package/dist/core/entity/event.d.ts +12 -2
- package/dist/core/environment/environment.d.ts +4 -1
- package/dist/core/exception/exception.d.ts +4 -0
- package/dist/core/exception/exported.d.ts +4 -0
- package/dist/core/json.d.ts +10 -0
- package/dist/core/logger/exceptions.d.ts +4 -0
- package/dist/core/logger/logger.d.ts +106 -0
- package/dist/core/output/exceptions.d.ts +8 -0
- package/dist/core/output/openapi-sink.d.ts +83 -0
- package/dist/core/output/output.d.ts +19 -0
- package/dist/core/output/problem.d.ts +15 -0
- package/dist/core/output/select.d.ts +14 -0
- package/dist/core/output/stage.d.ts +24 -0
- package/dist/core/output/status.d.ts +17 -0
- package/dist/core/output/types/output.interface.d.ts +171 -0
- package/dist/core/property/abstract-property.d.ts +8 -7
- package/dist/core/property/define-property.d.ts +8 -7
- package/dist/core/property/property.d.ts +26 -15
- package/dist/core/property/types/abstract-property-constructor.type.d.ts +8 -7
- package/dist/core/property/types/define-property.interface.d.ts +5 -4
- package/dist/core/property/types/optional-property.type.d.ts +5 -5
- package/dist/core/property/types/property-collection.type.d.ts +2 -2
- package/dist/core/property/types/property-constructor.type.d.ts +5 -1
- package/dist/core/property/types/property-options.interface.d.ts +17 -8
- package/dist/core/property/types/property-type.interface.d.ts +7 -3
- package/dist/core/property/types/property.interface.d.ts +5 -4
- package/dist/core/record/abstract-record.d.ts +12 -4
- package/dist/core/record/types/plugin.interface.d.ts +13 -3
- package/dist/core/record/types/record.interface.d.ts +20 -8
- package/dist/core/repository/exceptions.d.ts +4 -0
- package/dist/core/repository/in-memory.d.ts +3 -0
- package/dist/core/repository/provider.d.ts +6 -0
- package/dist/core/repository/query.d.ts +9 -0
- package/dist/core/repository/references.d.ts +4 -2
- package/dist/core/repository/repository.d.ts +4 -2
- package/dist/core/repository/state.d.ts +4 -0
- package/dist/core/repository/types/query.interface.d.ts +67 -0
- package/dist/core/repository/types/repository.interface.d.ts +13 -13
- package/dist/core/schema/types/schema.interface.d.ts +11 -4
- package/dist/core/symbols/meta.d.ts +2 -0
- package/dist/core/use-case/exceptions.d.ts +10 -0
- package/dist/core/use-case/scope.d.ts +24 -0
- package/dist/core/use-case/steps/describe.d.ts +13 -0
- package/dist/core/use-case/steps/references.d.ts +27 -0
- package/dist/core/use-case/steps/run.d.ts +20 -0
- package/dist/core/use-case/steps/types/steps.interface.d.ts +153 -0
- package/dist/core/use-case/steps/validate.d.ts +17 -0
- package/dist/core/use-case/use-case.d.ts +79 -13
- package/dist/experimental.d.ts +6 -0
- package/dist/experimental.js +123 -0
- package/dist/index-ewm6r4nw.js +5335 -0
- package/dist/index-hn82hm31.js +1651 -0
- package/dist/index.d.ts +34 -12
- package/dist/index.js +343 -4142
- package/dist/std/blueprint-plugin.d.ts +10 -10
- package/dist/std/blueprint.d.ts +10 -10
- package/dist/std/entity.d.ts +2 -2
- package/dist/std/properties/contact.d.ts +4 -4
- package/dist/std/properties/enum.d.ts +1 -1
- package/dist/std/properties/headless.d.ts +1 -1
- package/dist/std/properties/identity.d.ts +2 -2
- package/dist/std/properties/password.d.ts +1 -1
- package/dist/std/properties/primitives.d.ts +5 -5
- package/dist/std/properties/time.d.ts +2 -2
- package/dist/std/record-plugins.d.ts +12 -12
- package/dist/std/record.d.ts +1 -1
- package/dist/std/stages.d.ts +2 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +502 -0
- package/dist/testing/provider-contract.d.ts +22 -0
- package/package.json +28 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { applicationOf, isApplication } from "./core/application/application.js";
|
|
2
|
-
export { ApplicationConflict, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, UnregisteredApplicationReference, UnregisteredRepositoryDependency, } from "./core/application/exceptions.js";
|
|
3
|
-
export
|
|
2
|
+
export { ApplicationAlreadyStarted, ApplicationConflict, ApplicationNotStarted, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, InvalidApplicationEnvironment, UnregisteredApplicationReference, UnregisteredRepositoryDependency, UnregisteredUseCaseDependency, } from "./core/application/exceptions.js";
|
|
3
|
+
export { type Register, type RegisteredApplication, resetApplication, useApplication, } from "./core/application/registry.js";
|
|
4
|
+
export { isLogFactory, isProviderFactory, type LogFactory, logFrom, type ProviderFactory, providerFrom, } from "./core/application/start.js";
|
|
5
|
+
export type { AnyApplication, ApplicationCollections, ApplicationContext, ApplicationDescription, ApplicationSettings, ApplicationStartOptions, CommandDescription, ExceptionDescription, FieldDescription, FieldsDescription, IApplication, LogDescription, OutputDescription, PropertyDescription, PropertyLineageDescription, PropertyReference, RecordDescription, UseCaseDependencyDescription, UseCaseDescription, } from "./core/application/types/application.interface.js";
|
|
4
6
|
export { blueprintBuilderOf } from "./core/blueprint/blueprint.js";
|
|
5
7
|
export { blueprintPluginOf } from "./core/blueprint/blueprint-plugin.js";
|
|
6
8
|
export { ReservedBlueprintKey, UndeclaredBlueprintProperty, } from "./core/blueprint/exceptions.js";
|
|
@@ -8,26 +10,40 @@ export { isBlueprint } from "./core/blueprint/is-blueprint.js";
|
|
|
8
10
|
export { isBlueprintList, listOf } from "./core/blueprint/list.js";
|
|
9
11
|
export { optionalOf } from "./core/blueprint/optional.js";
|
|
10
12
|
export { isOptionalRecord, isRecordClass, recordFieldOf, } from "./core/blueprint/record-field.js";
|
|
11
|
-
export {
|
|
12
|
-
export type { AnyBlueprint, AnyBlueprintList, AnyOptionalRecord, AnyRecordClass, BlueprintBuilder, BlueprintContext, BlueprintData, BlueprintDefinition, BlueprintFactoryContext, BlueprintField, BlueprintHelpers, BlueprintInput, BlueprintListOptions, BlueprintPluginContext, BlueprintPropertySchema, BlueprintSchema, BlueprintSource, BlueprintValue, CallableProperties, IBlueprint, IBlueprintCollection, IBlueprintList, JoinedProperties, ListProperties, OptionalBlueprint, OptionalBlueprintList, OptionalProperties, OptionalRecord, } from "./core/blueprint/types/blueprint.interface.js";
|
|
13
|
+
export type { AnyBlueprint, AnyBlueprintList, AnyOptionalRecord, AnyRecordClass, BlueprintBuilder, BlueprintContext, BlueprintData, BlueprintDefinition, BlueprintField, BlueprintHelpers, BlueprintInput, BlueprintListOptions, BlueprintPluginContext, BlueprintSchema, BlueprintSource, BlueprintValue, IBlueprint, IBlueprintCollection, IBlueprintList, OptionalBlueprint, OptionalBlueprintList, OptionalRecord, } from "./core/blueprint/types/blueprint.interface.js";
|
|
13
14
|
export type { BlueprintFactory, IBlueprintFactories, IBlueprintPlugin, } from "./core/blueprint/types/blueprint-plugin.interface.js";
|
|
14
|
-
export
|
|
15
|
+
export { commandOf, isCommand } from "./core/command/command.js";
|
|
16
|
+
export { CommandEventFailed, InvalidCommandContext, InvalidCommandDeclaration, InvalidCommandEnvironment, UnknownCommandOperation, } from "./core/command/exceptions.js";
|
|
17
|
+
export type { AnyCommand, CommandEnvOption, CommandEventErrorHandler, CommandEventHandler, CommandEventInfo, CommandEvents, CommandExecution, CommandInput, CommandOf, CommandOperation, CommandOptions, CommandResponse, CommandSettings, CommandUseCases, } from "./core/command/types/command.interface.js";
|
|
15
18
|
export { AbstractEntity, ENTITY_IDENTITY_KEYS, EntityUniqueKeys, RESERVED_ENTITY_KEYS, } from "./core/entity/abstract-entity.js";
|
|
16
19
|
export { entityBuilderOf, isEntity, isEntityClass } from "./core/entity/entity.js";
|
|
17
|
-
export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, } from "./core/entity/event.js";
|
|
20
|
+
export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, EventHandlerContext, } from "./core/entity/event.js";
|
|
18
21
|
export { eventOf } from "./core/entity/event.js";
|
|
19
22
|
export { DeletedEntity, ImmutableEntityKey, ReservedEntityKey, } from "./core/entity/exceptions.js";
|
|
20
23
|
export type { DeclaredEntityInstance, EntityBuilder, EntityBuilderSettings, EntityConstructor, EntityIdentityKey, EntityInput, EntityOptions, EntityProperties, EntityUniqueKey, IEntityIdentity, } from "./core/entity/types/entity.interface.js";
|
|
21
|
-
export type { AnyEnvironment, EnvironmentDependencies, EnvironmentOptions, EnvironmentSource, EnvironmentValue, IEnvironment,
|
|
24
|
+
export type { AnyEnvironment, EnvironmentDependencies, EnvironmentOptions, EnvironmentSource, EnvironmentValue, IEnvironment, } from "./core/environment/environment.js";
|
|
22
25
|
export { environmentOf, InvalidEnvironment, isEnvironment, } from "./core/environment/environment.js";
|
|
23
26
|
export { ExceptionLayers } from "./core/exception/enums/exception-layers.js";
|
|
24
27
|
export type { DeclaredExceptionClass } from "./core/exception/exception.js";
|
|
25
28
|
export { Exception, exceptionOf, UNEXPECTED_ERROR, } from "./core/exception/exception.js";
|
|
26
29
|
export { guard } from "./core/exception/guard.js";
|
|
27
30
|
export type { ExceptionArgs, ExceptionClass, ExceptionDeclaration, ExceptionFrame, ExceptionInit, ExceptionMessage, ExceptionPropagation, ExceptionScope, } from "./core/exception/types/exception.interface.js";
|
|
31
|
+
export { InvalidLogDeclaration } from "./core/logger/exceptions.js";
|
|
32
|
+
export type { ILogger, ILogProvider, LogEntry, LogFields, LoggerDeclaration, LogLevel, LogProviderSettings, LogSettings, MemoryLogProvider, } from "./core/logger/logger.js";
|
|
33
|
+
export { consoleLogProvider, jsonLogProvider, Logger, LogLevels, logProviderOf, memoryLogProvider, } from "./core/logger/logger.js";
|
|
28
34
|
export { InvalidOpenAPIModel } from "./core/openapi/exceptions.js";
|
|
29
35
|
export { toOpenAPI } from "./core/openapi/openapi.js";
|
|
30
36
|
export type { OpenAPIComponents, OpenAPIOptions, OpenAPISchema, } from "./core/openapi/types/openapi.interface.js";
|
|
37
|
+
export { DuplicateOperation, InvalidOutputStage, } from "./core/output/exceptions.js";
|
|
38
|
+
export type { OpenAPIDocument, OpenAPIMethod, OpenAPISinkOptions, OperationRoute, RouteOptions, } from "./core/output/openapi-sink.js";
|
|
39
|
+
export { openapi, operationRoutes, routeOptionsIssue, } from "./core/output/openapi-sink.js";
|
|
40
|
+
export { isOutput, operationOf, outputOf } from "./core/output/output.js";
|
|
41
|
+
export { outputValueOf, PROBLEM_MEDIA_TYPE, problemOf, } from "./core/output/problem.js";
|
|
42
|
+
export type { SelectOptions } from "./core/output/select.js";
|
|
43
|
+
export { select } from "./core/output/select.js";
|
|
44
|
+
export { sinkOf, stageCatalogOf, stageDescriptionOf, stageKindOf, transformOf, } from "./core/output/stage.js";
|
|
45
|
+
export { statusOf } from "./core/output/status.js";
|
|
46
|
+
export type { AnyOutput, IStageCatalog, OperationCallOptions, OperationDescriptor, OperationPatch, OutputApplication, OutputOf, OutputSettings, OutputSource, OutputStatuses, PipeResult, Problem, ProblemOptions, SinkFactory, SinkSettings, SinkStage, Stage, StageContext, StageDescription, StageFactory, StageOptions, TransformFactory, TransformSettings, TransformStage, } from "./core/output/types/output.interface.js";
|
|
31
47
|
export type { Issue, IssueCode, ParseResult, } from "./core/parse/types/parse.interface.js";
|
|
32
48
|
export { AbstractProperty } from "./core/property/abstract-property.js";
|
|
33
49
|
export { AbstractDefineProperty } from "./core/property/define-property.js";
|
|
@@ -44,7 +60,7 @@ export type { OptionalProperty } from "./core/property/types/optional-property.t
|
|
|
44
60
|
export type { IProperty } from "./core/property/types/property.interface.js";
|
|
45
61
|
export type { AnyPropertyConstructor, IPropertyCollection, } from "./core/property/types/property-collection.type.js";
|
|
46
62
|
export type { PropertyValue } from "./core/property/types/property-constructor.type.js";
|
|
47
|
-
export type { CallableProperty, NumberConstraints, PropertyMetadata, PropertyOptions,
|
|
63
|
+
export type { CallableProperty, NumberConstraints, PropertyMetadata, PropertyOptions, StringConstraints, } from "./core/property/types/property-options.interface.js";
|
|
48
64
|
export type { IPropertyType, UniqueMark, } from "./core/property/types/property-type.interface.js";
|
|
49
65
|
export { AbstractRecord, RESERVED_RECORD_KEYS, } from "./core/record/abstract-record.js";
|
|
50
66
|
export { IncompatibleRecordPlugin, InvalidRecordPlugin, InvalidRecordValue, RecordPluginConflict, ReservedRecordKey, UndeclaredRecordProperty, UnknownRecordPlugin, } from "./core/record/exceptions.js";
|
|
@@ -53,21 +69,26 @@ export { hasPlugin, isRecordPlugin, pluginsOf, recordPluginOf, } from "./core/re
|
|
|
53
69
|
export { recordPluginCatalogOf } from "./core/record/plugin-catalog.js";
|
|
54
70
|
export type { RecordBuilder } from "./core/record/record.js";
|
|
55
71
|
export { recordBuilderOf } from "./core/record/record.js";
|
|
56
|
-
export type { AnyRecordPlugin, IRecordPlugin, IRecordPluginCatalog,
|
|
72
|
+
export type { AnyRecordPlugin, IRecordPlugin, IRecordPluginCatalog, PluginUniqueKey, RecordPluginDescriptor, RecordPluginOptions, RecordPluginReference, RecordPluginRequirement, RecordPluginsOption, } from "./core/record/types/plugin.interface.js";
|
|
57
73
|
export type { DeclaredRecordInstance, IRecord, MarkedUniqueKey, RecordChange, RecordChanges, RecordConstructor, RecordEffect, RecordEffects, RecordKey, RecordOptions, RecordSettings, RecordValue, } from "./core/record/types/record.interface.js";
|
|
58
|
-
export { InvalidRepositoryData, InvalidRepositoryDeclaration, InvalidRepositoryEntity, RepositoryEntityNotFound, RepositoryUniqueViolation, } from "./core/repository/exceptions.js";
|
|
74
|
+
export { InvalidRepositoryData, InvalidRepositoryDeclaration, InvalidRepositoryEntity, InvalidRepositoryQuery, RepositoryEntityNotFound, RepositoryUniqueViolation, } from "./core/repository/exceptions.js";
|
|
59
75
|
export { inMemoryProvider } from "./core/repository/in-memory.js";
|
|
76
|
+
export { providerDescriptionOf, providerOf } from "./core/repository/provider.js";
|
|
60
77
|
export type { RepositorySettings } from "./core/repository/repository.js";
|
|
61
78
|
export { AbstractRepository, isRepository, RepositoryOf, repositoryOf, } from "./core/repository/repository.js";
|
|
62
|
-
export type {
|
|
79
|
+
export type { ProviderCapabilities, ProviderDescription, ProviderOption, ProviderOptions, ProviderSettings, RepositoryExists, RepositoryFindMany, RepositoryFindPage, RepositoryOrder, RepositoryPage, RepositoryQuery, RepositoryWhere, } from "./core/repository/types/query.interface.js";
|
|
80
|
+
export type { AnyRepository, AnyRepositoryEntity, EntityInstanceOf, EntityKeyOf, EntityNonUniqueKeyOf, EntityUniqueKeyOf, EntityValueOf, IRepositoryProvider, QueryValueOf, RepositoryAction, RepositoryContext, RepositoryCount, RepositoryCreate, RepositoryCreateInput, RepositoryData, RepositoryDelete, RepositoryFindBy, RepositoryFindManyBy, RepositoryUpdate, } from "./core/repository/types/repository.interface.js";
|
|
63
81
|
export type { SchemaClass } from "./core/schema/schema.js";
|
|
64
82
|
export { schemaOf } from "./core/schema/schema.js";
|
|
65
83
|
export type { ISchema, ISchemaType, } from "./core/schema/types/schema.interface.js";
|
|
66
84
|
export type { StandardSchemaV1 } from "./core/standard/standard-schema.js";
|
|
67
85
|
export { Demo } from "./core/symbols/demo.js";
|
|
68
86
|
export { Kind } from "./core/symbols/kind.js";
|
|
87
|
+
export { Meta } from "./core/symbols/meta.js";
|
|
69
88
|
export { State } from "./core/symbols/state.js";
|
|
70
|
-
export
|
|
89
|
+
export { InvalidUseCaseStep } from "./core/use-case/exceptions.js";
|
|
90
|
+
export type { StepEnsureKind, StepErrorDescription, StepFindTarget, StepReadAction, StepReference, StepRepositoryWith, StepValue, UseCaseStep, UseCaseStepDescription, } from "./core/use-case/steps/types/steps.interface.js";
|
|
91
|
+
export type { AnyExceptionClass, AnyUseCaseClass, DependencyFunctions, DependencyOf, DependencyOverrides, StepsUseCaseConstructor, UseCaseCollection, UseCaseConstructor, UseCaseContext, UseCaseDependencies, UseCaseDependency, UseCaseInput, UseCaseOptions, UseCaseResponse, UseCaseSettings, UseCaseStepsSettings, } from "./core/use-case/use-case.js";
|
|
71
92
|
export { AbstractUseCase, InvalidUseCaseDeclaration, InvalidUseCaseDependencies, isUseCase, isUseCaseClass, UseCaseAlreadyExecuted, useCaseOf, } from "./core/use-case/use-case.js";
|
|
72
93
|
export { blueprintOf } from "./std/blueprint.js";
|
|
73
94
|
export { Std } from "./std/blueprint-plugin.js";
|
|
@@ -84,3 +105,4 @@ export { recordOf } from "./std/record.js";
|
|
|
84
105
|
export { Archivable, Authenticatable, Ownable, Publishable, StdRecordPlugins, Taggable, } from "./std/record-plugins.js";
|
|
85
106
|
export type { IdGenerator, PasswordHasher, RuntimeServices, } from "./std/runtime.js";
|
|
86
107
|
export { configure, PasswordHasherRequired, resetRuntime, SyncVerifyUnsupported, } from "./std/runtime.js";
|
|
108
|
+
export { StdStages } from "./std/stages.js";
|