@nestjs/common 11.1.15 → 12.0.0-alpha.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.
- package/constants.js +35 -38
- package/decorators/core/apply-decorators.js +1 -4
- package/decorators/core/bind.decorator.js +1 -4
- package/decorators/core/catch.decorator.d.ts +1 -1
- package/decorators/core/catch.decorator.js +4 -7
- package/decorators/core/controller.decorator.d.ts +1 -1
- package/decorators/core/controller.decorator.js +10 -13
- package/decorators/core/dependencies.decorator.js +4 -9
- package/decorators/core/exception-filters.decorator.d.ts +1 -1
- package/decorators/core/exception-filters.decorator.js +10 -14
- package/decorators/core/index.d.ts +14 -14
- package/decorators/core/index.js +14 -17
- package/decorators/core/inject.decorator.d.ts +1 -1
- package/decorators/core/inject.decorator.js +9 -12
- package/decorators/core/injectable.decorator.d.ts +2 -2
- package/decorators/core/injectable.decorator.js +7 -11
- package/decorators/core/optional.decorator.js +8 -11
- package/decorators/core/set-metadata.decorator.js +1 -5
- package/decorators/core/use-guards.decorator.d.ts +1 -1
- package/decorators/core/use-guards.decorator.js +10 -13
- package/decorators/core/use-interceptors.decorator.d.ts +1 -1
- package/decorators/core/use-interceptors.decorator.js +10 -13
- package/decorators/core/use-pipes.decorator.d.ts +1 -1
- package/decorators/core/use-pipes.decorator.js +9 -12
- package/decorators/core/version.decorator.d.ts +1 -1
- package/decorators/core/version.decorator.js +3 -6
- package/decorators/http/create-route-param-metadata.decorator.d.ts +6 -5
- package/decorators/http/create-route-param-metadata.decorator.js +48 -16
- package/decorators/http/header.decorator.js +4 -7
- package/decorators/http/http-code.decorator.js +3 -6
- package/decorators/http/index.d.ts +8 -8
- package/decorators/http/index.js +8 -11
- package/decorators/http/redirect.decorator.js +3 -6
- package/decorators/http/render.decorator.js +3 -6
- package/decorators/http/request-mapping.decorator.d.ts +1 -1
- package/decorators/http/request-mapping.decorator.js +28 -32
- package/decorators/http/route-params.decorator.d.ts +153 -3
- package/decorators/http/route-params.decorator.js +124 -49
- package/decorators/http/sse.decorator.d.ts +2 -2
- package/decorators/http/sse.decorator.js +7 -10
- package/decorators/index.d.ts +3 -3
- package/decorators/index.js +3 -6
- package/decorators/modules/global.decorator.js +3 -6
- package/decorators/modules/index.d.ts +2 -2
- package/decorators/modules/index.js +2 -5
- package/decorators/modules/module.decorator.d.ts +1 -1
- package/decorators/modules/module.decorator.js +3 -6
- package/enums/http-status.enum.js +2 -5
- package/enums/index.d.ts +4 -4
- package/enums/index.js +4 -7
- package/enums/request-method.enum.js +2 -5
- package/enums/route-paramtypes.enum.js +2 -5
- package/enums/shutdown-signal.enum.js +2 -5
- package/enums/version-type.enum.js +2 -5
- package/exceptions/bad-gateway.exception.d.ts +1 -1
- package/exceptions/bad-gateway.exception.js +5 -9
- package/exceptions/bad-request.exception.d.ts +1 -1
- package/exceptions/bad-request.exception.js +5 -9
- package/exceptions/conflict.exception.d.ts +1 -1
- package/exceptions/conflict.exception.js +5 -9
- package/exceptions/forbidden.exception.d.ts +1 -1
- package/exceptions/forbidden.exception.js +5 -9
- package/exceptions/gateway-timeout.exception.d.ts +1 -1
- package/exceptions/gateway-timeout.exception.js +5 -9
- package/exceptions/gone.exception.d.ts +1 -1
- package/exceptions/gone.exception.js +5 -9
- package/exceptions/http-version-not-supported.exception.d.ts +1 -1
- package/exceptions/http-version-not-supported.exception.js +5 -9
- package/exceptions/http.exception.d.ts +6 -2
- package/exceptions/http.exception.js +36 -17
- package/exceptions/im-a-teapot.exception.d.ts +1 -1
- package/exceptions/im-a-teapot.exception.js +5 -9
- package/exceptions/index.d.ts +23 -23
- package/exceptions/index.js +23 -26
- package/exceptions/internal-server-error.exception.d.ts +1 -1
- package/exceptions/internal-server-error.exception.js +5 -9
- package/exceptions/intrinsic.exception.js +1 -5
- package/exceptions/method-not-allowed.exception.d.ts +1 -1
- package/exceptions/method-not-allowed.exception.js +5 -9
- package/exceptions/misdirected.exception.d.ts +1 -1
- package/exceptions/misdirected.exception.js +5 -9
- package/exceptions/not-acceptable.exception.d.ts +1 -1
- package/exceptions/not-acceptable.exception.js +5 -9
- package/exceptions/not-found.exception.d.ts +1 -1
- package/exceptions/not-found.exception.js +5 -9
- package/exceptions/not-implemented.exception.d.ts +1 -1
- package/exceptions/not-implemented.exception.js +5 -9
- package/exceptions/payload-too-large.exception.d.ts +1 -1
- package/exceptions/payload-too-large.exception.js +5 -9
- package/exceptions/precondition-failed.exception.d.ts +1 -1
- package/exceptions/precondition-failed.exception.js +5 -9
- package/exceptions/request-timeout.exception.d.ts +1 -1
- package/exceptions/request-timeout.exception.js +5 -9
- package/exceptions/service-unavailable.exception.d.ts +1 -1
- package/exceptions/service-unavailable.exception.js +5 -9
- package/exceptions/unauthorized.exception.d.ts +1 -1
- package/exceptions/unauthorized.exception.js +5 -9
- package/exceptions/unprocessable-entity.exception.d.ts +1 -1
- package/exceptions/unprocessable-entity.exception.js +5 -9
- package/exceptions/unsupported-media-type.exception.d.ts +1 -1
- package/exceptions/unsupported-media-type.exception.js +5 -9
- package/file-stream/index.d.ts +1 -1
- package/file-stream/index.js +1 -4
- package/file-stream/interfaces/index.d.ts +2 -2
- package/file-stream/interfaces/index.js +2 -5
- package/file-stream/interfaces/streamable-handler-response.interface.js +1 -2
- package/file-stream/interfaces/streamable-options.interface.js +1 -2
- package/file-stream/streamable-file.d.ts +2 -2
- package/file-stream/streamable-file.js +26 -28
- package/index.d.ts +10 -10
- package/index.js +11 -17
- package/interfaces/abstract.interface.js +1 -2
- package/interfaces/controllers/controller-metadata.interface.js +1 -2
- package/interfaces/controllers/controller.interface.js +1 -2
- package/interfaces/controllers/index.d.ts +2 -2
- package/interfaces/controllers/index.js +2 -5
- package/interfaces/exceptions/exception-filter-metadata.interface.d.ts +2 -2
- package/interfaces/exceptions/exception-filter-metadata.interface.js +1 -2
- package/interfaces/exceptions/exception-filter.interface.d.ts +1 -1
- package/interfaces/exceptions/exception-filter.interface.js +1 -2
- package/interfaces/exceptions/index.d.ts +5 -5
- package/interfaces/exceptions/index.js +5 -8
- package/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts +2 -2
- package/interfaces/exceptions/rpc-exception-filter-metadata.interface.js +1 -2
- package/interfaces/exceptions/rpc-exception-filter.interface.d.ts +1 -1
- package/interfaces/exceptions/rpc-exception-filter.interface.js +1 -2
- package/interfaces/exceptions/ws-exception-filter.interface.d.ts +1 -1
- package/interfaces/exceptions/ws-exception-filter.interface.js +1 -2
- package/interfaces/external/class-transform-options.interface.js +1 -2
- package/interfaces/external/cors-options.interface.js +1 -2
- package/interfaces/external/https-options.interface.js +1 -2
- package/interfaces/external/transformer-package.interface.d.ts +2 -2
- package/interfaces/external/transformer-package.interface.js +1 -2
- package/interfaces/external/validation-error.interface.js +1 -2
- package/interfaces/external/validator-options.interface.js +1 -2
- package/interfaces/external/validator-package.interface.d.ts +2 -2
- package/interfaces/external/validator-package.interface.js +1 -2
- package/interfaces/features/arguments-host.interface.js +1 -2
- package/interfaces/features/can-activate.interface.d.ts +1 -1
- package/interfaces/features/can-activate.interface.js +1 -2
- package/interfaces/features/custom-route-param-factory.interface.d.ts +1 -1
- package/interfaces/features/custom-route-param-factory.interface.js +1 -2
- package/interfaces/features/execution-context.interface.d.ts +2 -2
- package/interfaces/features/execution-context.interface.js +1 -2
- package/interfaces/features/nest-interceptor.interface.d.ts +1 -1
- package/interfaces/features/nest-interceptor.interface.js +1 -2
- package/interfaces/features/paramtype.interface.js +1 -2
- package/interfaces/features/pipe-transform.interface.d.ts +10 -4
- package/interfaces/features/pipe-transform.interface.js +1 -2
- package/interfaces/global-prefix-options.interface.d.ts +1 -1
- package/interfaces/global-prefix-options.interface.js +1 -2
- package/interfaces/hooks/before-application-shutdown.interface.js +1 -2
- package/interfaces/hooks/index.d.ts +5 -5
- package/interfaces/hooks/index.js +5 -8
- package/interfaces/hooks/on-application-bootstrap.interface.js +1 -2
- package/interfaces/hooks/on-application-shutdown.interface.js +1 -2
- package/interfaces/hooks/on-destroy.interface.js +1 -2
- package/interfaces/hooks/on-init.interface.js +1 -2
- package/interfaces/http/http-exception-body.interface.d.ts +2 -1
- package/interfaces/http/http-exception-body.interface.js +1 -2
- package/interfaces/http/http-redirect-response.interface.d.ts +1 -1
- package/interfaces/http/http-redirect-response.interface.js +1 -2
- package/interfaces/http/http-server.interface.d.ts +4 -3
- package/interfaces/http/http-server.interface.js +1 -2
- package/interfaces/http/index.d.ts +5 -5
- package/interfaces/http/index.js +5 -8
- package/interfaces/http/message-event.interface.js +1 -2
- package/interfaces/http/raw-body-request.interface.js +1 -2
- package/interfaces/index.d.ts +31 -30
- package/interfaces/index.js +31 -33
- package/interfaces/injectable.interface.js +1 -2
- package/interfaces/microservices/nest-hybrid-application-options.interface.js +1 -2
- package/interfaces/microservices/nest-microservice-options.interface.d.ts +1 -1
- package/interfaces/microservices/nest-microservice-options.interface.js +1 -2
- package/interfaces/microservices/pre-request-hook.interface.d.ts +22 -0
- package/interfaces/microservices/pre-request-hook.interface.js +1 -0
- package/interfaces/middleware/index.d.ts +4 -4
- package/interfaces/middleware/index.js +4 -7
- package/interfaces/middleware/middleware-config-proxy.interface.d.ts +3 -3
- package/interfaces/middleware/middleware-config-proxy.interface.js +1 -2
- package/interfaces/middleware/middleware-configuration.interface.d.ts +3 -3
- package/interfaces/middleware/middleware-configuration.interface.js +1 -2
- package/interfaces/middleware/middleware-consumer.interface.d.ts +2 -2
- package/interfaces/middleware/middleware-consumer.interface.js +1 -2
- package/interfaces/middleware/nest-middleware.interface.js +1 -2
- package/interfaces/modules/dynamic-module.interface.d.ts +2 -2
- package/interfaces/modules/dynamic-module.interface.js +1 -2
- package/interfaces/modules/forward-reference.interface.js +1 -2
- package/interfaces/modules/index.d.ts +8 -8
- package/interfaces/modules/index.js +8 -11
- package/interfaces/modules/injection-token.interface.d.ts +2 -2
- package/interfaces/modules/injection-token.interface.js +1 -2
- package/interfaces/modules/introspection-result.interface.d.ts +1 -1
- package/interfaces/modules/introspection-result.interface.js +1 -2
- package/interfaces/modules/module-metadata.interface.d.ts +5 -5
- package/interfaces/modules/module-metadata.interface.js +1 -2
- package/interfaces/modules/nest-module.interface.d.ts +1 -1
- package/interfaces/modules/nest-module.interface.js +1 -2
- package/interfaces/modules/optional-factory-dependency.interface.d.ts +1 -1
- package/interfaces/modules/optional-factory-dependency.interface.js +1 -2
- package/interfaces/modules/provider.interface.d.ts +4 -4
- package/interfaces/modules/provider.interface.js +1 -2
- package/interfaces/nest-application-context-options.interface.d.ts +1 -1
- package/interfaces/nest-application-context-options.interface.js +55 -5
- package/interfaces/nest-application-context.interface.d.ts +6 -6
- package/interfaces/nest-application-context.interface.js +1 -2
- package/interfaces/nest-application-options.interface.d.ts +9 -3
- package/interfaces/nest-application-options.interface.js +1 -2
- package/interfaces/nest-application.interface.d.ts +8 -8
- package/interfaces/nest-application.interface.js +1 -2
- package/interfaces/nest-microservice.interface.d.ts +15 -6
- package/interfaces/nest-microservice.interface.js +1 -2
- package/interfaces/scope-options.interface.js +2 -5
- package/interfaces/shutdown-hooks-options.interface.js +1 -2
- package/interfaces/type.interface.js +1 -2
- package/interfaces/version-options.interface.d.ts +1 -1
- package/interfaces/version-options.interface.js +1 -4
- package/interfaces/websockets/web-socket-adapter.interface.js +1 -2
- package/internal.d.ts +30 -0
- package/internal.js +19 -0
- package/module-utils/configurable-module.builder.d.ts +4 -4
- package/module-utils/configurable-module.builder.js +21 -20
- package/module-utils/constants.js +5 -8
- package/module-utils/index.d.ts +2 -2
- package/module-utils/index.js +2 -5
- package/module-utils/interfaces/configurable-module-async-options.interface.d.ts +2 -2
- package/module-utils/interfaces/configurable-module-async-options.interface.js +1 -2
- package/module-utils/interfaces/configurable-module-cls.interface.d.ts +3 -3
- package/module-utils/interfaces/configurable-module-cls.interface.js +1 -2
- package/module-utils/interfaces/configurable-module-host.interface.d.ts +2 -2
- package/module-utils/interfaces/configurable-module-host.interface.js +1 -2
- package/module-utils/interfaces/index.d.ts +3 -3
- package/module-utils/interfaces/index.js +3 -6
- package/module-utils/utils/generate-options-injection-token.util.js +3 -6
- package/module-utils/utils/get-injection-providers.util.d.ts +1 -1
- package/module-utils/utils/get-injection-providers.util.js +4 -7
- package/module-utils/utils/index.d.ts +2 -2
- package/module-utils/utils/index.js +2 -5
- package/package.json +35 -2
- package/pipes/default-value.pipe.d.ts +1 -1
- package/pipes/default-value.pipe.js +10 -12
- package/pipes/file/file-type.validator.d.ts +3 -3
- package/pipes/file/file-type.validator.js +5 -19
- package/pipes/file/file-validator-context.interface.d.ts +1 -1
- package/pipes/file/file-validator-context.interface.js +1 -2
- package/pipes/file/file-validator.interface.d.ts +1 -1
- package/pipes/file/file-validator.interface.js +2 -5
- package/pipes/file/index.d.ts +6 -6
- package/pipes/file/index.js +6 -9
- package/pipes/file/interfaces/file.interface.js +1 -2
- package/pipes/file/interfaces/index.d.ts +1 -1
- package/pipes/file/interfaces/index.js +1 -4
- package/pipes/file/max-file-size.validator.d.ts +3 -3
- package/pipes/file/max-file-size.validator.js +2 -6
- package/pipes/file/parse-file-options.interface.d.ts +2 -2
- package/pipes/file/parse-file-options.interface.js +1 -2
- package/pipes/file/parse-file-pipe.builder.d.ts +5 -5
- package/pipes/file/parse-file-pipe.builder.js +8 -14
- package/pipes/file/parse-file.pipe.d.ts +7 -7
- package/pipes/file/parse-file.pipe.js +17 -18
- package/pipes/index.d.ts +11 -10
- package/pipes/index.js +11 -13
- package/pipes/parse-array.pipe.d.ts +4 -4
- package/pipes/parse-array.pipe.js +23 -23
- package/pipes/parse-bool.pipe.d.ts +6 -6
- package/pipes/parse-bool.pipe.js +16 -17
- package/pipes/parse-date.pipe.d.ts +4 -4
- package/pipes/parse-date.pipe.js +17 -16
- package/pipes/parse-enum.pipe.d.ts +5 -5
- package/pipes/parse-enum.pipe.js +16 -16
- package/pipes/parse-float.pipe.d.ts +6 -6
- package/pipes/parse-float.pipe.js +17 -18
- package/pipes/parse-int.pipe.d.ts +5 -5
- package/pipes/parse-int.pipe.js +18 -19
- package/pipes/parse-uuid.pipe.d.ts +4 -4
- package/pipes/parse-uuid.pipe.js +27 -26
- package/pipes/standard-schema-validation.pipe.d.ts +86 -0
- package/pipes/standard-schema-validation.pipe.js +120 -0
- package/pipes/validation.pipe.d.ts +32 -14
- package/pipes/validation.pipe.js +60 -30
- package/serializer/class-serializer.constants.js +1 -4
- package/serializer/class-serializer.interceptor.d.ts +5 -5
- package/serializer/class-serializer.interceptor.js +21 -24
- package/serializer/class-serializer.interfaces.d.ts +2 -2
- package/serializer/class-serializer.interfaces.js +1 -2
- package/serializer/decorators/index.d.ts +1 -1
- package/serializer/decorators/index.js +1 -4
- package/serializer/decorators/serialize-options.decorator.d.ts +3 -2
- package/serializer/decorators/serialize-options.decorator.js +3 -7
- package/serializer/index.d.ts +5 -3
- package/serializer/index.js +5 -6
- package/serializer/standard-schema-serializer.interceptor.d.ts +50 -0
- package/serializer/standard-schema-serializer.interceptor.js +75 -0
- package/serializer/standard-schema-serializer.interfaces.d.ts +18 -0
- package/serializer/standard-schema-serializer.interfaces.js +1 -0
- package/services/console-logger.service.d.ts +22 -3
- package/services/console-logger.service.js +132 -66
- package/services/index.d.ts +3 -3
- package/services/index.js +3 -6
- package/services/logger.service.js +86 -83
- package/services/utils/filter-log-levels.util.d.ts +1 -1
- package/services/utils/filter-log-levels.util.js +7 -10
- package/services/utils/index.d.ts +3 -3
- package/services/utils/index.js +3 -6
- package/services/utils/is-log-level-enabled.util.d.ts +1 -1
- package/services/utils/is-log-level-enabled.util.js +1 -4
- package/services/utils/is-log-level.util.d.ts +1 -1
- package/services/utils/is-log-level.util.js +3 -6
- package/tsconfig.build.json +1 -2
- package/utils/assign-custom-metadata.util.d.ts +5 -4
- package/utils/assign-custom-metadata.util.js +4 -6
- package/utils/cli-colors.util.js +4 -8
- package/utils/extend-metadata.util.js +1 -4
- package/utils/forward-ref.util.d.ts +1 -1
- package/utils/forward-ref.util.js +1 -5
- package/utils/http-error-by-code.util.d.ts +2 -2
- package/utils/http-error-by-code.util.js +22 -25
- package/utils/index.d.ts +1 -1
- package/utils/index.js +1 -4
- package/utils/load-package.util.d.ts +21 -1
- package/utils/load-package.util.js +62 -8
- package/utils/merge-with-values.util.js +1 -5
- package/utils/random-string-generator.util.js +2 -6
- package/utils/select-exception-filter-metadata.util.d.ts +1 -1
- package/utils/select-exception-filter-metadata.util.js +1 -5
- package/utils/shared.utils.d.ts +11 -10
- package/utils/shared.utils.js +28 -30
- package/utils/validate-each.util.js +3 -7
- package/utils/validate-module-keys.util.js +8 -13
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Type } from '../type.interface';
|
|
2
|
-
import { ModuleMetadata } from './module-metadata.interface';
|
|
1
|
+
import { Type } from '../type.interface.js';
|
|
2
|
+
import { ModuleMetadata } from './module-metadata.interface.js';
|
|
3
3
|
/**
|
|
4
4
|
* Interface defining a Dynamic Module.
|
|
5
5
|
*
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './dynamic-module.interface';
|
|
2
|
-
export * from './forward-reference.interface';
|
|
3
|
-
export * from './injection-token.interface';
|
|
4
|
-
export * from './introspection-result.interface';
|
|
5
|
-
export * from './module-metadata.interface';
|
|
6
|
-
export * from './nest-module.interface';
|
|
7
|
-
export * from './optional-factory-dependency.interface';
|
|
8
|
-
export * from './provider.interface';
|
|
1
|
+
export * from './dynamic-module.interface.js';
|
|
2
|
+
export * from './forward-reference.interface.js';
|
|
3
|
+
export * from './injection-token.interface.js';
|
|
4
|
+
export * from './introspection-result.interface.js';
|
|
5
|
+
export * from './module-metadata.interface.js';
|
|
6
|
+
export * from './nest-module.interface.js';
|
|
7
|
+
export * from './optional-factory-dependency.interface.js';
|
|
8
|
+
export * from './provider.interface.js';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./nest-module.interface"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./optional-factory-dependency.interface"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./provider.interface"), exports);
|
|
1
|
+
export * from './dynamic-module.interface.js';
|
|
2
|
+
export * from './forward-reference.interface.js';
|
|
3
|
+
export * from './injection-token.interface.js';
|
|
4
|
+
export * from './introspection-result.interface.js';
|
|
5
|
+
export * from './module-metadata.interface.js';
|
|
6
|
+
export * from './nest-module.interface.js';
|
|
7
|
+
export * from './optional-factory-dependency.interface.js';
|
|
8
|
+
export * from './provider.interface.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Abstract } from '../abstract.interface';
|
|
2
|
-
import { Type } from '../type.interface';
|
|
3
|
-
import { DynamicModule } from './dynamic-module.interface';
|
|
4
|
-
import { ForwardReference } from './forward-reference.interface';
|
|
5
|
-
import { Provider } from './provider.interface';
|
|
1
|
+
import { Abstract } from '../abstract.interface.js';
|
|
2
|
+
import { Type } from '../type.interface.js';
|
|
3
|
+
import { DynamicModule } from './dynamic-module.interface.js';
|
|
4
|
+
import { ForwardReference } from './forward-reference.interface.js';
|
|
5
|
+
import { Provider } from './provider.interface.js';
|
|
6
6
|
/**
|
|
7
7
|
* Interface defining the property object that describes the module.
|
|
8
8
|
*
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Scope } from '../scope-options.interface';
|
|
2
|
-
import { Type } from '../type.interface';
|
|
3
|
-
import { InjectionToken } from './injection-token.interface';
|
|
4
|
-
import { OptionalFactoryDependency } from './optional-factory-dependency.interface';
|
|
1
|
+
import { Scope } from '../scope-options.interface.js';
|
|
2
|
+
import { Type } from '../type.interface.js';
|
|
3
|
+
import { InjectionToken } from './injection-token.interface.js';
|
|
4
|
+
import { OptionalFactoryDependency } from './optional-factory-dependency.interface.js';
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,59 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NestApplicationContextOptions = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* @publicApi
|
|
6
3
|
*/
|
|
7
|
-
class NestApplicationContextOptions {
|
|
4
|
+
export class NestApplicationContextOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the logger to use. Pass `false` to turn off logging.
|
|
7
|
+
*/
|
|
8
|
+
logger;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to abort the process on Error. By default, the process is exited.
|
|
11
|
+
* Pass `false` to override the default behavior. If `false` is passed, Nest will not exit
|
|
12
|
+
* the application and instead will rethrow the exception.
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
abortOnError;
|
|
16
|
+
/**
|
|
17
|
+
* If enabled, logs will be buffered until the "Logger#flush" method is called.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
bufferLogs;
|
|
21
|
+
/**
|
|
22
|
+
* If enabled, logs will be automatically flushed and buffer detached when
|
|
23
|
+
* application initialization process either completes or fails.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
autoFlushLogs;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to run application in the preview mode.
|
|
29
|
+
* In the preview mode, providers/controllers are not instantiated & resolved.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
preview;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to generate a serialized graph snapshot.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
snapshot;
|
|
40
|
+
/**
|
|
41
|
+
* Determines what algorithm use to generate module ids.
|
|
42
|
+
* When set to `deep-hash`, the module id is generated based on the serialized module definition.
|
|
43
|
+
* When set to `reference`, each module obtains a unique id based on its reference.
|
|
44
|
+
*
|
|
45
|
+
* @default 'reference'
|
|
46
|
+
*/
|
|
47
|
+
moduleIdGeneratorAlgorithm;
|
|
48
|
+
/**
|
|
49
|
+
* Instrument the application context.
|
|
50
|
+
* This option allows you to add custom instrumentation to the application context.
|
|
51
|
+
*/
|
|
52
|
+
instrument;
|
|
53
|
+
/**
|
|
54
|
+
* If enabled, will force the use of console.log/console.error instead of process.stdout/stderr.write
|
|
55
|
+
* in the default ConsoleLogger. This is useful for test environments like Jest that can buffer console calls.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
forceConsole;
|
|
8
59
|
}
|
|
9
|
-
exports.NestApplicationContextOptions = NestApplicationContextOptions;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ShutdownSignal } from '../enums/shutdown-signal.enum';
|
|
2
|
-
import { LoggerService, LogLevel } from '../services/logger.service';
|
|
3
|
-
import { DynamicModule } from './modules';
|
|
4
|
-
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
|
|
5
|
-
import { ShutdownHooksOptions } from './shutdown-hooks-options.interface';
|
|
6
|
-
import { Type } from './type.interface';
|
|
1
|
+
import { ShutdownSignal } from '../enums/shutdown-signal.enum.js';
|
|
2
|
+
import { LoggerService, LogLevel } from '../services/logger.service.js';
|
|
3
|
+
import { DynamicModule } from './modules/index.js';
|
|
4
|
+
import { NestApplicationContextOptions } from './nest-application-context-options.interface.js';
|
|
5
|
+
import { ShutdownHooksOptions } from './shutdown-hooks-options.interface.js';
|
|
6
|
+
import { Type } from './type.interface.js';
|
|
7
7
|
export type SelectOptions = Pick<NestApplicationContextOptions, 'abortOnError'>;
|
|
8
8
|
export interface GetOrResolveOptions {
|
|
9
9
|
/**
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CorsOptions, CorsOptionsDelegate } from './external/cors-options.interface';
|
|
2
|
-
import { HttpsOptions } from './external/https-options.interface';
|
|
3
|
-
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
|
|
1
|
+
import { CorsOptions, CorsOptionsDelegate } from './external/cors-options.interface.js';
|
|
2
|
+
import { HttpsOptions } from './external/https-options.interface.js';
|
|
3
|
+
import { NestApplicationContextOptions } from './nest-application-context-options.interface.js';
|
|
4
4
|
/**
|
|
5
5
|
* @publicApi
|
|
6
6
|
*/
|
|
@@ -26,4 +26,10 @@ export interface NestApplicationOptions extends NestApplicationContextOptions {
|
|
|
26
26
|
* keep-alive connections in the HTTP adapter.
|
|
27
27
|
*/
|
|
28
28
|
forceCloseConnections?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to return 503 Service Unavailable for new requests during the shutdown process,
|
|
31
|
+
* while allowing existing in-flight requests to complete.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
return503OnClosing?: boolean;
|
|
29
35
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CanActivate } from './features/can-activate.interface';
|
|
2
|
-
import { NestInterceptor } from './features/nest-interceptor.interface';
|
|
3
|
-
import { GlobalPrefixOptions } from './global-prefix-options.interface';
|
|
4
|
-
import { HttpServer } from './http/http-server.interface';
|
|
5
|
-
import { ExceptionFilter, INestMicroservice, NestHybridApplicationOptions, PipeTransform } from './index';
|
|
6
|
-
import { INestApplicationContext } from './nest-application-context.interface';
|
|
7
|
-
import { VersioningOptions } from './version-options.interface';
|
|
8
|
-
import { WebSocketAdapter } from './websockets/web-socket-adapter.interface';
|
|
1
|
+
import { CanActivate } from './features/can-activate.interface.js';
|
|
2
|
+
import { NestInterceptor } from './features/nest-interceptor.interface.js';
|
|
3
|
+
import { GlobalPrefixOptions } from './global-prefix-options.interface.js';
|
|
4
|
+
import { HttpServer } from './http/http-server.interface.js';
|
|
5
|
+
import { ExceptionFilter, INestMicroservice, NestHybridApplicationOptions, PipeTransform } from './index.js';
|
|
6
|
+
import { INestApplicationContext } from './nest-application-context.interface.js';
|
|
7
|
+
import { VersioningOptions } from './version-options.interface.js';
|
|
8
|
+
import { WebSocketAdapter } from './websockets/web-socket-adapter.interface.js';
|
|
9
9
|
/**
|
|
10
10
|
* Interface defining the core NestApplication object.
|
|
11
11
|
*
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ExceptionFilter } from './exceptions/exception-filter.interface';
|
|
3
|
-
import { CanActivate } from './features/can-activate.interface';
|
|
4
|
-
import { NestInterceptor } from './features/nest-interceptor.interface';
|
|
5
|
-
import { PipeTransform } from './features/pipe-transform.interface';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { ExceptionFilter } from './exceptions/exception-filter.interface.js';
|
|
3
|
+
import { CanActivate } from './features/can-activate.interface.js';
|
|
4
|
+
import { NestInterceptor } from './features/nest-interceptor.interface.js';
|
|
5
|
+
import { PipeTransform } from './features/pipe-transform.interface.js';
|
|
6
|
+
import { PreRequestHook } from './microservices/pre-request-hook.interface.js';
|
|
7
|
+
import { INestApplicationContext } from './nest-application-context.interface.js';
|
|
8
|
+
import { WebSocketAdapter } from './websockets/web-socket-adapter.interface.js';
|
|
8
9
|
/**
|
|
9
10
|
* Interface describing Microservice Context.
|
|
10
11
|
*
|
|
@@ -49,6 +50,14 @@ export interface INestMicroservice extends INestApplicationContext {
|
|
|
49
50
|
* @param {...CanActivate} guards
|
|
50
51
|
*/
|
|
51
52
|
useGlobalGuards(...guards: CanActivate[]): this;
|
|
53
|
+
/**
|
|
54
|
+
* Registers a global preRequest hook (executed before all enhancers for every pattern handler).
|
|
55
|
+
* Hooks receive an `ExecutionContext` and a `next` function that executes the rest of the pipeline.
|
|
56
|
+
* Useful for setting up AsyncLocalStorage context, tracing, or correlation IDs.
|
|
57
|
+
*
|
|
58
|
+
* @param {...PreRequestHook} hooks
|
|
59
|
+
*/
|
|
60
|
+
registerPreRequestHook(...hooks: PreRequestHook[]): this;
|
|
52
61
|
/**
|
|
53
62
|
* Terminates the application.
|
|
54
63
|
*
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Scope = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* @publicApi
|
|
6
3
|
*/
|
|
7
|
-
var Scope;
|
|
4
|
+
export var Scope;
|
|
8
5
|
(function (Scope) {
|
|
9
6
|
/**
|
|
10
7
|
* The provider can be shared across multiple classes. The provider lifetime
|
|
@@ -20,4 +17,4 @@ var Scope;
|
|
|
20
17
|
* A new instance is instantiated for each request processing pipeline
|
|
21
18
|
*/
|
|
22
19
|
Scope[Scope["REQUEST"] = 2] = "REQUEST";
|
|
23
|
-
})(Scope || (
|
|
20
|
+
})(Scope || (Scope = {}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERSION_NEUTRAL = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Indicates that this will work for any version passed in the request, or no version.
|
|
6
3
|
*
|
|
7
4
|
* @publicApi
|
|
8
5
|
*/
|
|
9
|
-
|
|
6
|
+
export const VERSION_NEUTRAL = Symbol('VERSION_NEUTRAL');
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/internal.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal module - not part of the public API.
|
|
3
|
+
* These exports are used by sibling @nestjs packages.
|
|
4
|
+
* Do not depend on these in your application code.
|
|
5
|
+
* @internal
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
export * from './constants.js';
|
|
9
|
+
export { RouteParamtypes } from './enums/route-paramtypes.enum.js';
|
|
10
|
+
export * from './utils/shared.utils.js';
|
|
11
|
+
export * from './utils/load-package.util.js';
|
|
12
|
+
export * from './utils/cli-colors.util.js';
|
|
13
|
+
export * from './utils/random-string-generator.util.js';
|
|
14
|
+
export * from './utils/select-exception-filter-metadata.util.js';
|
|
15
|
+
export type { Controller, Injectable } from './interfaces/index.js';
|
|
16
|
+
export type { NestApplicationContextOptions } from './interfaces/nest-application-context-options.interface.js';
|
|
17
|
+
export type { NestMicroserviceOptions } from './interfaces/microservices/nest-microservice-options.interface.js';
|
|
18
|
+
export type { CorsOptions, CorsOptionsDelegate, CustomOrigin, } from './interfaces/external/cors-options.interface.js';
|
|
19
|
+
export type { ExceptionFilterMetadata } from './interfaces/exceptions/exception-filter-metadata.interface.js';
|
|
20
|
+
export type { RpcExceptionFilterMetadata } from './interfaces/exceptions/rpc-exception-filter-metadata.interface.js';
|
|
21
|
+
export type { VersionValue } from './interfaces/version-options.interface.js';
|
|
22
|
+
export type { GlobalPrefixOptions } from './interfaces/global-prefix-options.interface.js';
|
|
23
|
+
export type { MiddlewareConfiguration, RouteInfo, } from './interfaces/middleware/middleware-configuration.interface.js';
|
|
24
|
+
export type { MiddlewareConfigProxy } from './interfaces/middleware/middleware-config-proxy.interface.js';
|
|
25
|
+
export type { ModuleMetadata } from './interfaces/modules/module-metadata.interface.js';
|
|
26
|
+
export type { HttpArgumentsHost, RpcArgumentsHost, WsArgumentsHost, } from './interfaces/features/arguments-host.interface.js';
|
|
27
|
+
export type { RequestHandler } from './interfaces/http/http-server.interface.js';
|
|
28
|
+
export type { GetOrResolveOptions, SelectOptions, } from './interfaces/nest-application-context.interface.js';
|
|
29
|
+
export type { ShutdownHooksOptions } from './interfaces/shutdown-hooks-options.interface.js';
|
|
30
|
+
export { assignMetadata } from './decorators/http/route-params.decorator.js';
|
package/internal.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal module - not part of the public API.
|
|
3
|
+
* These exports are used by sibling @nestjs packages.
|
|
4
|
+
* Do not depend on these in your application code.
|
|
5
|
+
* @internal
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
// Constants
|
|
9
|
+
export * from './constants.js';
|
|
10
|
+
// Enums (internal)
|
|
11
|
+
export { RouteParamtypes } from './enums/route-paramtypes.enum.js';
|
|
12
|
+
// Utils
|
|
13
|
+
export * from './utils/shared.utils.js';
|
|
14
|
+
export * from './utils/load-package.util.js';
|
|
15
|
+
export * from './utils/cli-colors.util.js';
|
|
16
|
+
export * from './utils/random-string-generator.util.js';
|
|
17
|
+
export * from './utils/select-exception-filter-metadata.util.js';
|
|
18
|
+
// Decorators (internal)
|
|
19
|
+
export { assignMetadata } from './decorators/http/route-params.decorator.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DynamicModule } from '../interfaces';
|
|
2
|
-
import { Logger } from '../services/logger.service';
|
|
3
|
-
import { DEFAULT_FACTORY_CLASS_METHOD_KEY, DEFAULT_METHOD_KEY } from './constants';
|
|
4
|
-
import { ConfigurableModuleHost } from './interfaces';
|
|
1
|
+
import { DynamicModule } from '../interfaces/index.js';
|
|
2
|
+
import { Logger } from '../services/logger.service.js';
|
|
3
|
+
import { DEFAULT_FACTORY_CLASS_METHOD_KEY, DEFAULT_METHOD_KEY } from './constants.js';
|
|
4
|
+
import { ConfigurableModuleHost } from './interfaces/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* @publicApi
|
|
7
7
|
*/
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const random_string_generator_util_1 = require("../utils/random-string-generator.util");
|
|
6
|
-
const constants_1 = require("./constants");
|
|
7
|
-
const utils_1 = require("./utils");
|
|
1
|
+
import { Logger } from '../services/logger.service.js';
|
|
2
|
+
import { randomStringGenerator } from '../utils/random-string-generator.util.js';
|
|
3
|
+
import { ASYNC_METHOD_SUFFIX, ASYNC_OPTIONS_METADATA_KEYS, CONFIGURABLE_MODULE_ID, DEFAULT_FACTORY_CLASS_METHOD_KEY, DEFAULT_METHOD_KEY, } from './constants.js';
|
|
4
|
+
import { generateOptionsInjectionToken, getInjectionProviders, } from './utils/index.js';
|
|
8
5
|
/**
|
|
9
6
|
* Factory that lets you create configurable modules and
|
|
10
7
|
* provides a way to reduce the majority of dynamic module boilerplate.
|
|
11
8
|
*
|
|
12
9
|
* @publicApi
|
|
13
10
|
*/
|
|
14
|
-
class ConfigurableModuleBuilder {
|
|
11
|
+
export class ConfigurableModuleBuilder {
|
|
12
|
+
options;
|
|
13
|
+
staticMethodKey;
|
|
14
|
+
factoryClassMethodKey;
|
|
15
|
+
extras;
|
|
16
|
+
transformModuleDefinition;
|
|
17
|
+
logger = new Logger(ConfigurableModuleBuilder.name);
|
|
15
18
|
constructor(options = {}, parentBuilder) {
|
|
16
19
|
this.options = options;
|
|
17
|
-
this.logger = new logger_service_1.Logger(ConfigurableModuleBuilder.name);
|
|
18
20
|
if (parentBuilder) {
|
|
19
21
|
this.staticMethodKey = parentBuilder.staticMethodKey;
|
|
20
22
|
this.factoryClassMethodKey =
|
|
@@ -82,12 +84,12 @@ class ConfigurableModuleBuilder {
|
|
|
82
84
|
* easily construct dynamic configurable modules. See "ConfigurableModuleHost" interface for more details.
|
|
83
85
|
*/
|
|
84
86
|
build() {
|
|
85
|
-
this.staticMethodKey ??=
|
|
87
|
+
this.staticMethodKey ??= DEFAULT_METHOD_KEY;
|
|
86
88
|
this.factoryClassMethodKey ??=
|
|
87
|
-
|
|
89
|
+
DEFAULT_FACTORY_CLASS_METHOD_KEY;
|
|
88
90
|
this.options.optionsInjectionToken ??= this.options.moduleName
|
|
89
91
|
? this.constructInjectionTokenString()
|
|
90
|
-
:
|
|
92
|
+
: generateOptionsInjectionToken();
|
|
91
93
|
this.transformModuleDefinition ??= definition => definition;
|
|
92
94
|
return {
|
|
93
95
|
ConfigurableModuleClass: this.createConfigurableModuleCls(),
|
|
@@ -107,7 +109,7 @@ class ConfigurableModuleBuilder {
|
|
|
107
109
|
createConfigurableModuleCls() {
|
|
108
110
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
109
111
|
const self = this;
|
|
110
|
-
const asyncMethodKey = this.staticMethodKey +
|
|
112
|
+
const asyncMethodKey = this.staticMethodKey + ASYNC_METHOD_SUFFIX;
|
|
111
113
|
class InternalModuleClass {
|
|
112
114
|
static [self.staticMethodKey](options) {
|
|
113
115
|
const providers = [
|
|
@@ -118,8 +120,8 @@ class ConfigurableModuleBuilder {
|
|
|
118
120
|
];
|
|
119
121
|
if (self.options.alwaysTransient) {
|
|
120
122
|
providers.push({
|
|
121
|
-
provide:
|
|
122
|
-
useValue:
|
|
123
|
+
provide: CONFIGURABLE_MODULE_ID,
|
|
124
|
+
useValue: randomStringGenerator(),
|
|
123
125
|
});
|
|
124
126
|
}
|
|
125
127
|
return self.transformModuleDefinition({
|
|
@@ -134,8 +136,8 @@ class ConfigurableModuleBuilder {
|
|
|
134
136
|
const providers = this.createAsyncProviders(options);
|
|
135
137
|
if (self.options.alwaysTransient) {
|
|
136
138
|
providers.push({
|
|
137
|
-
provide:
|
|
138
|
-
useValue:
|
|
139
|
+
provide: CONFIGURABLE_MODULE_ID,
|
|
140
|
+
useValue: randomStringGenerator(),
|
|
139
141
|
});
|
|
140
142
|
}
|
|
141
143
|
return self.transformModuleDefinition({
|
|
@@ -166,7 +168,7 @@ class ConfigurableModuleBuilder {
|
|
|
166
168
|
}
|
|
167
169
|
const extrasOptions = {};
|
|
168
170
|
Object.keys(input)
|
|
169
|
-
.filter(key => !
|
|
171
|
+
.filter(key => !ASYNC_OPTIONS_METADATA_KEYS.includes(key))
|
|
170
172
|
.forEach(key => {
|
|
171
173
|
extrasOptions[key] = input[key];
|
|
172
174
|
});
|
|
@@ -177,7 +179,7 @@ class ConfigurableModuleBuilder {
|
|
|
177
179
|
if (options.inject && options.provideInjectionTokensFrom) {
|
|
178
180
|
return [
|
|
179
181
|
this.createAsyncOptionsProvider(options),
|
|
180
|
-
...
|
|
182
|
+
...getInjectionProviders(options.provideInjectionTokensFrom, options.inject),
|
|
181
183
|
];
|
|
182
184
|
}
|
|
183
185
|
return [this.createAsyncOptionsProvider(options)];
|
|
@@ -216,4 +218,3 @@ class ConfigurableModuleBuilder {
|
|
|
216
218
|
return proxy;
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
|
-
exports.ConfigurableModuleBuilder = ConfigurableModuleBuilder;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.DEFAULT_FACTORY_CLASS_METHOD_KEY = 'create';
|
|
6
|
-
exports.ASYNC_METHOD_SUFFIX = 'Async';
|
|
7
|
-
exports.CONFIGURABLE_MODULE_ID = 'CONFIGURABLE_MODULE_ID';
|
|
1
|
+
export const DEFAULT_METHOD_KEY = 'register';
|
|
2
|
+
export const DEFAULT_FACTORY_CLASS_METHOD_KEY = 'create';
|
|
3
|
+
export const ASYNC_METHOD_SUFFIX = 'Async';
|
|
4
|
+
export const CONFIGURABLE_MODULE_ID = 'CONFIGURABLE_MODULE_ID';
|
|
8
5
|
/**
|
|
9
6
|
* List of keys that are specific to ConfigurableModuleAsyncOptions
|
|
10
7
|
* and should be excluded when extracting user-defined extras.
|
|
11
8
|
*/
|
|
12
|
-
|
|
9
|
+
export const ASYNC_OPTIONS_METADATA_KEYS = [
|
|
13
10
|
'useFactory',
|
|
14
11
|
'useClass',
|
|
15
12
|
'useExisting',
|
package/module-utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './configurable-module.builder';
|
|
2
|
-
export * from './interfaces';
|
|
1
|
+
export * from './configurable-module.builder.js';
|
|
2
|
+
export * from './interfaces/index.js';
|
package/module-utils/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./configurable-module.builder"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./interfaces"), exports);
|
|
1
|
+
export * from './configurable-module.builder.js';
|
|
2
|
+
export * from './interfaces/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FactoryProvider, ModuleMetadata, Provider, Type } from '../../interfaces';
|
|
2
|
-
import { DEFAULT_FACTORY_CLASS_METHOD_KEY } from '../constants';
|
|
1
|
+
import { FactoryProvider, ModuleMetadata, Provider, Type } from '../../interfaces/index.js';
|
|
2
|
+
import { DEFAULT_FACTORY_CLASS_METHOD_KEY } from '../constants.js';
|
|
3
3
|
/**
|
|
4
4
|
* Interface that must be implemented by the module options factory class.
|
|
5
5
|
* Method key varies depending on the "FactoryClassMethodKey" type argument.
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|