@depup/nestjs__core 11.1.17-depup.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/LICENSE +22 -0
- package/PACKAGE.md +1 -0
- package/README.md +25 -0
- package/Readme.md +146 -0
- package/adapters/http-adapter.d.ts +80 -0
- package/adapters/http-adapter.js +90 -0
- package/adapters/index.d.ts +1 -0
- package/adapters/index.js +4 -0
- package/application-config.d.ts +47 -0
- package/application-config.js +107 -0
- package/changes.json +5 -0
- package/constants.d.ts +14 -0
- package/constants.js +21 -0
- package/discovery/discoverable-meta-host-collection.d.ts +46 -0
- package/discovery/discoverable-meta-host-collection.js +98 -0
- package/discovery/discovery-module.d.ts +5 -0
- package/discovery/discovery-module.js +19 -0
- package/discovery/discovery-service.d.ts +76 -0
- package/discovery/discovery-service.js +98 -0
- package/discovery/index.d.ts +2 -0
- package/discovery/index.js +5 -0
- package/errors/exception-handler.d.ts +4 -0
- package/errors/exception-handler.js +11 -0
- package/errors/exceptions/circular-dependency.exception.d.ts +4 -0
- package/errors/exceptions/circular-dependency.exception.js +11 -0
- package/errors/exceptions/index.d.ts +8 -0
- package/errors/exceptions/index.js +11 -0
- package/errors/exceptions/invalid-class-module.exception.d.ts +4 -0
- package/errors/exceptions/invalid-class-module.exception.js +11 -0
- package/errors/exceptions/invalid-class-scope.exception.d.ts +5 -0
- package/errors/exceptions/invalid-class-scope.exception.js +16 -0
- package/errors/exceptions/invalid-class.exception.d.ts +4 -0
- package/errors/exceptions/invalid-class.exception.js +11 -0
- package/errors/exceptions/invalid-exception-filter.exception.d.ts +4 -0
- package/errors/exceptions/invalid-exception-filter.exception.js +11 -0
- package/errors/exceptions/invalid-middleware-configuration.exception.d.ts +4 -0
- package/errors/exceptions/invalid-middleware-configuration.exception.js +11 -0
- package/errors/exceptions/invalid-middleware.exception.d.ts +4 -0
- package/errors/exceptions/invalid-middleware.exception.js +11 -0
- package/errors/exceptions/invalid-module.exception.d.ts +4 -0
- package/errors/exceptions/invalid-module.exception.js +11 -0
- package/errors/exceptions/runtime.exception.d.ts +4 -0
- package/errors/exceptions/runtime.exception.js +12 -0
- package/errors/exceptions/undefined-dependency.exception.d.ts +6 -0
- package/errors/exceptions/undefined-dependency.exception.js +11 -0
- package/errors/exceptions/undefined-forwardref.exception.d.ts +5 -0
- package/errors/exceptions/undefined-forwardref.exception.js +11 -0
- package/errors/exceptions/undefined-module.exception.d.ts +4 -0
- package/errors/exceptions/undefined-module.exception.js +11 -0
- package/errors/exceptions/unknown-dependencies.exception.d.ts +16 -0
- package/errors/exceptions/unknown-dependencies.exception.js +15 -0
- package/errors/exceptions/unknown-element.exception.d.ts +4 -0
- package/errors/exceptions/unknown-element.exception.js +11 -0
- package/errors/exceptions/unknown-export.exception.d.ts +4 -0
- package/errors/exceptions/unknown-export.exception.js +11 -0
- package/errors/exceptions/unknown-module.exception.d.ts +4 -0
- package/errors/exceptions/unknown-module.exception.js +10 -0
- package/errors/exceptions/unknown-request-mapping.exception.d.ts +5 -0
- package/errors/exceptions/unknown-request-mapping.exception.js +11 -0
- package/errors/exceptions-zone.d.ts +5 -0
- package/errors/exceptions-zone.js +34 -0
- package/errors/messages.d.ts +17 -0
- package/errors/messages.js +174 -0
- package/exceptions/base-exception-filter-context.d.ts +14 -0
- package/exceptions/base-exception-filter-context.js +56 -0
- package/exceptions/base-exception-filter.d.ts +20 -0
- package/exceptions/base-exception-filter.js +72 -0
- package/exceptions/exceptions-handler.d.ts +10 -0
- package/exceptions/exceptions-handler.js +34 -0
- package/exceptions/external-exception-filter-context.d.ts +12 -0
- package/exceptions/external-exception-filter-context.js +42 -0
- package/exceptions/external-exception-filter.d.ts +5 -0
- package/exceptions/external-exception-filter.js +15 -0
- package/exceptions/external-exceptions-handler.d.ts +9 -0
- package/exceptions/external-exceptions-handler.js +34 -0
- package/exceptions/index.d.ts +1 -0
- package/exceptions/index.js +4 -0
- package/guards/constants.d.ts +1 -0
- package/guards/constants.js +4 -0
- package/guards/guards-consumer.d.ts +9 -0
- package/guards/guards-consumer.js +39 -0
- package/guards/guards-context-creator.d.ts +17 -0
- package/guards/guards-context-creator.js +70 -0
- package/guards/index.d.ts +3 -0
- package/guards/index.js +6 -0
- package/helpers/barrier.d.ts +30 -0
- package/helpers/barrier.js +46 -0
- package/helpers/context-creator.d.ts +10 -0
- package/helpers/context-creator.js +33 -0
- package/helpers/context-id-factory.d.ts +41 -0
- package/helpers/context-id-factory.js +67 -0
- package/helpers/context-utils.d.ts +23 -0
- package/helpers/context-utils.js +55 -0
- package/helpers/execution-context-host.d.ts +19 -0
- package/helpers/execution-context-host.js +50 -0
- package/helpers/external-context-creator.d.ts +51 -0
- package/helpers/external-context-creator.js +166 -0
- package/helpers/external-proxy.d.ts +5 -0
- package/helpers/external-proxy.js +19 -0
- package/helpers/get-class-scope.d.ts +3 -0
- package/helpers/get-class-scope.js +8 -0
- package/helpers/handler-metadata-storage.d.ts +27 -0
- package/helpers/handler-metadata-storage.js +26 -0
- package/helpers/http-adapter-host.d.ts +51 -0
- package/helpers/http-adapter-host.js +73 -0
- package/helpers/index.d.ts +3 -0
- package/helpers/index.js +6 -0
- package/helpers/interfaces/external-handler-metadata.interface.d.ts +11 -0
- package/helpers/interfaces/external-handler-metadata.interface.js +2 -0
- package/helpers/interfaces/index.d.ts +2 -0
- package/helpers/interfaces/index.js +5 -0
- package/helpers/interfaces/params-metadata.interface.d.ts +6 -0
- package/helpers/interfaces/params-metadata.interface.js +2 -0
- package/helpers/is-durable.d.ts +2 -0
- package/helpers/is-durable.js +8 -0
- package/helpers/load-adapter.d.ts +1 -0
- package/helpers/load-adapter.js +15 -0
- package/helpers/messages.d.ts +7 -0
- package/helpers/messages.js +29 -0
- package/helpers/optional-require.d.ts +1 -0
- package/helpers/optional-require.js +11 -0
- package/helpers/rethrow.d.ts +1 -0
- package/helpers/rethrow.js +7 -0
- package/helpers/router-method-factory.d.ts +23 -0
- package/helpers/router-method-factory.js +33 -0
- package/hooks/before-app-shutdown.hook.d.ts +9 -0
- package/hooks/before-app-shutdown.hook.js +51 -0
- package/hooks/index.d.ts +5 -0
- package/hooks/index.js +8 -0
- package/hooks/on-app-bootstrap.hook.d.ts +8 -0
- package/hooks/on-app-bootstrap.hook.js +53 -0
- package/hooks/on-app-shutdown.hook.d.ts +9 -0
- package/hooks/on-app-shutdown.hook.js +54 -0
- package/hooks/on-module-destroy.hook.d.ts +8 -0
- package/hooks/on-module-destroy.hook.js +53 -0
- package/hooks/on-module-init.hook.d.ts +8 -0
- package/hooks/on-module-init.hook.js +53 -0
- 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 +17 -0
- package/index.js +32 -0
- package/injector/abstract-instance-resolver.d.ts +16 -0
- package/injector/abstract-instance-resolver.js +49 -0
- package/injector/compiler.d.ts +18 -0
- package/injector/compiler.js +35 -0
- package/injector/constants.d.ts +3 -0
- package/injector/constants.js +8 -0
- package/injector/container.d.ts +67 -0
- package/injector/container.js +233 -0
- package/injector/helpers/provider-classifier.d.ts +4 -0
- package/injector/helpers/provider-classifier.js +16 -0
- package/injector/helpers/silent-logger.d.ts +10 -0
- package/injector/helpers/silent-logger.js +18 -0
- package/injector/helpers/transient-instances.d.ts +12 -0
- package/injector/helpers/transient-instances.js +28 -0
- package/injector/index.d.ts +6 -0
- package/injector/index.js +8 -0
- package/injector/injector.d.ts +104 -0
- package/injector/injector.js +554 -0
- package/injector/inquirer/index.d.ts +1 -0
- package/injector/inquirer/index.js +4 -0
- package/injector/inquirer/inquirer-constants.d.ts +1 -0
- package/injector/inquirer/inquirer-constants.js +4 -0
- package/injector/inquirer/inquirer-providers.d.ts +2 -0
- package/injector/inquirer/inquirer-providers.js +11 -0
- package/injector/instance-links-host.d.ts +22 -0
- package/injector/instance-links-host.js +56 -0
- package/injector/instance-loader.d.ts +23 -0
- package/injector/instance-loader.js +88 -0
- package/injector/instance-wrapper.d.ts +99 -0
- package/injector/instance-wrapper.js +350 -0
- package/injector/internal-core-module/index.d.ts +1 -0
- package/injector/internal-core-module/index.js +4 -0
- package/injector/internal-core-module/internal-core-module-factory.d.ts +9 -0
- package/injector/internal-core-module/internal-core-module-factory.js +52 -0
- package/injector/internal-core-module/internal-core-module.d.ts +5 -0
- package/injector/internal-core-module/internal-core-module.js +40 -0
- package/injector/internal-providers-storage.d.ts +9 -0
- package/injector/internal-providers-storage.js +19 -0
- package/injector/lazy-module-loader/lazy-module-loader-options.interface.d.ts +6 -0
- package/injector/lazy-module-loader/lazy-module-loader-options.interface.js +2 -0
- package/injector/lazy-module-loader/lazy-module-loader.d.ts +20 -0
- package/injector/lazy-module-loader/lazy-module-loader.js +49 -0
- package/injector/module-ref.d.ts +106 -0
- package/injector/module-ref.js +66 -0
- package/injector/module.d.ts +82 -0
- package/injector/module.js +432 -0
- package/injector/modules-container.d.ts +27 -0
- package/injector/modules-container.js +42 -0
- package/injector/opaque-key-factory/by-reference-module-opaque-key-factory.d.ts +15 -0
- package/injector/opaque-key-factory/by-reference-module-opaque-key-factory.js +41 -0
- package/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.d.ts +15 -0
- package/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.js +83 -0
- package/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.d.ts +18 -0
- package/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.js +2 -0
- package/injector/settlement-signal.d.ts +37 -0
- package/injector/settlement-signal.js +55 -0
- package/injector/topology-tree/topology-tree.d.ts +8 -0
- package/injector/topology-tree/topology-tree.js +51 -0
- package/injector/topology-tree/tree-node.d.ts +14 -0
- package/injector/topology-tree/tree-node.js +54 -0
- package/inspector/deterministic-uuid-registry.d.ts +6 -0
- package/inspector/deterministic-uuid-registry.js +24 -0
- package/inspector/graph-inspector.d.ts +26 -0
- package/inspector/graph-inspector.js +166 -0
- package/inspector/index.d.ts +4 -0
- package/inspector/index.js +7 -0
- package/inspector/initialize-on-preview.allowlist.d.ts +6 -0
- package/inspector/initialize-on-preview.allowlist.js +13 -0
- package/inspector/interfaces/edge.interface.d.ts +28 -0
- package/inspector/interfaces/edge.interface.js +2 -0
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts +12 -0
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.js +2 -0
- package/inspector/interfaces/entrypoint.interface.d.ts +23 -0
- package/inspector/interfaces/entrypoint.interface.js +2 -0
- package/inspector/interfaces/extras.interface.d.ts +18 -0
- package/inspector/interfaces/extras.interface.js +2 -0
- package/inspector/interfaces/node.interface.d.ts +48 -0
- package/inspector/interfaces/node.interface.js +2 -0
- package/inspector/interfaces/serialized-graph-json.interface.d.ts +14 -0
- package/inspector/interfaces/serialized-graph-json.interface.js +2 -0
- package/inspector/interfaces/serialized-graph-metadata.interface.d.ts +10 -0
- package/inspector/interfaces/serialized-graph-metadata.interface.js +2 -0
- package/inspector/noop-graph-inspector.d.ts +2 -0
- package/inspector/noop-graph-inspector.js +8 -0
- package/inspector/partial-graph.host.d.ts +7 -0
- package/inspector/partial-graph.host.js +15 -0
- package/inspector/serialized-graph.d.ts +52 -0
- package/inspector/serialized-graph.js +124 -0
- package/inspector/uuid-factory.d.ts +9 -0
- package/inspector/uuid-factory.js +22 -0
- package/interceptors/index.d.ts +2 -0
- package/interceptors/index.js +5 -0
- package/interceptors/interceptors-consumer.d.ts +9 -0
- package/interceptors/interceptors-consumer.js +37 -0
- package/interceptors/interceptors-context-creator.d.ts +16 -0
- package/interceptors/interceptors-context-creator.js +69 -0
- package/interfaces/index.d.ts +2 -0
- package/interfaces/index.js +2 -0
- package/interfaces/module-definition.interface.d.ts +3 -0
- package/interfaces/module-definition.interface.js +2 -0
- package/interfaces/module-override.interface.d.ts +5 -0
- package/interfaces/module-override.interface.js +2 -0
- package/internal.d.ts +38 -0
- package/internal.js +46 -0
- package/metadata-scanner.d.ts +17 -0
- package/metadata-scanner.js +83 -0
- package/middleware/builder.d.ts +15 -0
- package/middleware/builder.js +91 -0
- package/middleware/container.d.ts +14 -0
- package/middleware/container.js +49 -0
- package/middleware/index.d.ts +1 -0
- package/middleware/index.js +4 -0
- package/middleware/middleware-module.d.ts +33 -0
- package/middleware/middleware-module.js +208 -0
- package/middleware/resolver.d.ts +10 -0
- package/middleware/resolver.js +18 -0
- package/middleware/route-info-path-extractor.d.ts +15 -0
- package/middleware/route-info-path-extractor.js +81 -0
- package/middleware/routes-mapper.d.ts +19 -0
- package/middleware/routes-mapper.js +117 -0
- package/middleware/utils.d.ts +8 -0
- package/middleware/utils.js +106 -0
- package/nest-application-context.d.ts +173 -0
- package/nest-application-context.js +327 -0
- package/nest-application.d.ts +64 -0
- package/nest-application.js +328 -0
- package/nest-factory.d.ts +83 -0
- package/nest-factory.js +232 -0
- package/package.json +73 -0
- package/pipes/index.d.ts +3 -0
- package/pipes/index.js +6 -0
- package/pipes/params-token-factory.d.ts +5 -0
- package/pipes/params-token-factory.js +19 -0
- package/pipes/pipes-consumer.d.ts +10 -0
- package/pipes/pipes-consumer.js +21 -0
- package/pipes/pipes-context-creator.d.ts +17 -0
- package/pipes/pipes-context-creator.js +72 -0
- package/repl/assign-to-object.util.d.ts +5 -0
- package/repl/assign-to-object.util.js +14 -0
- package/repl/constants.d.ts +1 -0
- package/repl/constants.js +4 -0
- package/repl/index.d.ts +1 -0
- package/repl/index.js +4 -0
- package/repl/native-functions/debug-repl-fn.d.ts +9 -0
- package/repl/native-functions/debug-repl-fn.js +46 -0
- package/repl/native-functions/get-repl-fn.d.ts +7 -0
- package/repl/native-functions/get-repl-fn.js +19 -0
- package/repl/native-functions/help-repl-fn.d.ts +7 -0
- package/repl/native-functions/help-repl-fn.js +29 -0
- package/repl/native-functions/index.d.ts +6 -0
- package/repl/native-functions/index.js +9 -0
- package/repl/native-functions/methods-repl-fn.d.ts +8 -0
- package/repl/native-functions/methods-repl-fn.js +28 -0
- package/repl/native-functions/resolve-repl-fn.d.ts +7 -0
- package/repl/native-functions/resolve-repl-fn.js +18 -0
- package/repl/native-functions/select-relp-fn.d.ts +7 -0
- package/repl/native-functions/select-relp-fn.js +18 -0
- package/repl/repl-context.d.ts +26 -0
- package/repl/repl-context.js +126 -0
- package/repl/repl-function.d.ts +18 -0
- package/repl/repl-function.js +19 -0
- package/repl/repl-logger.d.ts +5 -0
- package/repl/repl-logger.js +22 -0
- package/repl/repl-native-commands.d.ts +2 -0
- package/repl/repl-native-commands.js +46 -0
- package/repl/repl.d.ts +3 -0
- package/repl/repl.interfaces.d.ts +16 -0
- package/repl/repl.interfaces.js +2 -0
- package/repl/repl.js +32 -0
- package/router/index.d.ts +3 -0
- package/router/index.js +8 -0
- package/router/interfaces/exceptions-filter.interface.d.ts +6 -0
- package/router/interfaces/exceptions-filter.interface.js +2 -0
- package/router/interfaces/exclude-route-metadata.interface.d.ts +15 -0
- package/router/interfaces/exclude-route-metadata.interface.js +2 -0
- package/router/interfaces/index.d.ts +1 -0
- package/router/interfaces/index.js +4 -0
- package/router/interfaces/resolver.interface.d.ts +5 -0
- package/router/interfaces/resolver.interface.js +2 -0
- package/router/interfaces/route-params-factory.interface.d.ts +8 -0
- package/router/interfaces/route-params-factory.interface.js +2 -0
- package/router/interfaces/route-path-metadata.interface.d.ts +32 -0
- package/router/interfaces/route-path-metadata.interface.js +2 -0
- package/router/interfaces/routes.interface.d.ts +7 -0
- package/router/interfaces/routes.interface.js +2 -0
- package/router/legacy-route-converter.d.ts +16 -0
- package/router/legacy-route-converter.js +61 -0
- package/router/paths-explorer.d.ts +18 -0
- package/router/paths-explorer.js +45 -0
- package/router/request/index.d.ts +1 -0
- package/router/request/index.js +5 -0
- package/router/request/request-constants.d.ts +2 -0
- package/router/request/request-constants.js +5 -0
- package/router/request/request-providers.d.ts +2 -0
- package/router/request/request-providers.js +11 -0
- package/router/route-params-factory.d.ts +9 -0
- package/router/route-params-factory.js +41 -0
- package/router/route-path-factory.d.ts +14 -0
- package/router/route-path-factory.js +101 -0
- package/router/router-exception-filters.d.ts +14 -0
- package/router/router-exception-filters.js +40 -0
- package/router/router-execution-context.d.ts +54 -0
- package/router/router-execution-context.js +186 -0
- package/router/router-explorer.d.ts +47 -0
- package/router/router-explorer.js +234 -0
- package/router/router-module.d.ts +19 -0
- package/router/router-module.js +80 -0
- package/router/router-proxy.d.ts +6 -0
- package/router/router-proxy.js +31 -0
- package/router/router-response-controller.d.ts +28 -0
- package/router/router-response-controller.js +98 -0
- package/router/routes-resolver.d.ts +27 -0
- package/router/routes-resolver.js +129 -0
- package/router/sse-stream.d.ts +43 -0
- package/router/sse-stream.js +83 -0
- package/router/utils/exclude-route.util.d.ts +4 -0
- package/router/utils/exclude-route.util.js +19 -0
- package/router/utils/flatten-route-paths.util.d.ts +6 -0
- package/router/utils/flatten-route-paths.util.js +25 -0
- package/router/utils/index.d.ts +2 -0
- package/router/utils/index.js +5 -0
- package/scanner.d.ts +89 -0
- package/scanner.js +416 -0
- package/services/index.d.ts +1 -0
- package/services/index.js +4 -0
- package/services/reflector.service.d.ts +111 -0
- package/services/reflector.service.js +100 -0
- package/tsconfig.build.json +21 -0
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/nestjs__core",
|
|
3
|
+
"version": "11.1.17-depup.0",
|
|
4
|
+
"description": "[DepUp] Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
|
+
"author": "Kamil Mysliwiec",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://nestjs.com",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/nest"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">= 20"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/nestjs/nest.git",
|
|
18
|
+
"directory": "packages/core"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {},
|
|
21
|
+
"collective": {
|
|
22
|
+
"type": "opencollective",
|
|
23
|
+
"url": "https://opencollective.com/nest",
|
|
24
|
+
"donation": {
|
|
25
|
+
"text": "Become a partner:"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@nuxt/opencollective": "0.4.1",
|
|
30
|
+
"fast-safe-stringify": "2.1.1",
|
|
31
|
+
"iterare": "1.2.1",
|
|
32
|
+
"path-to-regexp": "8.3.0",
|
|
33
|
+
"tslib": "2.8.1",
|
|
34
|
+
"uid": "2.0.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@nestjs/common": "11.1.17"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@nestjs/common": "^11.0.0",
|
|
41
|
+
"@nestjs/microservices": "^11.0.0",
|
|
42
|
+
"@nestjs/platform-express": "^11.0.0",
|
|
43
|
+
"@nestjs/websockets": "^11.0.0",
|
|
44
|
+
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
45
|
+
"rxjs": "^7.1.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"@nestjs/websockets": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"@nestjs/microservices": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"@nestjs/platform-express": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"gitHead": "447a373ebebd2c58b5b3c8d718f25922a025f2fe",
|
|
59
|
+
"keywords": [
|
|
60
|
+
"depup",
|
|
61
|
+
"dependency-bumped",
|
|
62
|
+
"updated-deps",
|
|
63
|
+
"@nestjs/core"
|
|
64
|
+
],
|
|
65
|
+
"depup": {
|
|
66
|
+
"changes": {},
|
|
67
|
+
"depsUpdated": 0,
|
|
68
|
+
"originalPackage": "@nestjs/core",
|
|
69
|
+
"originalVersion": "11.1.17",
|
|
70
|
+
"processedAt": "2026-03-16T12:24:07.904Z",
|
|
71
|
+
"smokeTest": "failed"
|
|
72
|
+
}
|
|
73
|
+
}
|
package/pipes/index.d.ts
ADDED
package/pipes/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./params-token-factory"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./pipes-consumer"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./pipes-context-creator"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParamsTokenFactory = void 0;
|
|
4
|
+
const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum");
|
|
5
|
+
class ParamsTokenFactory {
|
|
6
|
+
exchangeEnumForString(type) {
|
|
7
|
+
switch (type) {
|
|
8
|
+
case route_paramtypes_enum_1.RouteParamtypes.BODY:
|
|
9
|
+
return 'body';
|
|
10
|
+
case route_paramtypes_enum_1.RouteParamtypes.PARAM:
|
|
11
|
+
return 'param';
|
|
12
|
+
case route_paramtypes_enum_1.RouteParamtypes.QUERY:
|
|
13
|
+
return 'query';
|
|
14
|
+
default:
|
|
15
|
+
return 'custom';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ParamsTokenFactory = ParamsTokenFactory;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ArgumentMetadata, PipeTransform } from '@nestjs/common/interfaces';
|
|
2
|
+
export declare class PipesConsumer {
|
|
3
|
+
private readonly paramsTokenFactory;
|
|
4
|
+
apply<TInput = unknown>(value: TInput, { metatype, type, data }: ArgumentMetadata, pipes: PipeTransform[]): Promise<any>;
|
|
5
|
+
applyPipes<TInput = unknown>(value: TInput, { metatype, type, data }: {
|
|
6
|
+
metatype: any;
|
|
7
|
+
type?: any;
|
|
8
|
+
data?: any;
|
|
9
|
+
}, transforms: PipeTransform[]): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PipesConsumer = void 0;
|
|
4
|
+
const params_token_factory_1 = require("./params-token-factory");
|
|
5
|
+
class PipesConsumer {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.paramsTokenFactory = new params_token_factory_1.ParamsTokenFactory();
|
|
8
|
+
}
|
|
9
|
+
async apply(value, { metatype, type, data }, pipes) {
|
|
10
|
+
const token = this.paramsTokenFactory.exchangeEnumForString(type);
|
|
11
|
+
return this.applyPipes(value, { metatype, type: token, data }, pipes);
|
|
12
|
+
}
|
|
13
|
+
async applyPipes(value, { metatype, type, data }, transforms) {
|
|
14
|
+
return transforms.reduce(async (deferredValue, pipe) => {
|
|
15
|
+
const val = await deferredValue;
|
|
16
|
+
const result = pipe.transform(val, { metatype, type, data });
|
|
17
|
+
return result;
|
|
18
|
+
}, Promise.resolve(value));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.PipesConsumer = PipesConsumer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Controller, PipeTransform, Type } from '@nestjs/common/interfaces';
|
|
2
|
+
import { ApplicationConfig } from '../application-config';
|
|
3
|
+
import { ContextCreator } from '../helpers/context-creator';
|
|
4
|
+
import { NestContainer } from '../injector/container';
|
|
5
|
+
import { InstanceWrapper } from '../injector/instance-wrapper';
|
|
6
|
+
export declare class PipesContextCreator extends ContextCreator {
|
|
7
|
+
private readonly container;
|
|
8
|
+
private readonly config?;
|
|
9
|
+
private moduleContext;
|
|
10
|
+
constructor(container: NestContainer, config?: ApplicationConfig | undefined);
|
|
11
|
+
create(instance: Controller, callback: (...args: unknown[]) => unknown, moduleKey: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): PipeTransform[];
|
|
12
|
+
createConcreteContext<T extends any[], R extends any[]>(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R;
|
|
13
|
+
getPipeInstance(pipe: Function | PipeTransform, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): PipeTransform | null;
|
|
14
|
+
getInstanceByMetatype(metatype: Type<unknown>): InstanceWrapper | undefined;
|
|
15
|
+
getGlobalMetadata<T extends unknown[]>(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T;
|
|
16
|
+
setModuleContext(context: string): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PipesContextCreator = void 0;
|
|
4
|
+
const constants_1 = require("@nestjs/common/constants");
|
|
5
|
+
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
|
6
|
+
const iterare_1 = require("iterare");
|
|
7
|
+
const context_creator_1 = require("../helpers/context-creator");
|
|
8
|
+
const constants_2 = require("../injector/constants");
|
|
9
|
+
class PipesContextCreator extends context_creator_1.ContextCreator {
|
|
10
|
+
constructor(container, config) {
|
|
11
|
+
super();
|
|
12
|
+
this.container = container;
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
create(instance, callback, moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) {
|
|
16
|
+
this.moduleContext = moduleKey;
|
|
17
|
+
return this.createContext(instance, callback, constants_1.PIPES_METADATA, contextId, inquirerId);
|
|
18
|
+
}
|
|
19
|
+
createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) {
|
|
20
|
+
if ((0, shared_utils_1.isEmpty)(metadata)) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
return (0, iterare_1.iterate)(metadata)
|
|
24
|
+
.filter((pipe) => pipe && (pipe.name || pipe.transform))
|
|
25
|
+
.map(pipe => this.getPipeInstance(pipe, contextId, inquirerId))
|
|
26
|
+
.filter(pipe => !!pipe && pipe.transform && (0, shared_utils_1.isFunction)(pipe.transform))
|
|
27
|
+
.toArray();
|
|
28
|
+
}
|
|
29
|
+
getPipeInstance(pipe, contextId = constants_2.STATIC_CONTEXT, inquirerId) {
|
|
30
|
+
const isObject = !!pipe.transform;
|
|
31
|
+
if (isObject) {
|
|
32
|
+
return pipe;
|
|
33
|
+
}
|
|
34
|
+
const instanceWrapper = this.getInstanceByMetatype(pipe);
|
|
35
|
+
if (!instanceWrapper) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId);
|
|
39
|
+
return instanceHost && instanceHost.instance;
|
|
40
|
+
}
|
|
41
|
+
getInstanceByMetatype(metatype) {
|
|
42
|
+
if (!this.moduleContext) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const collection = this.container.getModules();
|
|
46
|
+
const moduleRef = collection.get(this.moduleContext);
|
|
47
|
+
if (!moduleRef) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
return moduleRef.injectables.get(metatype);
|
|
51
|
+
}
|
|
52
|
+
getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) {
|
|
53
|
+
if (!this.config) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
const globalPipes = this.config.getGlobalPipes();
|
|
57
|
+
if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) {
|
|
58
|
+
return globalPipes;
|
|
59
|
+
}
|
|
60
|
+
const scopedPipeWrappers = this.config.getGlobalRequestPipes();
|
|
61
|
+
const scopedPipes = (0, iterare_1.iterate)(scopedPipeWrappers)
|
|
62
|
+
.map(wrapper => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId))
|
|
63
|
+
.filter(host => !!host)
|
|
64
|
+
.map(host => host.instance)
|
|
65
|
+
.toArray();
|
|
66
|
+
return globalPipes.concat(scopedPipes);
|
|
67
|
+
}
|
|
68
|
+
setModuleContext(context) {
|
|
69
|
+
this.moduleContext = context;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.PipesContextCreator = PipesContextCreator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assignToObject = assignToObject;
|
|
4
|
+
/**
|
|
5
|
+
* Similar to `Object.assign` but copying properties descriptors from `source`
|
|
6
|
+
* as well.
|
|
7
|
+
*/
|
|
8
|
+
function assignToObject(target, source) {
|
|
9
|
+
Object.defineProperties(target, Object.keys(source).reduce((descriptors, key) => {
|
|
10
|
+
descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
|
|
11
|
+
return descriptors;
|
|
12
|
+
}, Object.create(null)));
|
|
13
|
+
return target;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const REPL_INITIALIZED_MESSAGE = "REPL initialized";
|
package/repl/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './repl';
|
package/repl/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Type } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from '../repl-function';
|
|
3
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
4
|
+
export declare class DebugReplFn extends ReplFunction {
|
|
5
|
+
fnDefinition: ReplFnDefinition;
|
|
6
|
+
action(moduleCls?: Type<unknown> | string): void;
|
|
7
|
+
private printCtrlsAndProviders;
|
|
8
|
+
private printCollection;
|
|
9
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DebugReplFn = void 0;
|
|
4
|
+
const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util");
|
|
5
|
+
const repl_function_1 = require("../repl-function");
|
|
6
|
+
class DebugReplFn extends repl_function_1.ReplFunction {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.fnDefinition = {
|
|
10
|
+
name: 'debug',
|
|
11
|
+
description: 'Print all registered modules as a list together with their controllers and providers.\nIf the argument is passed in, for example, "debug(MyModule)" then it will only print components of this specific module.',
|
|
12
|
+
signature: '(moduleCls?: ClassRef | string) => void',
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
action(moduleCls) {
|
|
16
|
+
this.ctx.writeToStdout('\n');
|
|
17
|
+
if (moduleCls) {
|
|
18
|
+
const token = typeof moduleCls === 'function' ? moduleCls.name : moduleCls;
|
|
19
|
+
const moduleEntry = this.ctx.debugRegistry[token];
|
|
20
|
+
if (!moduleEntry) {
|
|
21
|
+
return this.logger.error(`"${token}" has not been found in the modules registry`);
|
|
22
|
+
}
|
|
23
|
+
this.printCtrlsAndProviders(token, moduleEntry);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
Object.keys(this.ctx.debugRegistry).forEach(moduleKey => {
|
|
27
|
+
this.printCtrlsAndProviders(moduleKey, this.ctx.debugRegistry[moduleKey]);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
this.ctx.writeToStdout('\n');
|
|
31
|
+
}
|
|
32
|
+
printCtrlsAndProviders(moduleName, moduleDebugEntry) {
|
|
33
|
+
this.ctx.writeToStdout(`${cli_colors_util_1.clc.green(moduleName)}:\n`);
|
|
34
|
+
this.printCollection('controllers', moduleDebugEntry['controllers']);
|
|
35
|
+
this.printCollection('providers', moduleDebugEntry['providers']);
|
|
36
|
+
}
|
|
37
|
+
printCollection(title, collectionValue) {
|
|
38
|
+
const collectionEntries = Object.keys(collectionValue);
|
|
39
|
+
if (collectionEntries.length <= 0) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow(`- ${title}`)}:\n`);
|
|
43
|
+
collectionEntries.forEach(provider => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.green('◻')} ${provider}\n`));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.DebugReplFn = DebugReplFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Type } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from '../repl-function';
|
|
3
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
4
|
+
export declare class GetReplFn extends ReplFunction {
|
|
5
|
+
fnDefinition: ReplFnDefinition;
|
|
6
|
+
action(token: string | symbol | Function | Type<any>): any;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetReplFn = void 0;
|
|
4
|
+
const repl_function_1 = require("../repl-function");
|
|
5
|
+
class GetReplFn extends repl_function_1.ReplFunction {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.fnDefinition = {
|
|
9
|
+
name: 'get',
|
|
10
|
+
signature: '(token: InjectionToken) => any',
|
|
11
|
+
description: 'Retrieves an instance of either injectable or controller, otherwise, throws exception.',
|
|
12
|
+
aliases: ['$'],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
action(token) {
|
|
16
|
+
return this.ctx.app.get(token);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GetReplFn = GetReplFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReplFunction } from '../repl-function';
|
|
2
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
3
|
+
export declare class HelpReplFn extends ReplFunction {
|
|
4
|
+
fnDefinition: ReplFnDefinition;
|
|
5
|
+
static buildHelpMessage: ({ name, description }: ReplFnDefinition) => string;
|
|
6
|
+
action(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HelpReplFn = void 0;
|
|
4
|
+
const iterare_1 = require("iterare");
|
|
5
|
+
const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util");
|
|
6
|
+
const repl_function_1 = require("../repl-function");
|
|
7
|
+
class HelpReplFn extends repl_function_1.ReplFunction {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.fnDefinition = {
|
|
11
|
+
name: 'help',
|
|
12
|
+
signature: '() => void',
|
|
13
|
+
description: 'Display all available REPL native functions.',
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
action() {
|
|
17
|
+
const sortedNativeFunctions = (0, iterare_1.iterate)(this.ctx.nativeFunctions)
|
|
18
|
+
.map(([, nativeFunction]) => nativeFunction.fnDefinition)
|
|
19
|
+
.toArray()
|
|
20
|
+
.sort((a, b) => (a.name < b.name ? -1 : 1));
|
|
21
|
+
this.ctx.writeToStdout(`You can call ${cli_colors_util_1.clc.bold('.help')} on any function listed below (e.g.: ${cli_colors_util_1.clc.bold('help.help')}):\n\n` +
|
|
22
|
+
sortedNativeFunctions.map(HelpReplFn.buildHelpMessage).join('\n') +
|
|
23
|
+
// Without the following LF the last item won't be displayed
|
|
24
|
+
'\n');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.HelpReplFn = HelpReplFn;
|
|
28
|
+
HelpReplFn.buildHelpMessage = ({ name, description }) => cli_colors_util_1.clc.cyanBright(name) +
|
|
29
|
+
(description ? ` ${cli_colors_util_1.clc.bold('-')} ${description}` : '');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./help-repl-fn"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./get-repl-fn"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./resolve-repl-fn"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./select-relp-fn"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./debug-repl-fn"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./methods-repl-fn"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Type } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from '../repl-function';
|
|
3
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
4
|
+
export declare class MethodsReplFn extends ReplFunction {
|
|
5
|
+
fnDefinition: ReplFnDefinition;
|
|
6
|
+
private readonly metadataScanner;
|
|
7
|
+
action(token: Type<unknown> | string): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MethodsReplFn = void 0;
|
|
4
|
+
const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util");
|
|
5
|
+
const metadata_scanner_1 = require("../../metadata-scanner");
|
|
6
|
+
const repl_function_1 = require("../repl-function");
|
|
7
|
+
class MethodsReplFn extends repl_function_1.ReplFunction {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.fnDefinition = {
|
|
11
|
+
name: 'methods',
|
|
12
|
+
description: 'Display all public methods available on a given provider or controller.',
|
|
13
|
+
signature: '(token: ClassRef | string) => void',
|
|
14
|
+
};
|
|
15
|
+
this.metadataScanner = new metadata_scanner_1.MetadataScanner();
|
|
16
|
+
}
|
|
17
|
+
action(token) {
|
|
18
|
+
const proto = typeof token !== 'function'
|
|
19
|
+
? Object.getPrototypeOf(this.ctx.app.get(token))
|
|
20
|
+
: token?.prototype;
|
|
21
|
+
const methods = this.metadataScanner.getAllMethodNames(proto);
|
|
22
|
+
this.ctx.writeToStdout('\n');
|
|
23
|
+
this.ctx.writeToStdout(`${cli_colors_util_1.clc.green('Methods')}:\n`);
|
|
24
|
+
methods.forEach(methodName => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow('◻')} ${methodName}\n`));
|
|
25
|
+
this.ctx.writeToStdout('\n');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.MethodsReplFn = MethodsReplFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Type } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from '../repl-function';
|
|
3
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
4
|
+
export declare class ResolveReplFn extends ReplFunction {
|
|
5
|
+
fnDefinition: ReplFnDefinition;
|
|
6
|
+
action(token: string | symbol | Function | Type<any>, contextId: any): Promise<any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResolveReplFn = void 0;
|
|
4
|
+
const repl_function_1 = require("../repl-function");
|
|
5
|
+
class ResolveReplFn extends repl_function_1.ReplFunction {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.fnDefinition = {
|
|
9
|
+
name: 'resolve',
|
|
10
|
+
description: 'Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception.',
|
|
11
|
+
signature: '(token: InjectionToken, contextId: any) => Promise<any>',
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
action(token, contextId) {
|
|
15
|
+
return this.ctx.app.resolve(token, contextId);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ResolveReplFn = ResolveReplFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DynamicModule, INestApplicationContext, Type } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from '../repl-function';
|
|
3
|
+
import type { ReplFnDefinition } from '../repl.interfaces';
|
|
4
|
+
export declare class SelectReplFn extends ReplFunction {
|
|
5
|
+
fnDefinition: ReplFnDefinition;
|
|
6
|
+
action(token: DynamicModule | Type<unknown>): INestApplicationContext;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectReplFn = void 0;
|
|
4
|
+
const repl_function_1 = require("../repl-function");
|
|
5
|
+
class SelectReplFn extends repl_function_1.ReplFunction {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.fnDefinition = {
|
|
9
|
+
name: 'select',
|
|
10
|
+
description: 'Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.',
|
|
11
|
+
signature: '(token: DynamicModule | ClassRef) => INestApplicationContext',
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
action(token) {
|
|
15
|
+
return this.ctx.app.select(token);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.SelectReplFn = SelectReplFn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { INestApplicationContext, InjectionToken, Logger } from '@nestjs/common';
|
|
2
|
+
import { ReplFunction } from './repl-function';
|
|
3
|
+
import type { ReplFunctionClass } from './repl.interfaces';
|
|
4
|
+
type ModuleKey = string;
|
|
5
|
+
export type ModuleDebugEntry = {
|
|
6
|
+
controllers: Record<string, InjectionToken>;
|
|
7
|
+
providers: Record<string, InjectionToken>;
|
|
8
|
+
};
|
|
9
|
+
type ReplScope = Record<string, any>;
|
|
10
|
+
export declare class ReplContext {
|
|
11
|
+
readonly app: INestApplicationContext;
|
|
12
|
+
readonly logger: Logger;
|
|
13
|
+
debugRegistry: Record<ModuleKey, ModuleDebugEntry>;
|
|
14
|
+
readonly globalScope: ReplScope;
|
|
15
|
+
readonly nativeFunctions: Map<string, ReplFunction<unknown[], any>>;
|
|
16
|
+
private readonly container;
|
|
17
|
+
constructor(app: INestApplicationContext, nativeFunctionsClassRefs?: ReplFunctionClass[]);
|
|
18
|
+
writeToStdout(text: string): void;
|
|
19
|
+
private initializeContext;
|
|
20
|
+
private introspectCollection;
|
|
21
|
+
private stringifyToken;
|
|
22
|
+
private addNativeFunction;
|
|
23
|
+
private registerFunctionIntoGlobalScope;
|
|
24
|
+
private initializeNativeFunctions;
|
|
25
|
+
}
|
|
26
|
+
export {};
|