@nestjs/core 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/adapters/http-adapter.d.ts +5 -3
- package/adapters/http-adapter.js +8 -5
- package/adapters/index.d.ts +1 -1
- package/adapters/index.js +1 -4
- package/application-config.d.ts +7 -4
- package/application-config.js +20 -15
- package/constants.d.ts +1 -1
- package/constants.js +10 -13
- package/discovery/discoverable-meta-host-collection.d.ts +3 -3
- package/discovery/discoverable-meta-host-collection.js +15 -19
- package/discovery/discovery-module.js +9 -12
- package/discovery/discovery-service.d.ts +4 -4
- package/discovery/discovery-service.js +17 -19
- package/discovery/index.d.ts +2 -2
- package/discovery/index.js +2 -5
- package/errors/exception-handler.js +3 -7
- package/errors/exceptions/circular-dependency.exception.d.ts +1 -1
- package/errors/exceptions/circular-dependency.exception.js +2 -6
- package/errors/exceptions/index.d.ts +8 -8
- package/errors/exceptions/index.js +8 -11
- package/errors/exceptions/invalid-class-module.exception.d.ts +1 -1
- package/errors/exceptions/invalid-class-module.exception.js +4 -8
- package/errors/exceptions/invalid-class-scope.exception.d.ts +2 -2
- package/errors/exceptions/invalid-class-scope.exception.js +6 -10
- package/errors/exceptions/invalid-class.exception.d.ts +1 -1
- package/errors/exceptions/invalid-class.exception.js +4 -8
- package/errors/exceptions/invalid-exception-filter.exception.d.ts +1 -1
- package/errors/exceptions/invalid-exception-filter.exception.js +4 -8
- package/errors/exceptions/invalid-middleware-configuration.exception.d.ts +1 -1
- package/errors/exceptions/invalid-middleware-configuration.exception.js +4 -8
- package/errors/exceptions/invalid-middleware.exception.d.ts +1 -1
- package/errors/exceptions/invalid-middleware.exception.js +4 -8
- package/errors/exceptions/invalid-module.exception.d.ts +1 -1
- package/errors/exceptions/invalid-module.exception.js +4 -8
- package/errors/exceptions/runtime.exception.js +1 -5
- package/errors/exceptions/undefined-dependency.exception.d.ts +3 -3
- package/errors/exceptions/undefined-dependency.exception.js +4 -8
- package/errors/exceptions/undefined-forwardref.exception.d.ts +2 -2
- package/errors/exceptions/undefined-forwardref.exception.js +4 -8
- package/errors/exceptions/undefined-module.exception.d.ts +1 -1
- package/errors/exceptions/undefined-module.exception.js +4 -8
- package/errors/exceptions/unknown-dependencies.exception.d.ts +3 -3
- package/errors/exceptions/unknown-dependencies.exception.js +8 -8
- package/errors/exceptions/unknown-element.exception.d.ts +1 -1
- package/errors/exceptions/unknown-element.exception.js +2 -6
- package/errors/exceptions/unknown-export.exception.d.ts +1 -1
- package/errors/exceptions/unknown-export.exception.js +4 -8
- package/errors/exceptions/unknown-module.exception.d.ts +1 -1
- package/errors/exceptions/unknown-module.exception.js +2 -6
- package/errors/exceptions/unknown-request-mapping.exception.d.ts +1 -1
- package/errors/exceptions/unknown-request-mapping.exception.js +4 -8
- package/errors/exceptions-zone.js +6 -10
- package/errors/messages.d.ts +2 -2
- package/errors/messages.js +19 -32
- package/exceptions/base-exception-filter-context.d.ts +6 -7
- package/exceptions/base-exception-filter-context.js +13 -16
- package/exceptions/base-exception-filter.d.ts +4 -4
- package/exceptions/base-exception-filter.js +33 -23
- package/exceptions/exceptions-handler.d.ts +4 -4
- package/exceptions/exceptions-handler.js +8 -16
- package/exceptions/external-exception-filter-context.d.ts +8 -8
- package/exceptions/external-exception-filter-context.js +14 -18
- package/exceptions/external-exception-filter.d.ts +1 -1
- package/exceptions/external-exception-filter.js +4 -8
- package/exceptions/external-exceptions-handler.d.ts +3 -3
- package/exceptions/external-exceptions-handler.js +8 -16
- package/exceptions/index.d.ts +1 -1
- package/exceptions/index.js +1 -4
- package/guards/constants.js +1 -4
- package/guards/guards-consumer.d.ts +4 -3
- package/guards/guards-consumer.js +8 -12
- package/guards/guards-context-creator.d.ts +11 -10
- package/guards/guards-context-creator.js +18 -20
- package/guards/index.d.ts +3 -3
- package/guards/index.js +3 -6
- package/helpers/barrier.js +5 -5
- package/helpers/context-creator.d.ts +2 -2
- package/helpers/context-creator.js +3 -7
- package/helpers/context-id-factory.d.ts +1 -1
- package/helpers/context-id-factory.js +10 -14
- package/helpers/context-utils.d.ts +6 -3
- package/helpers/context-utils.js +7 -12
- package/helpers/execution-context-host.d.ts +3 -3
- package/helpers/execution-context-host.js +5 -6
- package/helpers/external-context-creator.d.ts +15 -18
- package/helpers/external-context-creator.js +54 -43
- package/helpers/external-proxy.d.ts +2 -2
- package/helpers/external-proxy.js +3 -7
- package/helpers/get-class-scope.d.ts +2 -2
- package/helpers/get-class-scope.js +3 -6
- package/helpers/handler-metadata-storage.d.ts +4 -4
- package/helpers/handler-metadata-storage.js +7 -15
- package/helpers/http-adapter-host.d.ts +1 -1
- package/helpers/http-adapter-host.js +6 -11
- package/helpers/index.d.ts +3 -3
- package/helpers/index.js +3 -6
- package/helpers/interfaces/external-handler-metadata.interface.d.ts +2 -2
- package/helpers/interfaces/external-handler-metadata.interface.js +1 -2
- package/helpers/interfaces/index.d.ts +2 -2
- package/helpers/interfaces/index.js +2 -5
- package/helpers/interfaces/params-metadata.interface.d.ts +1 -1
- package/helpers/interfaces/params-metadata.interface.js +1 -2
- package/helpers/is-durable.d.ts +1 -1
- package/helpers/is-durable.js +3 -6
- package/helpers/load-adapter.d.ts +1 -1
- package/helpers/load-adapter.js +4 -7
- package/helpers/messages.d.ts +1 -1
- package/helpers/messages.js +10 -20
- package/helpers/optional-require.d.ts +1 -1
- package/helpers/optional-require.js +2 -5
- package/helpers/rethrow.js +1 -5
- package/helpers/router-method-factory.d.ts +2 -2
- package/helpers/router-method-factory.js +20 -24
- package/hooks/before-app-shutdown.hook.d.ts +3 -3
- package/hooks/before-app-shutdown.hook.js +15 -22
- package/hooks/index.d.ts +5 -5
- package/hooks/index.js +5 -8
- package/hooks/on-app-bootstrap.hook.d.ts +3 -3
- package/hooks/on-app-bootstrap.hook.js +15 -22
- package/hooks/on-app-shutdown.hook.d.ts +3 -3
- package/hooks/on-app-shutdown.hook.js +15 -22
- package/hooks/on-module-destroy.hook.d.ts +3 -3
- package/hooks/on-module-destroy.hook.js +15 -22
- package/hooks/on-module-init.hook.d.ts +3 -3
- package/hooks/on-module-init.hook.js +15 -22
- package/hooks/utils/get-instances-grouped-by-hierarchy-level.d.ts +3 -0
- package/hooks/utils/get-instances-grouped-by-hierarchy-level.js +27 -0
- package/hooks/utils/get-sorted-hierarchy-levels.d.ts +1 -0
- package/hooks/utils/get-sorted-hierarchy-levels.js +7 -0
- package/index.d.ts +16 -16
- package/index.js +17 -26
- package/injector/abstract-instance-resolver.d.ts +6 -6
- package/injector/abstract-instance-resolver.js +7 -11
- package/injector/compiler.d.ts +2 -2
- package/injector/compiler.js +2 -5
- package/injector/constants.d.ts +1 -1
- package/injector/constants.js +2 -5
- package/injector/container.d.ts +13 -14
- package/injector/container.js +40 -40
- package/injector/helpers/provider-classifier.d.ts +1 -1
- package/injector/helpers/provider-classifier.js +5 -10
- package/injector/helpers/silent-logger.js +9 -16
- package/injector/index.d.ts +6 -6
- package/injector/index.js +5 -8
- package/injector/injector.d.ts +7 -6
- package/injector/injector.js +78 -78
- package/injector/inquirer/index.d.ts +1 -1
- package/injector/inquirer/index.js +1 -4
- package/injector/inquirer/inquirer-constants.js +1 -4
- package/injector/inquirer/inquirer-providers.d.ts +1 -1
- package/injector/inquirer/inquirer-providers.js +5 -8
- package/injector/instance-links-host.d.ts +3 -3
- package/injector/instance-links-host.js +8 -11
- package/injector/instance-loader.d.ts +5 -5
- package/injector/instance-loader.js +11 -11
- package/injector/instance-wrapper.d.ts +8 -5
- package/injector/instance-wrapper.js +93 -74
- package/injector/internal-core-module/index.d.ts +1 -1
- package/injector/internal-core-module/index.js +1 -4
- package/injector/internal-core-module/internal-core-module-factory.d.ts +6 -6
- package/injector/internal-core-module/internal-core-module-factory.js +23 -27
- package/injector/internal-core-module/internal-core-module.d.ts +2 -2
- package/injector/internal-core-module/internal-core-module.js +17 -20
- package/injector/internal-providers-storage.d.ts +2 -2
- package/injector/internal-providers-storage.js +4 -9
- package/injector/lazy-module-loader/lazy-module-loader-options.interface.js +1 -2
- package/injector/lazy-module-loader/lazy-module-loader.d.ts +8 -8
- package/injector/lazy-module-loader/lazy-module-loader.js +10 -9
- package/injector/module-ref.d.ts +7 -7
- package/injector/module-ref.js +19 -20
- package/injector/module.d.ts +5 -5
- package/injector/module.js +93 -79
- package/injector/modules-container.d.ts +1 -1
- package/injector/modules-container.js +5 -12
- package/injector/opaque-key-factory/by-reference-module-opaque-key-factory.d.ts +2 -4
- package/injector/opaque-key-factory/by-reference-module-opaque-key-factory.js +6 -9
- package/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.d.ts +2 -3
- package/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.js +17 -22
- package/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.d.ts +1 -3
- package/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.js +1 -2
- package/injector/settlement-signal.js +5 -7
- package/injector/topology-tree/topology-tree.d.ts +1 -1
- package/injector/topology-tree/topology-tree.js +6 -9
- package/injector/topology-tree/tree-node.js +4 -6
- package/inspector/deterministic-uuid-registry.js +2 -6
- package/inspector/graph-inspector.d.ts +7 -7
- package/inspector/graph-inspector.js +10 -12
- package/inspector/index.d.ts +4 -4
- package/inspector/index.js +4 -7
- package/inspector/initialize-on-preview.allowlist.d.ts +1 -1
- package/inspector/initialize-on-preview.allowlist.js +2 -6
- package/inspector/interfaces/edge.interface.d.ts +1 -1
- package/inspector/interfaces/edge.interface.js +1 -2
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts +3 -3
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.js +1 -2
- package/inspector/interfaces/entrypoint.interface.d.ts +2 -2
- package/inspector/interfaces/entrypoint.interface.js +1 -2
- package/inspector/interfaces/extras.interface.d.ts +1 -1
- package/inspector/interfaces/extras.interface.js +1 -2
- package/inspector/interfaces/node.interface.d.ts +2 -2
- package/inspector/interfaces/node.interface.js +1 -2
- package/inspector/interfaces/serialized-graph-json.interface.d.ts +6 -6
- package/inspector/interfaces/serialized-graph-json.interface.js +1 -2
- package/inspector/interfaces/serialized-graph-metadata.interface.d.ts +1 -1
- package/inspector/interfaces/serialized-graph-metadata.interface.js +1 -2
- package/inspector/noop-graph-inspector.d.ts +1 -1
- package/inspector/noop-graph-inspector.js +2 -5
- package/inspector/partial-graph.host.d.ts +2 -2
- package/inspector/partial-graph.host.js +2 -5
- package/inspector/serialized-graph.d.ts +7 -7
- package/inspector/serialized-graph.js +35 -40
- package/inspector/uuid-factory.js +8 -12
- package/interceptors/index.d.ts +2 -2
- package/interceptors/index.js +2 -5
- package/interceptors/interceptors-consumer.d.ts +4 -3
- package/interceptors/interceptors-consumer.js +13 -17
- package/interceptors/interceptors-context-creator.d.ts +10 -9
- package/interceptors/interceptors-context-creator.js +18 -20
- package/interfaces/index.d.ts +2 -0
- package/interfaces/index.js +2 -0
- package/interfaces/module-definition.interface.d.ts +2 -2
- package/interfaces/module-definition.interface.js +1 -2
- package/interfaces/module-override.interface.d.ts +1 -1
- package/interfaces/module-override.interface.js +1 -2
- package/internal.d.ts +38 -0
- package/internal.js +46 -0
- package/metadata-scanner.d.ts +1 -1
- package/metadata-scanner.js +8 -14
- package/middleware/builder.d.ts +4 -4
- package/middleware/builder.js +78 -76
- package/middleware/container.d.ts +4 -4
- package/middleware/container.js +10 -13
- package/middleware/index.d.ts +1 -1
- package/middleware/index.js +1 -4
- package/middleware/middleware-module.d.ts +8 -9
- package/middleware/middleware-module.js +47 -44
- package/middleware/resolver.d.ts +3 -3
- package/middleware/resolver.js +3 -5
- package/middleware/route-info-path-extractor.d.ts +2 -2
- package/middleware/route-info-path-extractor.js +26 -25
- package/middleware/routes-mapper.d.ts +4 -3
- package/middleware/routes-mapper.js +22 -24
- package/middleware/utils.d.ts +3 -2
- package/middleware/utils.js +34 -45
- package/nest-application-context.d.ts +10 -9
- package/nest-application-context.js +50 -47
- package/nest-application.d.ts +18 -10
- package/nest-application.js +87 -55
- package/nest-factory.d.ts +4 -5
- package/nest-factory.js +61 -68
- package/package.json +32 -3
- package/pipes/index.d.ts +3 -3
- package/pipes/index.js +3 -6
- package/pipes/params-token-factory.d.ts +2 -2
- package/pipes/params-token-factory.js +5 -9
- package/pipes/pipes-consumer.d.ts +3 -7
- package/pipes/pipes-consumer.js +17 -18
- package/pipes/pipes-context-creator.d.ts +10 -9
- package/pipes/pipes-context-creator.js +18 -20
- package/repl/assign-to-object.util.js +1 -4
- package/repl/constants.js +1 -4
- package/repl/index.d.ts +1 -1
- package/repl/index.js +1 -4
- package/repl/native-functions/debug-repl-fn.d.ts +2 -2
- package/repl/native-functions/debug-repl-fn.js +14 -21
- package/repl/native-functions/get-repl-fn.d.ts +2 -2
- package/repl/native-functions/get-repl-fn.js +8 -15
- package/repl/native-functions/help-repl-fn.d.ts +2 -2
- package/repl/native-functions/help-repl-fn.js +13 -20
- package/repl/native-functions/index.d.ts +6 -6
- package/repl/native-functions/index.js +6 -9
- package/repl/native-functions/methods-repl-fn.d.ts +2 -2
- package/repl/native-functions/methods-repl-fn.js +12 -19
- package/repl/native-functions/resolve-repl-fn.d.ts +2 -2
- package/repl/native-functions/resolve-repl-fn.js +7 -14
- package/repl/native-functions/select-relp-fn.d.ts +2 -2
- package/repl/native-functions/select-relp-fn.js +7 -14
- package/repl/repl-context.d.ts +3 -3
- package/repl/repl-context.js +21 -23
- package/repl/repl-function.d.ts +3 -3
- package/repl/repl-function.js +5 -7
- package/repl/repl-logger.js +10 -14
- package/repl/repl-native-commands.js +1 -4
- package/repl/repl.d.ts +1 -1
- package/repl/repl.interfaces.d.ts +2 -2
- package/repl/repl.interfaces.js +1 -2
- package/repl/repl.js +17 -20
- package/router/index.d.ts +3 -3
- package/router/index.js +3 -8
- package/router/interfaces/exceptions-filter.interface.d.ts +3 -3
- package/router/interfaces/exceptions-filter.interface.js +1 -2
- package/router/interfaces/exclude-route-metadata.interface.d.ts +1 -1
- package/router/interfaces/exclude-route-metadata.interface.js +1 -2
- package/router/interfaces/index.d.ts +1 -1
- package/router/interfaces/index.js +1 -4
- package/router/interfaces/resolver.interface.js +1 -2
- package/router/interfaces/route-params-factory.interface.d.ts +1 -1
- package/router/interfaces/route-params-factory.interface.js +1 -2
- package/router/interfaces/route-path-metadata.interface.d.ts +2 -2
- package/router/interfaces/route-path-metadata.interface.js +1 -2
- package/router/interfaces/routes.interface.d.ts +1 -1
- package/router/interfaces/routes.interface.js +1 -2
- package/router/legacy-route-converter.js +3 -7
- package/router/paths-explorer.d.ts +4 -5
- package/router/paths-explorer.js +11 -15
- package/router/request/index.d.ts +1 -1
- package/router/request/index.js +1 -5
- package/router/request/request-constants.js +2 -5
- package/router/request/request-providers.d.ts +1 -1
- package/router/request/request-providers.js +5 -8
- package/router/route-params-factory.d.ts +2 -2
- package/router/route-params-factory.js +15 -19
- package/router/route-path-factory.d.ts +4 -4
- package/router/route-path-factory.js +19 -22
- package/router/router-exception-filters.d.ts +9 -9
- package/router/router-exception-filters.js +15 -18
- package/router/router-execution-context.d.ts +17 -20
- package/router/router-execution-context.js +57 -49
- package/router/router-explorer.d.ts +14 -16
- package/router/router-explorer.js +55 -54
- package/router/router-module.d.ts +4 -4
- package/router/router-module.js +21 -23
- package/router/router-proxy.d.ts +1 -1
- package/router/router-proxy.js +4 -8
- package/router/router-response-controller.d.ts +2 -2
- package/router/router-response-controller.js +20 -23
- package/router/routes-resolver.d.ts +8 -9
- package/router/routes-resolver.js +36 -51
- package/router/sse-stream.d.ts +1 -1
- package/router/sse-stream.js +5 -9
- package/router/utils/exclude-route.util.d.ts +1 -1
- package/router/utils/exclude-route.util.js +7 -12
- package/router/utils/flatten-route-paths.util.d.ts +2 -2
- package/router/utils/flatten-route-paths.util.js +4 -7
- package/router/utils/index.d.ts +2 -2
- package/router/utils/index.js +2 -5
- package/scanner.d.ts +11 -11
- package/scanner.js +64 -65
- package/services/index.d.ts +1 -1
- package/services/index.js +1 -4
- package/services/reflector.service.d.ts +1 -1
- package/services/reflector.service.js +9 -13
- package/tsconfig.build.json +1 -9
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SettlementSignal = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* SettlementSignal is used to signal the resolution of a provider/instance.
|
|
6
3
|
* Calling `complete` or `error` will resolve the promise returned by `asPromise`.
|
|
7
4
|
* Can be used to detect circular dependencies.
|
|
8
5
|
*/
|
|
9
|
-
class SettlementSignal {
|
|
6
|
+
export class SettlementSignal {
|
|
7
|
+
_refs = new Set();
|
|
8
|
+
settledPromise;
|
|
9
|
+
settleFn;
|
|
10
|
+
completed = false;
|
|
10
11
|
constructor() {
|
|
11
|
-
this._refs = new Set();
|
|
12
|
-
this.completed = false;
|
|
13
12
|
this.settledPromise = new Promise(resolve => {
|
|
14
13
|
this.settleFn = resolve;
|
|
15
14
|
});
|
|
@@ -52,4 +51,3 @@ class SettlementSignal {
|
|
|
52
51
|
return !this.completed && this._refs.has(wrapperId);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
exports.SettlementSignal = SettlementSignal;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class TopologyTree {
|
|
1
|
+
import { TreeNode } from './tree-node.js';
|
|
2
|
+
export class TopologyTree {
|
|
3
|
+
root;
|
|
4
|
+
links = new Map();
|
|
6
5
|
constructor(moduleRef) {
|
|
7
|
-
this.
|
|
8
|
-
this.root = new tree_node_1.TreeNode({
|
|
6
|
+
this.root = new TreeNode({
|
|
9
7
|
value: moduleRef,
|
|
10
8
|
parent: null,
|
|
11
9
|
});
|
|
@@ -38,7 +36,7 @@ class TopologyTree {
|
|
|
38
36
|
}
|
|
39
37
|
return;
|
|
40
38
|
}
|
|
41
|
-
const childNode = new
|
|
39
|
+
const childNode = new TreeNode({
|
|
42
40
|
value: child,
|
|
43
41
|
parent: node,
|
|
44
42
|
});
|
|
@@ -48,4 +46,3 @@ class TopologyTree {
|
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
exports.TopologyTree = TopologyTree;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class TreeNode {
|
|
2
|
+
value;
|
|
3
|
+
children = new Set();
|
|
4
|
+
parent;
|
|
5
5
|
constructor({ value, parent }) {
|
|
6
|
-
this.children = new Set();
|
|
7
6
|
this.value = value;
|
|
8
7
|
this.parent = parent;
|
|
9
8
|
}
|
|
@@ -51,4 +50,3 @@ class TreeNode {
|
|
|
51
50
|
return false;
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
exports.TreeNode = TreeNode;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DeterministicUuidRegistry = void 0;
|
|
4
|
-
class DeterministicUuidRegistry {
|
|
1
|
+
export class DeterministicUuidRegistry {
|
|
2
|
+
static registry = new Map();
|
|
5
3
|
static get(str, inc = 0) {
|
|
6
4
|
const id = inc ? this.hashCode(`${str}_${inc}`) : this.hashCode(str);
|
|
7
5
|
if (this.registry.has(id)) {
|
|
@@ -20,5 +18,3 @@ class DeterministicUuidRegistry {
|
|
|
20
18
|
return h.toString();
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
exports.DeterministicUuidRegistry = DeterministicUuidRegistry;
|
|
24
|
-
DeterministicUuidRegistry.registry = new Map();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NestContainer } from '../injector/container';
|
|
2
|
-
import { InstanceWrapper } from '../injector/instance-wrapper';
|
|
3
|
-
import { Module } from '../injector/module';
|
|
4
|
-
import { EnhancerMetadataCacheEntry } from './interfaces/enhancer-metadata-cache-entry.interface';
|
|
5
|
-
import { Entrypoint } from './interfaces/entrypoint.interface';
|
|
6
|
-
import { OrphanedEnhancerDefinition } from './interfaces/extras.interface';
|
|
7
|
-
import { Node } from './interfaces/node.interface';
|
|
1
|
+
import { NestContainer } from '../injector/container.js';
|
|
2
|
+
import { InstanceWrapper } from '../injector/instance-wrapper.js';
|
|
3
|
+
import { Module } from '../injector/module.js';
|
|
4
|
+
import { EnhancerMetadataCacheEntry } from './interfaces/enhancer-metadata-cache-entry.interface.js';
|
|
5
|
+
import { Entrypoint } from './interfaces/entrypoint.interface.js';
|
|
6
|
+
import { OrphanedEnhancerDefinition } from './interfaces/extras.interface.js';
|
|
7
|
+
import { Node } from './interfaces/node.interface.js';
|
|
8
8
|
export declare class GraphInspector {
|
|
9
9
|
private readonly container;
|
|
10
10
|
private readonly graph;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { UnknownDependenciesException } from '../errors/exceptions/unknown-dependencies.exception.js';
|
|
2
|
+
import { DeterministicUuidRegistry } from './deterministic-uuid-registry.js';
|
|
3
|
+
import { PartialGraphHost } from './partial-graph.host.js';
|
|
4
|
+
export class GraphInspector {
|
|
5
|
+
container;
|
|
6
|
+
graph;
|
|
7
|
+
enhancersMetadataCache = new Array();
|
|
8
8
|
constructor(container) {
|
|
9
9
|
this.container = container;
|
|
10
|
-
this.enhancersMetadataCache = new Array();
|
|
11
10
|
this.graph = container.serializedGraph;
|
|
12
11
|
}
|
|
13
12
|
inspectModules(modules = this.container.getModules()) {
|
|
@@ -17,11 +16,11 @@ class GraphInspector {
|
|
|
17
16
|
this.insertModuleToModuleEdges(moduleRef);
|
|
18
17
|
}
|
|
19
18
|
this.enhancersMetadataCache.forEach(entry => this.insertEnhancerEdge(entry));
|
|
20
|
-
|
|
19
|
+
DeterministicUuidRegistry.clear();
|
|
21
20
|
}
|
|
22
21
|
registerPartial(error) {
|
|
23
22
|
this.graph.status = 'partial';
|
|
24
|
-
if (error instanceof
|
|
23
|
+
if (error instanceof UnknownDependenciesException) {
|
|
25
24
|
this.graph.metadata = {
|
|
26
25
|
cause: {
|
|
27
26
|
type: 'unknown-dependencies',
|
|
@@ -39,7 +38,7 @@ class GraphInspector {
|
|
|
39
38
|
},
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
|
-
|
|
41
|
+
PartialGraphHost.register(this.graph);
|
|
43
42
|
}
|
|
44
43
|
inspectInstanceWrapper(source, moduleRef) {
|
|
45
44
|
const ctorMetadata = source.getCtorMetadata();
|
|
@@ -163,4 +162,3 @@ class GraphInspector {
|
|
|
163
162
|
moduleRef.controllers.forEach(value => this.insertClassNode(moduleRef, value, 'controller'));
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
|
-
exports.GraphInspector = GraphInspector;
|
package/inspector/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './graph-inspector';
|
|
2
|
-
export * from './initialize-on-preview.allowlist';
|
|
3
|
-
export * from './partial-graph.host';
|
|
4
|
-
export * from './serialized-graph';
|
|
1
|
+
export * from './graph-inspector.js';
|
|
2
|
+
export * from './initialize-on-preview.allowlist.js';
|
|
3
|
+
export * from './partial-graph.host.js';
|
|
4
|
+
export * from './serialized-graph.js';
|
package/inspector/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
tslib_1.__exportStar(require("./initialize-on-preview.allowlist"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./partial-graph.host"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./serialized-graph"), exports);
|
|
1
|
+
export * from './graph-inspector.js';
|
|
2
|
+
export * from './initialize-on-preview.allowlist.js';
|
|
3
|
+
export * from './partial-graph.host.js';
|
|
4
|
+
export * from './serialized-graph.js';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.InitializeOnPreviewAllowlist = void 0;
|
|
4
|
-
class InitializeOnPreviewAllowlist {
|
|
1
|
+
export class InitializeOnPreviewAllowlist {
|
|
2
|
+
static allowlist = new WeakMap();
|
|
5
3
|
static add(type) {
|
|
6
4
|
this.allowlist.set(type, true);
|
|
7
5
|
}
|
|
@@ -9,5 +7,3 @@ class InitializeOnPreviewAllowlist {
|
|
|
9
7
|
return this.allowlist.has(type);
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
exports.InitializeOnPreviewAllowlist = InitializeOnPreviewAllowlist;
|
|
13
|
-
InitializeOnPreviewAllowlist.allowlist = new WeakMap();
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Type } from '@nestjs/common';
|
|
2
|
+
import { InstanceWrapper } from '../../injector/instance-wrapper.js';
|
|
3
|
+
import type { EnhancerSubtype } from '@nestjs/common/internal';
|
|
4
4
|
export interface EnhancerMetadataCacheEntry {
|
|
5
5
|
targetNodeId?: string;
|
|
6
6
|
moduleToken: string;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RequestMethod } from '@nestjs/common';
|
|
2
|
-
import { VersionValue } from '@nestjs/common/
|
|
1
|
+
import type { RequestMethod } from '@nestjs/common';
|
|
2
|
+
import type { VersionValue } from '@nestjs/common/internal';
|
|
3
3
|
export type HttpEntrypointMetadata = {
|
|
4
4
|
path: string;
|
|
5
5
|
requestMethod: keyof typeof RequestMethod;
|
|
@@ -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 { InjectionToken, Scope } from '@nestjs/common';
|
|
2
|
-
import { EnhancerSubtype } from '@nestjs/common/
|
|
1
|
+
import type { InjectionToken, Scope } from '@nestjs/common';
|
|
2
|
+
import type { EnhancerSubtype } from '@nestjs/common/internal';
|
|
3
3
|
export type ModuleNode = {
|
|
4
4
|
metadata: {
|
|
5
5
|
type: 'module';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SerializedGraphStatus } from '../serialized-graph';
|
|
2
|
-
import { Edge } from './edge.interface';
|
|
3
|
-
import { Entrypoint } from './entrypoint.interface';
|
|
4
|
-
import { Extras } from './extras.interface';
|
|
5
|
-
import { Node } from './node.interface';
|
|
6
|
-
import { SerializedGraphMetadata } from './serialized-graph-metadata.interface';
|
|
1
|
+
import { SerializedGraphStatus } from '../serialized-graph.js';
|
|
2
|
+
import { Edge } from './edge.interface.js';
|
|
3
|
+
import { Entrypoint } from './entrypoint.interface.js';
|
|
4
|
+
import { Extras } from './extras.interface.js';
|
|
5
|
+
import { Node } from './node.interface.js';
|
|
6
|
+
import { SerializedGraphMetadata } from './serialized-graph-metadata.interface.js';
|
|
7
7
|
export interface SerializedGraphJson {
|
|
8
8
|
nodes: Record<string, Node>;
|
|
9
9
|
edges: Record<string, Edge>;
|
|
@@ -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,2 @@
|
|
|
1
|
-
import { GraphInspector } from './graph-inspector';
|
|
1
|
+
import { GraphInspector } from './graph-inspector.js';
|
|
2
2
|
export declare const NoopGraphInspector: GraphInspector;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NoopGraphInspector = void 0;
|
|
4
|
-
const graph_inspector_1 = require("./graph-inspector");
|
|
1
|
+
import { GraphInspector } from './graph-inspector.js';
|
|
5
2
|
const noop = () => { };
|
|
6
|
-
|
|
3
|
+
export const NoopGraphInspector = new Proxy(GraphInspector.prototype, {
|
|
7
4
|
get: () => noop,
|
|
8
5
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SerializedGraph } from './serialized-graph';
|
|
1
|
+
import { SerializedGraph } from './serialized-graph.js';
|
|
2
2
|
export declare class PartialGraphHost {
|
|
3
3
|
private static partialGraph;
|
|
4
|
-
static toJSON(): import("./interfaces/serialized-graph-json.interface").SerializedGraphJson;
|
|
4
|
+
static toJSON(): import("./interfaces/serialized-graph-json.interface.js").SerializedGraphJson;
|
|
5
5
|
static toString(): string;
|
|
6
6
|
static register(partialGraph: SerializedGraph): void;
|
|
7
7
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.PartialGraphHost = void 0;
|
|
4
|
-
class PartialGraphHost {
|
|
1
|
+
export class PartialGraphHost {
|
|
2
|
+
static partialGraph;
|
|
5
3
|
static toJSON() {
|
|
6
4
|
return this.partialGraph?.toJSON();
|
|
7
5
|
}
|
|
@@ -12,4 +10,3 @@ class PartialGraphHost {
|
|
|
12
10
|
this.partialGraph = partialGraph;
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
|
-
exports.PartialGraphHost = PartialGraphHost;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { InjectionToken } from '@nestjs/common';
|
|
2
|
-
import { Edge } from './interfaces/edge.interface';
|
|
3
|
-
import { Entrypoint } from './interfaces/entrypoint.interface';
|
|
4
|
-
import { OrphanedEnhancerDefinition } from './interfaces/extras.interface';
|
|
5
|
-
import { Node } from './interfaces/node.interface';
|
|
6
|
-
import { SerializedGraphJson } from './interfaces/serialized-graph-json.interface';
|
|
7
|
-
import { SerializedGraphMetadata } from './interfaces/serialized-graph-metadata.interface';
|
|
1
|
+
import type { InjectionToken } from '@nestjs/common';
|
|
2
|
+
import { Edge } from './interfaces/edge.interface.js';
|
|
3
|
+
import { Entrypoint } from './interfaces/entrypoint.interface.js';
|
|
4
|
+
import { OrphanedEnhancerDefinition } from './interfaces/extras.interface.js';
|
|
5
|
+
import { Node } from './interfaces/node.interface.js';
|
|
6
|
+
import { SerializedGraphJson } from './interfaces/serialized-graph-json.interface.js';
|
|
7
|
+
import { SerializedGraphMetadata } from './interfaces/serialized-graph-metadata.interface.js';
|
|
8
8
|
export type SerializedGraphStatus = 'partial' | 'complete';
|
|
9
9
|
type WithOptionalId<T extends Record<'id', string>> = Omit<T, 'id'> & Partial<Pick<T, 'id'>>;
|
|
10
10
|
export declare class SerializedGraph {
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { ApplicationConfig } from '../application-config.js';
|
|
2
|
+
import { ExternalContextCreator } from '../helpers/external-context-creator.js';
|
|
3
|
+
import { HttpAdapterHost } from '../helpers/http-adapter-host.js';
|
|
4
|
+
import { INQUIRER } from '../injector/inquirer/inquirer-constants.js';
|
|
5
|
+
import { LazyModuleLoader } from '../injector/lazy-module-loader/lazy-module-loader.js';
|
|
6
|
+
import { ModuleRef } from '../injector/module-ref.js';
|
|
7
|
+
import { ModulesContainer } from '../injector/modules-container.js';
|
|
8
|
+
import { REQUEST } from '../router/request/request-constants.js';
|
|
9
|
+
import { Reflector } from '../services/reflector.service.js';
|
|
10
|
+
import { DeterministicUuidRegistry } from './deterministic-uuid-registry.js';
|
|
11
|
+
export class SerializedGraph {
|
|
12
|
+
nodes = new Map();
|
|
13
|
+
edges = new Map();
|
|
14
|
+
entrypoints = new Map();
|
|
15
|
+
extras = {
|
|
16
|
+
orphanedEnhancers: [],
|
|
17
|
+
attachedEnhancers: [],
|
|
18
|
+
};
|
|
19
|
+
_status = 'complete';
|
|
20
|
+
_metadata;
|
|
21
|
+
static INTERNAL_PROVIDERS = [
|
|
22
|
+
ApplicationConfig,
|
|
23
|
+
ModuleRef,
|
|
24
|
+
HttpAdapterHost,
|
|
25
|
+
LazyModuleLoader,
|
|
26
|
+
ExternalContextCreator,
|
|
27
|
+
ModulesContainer,
|
|
28
|
+
Reflector,
|
|
29
|
+
SerializedGraph,
|
|
30
|
+
HttpAdapterHost.name,
|
|
31
|
+
Reflector.name,
|
|
32
|
+
REQUEST,
|
|
33
|
+
INQUIRER,
|
|
34
|
+
];
|
|
25
35
|
set status(status) {
|
|
26
36
|
this._status = status;
|
|
27
37
|
}
|
|
@@ -104,21 +114,6 @@ class SerializedGraph {
|
|
|
104
114
|
return JSON.stringify(this.toJSON(), replacer, 2);
|
|
105
115
|
}
|
|
106
116
|
generateUuidByEdgeDefinition(edgeDefinition) {
|
|
107
|
-
return
|
|
117
|
+
return DeterministicUuidRegistry.get(JSON.stringify(edgeDefinition));
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
|
-
exports.SerializedGraph = SerializedGraph;
|
|
111
|
-
SerializedGraph.INTERNAL_PROVIDERS = [
|
|
112
|
-
application_config_1.ApplicationConfig,
|
|
113
|
-
module_ref_1.ModuleRef,
|
|
114
|
-
http_adapter_host_1.HttpAdapterHost,
|
|
115
|
-
lazy_module_loader_1.LazyModuleLoader,
|
|
116
|
-
external_context_creator_1.ExternalContextCreator,
|
|
117
|
-
modules_container_1.ModulesContainer,
|
|
118
|
-
reflector_service_1.Reflector,
|
|
119
|
-
SerializedGraph,
|
|
120
|
-
http_adapter_host_1.HttpAdapterHost.name,
|
|
121
|
-
reflector_service_1.Reflector.name,
|
|
122
|
-
request_constants_1.REQUEST,
|
|
123
|
-
inquirer_constants_1.INQUIRER,
|
|
124
|
-
];
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util");
|
|
5
|
-
const deterministic_uuid_registry_1 = require("./deterministic-uuid-registry");
|
|
6
|
-
var UuidFactoryMode;
|
|
1
|
+
import { DeterministicUuidRegistry } from './deterministic-uuid-registry.js';
|
|
2
|
+
import { randomStringGenerator } from '@nestjs/common/internal';
|
|
3
|
+
export var UuidFactoryMode;
|
|
7
4
|
(function (UuidFactoryMode) {
|
|
8
5
|
UuidFactoryMode["Random"] = "random";
|
|
9
6
|
UuidFactoryMode["Deterministic"] = "deterministic";
|
|
10
|
-
})(UuidFactoryMode || (
|
|
11
|
-
class UuidFactory {
|
|
7
|
+
})(UuidFactoryMode || (UuidFactoryMode = {}));
|
|
8
|
+
export class UuidFactory {
|
|
9
|
+
static _mode = UuidFactoryMode.Random;
|
|
12
10
|
static set mode(value) {
|
|
13
11
|
this._mode = value;
|
|
14
12
|
}
|
|
15
13
|
static get(key = '') {
|
|
16
14
|
return this._mode === UuidFactoryMode.Deterministic
|
|
17
|
-
?
|
|
18
|
-
:
|
|
15
|
+
? DeterministicUuidRegistry.get(key)
|
|
16
|
+
: randomStringGenerator();
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
exports.UuidFactory = UuidFactory;
|
|
22
|
-
UuidFactory._mode = UuidFactoryMode.Random;
|
package/interceptors/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interceptors-consumer';
|
|
2
|
-
export * from './interceptors-context-creator';
|
|
1
|
+
export * from './interceptors-consumer.js';
|
|
2
|
+
export * from './interceptors-context-creator.js';
|
package/interceptors/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./interceptors-consumer"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./interceptors-context-creator"), exports);
|
|
1
|
+
export * from './interceptors-consumer.js';
|
|
2
|
+
export * from './interceptors-context-creator.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { NestInterceptor } from '@nestjs/common';
|
|
2
|
-
import { ContextType, Controller } from '@nestjs/common/interfaces';
|
|
1
|
+
import type { NestInterceptor } from '@nestjs/common';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { ExecutionContextHost } from '../helpers/execution-context-host';
|
|
3
|
+
import { ExecutionContextHost } from '../helpers/execution-context-host.js';
|
|
4
|
+
import type { ContextType } from '@nestjs/common';
|
|
5
|
+
import { type Controller } from '@nestjs/common/internal';
|
|
5
6
|
export declare class InterceptorsConsumer {
|
|
6
7
|
intercept<TContext extends string = ContextType>(interceptors: NestInterceptor[], args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown, next: () => Promise<unknown>, type?: TContext): Promise<unknown>;
|
|
7
8
|
createContext(args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown): ExecutionContextHost;
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
|
-
const execution_context_host_1 = require("../helpers/execution-context-host");
|
|
9
|
-
class InterceptorsConsumer {
|
|
1
|
+
import { AsyncResource } from 'async_hooks';
|
|
2
|
+
import { Observable, defer, from as fromPromise } from 'rxjs';
|
|
3
|
+
import { mergeAll, switchMap } from 'rxjs/operators';
|
|
4
|
+
import { ExecutionContextHost } from '../helpers/execution-context-host.js';
|
|
5
|
+
import { isEmptyArray } from '@nestjs/common/internal';
|
|
6
|
+
export class InterceptorsConsumer {
|
|
10
7
|
async intercept(interceptors, args, instance, callback, next, type) {
|
|
11
|
-
if ((
|
|
8
|
+
if (isEmptyArray(interceptors)) {
|
|
12
9
|
return next();
|
|
13
10
|
}
|
|
14
11
|
const context = this.createContext(args, instance, callback);
|
|
15
12
|
context.setType(type);
|
|
16
13
|
const nextFn = async (i = 0) => {
|
|
17
14
|
if (i >= interceptors.length) {
|
|
18
|
-
return
|
|
15
|
+
return defer(AsyncResource.bind(() => this.transformDeferred(next)));
|
|
19
16
|
}
|
|
20
17
|
const handler = {
|
|
21
|
-
handle: () =>
|
|
18
|
+
handle: () => defer(AsyncResource.bind(() => nextFn(i + 1))).pipe(mergeAll()),
|
|
22
19
|
};
|
|
23
20
|
return interceptors[i].intercept(context, handler);
|
|
24
21
|
};
|
|
25
|
-
return
|
|
22
|
+
return defer(() => nextFn()).pipe(mergeAll());
|
|
26
23
|
}
|
|
27
24
|
createContext(args, instance, callback) {
|
|
28
|
-
return new
|
|
25
|
+
return new ExecutionContextHost(args, instance.constructor, callback);
|
|
29
26
|
}
|
|
30
27
|
transformDeferred(next) {
|
|
31
|
-
return (
|
|
32
|
-
const isDeferred = res instanceof Promise || res instanceof
|
|
28
|
+
return fromPromise(next()).pipe(switchMap(res => {
|
|
29
|
+
const isDeferred = res instanceof Promise || res instanceof Observable;
|
|
33
30
|
return isDeferred ? res : Promise.resolve(res);
|
|
34
31
|
}));
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
|
-
exports.InterceptorsConsumer = InterceptorsConsumer;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ApplicationConfig } from '../application-config.js';
|
|
2
|
+
import { ContextCreator } from '../helpers/context-creator.js';
|
|
3
|
+
import { NestContainer } from '../injector/container.js';
|
|
4
|
+
import { InstanceWrapper } from '../injector/instance-wrapper.js';
|
|
5
|
+
import { type Controller } from '@nestjs/common/internal';
|
|
6
|
+
import type { NestInterceptor, Type } from '@nestjs/common';
|
|
6
7
|
export declare class InterceptorsContextCreator extends ContextCreator {
|
|
7
8
|
private readonly container;
|
|
8
9
|
private readonly config?;
|
|
9
10
|
private moduleContext;
|
|
10
11
|
constructor(container: NestContainer, config?: ApplicationConfig | undefined);
|
|
11
|
-
create(instance: Controller, callback: (...args: unknown[]) => unknown, module: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): NestInterceptor[];
|
|
12
|
-
createConcreteContext<T extends any[], R extends any[]>(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R;
|
|
13
|
-
getInterceptorInstance(metatype: Function | NestInterceptor, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): NestInterceptor | null;
|
|
12
|
+
create(instance: Controller, callback: (...args: unknown[]) => unknown, module: string, contextId?: import("../injector/instance-wrapper.js").ContextId, inquirerId?: string): NestInterceptor[];
|
|
13
|
+
createConcreteContext<T extends any[], R extends any[]>(metadata: T, contextId?: import("../injector/instance-wrapper.js").ContextId, inquirerId?: string): R;
|
|
14
|
+
getInterceptorInstance(metatype: Function | NestInterceptor, contextId?: import("../injector/instance-wrapper.js").ContextId, inquirerId?: string): NestInterceptor | null;
|
|
14
15
|
getInstanceByMetatype(metatype: Type<unknown>): InstanceWrapper | undefined;
|
|
15
|
-
getGlobalMetadata<T extends unknown[]>(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T;
|
|
16
|
+
getGlobalMetadata<T extends unknown[]>(contextId?: import("../injector/instance-wrapper.js").ContextId, inquirerId?: string): T;
|
|
16
17
|
}
|