@tstdl/base 0.88.7 → 0.89.1

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 (114) hide show
  1. package/api/index.d.ts +7 -3
  2. package/api/index.js +7 -3
  3. package/application/index.d.ts +5 -0
  4. package/application/index.js +5 -0
  5. package/authentication/client/authentication.service.d.ts +1 -1
  6. package/authentication/client/authentication.service.js +4 -4
  7. package/authentication/client/http-client.middleware.d.ts +2 -2
  8. package/authentication/client/module.d.ts +2 -2
  9. package/authentication/client/module.js +2 -2
  10. package/authentication/index.d.ts +7 -0
  11. package/authentication/index.js +7 -0
  12. package/browser/index.d.ts +5 -0
  13. package/browser/index.js +5 -0
  14. package/cancellation/index.d.ts +4 -0
  15. package/cancellation/index.js +4 -0
  16. package/collections/index.d.ts +5 -0
  17. package/collections/index.js +5 -0
  18. package/cookie/index.d.ts +5 -0
  19. package/cookie/index.js +5 -0
  20. package/data-structures/index.d.ts +5 -0
  21. package/data-structures/index.js +5 -0
  22. package/database/index.d.ts +5 -0
  23. package/database/index.js +5 -0
  24. package/database/mongo/index.d.ts +5 -0
  25. package/database/mongo/index.js +5 -0
  26. package/database/mongo/module.js +1 -1
  27. package/decorators/index.d.ts +5 -0
  28. package/decorators/index.js +5 -0
  29. package/disposable/index.d.ts +5 -0
  30. package/disposable/index.js +5 -0
  31. package/distributed-loop/index.d.ts +5 -0
  32. package/distributed-loop/index.js +5 -0
  33. package/enumerable/index.d.ts +5 -0
  34. package/enumerable/index.js +5 -0
  35. package/error/index.d.ts +5 -0
  36. package/error/index.js +5 -0
  37. package/examples/api/authentication.js +2 -2
  38. package/examples/api/basic-overview.js +1 -1
  39. package/examples/api/custom-authentication.js +2 -2
  40. package/examples/api/streaming.js +1 -1
  41. package/examples/http/client.js +1 -1
  42. package/function/index.d.ts +5 -0
  43. package/function/index.js +5 -0
  44. package/http/client/adapters/{undici-http-client.adapter.d.ts → undici.adapter.d.ts} +4 -2
  45. package/http/client/adapters/{undici-http-client.adapter.js → undici.adapter.js} +3 -15
  46. package/http/index.d.ts +6 -0
  47. package/http/index.js +6 -0
  48. package/http/server/index.d.ts +2 -1
  49. package/http/server/index.js +2 -1
  50. package/image-service/index.d.ts +6 -0
  51. package/image-service/index.js +6 -0
  52. package/index.d.ts +5 -0
  53. package/index.js +5 -0
  54. package/injector/index.d.ts +5 -0
  55. package/injector/index.js +5 -0
  56. package/json-path/index.d.ts +5 -0
  57. package/json-path/index.js +5 -0
  58. package/key-value-store/index.d.ts +6 -0
  59. package/key-value-store/index.js +6 -0
  60. package/lock/index.d.ts +7 -0
  61. package/lock/index.js +7 -0
  62. package/lock/mongo/lock.d.ts +1 -2
  63. package/lock/mongo/lock.js +9 -9
  64. package/lock/mongo/provider.d.ts +3 -7
  65. package/lock/mongo/provider.js +14 -24
  66. package/logger/index.d.ts +7 -0
  67. package/logger/index.js +7 -0
  68. package/mail/index.d.ts +6 -1
  69. package/mail/index.js +6 -1
  70. package/mail/repositories/index.d.ts +2 -1
  71. package/mail/repositories/index.js +2 -1
  72. package/memory/index.d.ts +5 -0
  73. package/memory/index.js +5 -0
  74. package/message-bus/index.d.ts +7 -0
  75. package/message-bus/index.js +7 -0
  76. package/migration/index.d.ts +6 -0
  77. package/migration/index.js +6 -0
  78. package/module/index.d.ts +6 -0
  79. package/module/index.js +6 -0
  80. package/object-storage/index.d.ts +8 -2
  81. package/object-storage/index.js +8 -2
  82. package/openid-connect/index.d.ts +5 -0
  83. package/openid-connect/index.js +5 -0
  84. package/package.json +7 -24
  85. package/password/index.d.ts +5 -0
  86. package/password/index.js +5 -0
  87. package/pdf/pdf.service.d.ts +5 -0
  88. package/pdf/pdf.service.js +5 -0
  89. package/pool/index.d.ts +5 -0
  90. package/pool/index.js +5 -0
  91. package/promise/cancelable-promise.d.ts +10 -2
  92. package/promise/cancelable-promise.js +23 -19
  93. package/promise/custom-promise.d.ts +6 -0
  94. package/promise/custom-promise.js +14 -0
  95. package/promise/deferred-promise.d.ts +3 -3
  96. package/promise/deferred-promise.js +5 -8
  97. package/promise/index.d.ts +6 -0
  98. package/promise/index.js +6 -0
  99. package/promise/lazy-promise.d.ts +6 -6
  100. package/promise/lazy-promise.js +23 -15
  101. package/promise/types.d.ts +3 -0
  102. package/promise/types.js +1 -0
  103. package/utils/type-guards.d.ts +6 -0
  104. package/utils/type-guards.js +7 -0
  105. package/container/decorators.d.ts +0 -2
  106. package/container/decorators.js +0 -1
  107. package/container/index.d.ts +0 -3
  108. package/container/index.js +0 -3
  109. package/container/interfaces.d.ts +0 -2
  110. package/container/interfaces.js +0 -1
  111. package/container/token.d.ts +0 -2
  112. package/container/token.js +0 -1
  113. package/http/client/adapters/index.d.ts +0 -1
  114. package/http/client/adapters/index.js +0 -1
