@afora/core 0.0.3 → 0.0.5

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/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export { applicationOf, isApplication } from "./core/application/application.js";
2
- export { ApplicationAlreadyStarted, ApplicationConflict, ApplicationNotStarted, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, InvalidApplicationEnvironment, UnregisteredApplicationReference, UnregisteredRepositoryDependency, UnregisteredUseCaseDependency, } from "./core/application/exceptions.js";
2
+ export { ApplicationAlreadyStarted, ApplicationConflict, ApplicationNotStarted, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, InvalidApplicationEnvironment, ProviderNotBound, UnregisteredApplicationReference, UnregisteredRepositoryDependency, UnregisteredUseCaseDependency, } from "./core/application/exceptions.js";
3
+ export { isProviderSlot, isProviderStorage, type ProviderSlot, type ProviderStorage, providersOf, } from "./core/application/providers.js";
3
4
  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";
5
+ export { isLogFactory, isProviderFactory, type LogFactory, logFrom, type ProviderFactory, providerFrom, } from "./core/application/start.js";
6
+ export type { AnyApplication, ApplicationCollections, ApplicationContext, ApplicationDescription, ApplicationSettings, ApplicationStartOptions, CommandDescription, ExceptionDescription, FieldDescription, FieldsDescription, IApplication, LogDescription, OutputDescription, PropertyDescription, PropertyLineageDescription, PropertyReference, ProviderReference, RecordDescription, UseCaseDependencyDescription, UseCaseDescription, } from "./core/application/types/application.interface.js";
6
7
  export { blueprintBuilderOf } from "./core/blueprint/blueprint.js";
7
8
  export { blueprintPluginOf } from "./core/blueprint/blueprint-plugin.js";
8
9
  export { ReservedBlueprintKey, UndeclaredBlueprintProperty, } from "./core/blueprint/exceptions.js";
@@ -17,7 +18,7 @@ export { CommandEventFailed, InvalidCommandContext, InvalidCommandDeclaration, I
17
18
  export type { AnyCommand, CommandEnvOption, CommandEventErrorHandler, CommandEventHandler, CommandEventInfo, CommandEvents, CommandExecution, CommandInput, CommandOf, CommandOperation, CommandOptions, CommandResponse, CommandSettings, CommandUseCases, } from "./core/command/types/command.interface.js";
18
19
  export { AbstractEntity, ENTITY_IDENTITY_KEYS, EntityUniqueKeys, RESERVED_ENTITY_KEYS, } from "./core/entity/abstract-entity.js";
19
20
  export { entityBuilderOf, isEntity, isEntityClass } from "./core/entity/entity.js";
20
- export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, } from "./core/entity/event.js";
21
+ export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, EventHandlerContext, } from "./core/entity/event.js";
21
22
  export { eventOf } from "./core/entity/event.js";
22
23
  export { DeletedEntity, ImmutableEntityKey, ReservedEntityKey, } from "./core/entity/exceptions.js";
23
24
  export type { DeclaredEntityInstance, EntityBuilder, EntityBuilderSettings, EntityConstructor, EntityIdentityKey, EntityInput, EntityOptions, EntityProperties, EntityUniqueKey, IEntityIdentity, } from "./core/entity/types/entity.interface.js";
@@ -28,6 +29,9 @@ export type { DeclaredExceptionClass } from "./core/exception/exception.js";
28
29
  export { Exception, exceptionOf, UNEXPECTED_ERROR, } from "./core/exception/exception.js";
29
30
  export { guard } from "./core/exception/guard.js";
30
31
  export type { ExceptionArgs, ExceptionClass, ExceptionDeclaration, ExceptionFrame, ExceptionInit, ExceptionMessage, ExceptionPropagation, ExceptionScope, } from "./core/exception/types/exception.interface.js";
32
+ export { InvalidLogDeclaration } from "./core/logger/exceptions.js";
33
+ export type { ILogger, ILogProvider, LogEntry, LogFields, LoggerDeclaration, LogLevel, LogProviderSettings, LogSettings, MemoryLogProvider, } from "./core/logger/logger.js";
34
+ export { consoleLogProvider, jsonLogProvider, Logger, LogLevels, logProviderOf, memoryLogProvider, } from "./core/logger/logger.js";
31
35
  export { InvalidOpenAPIModel } from "./core/openapi/exceptions.js";
32
36
  export { toOpenAPI } from "./core/openapi/openapi.js";
33
37
  export type { OpenAPIComponents, OpenAPIOptions, OpenAPISchema, } from "./core/openapi/types/openapi.interface.js";
package/dist/index.js CHANGED
@@ -3,6 +3,25 @@ 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
+ ProviderNotBound2,
14
+ ApplicationAlreadyStarted2,
15
+ InvalidApplicationEnvironment2,
16
+ useApplication2,
17
+ resetApplication2,
18
+ InvalidLogDeclaration2,
19
+ LogLevels2,
20
+ logProviderOf2,
21
+ consoleLogProvider2,
22
+ jsonLogProvider2,
23
+ memoryLogProvider2,
24
+ Logger2,
6
25
  ReservedEntityKey2,
7
26
  ImmutableEntityKey2,
8
27
  DeletedEntity2,
