@ddd-ts-kit/kernel 0.1.1 → 0.3.0

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.
Files changed (126) hide show
  1. package/README.md +156 -36
  2. package/dist/declarations/decorators/adapter.d.ts +5 -4
  3. package/dist/declarations/decorators/adapter.d.ts.map +1 -1
  4. package/dist/declarations/decorators/adapter.js.map +1 -1
  5. package/dist/declarations/decorators/command-handler.d.ts +7 -5
  6. package/dist/declarations/decorators/command-handler.d.ts.map +1 -1
  7. package/dist/declarations/decorators/command-handler.js +4 -3
  8. package/dist/declarations/decorators/command-handler.js.map +1 -1
  9. package/dist/declarations/decorators/declaring.d.ts +2 -2
  10. package/dist/declarations/decorators/declaring.d.ts.map +1 -1
  11. package/dist/declarations/decorators/declaring.js +5 -2
  12. package/dist/declarations/decorators/declaring.js.map +1 -1
  13. package/dist/declarations/decorators/domain-event-handler.d.ts +5 -4
  14. package/dist/declarations/decorators/domain-event-handler.d.ts.map +1 -1
  15. package/dist/declarations/decorators/domain-event-handler.js +3 -3
  16. package/dist/declarations/decorators/domain-event-handler.js.map +1 -1
  17. package/dist/declarations/decorators/gateway.d.ts +5 -4
  18. package/dist/declarations/decorators/gateway.d.ts.map +1 -1
  19. package/dist/declarations/decorators/gateway.js.map +1 -1
  20. package/dist/declarations/decorators/handling.d.ts +2 -2
  21. package/dist/declarations/decorators/handling.d.ts.map +1 -1
  22. package/dist/declarations/decorators/handling.js +1 -1
  23. package/dist/declarations/decorators/handling.js.map +1 -1
  24. package/dist/declarations/decorators/integration-event-handler.d.ts +4 -3
  25. package/dist/declarations/decorators/integration-event-handler.d.ts.map +1 -1
  26. package/dist/declarations/decorators/integration-event-handler.js +2 -2
  27. package/dist/declarations/decorators/integration-event-handler.js.map +1 -1
  28. package/dist/declarations/decorators/policy.d.ts +3 -2
  29. package/dist/declarations/decorators/policy.d.ts.map +1 -1
  30. package/dist/declarations/decorators/policy.js +1 -1
  31. package/dist/declarations/decorators/policy.js.map +1 -1
  32. package/dist/declarations/decorators/projection.d.ts +4 -3
  33. package/dist/declarations/decorators/projection.d.ts.map +1 -1
  34. package/dist/declarations/decorators/projection.js +2 -2
  35. package/dist/declarations/decorators/projection.js.map +1 -1
  36. package/dist/declarations/decorators/query-handler.d.ts +4 -3
  37. package/dist/declarations/decorators/query-handler.d.ts.map +1 -1
  38. package/dist/declarations/decorators/query-handler.js +1 -1
  39. package/dist/declarations/decorators/query-handler.js.map +1 -1
  40. package/dist/declarations/decorators/repository.d.ts +5 -5
  41. package/dist/declarations/decorators/repository.d.ts.map +1 -1
  42. package/dist/declarations/decorators/repository.js.map +1 -1
  43. package/dist/declarations/decorators/scheduled.d.ts +4 -3
  44. package/dist/declarations/decorators/scheduled.d.ts.map +1 -1
  45. package/dist/declarations/decorators/scheduled.js +2 -2
  46. package/dist/declarations/decorators/scheduled.js.map +1 -1
  47. package/dist/declarations/dependencies/class-declarator.d.ts +2 -1
  48. package/dist/declarations/dependencies/class-declarator.d.ts.map +1 -1
  49. package/dist/declarations/dependencies/declared-dependencies.d.ts +5 -0
  50. package/dist/declarations/dependencies/declared-dependencies.d.ts.map +1 -0
  51. package/dist/declarations/dependencies/declared-dependencies.js +2 -0
  52. package/dist/declarations/dependencies/declared-dependencies.js.map +1 -0
  53. package/dist/declarations/dependencies/dependencies-from-signature.d.ts +7 -0
  54. package/dist/declarations/dependencies/dependencies-from-signature.d.ts.map +1 -0
  55. package/dist/declarations/dependencies/dependencies-from-signature.js +2 -0
  56. package/dist/declarations/dependencies/dependencies-from-signature.js.map +1 -0
  57. package/dist/declarations/dependencies/matching-dependencies.d.ts +5 -2
  58. package/dist/declarations/dependencies/matching-dependencies.d.ts.map +1 -1
  59. package/dist/declarations/injection/injected-dependencies.d.ts +4 -0
  60. package/dist/declarations/injection/injected-dependencies.d.ts.map +1 -0
  61. package/dist/declarations/injection/injected-dependencies.js +9 -0
  62. package/dist/declarations/injection/injected-dependencies.js.map +1 -0
  63. package/dist/declarations/injection/injected-registry.d.ts +4 -0
  64. package/dist/declarations/injection/injected-registry.d.ts.map +1 -0
  65. package/dist/declarations/injection/injected-registry.js +19 -0
  66. package/dist/declarations/injection/injected-registry.js.map +1 -0
  67. package/dist/declarations/injection/injected.d.ts +11 -0
  68. package/dist/declarations/injection/injected.d.ts.map +1 -0
  69. package/dist/declarations/injection/injected.js +24 -0
  70. package/dist/declarations/injection/injected.js.map +1 -0
  71. package/dist/declarations/model/domain-event-handler-declaration.d.ts +2 -1
  72. package/dist/declarations/model/domain-event-handler-declaration.d.ts.map +1 -1
  73. package/dist/declarations/model/handler-declaration.d.ts +2 -1
  74. package/dist/declarations/model/handler-declaration.d.ts.map +1 -1
  75. package/dist/declarations/model/integration-event-handler-declaration.d.ts +2 -1
  76. package/dist/declarations/model/integration-event-handler-declaration.d.ts.map +1 -1
  77. package/dist/declarations/model/job-declaration.d.ts +2 -1
  78. package/dist/declarations/model/job-declaration.d.ts.map +1 -1
  79. package/dist/declarations/model/policy-declaration.d.ts +2 -1
  80. package/dist/declarations/model/policy-declaration.d.ts.map +1 -1
  81. package/dist/declarations/model/port-declaration.d.ts +2 -1
  82. package/dist/declarations/model/port-declaration.d.ts.map +1 -1
  83. package/dist/declarations/model/projection-declaration.d.ts +2 -1
  84. package/dist/declarations/model/projection-declaration.d.ts.map +1 -1
  85. package/dist/declarations/token/token.d.ts +2 -2
  86. package/dist/declarations.d.ts +4 -0
  87. package/dist/declarations.d.ts.map +1 -1
  88. package/dist/declarations.js +2 -0
  89. package/dist/declarations.js.map +1 -1
  90. package/dist/domain/errors/code-of.d.ts +4 -0
  91. package/dist/domain/errors/code-of.d.ts.map +1 -0
  92. package/dist/domain/errors/code-of.js +2 -0
  93. package/dist/domain/errors/code-of.js.map +1 -0
  94. package/dist/domain/errors/concept-error.d.ts +43 -0
  95. package/dist/domain/errors/concept-error.d.ts.map +1 -0
  96. package/dist/domain/errors/concept-error.js +54 -0
  97. package/dist/domain/errors/concept-error.js.map +1 -0
  98. package/dist/domain/errors/domain-error-json.d.ts +10 -0
  99. package/dist/domain/errors/domain-error-json.d.ts.map +1 -0
  100. package/dist/domain/errors/domain-error-json.js +2 -0
  101. package/dist/domain/errors/domain-error-json.js.map +1 -0
  102. package/dist/domain/errors/domain-error.d.ts +3 -0
  103. package/dist/domain/errors/domain-error.d.ts.map +1 -1
  104. package/dist/domain/errors/domain-error.js +4 -0
  105. package/dist/domain/errors/domain-error.js.map +1 -1
  106. package/dist/domain/errors/is-refusal.d.ts +9 -0
  107. package/dist/domain/errors/is-refusal.d.ts.map +1 -0
  108. package/dist/domain/errors/is-refusal.js +9 -0
  109. package/dist/domain/errors/is-refusal.js.map +1 -0
  110. package/dist/domain/errors/refusal-facts.d.ts +5 -0
  111. package/dist/domain/errors/refusal-facts.d.ts.map +1 -0
  112. package/dist/domain/errors/refusal-facts.js +2 -0
  113. package/dist/domain/errors/refusal-facts.js.map +1 -0
  114. package/dist/domain/errors/refusal-of.d.ts +15 -0
  115. package/dist/domain/errors/refusal-of.d.ts.map +1 -0
  116. package/dist/domain/errors/refusal-of.js +2 -0
  117. package/dist/domain/errors/refusal-of.js.map +1 -0
  118. package/dist/domain/errors/refusal.d.ts +7 -0
  119. package/dist/domain/errors/refusal.d.ts.map +1 -0
  120. package/dist/domain/errors/refusal.js +2 -0
  121. package/dist/domain/errors/refusal.js.map +1 -0
  122. package/dist/index.d.ts +7 -0
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +7 -0
  125. package/dist/index.js.map +1 -1
  126. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"integration-event-handler.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/integration-event-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,IAAI,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAGrH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,8BAA8B,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IAC1E;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,GAAG,SAAS,CAAC;CACnE;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,IAAI,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAErF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,EACpH,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,8BAA8B,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,EACvE,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,4BAA4B,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAe3D"}