package/api/index.d.ts CHANGED
@@ -1,14 +1,18 @@
1
1
  /**
2
- * Module for creating and consuming HTTP apis with built-in support for validation and error handling.
2
+ * Create and consume HTTP APIs
3
+ *
4
+ * It has built-in support for validation and error handling.
3
5
  *
4
6
  * This module contains types and functions to define and register apis and error handlers.
5
7
  *
6
8
  * Consumers of these definitions are [client](api_client.html) and [server](api_server.html).
7
9
  *
8
- * A basic example with a working minimal api server and client can be found in `source/examples/api/basic-overview.ts`
10
+ * Examples can be found in `source/examples/api/`.
9
11
  *
10
- * @module
12
+ * @module API
11
13
  */
14
+ export * from './client/index.js';
12
15
  export * from './default-error-handlers.js';
13
16
  export * from './response.js';
17
+ export * from './server/index.js';
14
18
  export * from './types.js';
package/api/index.js CHANGED
@@ -1,14 +1,18 @@
1
1
  /**
2
- * Module for creating and consuming HTTP apis with built-in support for validation and error handling.
2
+ * Create and consume HTTP APIs
3
+ *
4
+ * It has built-in support for validation and error handling.
3
5
  *
4
6
  * This module contains types and functions to define and register apis and error handlers.
5
7
  *
6
8
  * Consumers of these definitions are [client](api_client.html) and [server](api_server.html).
7
9
  *
8
- * A basic example with a working minimal api server and client can be found in `source/examples/api/basic-overview.ts`
10
+ * Examples can be found in `source/examples/api/`.
9
11
  *
10
- * @module
12
+ * @module API
11
13
  */
14
+ export * from './client/index.js';
12
15
  export * from './default-error-handlers.js';
13
16
  export * from './response.js';
17
+ export * from './server/index.js';
14
18
  export * from './types.js';
@@ -1 +1,6 @@
1
+ /**
2
+ * Start application modules and shutting down the app
3
+ *
4
+ * @module Application
5
+ */
1
6
  export * from './application.js';
@@ -1 +1,6 @@
1
+ /**
2
+ * Start application modules and shutting down the app
3
+ *
4
+ * @module Application
5
+ */
1
6
  export * from './application.js';
@@ -4,7 +4,7 @@ import type { AfterResolve } from '../../injector/index.js';
4
4
  import { afterResolve } from '../../injector/index.js';
5
5
  import type { Record } from '../../types.js';
6
6
  import type { SecretCheckResult, TokenPayload } from '../models/index.js';