@@ -42,15 +61,6 @@ import {
42
61
  CommandEventFailed2,
43
62
  commandOf2,
44
63
  isCommand2,
45
- InvalidApplicationDeclaration2,
46
- DuplicateApplicationDeclaration2,
47
- ApplicationConflict2,
48
- UnregisteredApplicationReference2,
49
- UnregisteredRepositoryDependency2,
50
- UnregisteredUseCaseDependency2,
51
- ApplicationNotStarted2,
52
- ApplicationAlreadyStarted2,
53
- InvalidApplicationEnvironment2,
54
64
  InvalidOpenAPIModel2,
55
65
  InvalidOutputStage2,
56
66
  DuplicateOperation2,
@@ -63,10 +73,13 @@ import {
63
73
  operationOf2,
64
74
  outputOf2,
65
75
  isOutput2,
66
- useApplication2,
67
- resetApplication2,
68
76
  providerFrom2,
77
+ logFrom2,
78
+ isLogFactory2,
69
79
  isProviderFactory2,
80
+ providersOf2,
81
+ isProviderSlot2,
82
+ isProviderStorage2,
70
83
  isApplication2,
71
84
  applicationOf2,
72
85
  blueprintPluginOf2,
@@ -118,7 +131,7 @@ import {
118
131
  entityOf2,
119
132
  recordOf2,
120
133
  StdStages2
121
- } from "./index-sw2b9ehx.js";
134
+ } from "./index-8m80wjzf.js";
122
135
  import {
123
136
  isProperty2,
124
137
  schemaOf2,
@@ -200,6 +213,7 @@ export {
200
213
  InvalidCommandDeclaration2 as InvalidCommandDeclaration,
201
214
  InvalidCommandEnvironment2 as InvalidCommandEnvironment,
202
215
  InvalidEnvironment2 as InvalidEnvironment,
216
+ InvalidLogDeclaration2 as InvalidLogDeclaration,
203
217
  InvalidOpenAPIModel2 as InvalidOpenAPIModel,
204
218
  InvalidOutputStage2 as InvalidOutputStage,
205
219
  InvalidPropertyValue2 as InvalidPropertyValue,
@@ -214,6 +228,8 @@ export {
214
228
  InvalidUseCaseStep2 as InvalidUseCaseStep,
215
229
  Ip2 as Ip,
216
230
  Kind2 as Kind,
231
+ LogLevels2 as LogLevels,
232
+ Logger2 as Logger,
217
233
  MASK2 as MASK,
218
234
  Meta2 as Meta,
219
235
  NumberProperty2 as NumberProperty,
@@ -227,6 +243,7 @@ export {
227
243
  Phone2 as Phone,
228
244
  PropertyRequired2 as PropertyRequired,
229
245
  PropertyStates2 as PropertyStates,
246
+ ProviderNotBound2 as ProviderNotBound,
230
247
  Publishable2 as Publishable,
231
248
  RESERVED_ENTITY_KEYS2 as RESERVED_ENTITY_KEYS,
232
249
  RESERVED_RECORD_KEYS2 as RESERVED_RECORD_KEYS,
@@ -264,6 +281,7 @@ export {
264
281
  blueprintPluginOf2 as blueprintPluginOf,
265
282
  commandOf2 as commandOf,
266
283
  configure2 as configure,
284
+ consoleLogProvider2 as consoleLogProvider,
267
285
  entityBuilderOf2 as entityBuilderOf,
268
286
  entityOf2 as entityOf,
269
287
  enumOf2 as enumOf,
@@ -280,17 +298,24 @@ export {
280
298
  isEntity2 as isEntity,
281
299
  isEntityClass2 as isEntityClass,
282
300
  isEnvironment2 as isEnvironment,
301
+ isLogFactory2 as isLogFactory,
283
302
  isOptionalRecord2 as isOptionalRecord,
284
303
  isOutput2 as isOutput,
285
304
  isPasswordHash2 as isPasswordHash,
286
305
  isProperty2 as isProperty,
287
306
  isProviderFactory2 as isProviderFactory,
307
+ isProviderSlot2 as isProviderSlot,
308
+ isProviderStorage2 as isProviderStorage,
288
309
  isRecordClass2 as isRecordClass,
289
310
  isRecordPlugin2 as isRecordPlugin,
290
311
  isRepository2 as isRepository,
291
312
  isUseCase2 as isUseCase,
292
313
  isUseCaseClass2 as isUseCaseClass,
314
+ jsonLogProvider2 as jsonLogProvider,
293
315
  listOf2 as listOf,
316
+ logFrom2 as logFrom,
317
+ logProviderOf2 as logProviderOf,
318
+ memoryLogProvider2 as memoryLogProvider,
294
319
  openapi2 as openapi,
295
320
  operationOf2 as operationOf,
296
321
  operationRoutes2 as operationRoutes,
@@ -305,6 +330,7 @@ export {
305
330
  providerDescriptionOf2 as providerDescriptionOf,
306
331
  providerFrom2 as providerFrom,
307
332
  providerOf2 as providerOf,
333
+ providersOf2 as providersOf,
308
334
  recordBuilderOf2 as recordBuilderOf,
309
335
  recordFieldOf2 as recordFieldOf,
310
336
  recordOf2 as recordOf,
@@ -4,7 +4,7 @@ import {
4
4
  RepositoryEntityNotFound2,
5
5
  blueprintOf2,
6
6
  entityOf2
7
- } from "../index-sw2b9ehx.js";
7
+ } from "../index-8m80wjzf.js";
8
8
 
9
9
  // src/testing/provider-contract.ts
10
10
  function contextOf(name = "Accounts") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afora/core",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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",