1
+ {"version":3,"file":"integration-event-handler.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/integration-event-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,IAAI,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAGrH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,8BAA8B,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IAC1E;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,GAAG,SAAS,CAAC;CACnE;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,IAAI,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAErF;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EACP,KAAK,CAAC,IAAI,SAAS,MAAM,EACzB,KAAK,CAAC,CAAC,SAAS,oBAAoB,GAAG,yBAAyB,EAEhE,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,8BAA8B,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,EACvE,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,4BAA4B,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAe3D"}
@@ -2,7 +2,7 @@ import { record } from '../registry/record.js';
2
2
  import { assertNamed } from './assert-named.js';
3
3
  /**
4
4
  * The handler of an integration event of another context, subscribed under a stable consumer name:
5
- * `@IntegrationEventHandler(OrderPlaced, { consumer: 'billing.invoice-on-order-placed' }, [CommandBus])`.
5
+ * `@IntegrationEventHandler(OrderPlaced, { consumer: 'billing.invoice-on-order-placed' })`.
6
6
  */
7
7
  export function IntegrationEventHandler(contract, options, dependencies) {
8
8
  const { consumer, actorOf } = options;
@@ -13,7 +13,7 @@ export function IntegrationEventHandler(contract, options, dependencies) {
13
13
  event: { type: contract.type, version: contract.version },
14
14
  consumer,
15
15
  ...(actorOf === undefined ? {} : { actorOf }),
16
- dependencies: dependencies ?? [],
16
+ dependencies,
17
17
  pair: (use) => use(contract, target),
18
18
  });