7
- export declare class AuthenticationService<AdditionalTokenPayload extends Record = Record, AuthenticationData = any> implements AfterResolve, AsyncDisposable {
7
+ export declare class AuthenticationClientService<AdditionalTokenPayload extends Record = Record, AuthenticationData = any> implements AfterResolve, AsyncDisposable {
8
8
  private readonly client;
9
9
  private readonly errorSubject;
10
10
  private readonly tokenUpdateBus;
@@ -33,7 +33,7 @@ const authenticationDataStorageKey = 'AuthenticationService:authentication-data'
33
33
  const tokenUpdateBusName = 'AuthenticationService:tokenUpdate';
34
34
  const loggedOutBusName = 'AuthenticationService:loggedOut';
35
35
  const refreshLockResource = 'AuthenticationService:refresh';
36
- let AuthenticationService = class AuthenticationService {
36
+ let AuthenticationClientService = class AuthenticationClientService {
37
37
  client = inject(AUTHENTICATION_API_CLIENT);
38
38
  errorSubject = new Subject();
39
39
  tokenUpdateBus = inject((MessageBus), tokenUpdateBusName);
@@ -211,10 +211,10 @@ let AuthenticationService = class AuthenticationService {
211
211
  }
212
212
  }
213
213
  };
214
- AuthenticationService = __decorate([
214
+ AuthenticationClientService = __decorate([
215
215
  Singleton(),
216
216
  __param(0, Inject(INITIAL_AUTHENTICATION_DATA)),
217
217
  __param(0, Optional()),
218
218
  __metadata("design:paramtypes", [Object])
219
- ], AuthenticationService);
220
- export { AuthenticationService };
219
+ ], AuthenticationClientService);
220
+ export { AuthenticationClientService };
@@ -1,4 +1,4 @@
1
1
  import type { HttpClientMiddleware } from '../../http/client/middleware.js';
2
2
  import type { ValueOrAsyncProvider } from '../../utils/value-or-provider.js';
3
- import type { AuthenticationService } from './authentication.service.js';
4
- export declare function waitForAuthenticationCredentialsMiddleware(authenticationServiceOrProvider: ValueOrAsyncProvider<AuthenticationService>): HttpClientMiddleware;
3
+ import type { AuthenticationClientService } from './authentication.service.js';
4
+ export declare function waitForAuthenticationCredentialsMiddleware(authenticationServiceOrProvider: ValueOrAsyncProvider<AuthenticationClientService>): HttpClientMiddleware;
@@ -2,9 +2,9 @@ import type { ApiClientImplementation } from '../../api/index.js';
2
2
  import { Injector } from '../../injector/injector.js';
3
3
  import type { Type } from '../../types.js';
4
4
  import type { AuthenticationApiDefinition } from '../authentication.api.js';
5
- export type AuthenticationModuleConfig = {
5
+ export type AuthenticationClientModuleConfig = {
6
6
  authenticationApiClient?: Type<ApiClientImplementation<AuthenticationApiDefinition<any, any>>>;
7
7
  initialAuthenticationData?: unknown;
8
8
  registerMiddleware?: boolean;
9
9
  };
10
- export declare function configureAuthenticationClient(config: AuthenticationModuleConfig, injector?: Injector | null): void;
10
+ export declare function configureAuthenticationClient(config: AuthenticationClientModuleConfig, injector?: Injector | null): void;
@@ -2,7 +2,7 @@ import { HTTP_CLIENT_MIDDLEWARE } from '../../http/client/tokens.js';
2
2
  import { getCurrentInjector } from '../../injector/inject.js';
3
3
  import { Injector } from '../../injector/injector.js';
4
4
  import { isDefined } from '../../utils/type-guards.js';
5
- import { AuthenticationService } from './authentication.service.js';
5
+ import { AuthenticationClientService } from './authentication.service.js';
6
6
  import { waitForAuthenticationCredentialsMiddleware } from './http-client.middleware.js';
7
7
  import { AUTHENTICATION_API_CLIENT, INITIAL_AUTHENTICATION_DATA } from './tokens.js';
8
8
  export function configureAuthenticationClient(config, injector = getCurrentInjector()) {
@@ -15,7 +15,7 @@ export function configureAuthenticationClient(config, injector = getCurrentInjec
15
15
  if (isDefined(config.registerMiddleware)) {
16
16
  (injector ?? Injector).register(HTTP_CLIENT_MIDDLEWARE, {
17
17
  useFactory(_, context) {
18
- const authenticationService = context.resolve(AuthenticationService, undefined, { forwardRef: true, forwardRefTypeHint: 'object' });
18
+ const authenticationService = context.resolve(AuthenticationClientService, undefined, { forwardRef: true, forwardRefTypeHint: 'object' });
19
19
  return waitForAuthenticationCredentialsMiddleware(authenticationService);
20
20
  }
21
21
  }, { multi: true });
@@ -1,3 +1,10 @@
1
+ /**
2
+ * User Authentication
3
+ *
4
+ * @module Authentication
5
+ */
1
6
  export * from './authentication.api.js';
7
+ export * from './client/index.js';
2
8
  export * from './errors/index.js';
3
9
  export * from './models/index.js';
10
+ export * from './server/index.js';
@@ -1,3 +1,10 @@
1
+ /**
2
+ * User Authentication
3
+ *
4
+ * @module Authentication
5
+ */
1
6
  export * from './authentication.api.js';
7
+ export * from './client/index.js';
2
8
  export * from './errors/index.js';
3
9
  export * from './models/index.js';
10
+ export * from './server/index.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Web automation
3
+ *
4
+ * @module Browser
5
+ */
1
6
  export * from './browser-context-controller.js';
2
7
  export * from './browser-controller.js';
3
8
  export * from './browser.service.js';
package/browser/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Web automation
3
+ *
4
+ * @module Browser
5
+ */
1
6
  export * from './browser-context-controller.js';
2
7
  export * from './browser-controller.js';
3
8
  export * from './browser.service.js';
@@ -1 +1,5 @@
1
+ /**
2
+ * Cancellation signaling
3
+ * @module Cancellation
4
+ */
1
5
  export * from './token.js';
@@ -1 +1,5 @@
1
+ /**
2
+ * Cancellation signaling
3
+ * @module Cancellation
4
+ */
1
5
  export * from './token.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Data structures
3
+ *
4
+ * @module Collections
5
+ */
1
6
  export * from './collection.js';
2
7
  export * from './keyed-set.js';
3
8
  export * from './list.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Data structures
3
+ *
4
+ * @module Collections
5
+ */
1
6
  export * from './collection.js';
2
7
  export * from './keyed-set.js';
3
8
  export * from './list.js';
package/cookie/index.d.ts CHANGED
@@ -1 +1,6 @@
1
+ /**
2
+ * Cookie creation and parsing
3
+ *
4
+ * @module Cookie
5
+ */
1
6
  export * from './cookie.js';
package/cookie/index.js CHANGED
@@ -1 +1,6 @@
1
+ /**
2
+ * Cookie creation and parsing
3
+ *
4
+ * @module Cookie
5
+ */
1
6
  export * from './cookie.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Data Structures
3
+ *
4
+ * @module Data Structures
5
+ */
1
6
  export * from './array-dictionary.js';
2
7
  export * from './array-list.js';
3
8
  export * from './cache.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Data Structures
3
+ *
4
+ * @module Data Structures
5
+ */
1
6
  export * from './array-dictionary.js';
2
7
  export * from './array-list.js';
3
8
  export * from './cache.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Repository abstractions
3
+ *
4
+ * @module Database
5
+ */
1
6
  export * from './entity-repository.js';
2
7
  export * from './entity.js';
3
8
  export * from './id.js';
package/database/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Repository abstractions
3
+ *
4
+ * @module Database
5
+ */
1
6
  export * from './entity-repository.js';
2
7
  export * from './entity.js';
3
8
  export * from './id.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * MongoDB implemenation for Database module
3
+ *
4
+ * @module Database - MongoDB
5
+ */
1
6
  export * from './classes.js';
2
7
  export * from './model/index.js';
3
8
  export * from './module.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * MongoDB implemenation for Database module
3
+ *
4
+ * @module Database - MongoDB
5
+ */
1
6
  export * from './classes.js';
2
7
  export * from './model/index.js';
3
8
  export * from './module.js';
@@ -6,7 +6,7 @@ import { Collection, Database, MongoClient } from './classes.js';
6
6
  export const mongoModuleConfig = {
7
7
  defaultConnection: { url: 'mongodb://localhost:27017/test-db' },
8
8
  defaultDatabase: undefined,
9
- logPrefix: 'MONGO'
9
+ logPrefix: 'Mongo'
10
10
  };
11
11
  export function configureMongo(config) {
12
12
  mongoModuleConfig.defaultDatabase = config.defaultDatabase ?? mongoModuleConfig.defaultDatabase;
@@ -1 +1,6 @@
1
+ /**
2
+ * Collection of decorators
3
+ *
4
+ * @module Decorators
5
+ */
1
6
  export * from './log.js';
@@ -1 +1,6 @@
1
+ /**
2
+ * Collection of decorators
3
+ *
4
+ * @module Decorators
5
+ */
1
6
  export * from './log.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Dispose pattern
3
+ *
4
+ * @module Disposable
5
+ */
1
6
  export * from './async-disposer.js';
2
7
  export * from './disposable.js';
3
8
  export * from './using.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Dispose pattern
3
+ *
4
+ * @module Disposable
5
+ */
1
6
  export * from './async-disposer.js';
2
7
  export * from './disposable.js';
3
8
  export * from './using.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Distributed (clusterd) loop
3
+ *
4
+ * @module Distributed Loop
5
+ */
1
6
  export * from './controller.js';
2
7
  export * from './distributed-loop.js';
3
8
  export * from './provider.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Distributed (clusterd) loop
3
+ *
4
+ * @module Distributed Loop
5
+ */
1
6
  export * from './controller.js';
2
7
  export * from './distributed-loop.js';
3
8
  export * from './provider.js';
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Iteration of item iterables
3
+ *
4
+ * @module Enumerable
5
+ */
1
6
  export * from './async-enumerable.js';
2
7
  export * from './enumerable.js';
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Iteration of item iterables
3
+ *
4
+ * @module Enumerable
5
+ */
1
6
  export * from './async-enumerable.js';
2
7
  export * from './enumerable.js';
package/error/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Errors
3
+ *
4
+ * @module Error
5
+ */
1
6
  export * from './api.error.js';
2
7
  export * from './assertion.error.js';
3
8
  export * from './bad-request.error.js';
package/error/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Errors
3
+ *
4
+ * @module Error
5
+ */
1
6
  export * from './api.error.js';
2
7
  export * from './assertion.error.js';
3
8
  export * from './bad-request.error.js';
@@ -3,11 +3,11 @@ import '../../polyfills.js';
3
3
  import { configureApiServer } from '../../api/server/index.js';
4
4
  import { Application } from '../../application/application.js';
5
5
  import { AuthenticationApiClient } from '../../authentication/client/api.client.js';
6
- import { AuthenticationService as AuthenticationClientService, configureAuthenticationClient } from '../../authentication/client/index.js';
6
+ import { AuthenticationClientService, configureAuthenticationClient } from '../../authentication/client/index.js';
7
7
  import { AuthenticationApiController, AuthenticationService as AuthenticationServerService, configureAuthenticationServer } from '../../authentication/server/index.js';
8
8
  import { MongoAuthenticationCredentialsRepository, configureMongoAuthenticationCredentialsRepository } from '../../authentication/server/mongo/mongo-authentication-credentials.repository.js';
9
9
  import { MongoAuthenticationSessionRepository, configureMongoAuthenticationSessionRepository } from '../../authentication/server/mongo/mongo-authentication-session.repository.js';
10
- import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici-http-client.adapter.js';
10
+ import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici.adapter.js';
11
11
  import { configureHttpClient } from '../../http/client/module.js';
12
12
  import { configureNodeHttpServer } from '../../http/server/node/module.js';
13
13
  import { inject, injectAsync } from '../../injector/inject.js';
@@ -12,7 +12,7 @@ import { compileClient } from '../../api/client/index.js';
12
12
  import { defineApi } from '../../api/index.js';
13
13
  import { apiController, configureApiServer } from '../../api/server/index.js';
14
14
  import { Application } from '../../application/application.js';
15
- import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici-http-client.adapter.js';
15
+ import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici.adapter.js';
16
16
  import { configureHttpClient } from '../../http/client/module.js';
17
17
  import { configureNodeHttpServer } from '../../http/server/node/module.js';
18
18
  import { inject } from '../../injector/inject.js';
@@ -11,14 +11,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  import '../../polyfills.js';
12
12
  import { configureApiServer } from '../../api/server/index.js';
13
13
  import { Application } from '../../application/application.js';
14
- import { AuthenticationService as AuthenticationClientService, configureAuthenticationClient, getAuthenticationApiClient } from '../../authentication/client/index.js';
14
+ import { AuthenticationClientService, configureAuthenticationClient, getAuthenticationApiClient } from '../../authentication/client/index.js';
15
15
  import { AuthenticationTokenPayloadProvider } from '../../authentication/server/authentication-token-payload.provider.js';
16
16
  import { AuthenticationApiController } from '../../authentication/server/authentication.api-controller.js';
17
17
  import { AuthenticationService as AuthenticationServerService } from '../../authentication/server/authentication.service.js';
18
18
  import { configureAuthenticationServer } from '../../authentication/server/module.js';
19
19
  import { MongoAuthenticationCredentialsRepository, configureMongoAuthenticationCredentialsRepository } from '../../authentication/server/mongo/mongo-authentication-credentials.repository.js';
20
20
  import { MongoAuthenticationSessionRepository, configureMongoAuthenticationSessionRepository } from '../../authentication/server/mongo/mongo-authentication-session.repository.js';
21
- import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici-http-client.adapter.js';
21
+ import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici.adapter.js';
22
22
  import { configureHttpClient } from '../../http/client/module.js';
23
23
  import { configureNodeHttpServer } from '../../http/server/node/module.js';
24
24
  import { Singleton } from '../../injector/decorators.js';
@@ -10,7 +10,7 @@ import { defineApi } from '../../api/index.js';
10
10
  import { apiController, configureApiServer } from '../../api/server/index.js';
11
11
  import { Application } from '../../application/application.js';
12
12
  import { CORE_LOGGER, configureTstdl, getGlobalInjector } from '../../core.js';
13
- import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici-http-client.adapter.js';
13
+ import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici.adapter.js';
14
14
  import { configureHttpClient } from '../../http/client/module.js';
15
15
  import { HttpServerResponse } from '../../http/server/index.js';
16
16
  import { configureNodeHttpServer } from '../../http/server/node/index.js';
@@ -1,5 +1,5 @@
1
1
  import { Application } from '../../application/application.js';
2
- import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici-http-client.adapter.js';
2
+ import { configureUndiciHttpClientAdapter } from '../../http/client/adapters/undici.adapter.js';
3
3
  import { HttpClient } from '../../http/client/index.js';
4
4
  import { inject } from '../../injector/inject.js';
5
5
  configureUndiciHttpClientAdapter();
@@ -1 +1,6 @@
1
+ /**
2
+ * Tools around functions
3
+ *
4
+ * @module Function
5
+ */
1
6
  export * from './log.js';
package/function/index.js CHANGED
@@ -1 +1,6 @@
1
+ /**
2
+ * Tools around functions
3
+ *
4
+ * @module Function
5
+ */
1
6
  export * from './log.js';
@@ -1,13 +1,15 @@
1
1
  import type { Dispatcher } from 'undici';
2
+ import type { Resolvable } from '../../../injector/index.js';
3
+ import { resolveArgumentType } from '../../../injector/index.js';
2
4
  import type { HttpClientRequest } from '../http-client-request.js';
3
5
  import { HttpClientResponse } from '../http-client-response.js';
4
6
  import { HttpClientAdapter } from '../http-client.adapter.js';
5
7
  export type UndiciHttpClientAdapterOptions = {
6
8
  dispatcher?: Dispatcher;
7
9
  };
8
- export declare class UndiciHttpClientAdapter extends HttpClientAdapter {
10
+ export declare class UndiciHttpClientAdapter extends HttpClientAdapter implements Resolvable<UndiciHttpClientAdapterOptions> {
9
11
  private readonly options;
10
- constructor(options?: UndiciHttpClientAdapterOptions);
12
+ readonly [resolveArgumentType]: UndiciHttpClientAdapterOptions;
11
13
  call(httpClientRequest: HttpClientRequest): Promise<HttpClientResponse>;
12
14
  }
13
15
  /**
@@ -4,17 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
7
  import { Readable } from 'node:stream';
14
8
  import { request, errors as undiciErrors } from 'undici';
15
9
  import { HttpHeaders } from '../../../http/http-headers.js';
16
10
  import { HttpError, HttpErrorReason } from '../../../http/http.error.js';
17
- import { InjectArg, Singleton } from '../../../injector/index.js';
11
+ import { Singleton, injectArgument, resolveArgumentType } from '../../../injector/index.js';
18
12
  import { Injector } from '../../../injector/injector.js';
19
13
  import { toArray } from '../../../utils/array/array.js';
20
14
  import { isDefined } from '../../../utils/type-guards.js';
@@ -22,11 +16,7 @@ import { HttpClientResponse } from '../http-client-response.js';
22
16
  import { HttpClientAdapter } from '../http-client.adapter.js';
23
17
  let defaultOptions = {};
24
18
  let UndiciHttpClientAdapter = class UndiciHttpClientAdapter extends HttpClientAdapter {
25
- options;
26
- constructor(options = {}) {
27
- super();
28
- this.options = options;
29
- }
19
+ options = injectArgument(this);
30
20
  // eslint-disable-next-line max-lines-per-function, max-statements
31
21
  async call(httpClientRequest) {
32
22
  let body;
@@ -86,9 +76,7 @@ let UndiciHttpClientAdapter = class UndiciHttpClientAdapter extends HttpClientAd
86
76
  }
87
77
  };
88
78
  UndiciHttpClientAdapter = __decorate([
89
- Singleton({ defaultArgumentProvider: () => defaultOptions }),
90
- __param(0, InjectArg()),
91
- __metadata("design:paramtypes", [Object])
79
+ Singleton({ defaultArgumentProvider: () => defaultOptions })
92
80
  ], UndiciHttpClientAdapter);
93
81
  export { UndiciHttpClientAdapter };
94
82
  /**
package/http/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * HTTP Server and Client
3
+ *
4
+ * @module HTTP
5
+ */
1
6
  export * from './client/index.js';
2
7
  export * from './cookie-parser.js';
3
8
  export * from './http-body.js';
@@ -7,5 +12,6 @@ export * from './http-query.js';
7
12
  export * from './http-url-parameters.js';
8
13
  export * from './http-value-map.js';
9
14
  export * from './http.error.js';
15
+ export * from './server/index.js';
10
16
  export * from './types.js';
11
17
  export * from './utils.js';
package/http/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * HTTP Server and Client
3
+ *
4
+ * @module HTTP
5
+ */
1
6
  export * from './client/index.js';
2
7
  export * from './cookie-parser.js';
3
8
  export * from './http-body.js';
@@ -7,5 +12,6 @@ export * from './http-query.js';
7
12
  export * from './http-url-parameters.js';
8
13
  export * from './http-value-map.js';
9
14
  export * from './http.error.js';
15
+ export * from './server/index.js';
10
16
  export * from './types.js';
11
17
  export * from './utils.js';
@@ -1,3 +1,4 @@
1
- export * from './http-server.js';
2
1
  export * from './http-server-request.js';
3
2
  export * from './http-server-response.js';
3
+ export * from './http-server.js';
4
+ export * from './node/index.js';
@@ -1,3 +1,4 @@
1
- export * from './http-server.js';
2
1
  export * from './http-server-request.js';
3
2
  export * from './http-server-response.js';
3
+ export * from './http-server.js';
4
+ export * from './node/index.js';
@@ -1 +1,7 @@
1
+ /**
2
+ * Image provider with image manipulation
3
+ *
4
+ * @module Image Service
5
+ */
1
6
  export * from './image-service.js';
7
+ export * from './imgproxy/index.js';
@@ -1 +1,7 @@
1
+ /**
2
+ * Image provider with image manipulation
3
+ *
4
+ * @module Image Service
5
+ */
1
6
  export * from './image-service.js';
7
+ export * from './imgproxy/index.js';
package/index.d.ts CHANGED
@@ -1 +1,6 @@
1
+ /**
2
+ * Core of tstdl
3
+ *
4
+ * @module Core
5
+ */
1
6
  export * from './core.js';
package/index.js CHANGED
@@ -1 +1,6 @@
1
+ /**
2
+ * Core of tstdl
3
+ *
4
+ * @module Core
5
+ */
1
6
  export * from './core.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Dependency Injection
3
+ *
4
+ * @module Injector
5
+ */
1
6
  export * from './decorators.js';
2
7
  export * from './inject.js';
3
8
  export * from './injector.js';