@nestjs/core 12.0.0-alpha.3 → 12.0.0-alpha.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.4",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"uid": "2.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@nestjs/common": "^12.0.0-alpha.
|
|
50
|
+
"@nestjs/common": "^12.0.0-alpha.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@nestjs/common": "^11.0.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"optional": true
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "415e4d33707e74998d8456be7bd305cedb6508e3"
|
|
72
72
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@nestjs/common';
|
|
2
|
-
import { InstanceWrapper } from '../instance-wrapper';
|
|
3
|
-
/**
|
|
4
|
-
* Returns the instances which are transient
|
|
5
|
-
* @param instances The instances which should be checked whether they are transient
|
|
6
|
-
*/
|
|
7
|
-
export declare function getTransientInstances(instances: [InjectionToken, InstanceWrapper][]): InstanceWrapper[];
|
|
8
|
-
/**
|
|
9
|
-
* Returns the instances which are not transient
|
|
10
|
-
* @param instances The instances which should be checked whether they are transient
|
|
11
|
-
*/
|
|
12
|
-
export declare function getNonTransientInstances(instances: [InjectionToken, InstanceWrapper][]): InstanceWrapper[];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTransientInstances = getTransientInstances;
|
|
4
|
-
exports.getNonTransientInstances = getNonTransientInstances;
|
|
5
|
-
const iterare_1 = require("iterare");
|
|
6
|
-
/**
|
|
7
|
-
* Returns the instances which are transient
|
|
8
|
-
* @param instances The instances which should be checked whether they are transient
|
|
9
|
-
*/
|
|
10
|
-
function getTransientInstances(instances) {
|
|
11
|
-
return (0, iterare_1.iterate)(instances)
|
|
12
|
-
.filter(([_, wrapper]) => wrapper.isDependencyTreeStatic())
|
|
13
|
-
.map(([_, wrapper]) => wrapper.getStaticTransientInstances())
|
|
14
|
-
.flatten()
|
|
15
|
-
.filter(item => !!item)
|
|
16
|
-
.map(({ instance }) => instance)
|
|
17
|
-
.toArray();
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Returns the instances which are not transient
|
|
21
|
-
* @param instances The instances which should be checked whether they are transient
|
|
22
|
-
*/
|
|
23
|
-
function getNonTransientInstances(instances) {
|
|
24
|
-
return (0, iterare_1.iterate)(instances)
|
|
25
|
-
.filter(([key, wrapper]) => wrapper.isDependencyTreeStatic() && !wrapper.isTransient)
|
|
26
|
-
.map(([key, { instance }]) => instance)
|
|
27
|
-
.toArray();
|
|
28
|
-
}
|