@afora/core 0.0.3 → 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/dist/core/application/start.d.ts +25 -1
- package/dist/core/application/types/application.interface.d.ts +45 -2
- package/dist/core/command/types/command.interface.d.ts +6 -0
- package/dist/core/entity/event.d.ts +12 -2
- package/dist/core/logger/exceptions.d.ts +4 -0
- package/dist/core/logger/logger.d.ts +106 -0
- package/dist/core/use-case/scope.d.ts +3 -0
- package/dist/core/use-case/use-case.d.ts +5 -4
- package/dist/{index-sw2b9ehx.js → index-ewm6r4nw.js} +533 -217
- package/dist/index.d.ts +6 -3
- package/dist/index.js +30 -12
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { applicationOf, isApplication } from "./core/application/application.js";
|
|
2
2
|
export { ApplicationAlreadyStarted, ApplicationConflict, ApplicationNotStarted, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, InvalidApplicationEnvironment, UnregisteredApplicationReference, UnregisteredRepositoryDependency, UnregisteredUseCaseDependency, } from "./core/application/exceptions.js";
|
|
3
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
|
+
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";
|
|
6
6
|
export { blueprintBuilderOf } from "./core/blueprint/blueprint.js";
|
|
7
7
|
export { blueprintPluginOf } from "./core/blueprint/blueprint-plugin.js";
|
|
8
8
|
export { ReservedBlueprintKey, UndeclaredBlueprintProperty, } from "./core/blueprint/exceptions.js";
|
|
@@ -17,7 +17,7 @@ export { CommandEventFailed, InvalidCommandContext, InvalidCommandDeclaration, I
|
|
|
17
17
|
export type { AnyCommand, CommandEnvOption, CommandEventErrorHandler, CommandEventHandler, CommandEventInfo, CommandEvents, CommandExecution, CommandInput, CommandOf, CommandOperation, CommandOptions, CommandResponse, CommandSettings, CommandUseCases, } from "./core/command/types/command.interface.js";
|
|
18
18
|
export { AbstractEntity, ENTITY_IDENTITY_KEYS, EntityUniqueKeys, RESERVED_ENTITY_KEYS, } from "./core/entity/abstract-entity.js";
|
|
19
19
|
export { entityBuilderOf, isEntity, isEntityClass } from "./core/entity/entity.js";
|
|
20
|
-
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";
|
|
21
21
|
export { eventOf } from "./core/entity/event.js";
|
|
22
22
|
export { DeletedEntity, ImmutableEntityKey, ReservedEntityKey, } from "./core/entity/exceptions.js";
|
|
23
23
|
export type { DeclaredEntityInstance, EntityBuilder, EntityBuilderSettings, EntityConstructor, EntityIdentityKey, EntityInput, EntityOptions, EntityProperties, EntityUniqueKey, IEntityIdentity, } from "./core/entity/types/entity.interface.js";
|
|
@@ -28,6 +28,9 @@ export type { DeclaredExceptionClass } from "./core/exception/exception.js";
|
|
|
28
28
|
export { Exception, exceptionOf, UNEXPECTED_ERROR, } from "./core/exception/exception.js";
|
|
29
29
|
export { guard } from "./core/exception/guard.js";
|
|
30
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";
|
|
31
34
|
export { InvalidOpenAPIModel } from "./core/openapi/exceptions.js";
|
|
32
35
|
export { toOpenAPI } from "./core/openapi/openapi.js";
|
|
33
36
|
export type { OpenAPIComponents, OpenAPIOptions, OpenAPISchema, } from "./core/openapi/types/openapi.interface.js";
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,24 @@ import {
|
|
|
3
3
|
environmentOf2,
|
|
4
4
|
isEnvironment2,
|
|
5
5
|
guard2,
|
|
6
|
+
InvalidApplicationDeclaration2,
|
|
7
|
+
DuplicateApplicationDeclaration2,
|
|
8
|
+
ApplicationConflict2,
|
|
9
|
+
UnregisteredApplicationReference2,
|
|
10
|
+
UnregisteredRepositoryDependency2,
|
|
11
|
+
UnregisteredUseCaseDependency2,
|
|
12
|
+
ApplicationNotStarted2,
|
|
13
|
+
ApplicationAlreadyStarted2,
|
|
14
|
+
InvalidApplicationEnvironment2,
|
|
15
|
+
useApplication2,
|
|
16
|
+
resetApplication2,
|
|
17
|
+
InvalidLogDeclaration2,
|
|
18
|
+
LogLevels2,
|
|
19
|
+
logProviderOf2,
|
|
20
|
+
consoleLogProvider2,
|
|
21
|
+
jsonLogProvider2,
|
|
22
|
+
memoryLogProvider2,
|
|
23
|
+
Logger2,
|
|
6
24
|
ReservedEntityKey2,
|
|
7
25
|
ImmutableEntityKey2,
|
|
8
26
|
DeletedEntity2,
|
|
@@ -42,15 +60,6 @@ import {
|
|
|
42
60
|
CommandEventFailed2,
|
|
43
61
|
commandOf2,
|
|
44
62
|
isCommand2,
|
|
45
|
-
InvalidApplicationDeclaration2,
|
|
46
|
-
DuplicateApplicationDeclaration2,
|
|
47
|
-
ApplicationConflict2,
|
|
48
|
-
UnregisteredApplicationReference2,
|
|
49
|
-
UnregisteredRepositoryDependency2,
|
|
50
|
-
UnregisteredUseCaseDependency2,
|
|
51
|
-
ApplicationNotStarted2,
|
|
52
|
-
ApplicationAlreadyStarted2,
|
|
53
|
-
InvalidApplicationEnvironment2,
|
|
54
63
|
InvalidOpenAPIModel2,
|
|
55
64
|
InvalidOutputStage2,
|
|
56
65
|
DuplicateOperation2,
|
|
@@ -63,9 +72,9 @@ import {
|
|
|
63
72
|
operationOf2,
|
|
64
73
|
outputOf2,
|
|
65
74
|
isOutput2,
|
|
66
|
-
useApplication2,
|
|
67
|
-
resetApplication2,
|
|
68
75
|
providerFrom2,
|
|
76
|
+
logFrom2,
|
|
77
|
+
isLogFactory2,
|
|
69
78
|
isProviderFactory2,
|
|
70
79
|
isApplication2,
|
|
71
80
|
applicationOf2,
|
|
@@ -118,7 +127,7 @@ import {
|
|
|
118
127
|
entityOf2,
|
|
119
128
|
recordOf2,
|
|
120
129
|
StdStages2
|
|
121
|
-
} from "./index-
|
|
130
|
+
} from "./index-ewm6r4nw.js";
|
|
122
131
|
import {
|
|
123
132
|
isProperty2,
|
|
124
133
|
schemaOf2,
|
|
@@ -200,6 +209,7 @@ export {
|
|
|
200
209
|
InvalidCommandDeclaration2 as InvalidCommandDeclaration,
|
|
201
210
|
InvalidCommandEnvironment2 as InvalidCommandEnvironment,
|
|
202
211
|
InvalidEnvironment2 as InvalidEnvironment,
|
|
212
|
+
InvalidLogDeclaration2 as InvalidLogDeclaration,
|
|
203
213
|
InvalidOpenAPIModel2 as InvalidOpenAPIModel,
|
|
204
214
|
InvalidOutputStage2 as InvalidOutputStage,
|
|
205
215
|
InvalidPropertyValue2 as InvalidPropertyValue,
|
|
@@ -214,6 +224,8 @@ export {
|
|
|
214
224
|
InvalidUseCaseStep2 as InvalidUseCaseStep,
|
|
215
225
|
Ip2 as Ip,
|
|
216
226
|
Kind2 as Kind,
|
|
227
|
+
LogLevels2 as LogLevels,
|
|
228
|
+
Logger2 as Logger,
|
|
217
229
|
MASK2 as MASK,
|
|
218
230
|
Meta2 as Meta,
|
|
219
231
|
NumberProperty2 as NumberProperty,
|
|
@@ -264,6 +276,7 @@ export {
|
|
|
264
276
|
blueprintPluginOf2 as blueprintPluginOf,
|
|
265
277
|
commandOf2 as commandOf,
|
|
266
278
|
configure2 as configure,
|
|
279
|
+
consoleLogProvider2 as consoleLogProvider,
|
|
267
280
|
entityBuilderOf2 as entityBuilderOf,
|
|
268
281
|
entityOf2 as entityOf,
|
|
269
282
|
enumOf2 as enumOf,
|
|
@@ -280,6 +293,7 @@ export {
|
|
|
280
293
|
isEntity2 as isEntity,
|
|
281
294
|
isEntityClass2 as isEntityClass,
|
|
282
295
|
isEnvironment2 as isEnvironment,
|
|
296
|
+
isLogFactory2 as isLogFactory,
|
|
283
297
|
isOptionalRecord2 as isOptionalRecord,
|
|
284
298
|
isOutput2 as isOutput,
|
|
285
299
|
isPasswordHash2 as isPasswordHash,
|
|
@@ -290,7 +304,11 @@ export {
|
|
|
290
304
|
isRepository2 as isRepository,
|
|
291
305
|
isUseCase2 as isUseCase,
|
|
292
306
|
isUseCaseClass2 as isUseCaseClass,
|
|
307
|
+
jsonLogProvider2 as jsonLogProvider,
|
|
293
308
|
listOf2 as listOf,
|
|
309
|
+
logFrom2 as logFrom,
|
|
310
|
+
logProviderOf2 as logProviderOf,
|
|
311
|
+
memoryLogProvider2 as memoryLogProvider,
|
|
294
312
|
openapi2 as openapi,
|
|
295
313
|
operationOf2 as operationOf,
|
|
296
314
|
operationRoutes2 as operationRoutes,
|
package/dist/testing/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afora/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Domain modeling on TypeBox: entities with invariants, repositories, use cases, sensitive data masking and layered exceptions, usable by any Standard Schema consumer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"domain-driven-design",
|