19
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"integration-event-handler.js","sourceRoot":"","sources":["../../../src/declarations/decorators/integration-event-handler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAsBhD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,QAAgC,EAChC,OAAuE,EACvE,YAAgB;IAEhB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEtC,WAAW,CAAC,QAAQ,EAAE,oDAAoD,CAAC,CAAC;IAE5E,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE;YACb,IAAI,EAAE,2BAA2B;YACjC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE;YACzD,QAAQ;YACR,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;YAC7C,YAAY,EAAE,YAAY,IAAI,EAAE;YAChC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;SACrC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"integration-event-handler.js","sourceRoot":"","sources":["../../../src/declarations/decorators/integration-event-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAsBhD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAKrC,QAAgC,EAChC,OAAuE,EACvE,YAAgB;IAEhB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEtC,WAAW,CAAC,QAAQ,EAAE,oDAAoD,CAAC,CAAC;IAE5E,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE;YACb,IAAI,EAAE,2BAA2B;YACjC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE;YACzD,QAAQ;YACR,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;YAC7C,YAAY;YACZ,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;SACrC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { ClassDeclarator } from '../dependencies/class-declarator.js';
2
- import type { Dependencies } from '../dependencies/dependencies.js';
2
+ import type { DeclaredDependencies } from '../dependencies/declared-dependencies.js';
3
+ import type { DependenciesFromSignature } from '../dependencies/dependencies-from-signature.js';
3
4
  import type { DeclaredPolicy } from '../model/declared-policy.js';
4
5
  import type { PermissionRef } from '../model/permission-ref.js';
5
6
  import type { Named } from './named.js';
@@ -11,5 +12,5 @@ export interface PolicyOptions<Name extends string = string> {
11
12
  * A rule about one permission that needs the loaded element:
12
13
  * `@Policy(permissions['invoice.void'], { name: 'only-the-issuer-voids' })`.
13
14
  */
14
- export declare function Policy<const Name extends string, const D extends Dependencies = readonly []>(permission: PermissionRef, options: PolicyOptions<Name> & Named<Name, 'name'>, dependencies?: D): ClassDeclarator<DeclaredPolicy, D>;
15
+ export declare function Policy<const Name extends string, const D extends DeclaredDependencies = DependenciesFromSignature>(permission: PermissionRef, options: PolicyOptions<Name> & Named<Name, 'name'>, dependencies?: D): ClassDeclarator<DeclaredPolicy, D>;
15
16
  //# sourceMappingURL=policy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,aAAa,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IACzD,oGAAoG;IACpG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,EAC1F,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,EAClD,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC,CAUpC"}
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,aAAa,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IACzD,oGAAoG;IACpG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,CAAC,CAAC,SAAS,oBAAoB,GAAG,yBAAyB,EAChH,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,EAClD,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC,CAUpC"}
@@ -10,7 +10,7 @@ export function Policy(permission, options, dependencies) {
10
10
  throw new DeclarationError(`A policy of ${permission.id} needs a name, and it is empty.`);
11
11
  }
12
12
  return (target) => {
13
- record(target, { role: 'policy', name, permission, implementation: target, dependencies: dependencies ?? [] });
13
+ record(target, { role: 'policy', name, permission, implementation: target, dependencies });
14
14
  };
15
15
  }
16
16
  //# sourceMappingURL=policy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/declarations/decorators/policy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQ/C;;;GAGG;AACH,MAAM,UAAU,MAAM,CACpB,UAAyB,EACzB,OAAkD,EAClD,YAAgB;IAEhB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACvB,MAAM,IAAI,gBAAgB,CAAC,eAAe,UAAU,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC,CAAC;IACjH,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/declarations/decorators/policy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQ/C;;;GAGG;AACH,MAAM,UAAU,MAAM,CACpB,UAAyB,EACzB,OAAkD,EAClD,YAAgB;IAEhB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACvB,MAAM,IAAI,gBAAgB,CAAC,eAAe,UAAU,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAC7F,CAAC,CAAC;AACJ,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import type { ClassDeclarator } from '../dependencies/class-declarator.js';
2
- import type { Dependencies } from '../dependencies/dependencies.js';
2
+ import type { DeclaredDependencies } from '../dependencies/declared-dependencies.js';
3
+ import type { DependenciesFromSignature } from '../dependencies/dependencies-from-signature.js';
3
4
  /**
4
5
  * A projector: the class that keeps one read model up to date, each of its `@On` methods
5
6
  * applying one event through a port of its own read model:
6
- * `@Projection('scheduling.appointment-list', [AppointmentList])`. The name is the consumer
7
+ * `@Projection('scheduling.appointment-list')`. The name is the consumer
7
8
  * it is subscribed as: stable, `<context>.<name>`, unique in the application.
8
9
  */
9
- export declare function Projection<const D extends Dependencies = readonly []>(name: `${string}.${string}`, dependencies?: D): ClassDeclarator<object, D>;
10
+ export declare function Projection<const D extends DeclaredDependencies = DependenciesFromSignature>(name: `${string}.${string}`, dependencies?: D): ClassDeclarator<object, D>;
10
11
  //# sourceMappingURL=projection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/projection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAOpE;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,EACnE,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAC3B,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAgB5B"}
1
+ {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/projection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAOhG;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,oBAAoB,GAAG,yBAAyB,EACzF,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAC3B,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAgB5B"}
@@ -5,7 +5,7 @@ import { pendingApplications } from './pending-applications.js';
5
5
  /**
6
6
  * A projector: the class that keeps one read model up to date, each of its `@On` methods
7
7
  * applying one event through a port of its own read model:
8
- * `@Projection('scheduling.appointment-list', [AppointmentList])`. The name is the consumer
8
+ * `@Projection('scheduling.appointment-list')`. The name is the consumer
9
9
  * it is subscribed as: stable, `<context>.<name>`, unique in the application.
10
10
  */
11
11
  export function Projection(name, dependencies) {
@@ -17,7 +17,7 @@ export function Projection(name, dependencies) {
17
17
  if (applies.length === 0) {
18
18
  throw new DeclarationError(`Projection ${target.name} applies no event: write @On(...) on the methods that do.`);
19
19
  }
20
- record(target, { role: 'projection', name, implementation: target, dependencies: dependencies ?? [], applies });
20
+ record(target, { role: 'projection', name, implementation: target, dependencies, applies });
21
21
  };
22
22
  }
23
23
  /** The `@On` of the methods of the class: they ran just before its `@Projection`. */
@@ -1 +1 @@
1
- {"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../src/declarations/decorators/projection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAKxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,IAA2B,EAC3B,YAAgB;IAEhB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,gBAAgB,CACxB,IAAI,IAAI,mIAAmI,CAC5I,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAEhC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC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CAAC,IAAI,GAAG,CACrI,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC;AACvD,CAAC"}
@@ -2,10 +2,11 @@ import type { MessageType } from '../../application/messaging/message-type.js';
2
2
  import type { QueryHandler as QueryHandlerPort } from '../../application/messaging/query-handler.js';
3
3
  import type { Query } from '../../application/messaging/query.js';
4
4
  import type { ClassDeclarator } from '../dependencies/class-declarator.js';
5
- import type { Dependencies } from '../dependencies/dependencies.js';
5
+ import type { DeclaredDependencies } from '../dependencies/declared-dependencies.js';
6
+ import type { DependenciesFromSignature } from '../dependencies/dependencies-from-signature.js';
6
7
  import type { MessageHandler } from '../model/message-handler.js';
7
8
  /** The interface of the kernel under the name of its decorator, so one import serves both. */
8
9
  export type QueryHandler<Q extends Query<unknown>> = QueryHandlerPort<Q>;
9
- /** The one handler of a query: `@QueryHandler(GetOrder, [OrderReadModel])`. */
10
- export declare function QueryHandler<Q extends Query<unknown>, const D extends Dependencies = readonly []>(message: MessageType<Q>, dependencies?: D): ClassDeclarator<MessageHandler<Q>, D>;
10
+ /** The one handler of a query: `@QueryHandler(GetOrder)`, its dependencies being the ports that type its constructor parameters. */
11
+ export declare function QueryHandler<Q extends Query<unknown>, const D extends DeclaredDependencies = DependenciesFromSignature>(message: MessageType<Q>, dependencies?: D): ClassDeclarator<MessageHandler<Q>, D>;
11
12
  //# sourceMappingURL=query-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-handler.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/query-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AA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CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACxB,KAAK,CAAC,CAAC,SAAS,oBAAoB,GAAG,yBAAyB,EAChE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAIlF"}
@@ -1,6 +1,6 @@
1
1
  import { record } from '../registry/record.js';
2
2
  import { handling } from './handling.js';
3
- /** The one handler of a query: `@QueryHandler(GetOrder, [OrderReadModel])`. */
3
+ /** The one handler of a query: `@QueryHandler(GetOrder)`, its dependencies being the ports that type its constructor parameters. */
4
4
  export function QueryHandler(message, dependencies) {
5
5
  return (target) => {
6
6
  record(target, handling({ role: 'query-handler', message, implementation: target }, dependencies));
@@ -1 +1 @@
1
- {"version":3,"file":"query-handler.js","sourceRoot":"","sources":["../../../src/declarations/decorators/query-handler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,+EAA+E;AAC/E,MAAM,UAAU,YAAY,CAC1B,OAAuB,EACvB,YAAgB;IAEhB,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;IACrG,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"query-handler.js","sourceRoot":"","sources":["../../../src/declarations/decorators/query-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,oIAAoI;AACpI,MAAM,UAAU,YAAY,CAG1B,OAAuB,EAAE,YAAgB;IACzC,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;IACrG,CAAC,CAAC;AACJ,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import type { ClassDeclarator } from '../dependencies/class-declarator.js';
2
- import type { Dependencies } from '../dependencies/dependencies.js';
2
+ import type { DeclaredDependencies } from '../dependencies/declared-dependencies.js';
3
+ import type { DependenciesFromSignature } from '../dependencies/dependencies-from-signature.js';
3
4
  import type { Token } from '../token/token.js';
4
5
  import type { PortOptions } from './port-options.js';
5
6
  /**
6
7
  * The adapter of a repository port of the domain, bound to it:
7
- * `@Repository(OrderRepository, [Database, ExecutionScope, Clock])`. The class implements the
8
- * port and never extends it.
8
+ * `@Repository(OrderRepository)`. The class implements the port and never extends it.
9
9
  */
10
- export declare function Repository<T, const D extends Dependencies = readonly []>(port: Token<T>, dependencies?: D): ClassDeclarator<T, D>;
11
- export declare function Repository<T, const D extends Dependencies = readonly []>(port: Token<T>, options: PortOptions, dependencies?: D): ClassDeclarator<T, D>;
10
+ export declare function Repository<T, const D extends DeclaredDependencies = DependenciesFromSignature>(port: Token<T>, dependencies?: D): ClassDeclarator<T, D>;
11
+ export declare function Repository<T, const D extends DeclaredDependencies = DependenciesFromSignature>(port: Token<T>, options: PortOptions, dependencies?: D): ClassDeclarator<T, D>;
12
12
  //# sourceMappingURL=repository.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,E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B,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../src/declarations/decorators/repository.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAmB3C,MAAM,UAAU,UAAU,CACxB,IAAc,EACd,GAAG,QAAkC;IAErC,OAAO,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;AACtF,CAAC"}
1
+ {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../src/declarations/decorators/repository.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAkB3C,MAAM,UAAU,UAAU,CACxB,IAAc,EACd,GAAG,QAAkC;IAErC,OAAO,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;AACtF,CAAC"}
@@ -2,14 +2,15 @@ import type { JobOptions } from '../../application/scheduling/job-options.js';
2
2
  import type { JobSchedule } from '../../application/scheduling/job-schedule.js';
3
3
  import type { ScheduledJob } from '../../application/scheduling/scheduled-job.js';
4
4
  import type { ClassDeclarator } from '../dependencies/class-declarator.js';
5
- import type { Dependencies } from '../dependencies/dependencies.js';
5
+ import type { DeclaredDependencies } from '../dependencies/declared-dependencies.js';
6
+ import type { DependenciesFromSignature } from '../dependencies/dependencies-from-signature.js';
6
7
  /** When the job runs, and the options of `JobOptions` next to it: `{ every: '15m', overlap: 'queue' }`. */
7
8
  export type ScheduledOptions = JobSchedule & JobOptions;
8
9
  /**
9
10
  * A job run by time, which triggers use cases and decides nothing, under a stable name:
10
- * `@Scheduled('billing.send-reminders', { cron: '0 7 * * 1-5', timeZone: 'Europe/Paris' }, [CommandBus])`.
11
+ * `@Scheduled('billing.send-reminders', { cron: '0 7 * * 1-5', timeZone: 'Europe/Paris' })`.
11
12
  * The name and the schedule are checked when the file loads: a name that is not
12
13
  * `<context>.<job-name>`, an unreadable cron, a zero interval or an unknown time zone throw.
13
14
  */
14
- export declare function Scheduled<const D extends Dependencies = readonly []>(name: `${string}.${string}`, settings: ScheduledOptions, dependencies?: D): ClassDeclarator<ScheduledJob, D>;
15
+ export declare function Scheduled<const D extends DeclaredDependencies = DependenciesFromSignature>(name: `${string}.${string}`, settings: ScheduledOptions, dependencies?: D): ClassDeclarator<ScheduledJob, D>;
15
16
  //# sourceMappingURL=scheduled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/scheduled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAG9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAIpE,2GAA2G;AAC3G,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,EAClE,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAC3B,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,YAAY,EAAE,CAAC,CAAC,CAelC"}
1
+ {"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../../src/declarations/decorators/scheduled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAG9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAIhG,2GAA2G;AAC3G,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,CAAC,CAAC,SAAS,oBAAoB,GAAG,yBAAyB,EACxF,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAC3B,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,CAAC,EAAE,CAAC,GACf,eAAe,CAAC,YAAY,EAAE,CAAC,CAAC,CAelC"}
@@ -6,7 +6,7 @@ import { DeclarationError } from '../registry/declaration-error.js';
6
6
  import { record } from '../registry/record.js';
7
7
  /**
8
8
  * A job run by time, which triggers use cases and decides nothing, under a stable name:
9
- * `@Scheduled('billing.send-reminders', { cron: '0 7 * * 1-5', timeZone: 'Europe/Paris' }, [CommandBus])`.
9
+ * `@Scheduled('billing.send-reminders', { cron: '0 7 * * 1-5', timeZone: 'Europe/Paris' })`.
10
10
  * The name and the schedule are checked when the file loads: a name that is not
11
11
  * `<context>.<job-name>`, an unreadable cron, a zero interval or an unknown time zone throw.
12
12
  */
@@ -18,7 +18,7 @@ export function Scheduled(name, settings, dependencies) {
18
18
  }
19
19
  policyOf(name, options);
20
20
  return (target) => {
21
- record(target, { role: 'job', name, schedule, options, implementation: target, dependencies: dependencies ?? [] });
21
+ record(target, { role: 'job', name, schedule, options, implementation: target, dependencies });
22
22
  };
23
23
  }
24
24
  function schedule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CAAC;AACpH,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import type { MatchingDependencies } from './matching-dependencies.js';
2
2
  /**
3
3
  * A class decorator that accepts only a class whose instances are `Instance` and whose
4
- * constructor parameters are the ones `List` names, in order. It serves both decorator
4
+ * constructor parameters are the ones `List` names, in order; without a list, any constructor,
5
+ * whose signature then states the dependencies. It serves both decorator
5
6
  * modes of the compiler: the standard (TC39) call hands it a context, the legacy
6
7
  * `experimentalDecorators` call does not, and it reads nothing but the class.
7
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"class-declarator.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/class-declarator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAC5E,MAAM,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,GAAG,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,EAC5E,OAAO,CAAC,EAAE,qBAAqB,KAC5B,IAAI,CAAC"}
1
+ {"version":3,"file":"class-declarator.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/class-declarator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAC5E,MAAM,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,GAAG,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,EAC5E,OAAO,CAAC,EAAE,qBAAqB,KAC5B,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Dependencies } from './dependencies.js';
2
+ import type { DependenciesFromSignature } from './dependencies-from-signature.js';
3
+ /** What the decorator of a class says of its dependencies: a list, or that the constructor states them. */
4
+ export type DeclaredDependencies = Dependencies | DependenciesFromSignature;
5
+ //# sourceMappingURL=declared-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declared-dependencies.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/declared-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF,2GAA2G;AAC3G,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=declared-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declared-dependencies.js","sourceRoot":"","sources":["../../../src/declarations/dependencies/declared-dependencies.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * What a declaration holds in place of a list when its decorator names no dependency: they
3
+ * are the types of the constructor parameters of the class, read from its source by
4
+ * `ddd-ts-kit docs` and registered by the generated file of its context.
5
+ */
6
+ export type DependenciesFromSignature = undefined;
7
+ //# sourceMappingURL=dependencies-from-signature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies-from-signature.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/dependencies-from-signature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dependencies-from-signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies-from-signature.js","sourceRoot":"","sources":["../../../src/declarations/dependencies/dependencies-from-signature.ts"],"names":[],"mappings":""}
@@ -2,6 +2,9 @@ import type { ConcreteDependency } from './concrete-dependency.js';
2
2
  import type { DependencyMismatch } from './dependency-mismatch.js';
3
3
  import type { DependencyTokens } from './dependency-tokens.js';
4
4
  import type { StandIns } from './stand-ins.js';
5
- /** `unknown` when `List` names the parameters `Args` in order, by their ports; a type naming the mistake otherwise. */
6
- export type MatchingDependencies<Args extends readonly unknown[], List> = List extends DependencyTokens<Args> ? [StandIns<Args, List>] extends [never] ? unknown : ConcreteDependency<StandIns<Args, List>> : DependencyMismatch<Args>;
5
+ /**
6
+ * `unknown` when `List` names the parameters `Args` in order, by their ports, or when there is
7
+ * no list and the constructor states its dependencies itself; a type naming the mistake otherwise.
8
+ */
9
+ export type MatchingDependencies<Args extends readonly unknown[], List> = [List] extends [undefined] ? unknown : List extends DependencyTokens<Args> ? [StandIns<Args, List>] extends [never] ? unknown : ConcreteDependency<StandIns<Args, List>> : DependencyMismatch<Args>;
7
10
  //# sourceMappingURL=matching-dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matching-dependencies.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/matching-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,uHAAuH;AACvH,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAAE,IAAI,IACpE,IAAI,SAAS,gBAAgB,CAAC,IAAI,CAAC,GAC/B,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACpC,OAAO,GACP,kBAAkB,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAC1C,kBAAkB,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"matching-dependencies.d.ts","sourceRoot":"","sources":["../../../src/declarations/dependencies/matching-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAChG,OAAO,GACP,IAAI,SAAS,gBAAgB,CAAC,IAAI,CAAC,GACjC,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACpC,OAAO,GACP,kBAAkB,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAC1C,kBAAkB,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Dependencies } from '../dependencies/dependencies.js';
2
+ /** The list `injected` registered for the class, or `undefined` when no generated file named it. */
3
+ export declare function injectedDependencies(target: unknown): Dependencies | undefined;
4
+ //# sourceMappingURL=injected-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected-dependencies.d.ts","sourceRoot":"","sources":["../../../src/declarations/injection/injected-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAIpE,oGAAoG;AACpG,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAE9E"}
@@ -0,0 +1,9 @@
1
+ import { injectedRegistry } from './injected-registry.js';
2
+ /** The list `injected` registered for the class, or `undefined` when no generated file named it. */
3
+ export function injectedDependencies(target) {
4
+ return isClass(target) ? injectedRegistry().get(target) : undefined;
5
+ }
6
+ function isClass(value) {
7
+ return typeof value === 'function';
8
+ }
9
+ //# sourceMappingURL=injected-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected-dependencies.js","sourceRoot":"","sources":["../../../src/declarations/injection/injected-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,oGAAoG;AACpG,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DeclaredClass } from '../model/declared-class.js';
2
+ import type { Token } from '../token/token.js';
3
+ export declare function injectedRegistry(): WeakMap<DeclaredClass, readonly Token<unknown>[]>;
4
+ //# sourceMappingURL=injected-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected-registry.d.ts","sourceRoot":"","sources":["../../../src/declarations/injection/injected-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS/C,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,aAAa,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAYpF"}
@@ -0,0 +1,19 @@
1
+ /*
2
+ * One map per process, whatever the number of copies of this package it loaded, as the
3
+ * registry of declarations: the generated file of a context and the container that reads it
4
+ * may not share a copy.
5
+ */
6
+ const INJECTED = Symbol.for('@ddd-ts-kit/kernel/injected/v1');
7
+ export function injectedRegistry() {
8
+ const existing = Reflect.get(globalThis, INJECTED);
9
+ if (isInjectedRegistry(existing)) {
10
+ return existing;
11
+ }
12
+ const created = new WeakMap();
13
+ Reflect.set(globalThis, INJECTED, created);
14
+ return created;
15
+ }
16
+ function isInjectedRegistry(value) {
17
+ return value instanceof WeakMap;
18
+ }
19
+ //# sourceMappingURL=injected-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected-registry.js","sourceRoot":"","sources":["../../../src/declarations/injection/injected-registry.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAE9D,MAAM,UAAU,gBAAgB;IAC9B,MAAM,QAAQ,GAAY,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAE5D,IAAI,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,OAAO,EAA4C,CAAC;IAExE,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,OAAO,CAAC;AAClC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Dependencies } from '../dependencies/dependencies.js';
2
+ import type { DependencyList } from '../dependencies/dependency-list.js';
3
+ import type { DependencyTokens } from '../dependencies/dependency-tokens.js';
4
+ /**
5
+ * Says what the constructor of a class receives, one token per parameter, in order:
6
+ * `injected(PlaceOrderHandler, [OrderRepository, Clock])`. Written by `ddd-ts-kit docs` in the
7
+ * generated file of each context, from the constructor signatures it reads, and checked by the
8
+ * compiler against the constructor like a list of a decorator. Never written by hand.
9
+ */
10
+ export declare function injected<Args extends readonly unknown[], const List extends Dependencies = DependencyTokens<Args>>(target: new (...args: Args) => unknown, ...[dependencies]: DependencyList<Args, List>): void;
11
+ //# sourceMappingURL=injected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected.d.ts","sourceRoot":"","sources":["../../../src/declarations/injection/injected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAK7E;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAAE,KAAK,CAAC,IAAI,SAAS,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAChH,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,EACtC,GAAG,CAAC,YAAiB,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,GACjD,IAAI,CAWN"}
@@ -0,0 +1,24 @@
1
+ import { DeclarationError } from '../registry/declaration-error.js';
2
+ import { describeToken } from '../token/describe-token.js';
3
+ import { injectedRegistry } from './injected-registry.js';
4
+ /**
5
+ * Says what the constructor of a class receives, one token per parameter, in order:
6
+ * `injected(PlaceOrderHandler, [OrderRepository, Clock])`. Written by `ddd-ts-kit docs` in the
7
+ * generated file of each context, from the constructor signatures it reads, and checked by the
8
+ * compiler against the constructor like a list of a decorator. Never written by hand.
9
+ */
10
+ export function injected(target, ...[dependencies = []]) {
11
+ const registry = injectedRegistry();
12
+ const known = registry.get(target);
13
+ if (known !== undefined && !sameList(known, dependencies)) {
14
+ throw new DeclarationError(`${target.name} is given two dependency lists, [${named(known)}] and [${named(dependencies)}]: two generated files disagree. Run \`ddd-ts-kit docs\` and load one file per context.`);
15
+ }
16
+ registry.set(target, Object.freeze([...dependencies]));
17
+ }
18
+ function sameList(left, right) {
19
+ return left.length === right.length && left.every((token, index) => token === right[index]);
20
+ }
21
+ function named(list) {
22
+ return list.map((token) => describeToken(token)).join(', ');
23
+ }
24
+ //# sourceMappingURL=injected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injected.js","sourceRoot":"","sources":["../../../src/declarations/injection/injected.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAsC,EACtC,GAAG,CAAC,YAAY,GAAG,EAAE,CAA6B;IAElD,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnC,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,gBAAgB,CACxB,GAAG,MAAM,CAAC,IAAI,oCAAoC,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,YAAY,CAAC,yFAAyF,CACrL,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,QAAQ,CAAC,IAAkB,EAAE,KAAmB;IACvD,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,SAAS,KAAK,CAAC,IAAkB;IAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC"}
@@ -9,7 +9,8 @@ export interface DomainEventHandlerDeclaration {
9
9
  readonly name: string;
10
10
  readonly phase: DomainEventPhase;
11
11
  readonly event: DomainEventType<DomainEvent>;
12
- readonly dependencies: readonly Token<unknown>[];
12
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
13
+ readonly dependencies: readonly Token<unknown>[] | undefined;
13
14
  /** Hands the event type and the class to `use`, with the event type the two share. */
14
15
  pair<Outcome>(use: DomainEventHandlerUse<Outcome>): Outcome;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"domain-event-handler-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/domain-event-handler-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;IACjD,sFAAsF;IACtF,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAC7D"}
1
+ {"version":3,"file":"domain-event-handler-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/domain-event-handler-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7C,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAC7D,sFAAsF;IACtF,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAC7D"}
@@ -7,6 +7,7 @@ export interface HandlerDeclaration {
7
7
  readonly implementation: new (...args: never) => {
8
8
  readonly execute: (message: never) => Promise<unknown>;
9
9
  };
10
- readonly dependencies: readonly Token<unknown>[];
10
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
11
+ readonly dependencies: readonly Token<unknown>[] | undefined;
11
12
  }
12
13
  //# sourceMappingURL=handler-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/handler-declaration.ts"],"names":[],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EAAE,GAAG,SAAS,CAAC;CAC9D"}
@@ -9,7 +9,8 @@ export interface IntegrationEventHandlerDeclaration {
9
9
  /** Stable name of the consumer: the idempotency scope and the system actor it runs as. */
10
10
  readonly consumer: string;
11
11
  readonly actorOf?: (event: IntegrationEvent) => Actor | undefined;
12
- readonly dependencies: readonly Token<unknown>[];
12
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
13
+ readonly dependencies: readonly Token<unknown>[] | undefined;
13
14
  /** Hands the contract and the class to `use`, with the payload type the two share. */
14
15
  pair<Outcome>(use: IntegrationEventHandlerUse<Outcome>): Outcome;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"integration-event-handler-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/integration-event-handler-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAErF,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACjE,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,GAAG,SAAS,CAAC;IAClE,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;IACjD,sFAAsF;IACtF,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAClE"}
1
+ {"version":3,"file":"integration-event-handler-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/integration-event-handler-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAErF,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACjE,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,GAAG,SAAS,CAAC;IAClE,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAC7D,sFAAsF;IACtF,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAClE"}
@@ -10,6 +10,7 @@ export interface JobDeclaration {
10
10
  /** As written: the defaults are filled in where the job is registered. */
11
11
  readonly options: JobOptions;
12
12
  readonly implementation: new (...args: never) => ScheduledJob;
13
- readonly dependencies: readonly Token<unknown>[];
13
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
14
+ readonly dependencies: readonly Token<unknown>[] | undefined;
14
15
  }
15
16
  //# sourceMappingURL=job-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"job-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/job-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,YAAY,CAAC;IAC9D,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;CAClD"}
1
+ {"version":3,"file":"job-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/job-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,YAAY,CAAC;IAC9D,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;CAC9D"}
@@ -7,6 +7,7 @@ export interface PolicyDeclaration {
7
7
  readonly name: string;
8
8
  readonly permission: PermissionRef;
9
9
  readonly implementation: new (...args: never) => DeclaredPolicy;
10
- readonly dependencies: readonly Token<unknown>[];
10
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
11
+ readonly dependencies: readonly Token<unknown>[] | undefined;
11
12
  }
12
13
  //# sourceMappingURL=policy-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"policy-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/policy-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,cAAc,CAAC;IAChE,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;CAClD"}
1
+ {"version":3,"file":"policy-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/policy-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,cAAc,CAAC;IAChE,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;CAC9D"}
@@ -11,6 +11,7 @@ export interface PortDeclaration {
11
11
  /** Outermost first. */
12
12
  readonly aspects: readonly BindingAspect[];
13
13
  readonly implementation: new (...args: never) => unknown;
14
- readonly dependencies: readonly Token<unknown>[];
14
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
15
+ readonly dependencies: readonly Token<unknown>[] | undefined;
15
16
  }
16
17
  //# sourceMappingURL=port-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"port-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/port-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,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 @@ export interface ProjectionDeclaration {
5
5
  /** `<context>.<name>`: the consumer the projection is subscribed as, its idempotency scope and its label. */
6
6
  readonly name: string;
7
7
  readonly implementation: new (...args: never) => object;
8
- readonly dependencies: readonly Token<unknown>[];
8
+ /** The list the decorator wrote; `undefined` when the constructor states the dependencies. */
9
+ readonly dependencies: readonly Token<unknown>[] | undefined;
9
10
  /** In the order the methods are written. */
10
11
  readonly applies: readonly ProjectionApplication[];
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"projection-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/projection-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,6GAA6G;IAC7G,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;IACjD,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACpD"}
1
+ {"version":3,"file":"projection-declaration.d.ts","sourceRoot":"","sources":["../../../src/declarations/model/projection-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,6GAA6G;IAC7G,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACxD,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAC7D,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACpD"}