@afora/core 0.0.2 → 0.0.3
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 +51 -0
- package/dist/core/application/types/application.interface.d.ts +186 -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 +102 -0
- 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/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 +21 -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 +74 -9
- package/dist/experimental.d.ts +6 -0
- package/dist/experimental.js +123 -0
- package/dist/index-hn82hm31.js +1651 -0
- package/dist/index-sw2b9ehx.js +5019 -0
- package/dist/index.d.ts +30 -11
- package/dist/index.js +325 -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 { isProviderFactory, type ProviderFactory, providerFrom, } from "./core/application/start.js";
|
|
5
|
+
export type { AnyApplication, ApplicationCollections, ApplicationDescription, ApplicationSettings, ApplicationStartOptions, CommandDescription, ExceptionDescription, FieldDescription, FieldsDescription, IApplication, 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,17 +10,18 @@ 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
20
|
export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, } 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";
|
|
@@ -28,6 +31,16 @@ export type { ExceptionArgs, ExceptionClass, ExceptionDeclaration, ExceptionFram
|
|
|
28
31
|
export { InvalidOpenAPIModel } from "./core/openapi/exceptions.js";
|
|
29
32
|
export { toOpenAPI } from "./core/openapi/openapi.js";
|
|
30
33
|
export type { OpenAPIComponents, OpenAPIOptions, OpenAPISchema, } from "./core/openapi/types/openapi.interface.js";
|
|
34
|
+
export { DuplicateOperation, InvalidOutputStage, } from "./core/output/exceptions.js";
|
|
35
|
+
export type { OpenAPIDocument, OpenAPIMethod, OpenAPISinkOptions, OperationRoute, RouteOptions, } from "./core/output/openapi-sink.js";
|
|
36
|
+
export { openapi, operationRoutes, routeOptionsIssue, } from "./core/output/openapi-sink.js";
|
|
37
|
+
export { isOutput, operationOf, outputOf } from "./core/output/output.js";
|
|
38
|
+
export { outputValueOf, PROBLEM_MEDIA_TYPE, problemOf, } from "./core/output/problem.js";
|
|
39
|
+
export type { SelectOptions } from "./core/output/select.js";
|
|
40
|
+
export { select } from "./core/output/select.js";
|
|
41
|
+
export { sinkOf, stageCatalogOf, stageDescriptionOf, stageKindOf, transformOf, } from "./core/output/stage.js";
|
|
42
|
+
export { statusOf } from "./core/output/status.js";
|
|
43
|
+
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
44
|
export type { Issue, IssueCode, ParseResult, } from "./core/parse/types/parse.interface.js";
|
|
32
45
|
export { AbstractProperty } from "./core/property/abstract-property.js";
|
|
33
46
|
export { AbstractDefineProperty } from "./core/property/define-property.js";
|
|
@@ -44,7 +57,7 @@ export type { OptionalProperty } from "./core/property/types/optional-property.t
|
|
|
44
57
|
export type { IProperty } from "./core/property/types/property.interface.js";
|
|
45
58
|
export type { AnyPropertyConstructor, IPropertyCollection, } from "./core/property/types/property-collection.type.js";
|
|
46
59
|
export type { PropertyValue } from "./core/property/types/property-constructor.type.js";
|
|
47
|
-
export type { CallableProperty, NumberConstraints, PropertyMetadata, PropertyOptions,
|
|
60
|
+
export type { CallableProperty, NumberConstraints, PropertyMetadata, PropertyOptions, StringConstraints, } from "./core/property/types/property-options.interface.js";
|
|
48
61
|
export type { IPropertyType, UniqueMark, } from "./core/property/types/property-type.interface.js";
|
|
49
62
|
export { AbstractRecord, RESERVED_RECORD_KEYS, } from "./core/record/abstract-record.js";
|
|
50
63
|
export { IncompatibleRecordPlugin, InvalidRecordPlugin, InvalidRecordValue, RecordPluginConflict, ReservedRecordKey, UndeclaredRecordProperty, UnknownRecordPlugin, } from "./core/record/exceptions.js";
|
|
@@ -53,21 +66,26 @@ export { hasPlugin, isRecordPlugin, pluginsOf, recordPluginOf, } from "./core/re
|
|
|
53
66
|
export { recordPluginCatalogOf } from "./core/record/plugin-catalog.js";
|
|
54
67
|
export type { RecordBuilder } from "./core/record/record.js";
|
|
55
68
|
export { recordBuilderOf } from "./core/record/record.js";
|
|
56
|
-
export type { AnyRecordPlugin, IRecordPlugin, IRecordPluginCatalog,
|
|
69
|
+
export type { AnyRecordPlugin, IRecordPlugin, IRecordPluginCatalog, PluginUniqueKey, RecordPluginDescriptor, RecordPluginOptions, RecordPluginReference, RecordPluginRequirement, RecordPluginsOption, } from "./core/record/types/plugin.interface.js";
|
|
57
70
|
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";
|
|
71
|
+
export { InvalidRepositoryData, InvalidRepositoryDeclaration, InvalidRepositoryEntity, InvalidRepositoryQuery, RepositoryEntityNotFound, RepositoryUniqueViolation, } from "./core/repository/exceptions.js";
|
|
59
72
|
export { inMemoryProvider } from "./core/repository/in-memory.js";
|
|
73
|
+
export { providerDescriptionOf, providerOf } from "./core/repository/provider.js";
|
|
60
74
|
export type { RepositorySettings } from "./core/repository/repository.js";
|
|
61
75
|
export { AbstractRepository, isRepository, RepositoryOf, repositoryOf, } from "./core/repository/repository.js";
|
|
62
|
-
export type {
|
|
76
|
+
export type { ProviderCapabilities, ProviderDescription, ProviderOption, ProviderOptions, ProviderSettings, RepositoryExists, RepositoryFindMany, RepositoryFindPage, RepositoryOrder, RepositoryPage, RepositoryQuery, RepositoryWhere, } from "./core/repository/types/query.interface.js";
|
|
77
|
+
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
78
|
export type { SchemaClass } from "./core/schema/schema.js";
|
|
64
79
|
export { schemaOf } from "./core/schema/schema.js";
|
|
65
80
|
export type { ISchema, ISchemaType, } from "./core/schema/types/schema.interface.js";
|
|
66
81
|
export type { StandardSchemaV1 } from "./core/standard/standard-schema.js";
|
|
67
82
|
export { Demo } from "./core/symbols/demo.js";
|
|
68
83
|
export { Kind } from "./core/symbols/kind.js";
|
|
84
|
+
export { Meta } from "./core/symbols/meta.js";
|
|
69
85
|
export { State } from "./core/symbols/state.js";
|
|
70
|
-
export
|
|
86
|
+
export { InvalidUseCaseStep } from "./core/use-case/exceptions.js";
|
|
87
|
+
export type { StepEnsureKind, StepErrorDescription, StepFindTarget, StepReadAction, StepReference, StepRepositoryWith, StepValue, UseCaseStep, UseCaseStepDescription, } from "./core/use-case/steps/types/steps.interface.js";
|
|
88
|
+
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
89
|
export { AbstractUseCase, InvalidUseCaseDeclaration, InvalidUseCaseDependencies, isUseCase, isUseCaseClass, UseCaseAlreadyExecuted, useCaseOf, } from "./core/use-case/use-case.js";
|
|
72
90
|
export { blueprintOf } from "./std/blueprint.js";
|
|
73
91
|
export { Std } from "./std/blueprint-plugin.js";
|
|
@@ -84,3 +102,4 @@ export { recordOf } from "./std/record.js";
|
|
|
84
102
|
export { Archivable, Authenticatable, Ownable, Publishable, StdRecordPlugins, Taggable, } from "./std/record-plugins.js";
|
|
85
103
|
export type { IdGenerator, PasswordHasher, RuntimeServices, } from "./std/runtime.js";
|
|
86
104
|
export { configure, PasswordHasherRequired, resetRuntime, SyncVerifyUnsupported, } from "./std/runtime.js";
|
|
105
|
+
export { StdStages } from "./std/stages.js";
|