@spinajs/reflection 2.0.46 → 2.0.50
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/lib/index.d.ts +2 -9
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +36 -87
- package/lib/index.js.map +1 -1
- package/package.json +49 -46
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exception } from '
|
|
1
|
+
import { Exception } from '../../exceptions/lib/index.js';
|
|
2
2
|
export * from 'typescript-mix';
|
|
3
3
|
/**
|
|
4
4
|
* Class info structure
|
|
@@ -53,11 +53,4 @@ export declare class TypescriptCompiler {
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
export declare function ResolveFromFiles(filter: string, configPath: string, typeMatcher?: (fileName: string) => string): (target: any, propertyKey: string | symbol) => void;
|
|
56
|
-
|
|
57
|
-
* Returns list of class types found in specified path. It do not resolve / create instances
|
|
58
|
-
*
|
|
59
|
-
* @param filter - files to look at, uses glob pattern to search
|
|
60
|
-
* @param configPath - dir paths taken from app config eg. "system.dirs.controllers". Path MUST be avaible in configuration
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
export declare function ListFromFiles(filter: string, configPath: string, typeMatcher?: (fileName: string) => string): (target: any, propertyKey: string | symbol) => void;
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAmB,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG3E,cAAc,gBAAgB,CAAC;AAE/B;;GAEG;AACH,qBAAa,SAAS,CAAC,CAAC;IACtB;;OAEG;IACI,IAAI,EAAE,MAAM,CAAC;IACpB;;OAEG;IACI,IAAI,EAAE,MAAM,CAAC;IACpB;;OAEG;IACI,IAAI,EAAE,GAAG,CAAC;IAEjB;;OAEG;IACI,QAAQ,CAAC,EAAE,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;CAAG;AAErD;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,QAAQ,CAAa;gBAEjB,QAAQ,EAAE,MAAM;IAS5B;;;;;OAKG;IACI,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAsB3D,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,cAAc;CAUvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,uDAE9G"}
|
package/lib/index.js
CHANGED
|
@@ -1,57 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ListFromFiles = exports.ResolveFromFiles = exports.TypescriptCompiler = exports.ReflectionException = exports.ClassInfo = void 0;
|
|
30
|
-
const fs = __importStar(require("fs"));
|
|
31
|
-
const glob = __importStar(require("glob"));
|
|
32
|
-
const path = __importStar(require("path"));
|
|
33
|
-
const ts = __importStar(require("typescript"));
|
|
34
|
-
const configuration_1 = require("@spinajs/configuration");
|
|
35
|
-
const di_1 = require("@spinajs/di");
|
|
36
|
-
const exceptions_1 = require("@spinajs/exceptions");
|
|
37
|
-
const log_1 = require("@spinajs/log");
|
|
38
|
-
__exportStar(require("typescript-mix"), exports);
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import glob from 'glob';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import * as ts from 'typescript';
|
|
5
|
+
import { Configuration } from '@spinajs/configuration';
|
|
6
|
+
import { AsyncService, DI } from '@spinajs/di';
|
|
7
|
+
import { InvalidArgument, Exception } from '../../exceptions/lib/index.js';
|
|
8
|
+
import { Log } from '@spinajs/log';
|
|
9
|
+
export * from 'typescript-mix';
|
|
39
10
|
/**
|
|
40
11
|
* Class info structure
|
|
41
12
|
*/
|
|
42
|
-
class ClassInfo {
|
|
13
|
+
export class ClassInfo {
|
|
43
14
|
}
|
|
44
|
-
exports.ClassInfo = ClassInfo;
|
|
45
15
|
/**
|
|
46
16
|
* Exception thrown when some error during reflection occurs
|
|
47
17
|
*/
|
|
48
|
-
class ReflectionException extends
|
|
18
|
+
export class ReflectionException extends Exception {
|
|
49
19
|
}
|
|
50
|
-
exports.ReflectionException = ReflectionException;
|
|
51
20
|
/**
|
|
52
21
|
* Helper class for extracting various information from typescript source code
|
|
53
22
|
*/
|
|
54
|
-
class TypescriptCompiler {
|
|
23
|
+
export class TypescriptCompiler {
|
|
55
24
|
constructor(filename) {
|
|
56
25
|
this.tsFile = filename;
|
|
57
26
|
this.compiled = ts.createProgram([this.tsFile], {
|
|
@@ -98,7 +67,6 @@ class TypescriptCompiler {
|
|
|
98
67
|
};
|
|
99
68
|
}
|
|
100
69
|
}
|
|
101
|
-
exports.TypescriptCompiler = TypescriptCompiler;
|
|
102
70
|
/**
|
|
103
71
|
* Returns resolved instances of classes from specified files.
|
|
104
72
|
* It automatically checks if should resolve promise or not, calls resolve strategy, checks if should return new or signleton etc, resolves
|
|
@@ -108,28 +76,16 @@ exports.TypescriptCompiler = TypescriptCompiler;
|
|
|
108
76
|
* @param configPath - dir paths taken from app config eg. "system.dirs.controllers". Path MUST be avaible in configuration
|
|
109
77
|
*
|
|
110
78
|
*/
|
|
111
|
-
function ResolveFromFiles(filter, configPath, typeMatcher) {
|
|
112
|
-
return _listOrResolveFromFiles(filter, configPath,
|
|
113
|
-
}
|
|
114
|
-
exports.ResolveFromFiles = ResolveFromFiles;
|
|
115
|
-
/**
|
|
116
|
-
* Returns list of class types found in specified path. It do not resolve / create instances
|
|
117
|
-
*
|
|
118
|
-
* @param filter - files to look at, uses glob pattern to search
|
|
119
|
-
* @param configPath - dir paths taken from app config eg. "system.dirs.controllers". Path MUST be avaible in configuration
|
|
120
|
-
*
|
|
121
|
-
*/
|
|
122
|
-
function ListFromFiles(filter, configPath, typeMatcher) {
|
|
123
|
-
return _listOrResolveFromFiles(filter, configPath, false, typeMatcher);
|
|
79
|
+
export function ResolveFromFiles(filter, configPath, typeMatcher) {
|
|
80
|
+
return _listOrResolveFromFiles(filter, configPath, typeMatcher);
|
|
124
81
|
}
|
|
125
|
-
|
|
126
|
-
function _listOrResolveFromFiles(filter, configPath, resolve, typeMatcher) {
|
|
82
|
+
function _listOrResolveFromFiles(filter, configPath, typeMatcher) {
|
|
127
83
|
return (target, propertyKey) => {
|
|
128
84
|
if (!filter) {
|
|
129
|
-
throw new
|
|
85
|
+
throw new InvalidArgument('filter parameter is null or empty');
|
|
130
86
|
}
|
|
131
87
|
if (!configPath) {
|
|
132
|
-
throw new
|
|
88
|
+
throw new InvalidArgument('configPath parameter is null or empty');
|
|
133
89
|
}
|
|
134
90
|
let instances = null;
|
|
135
91
|
const getter = () => {
|
|
@@ -142,9 +98,9 @@ function _listOrResolveFromFiles(filter, configPath, resolve, typeMatcher) {
|
|
|
142
98
|
enumerable: true,
|
|
143
99
|
get: getter,
|
|
144
100
|
});
|
|
145
|
-
function _loadInstances() {
|
|
146
|
-
const config =
|
|
147
|
-
const logger =
|
|
101
|
+
async function _loadInstances() {
|
|
102
|
+
const config = DI.get(Configuration);
|
|
103
|
+
const logger = DI.resolve(Log, ['reflection']);
|
|
148
104
|
let directories = config.get(configPath);
|
|
149
105
|
if (!directories || directories.length === 0) {
|
|
150
106
|
return [];
|
|
@@ -152,8 +108,8 @@ function _listOrResolveFromFiles(filter, configPath, resolve, typeMatcher) {
|
|
|
152
108
|
if (!Array.isArray(directories)) {
|
|
153
109
|
directories = [directories];
|
|
154
110
|
}
|
|
155
|
-
|
|
156
|
-
const
|
|
111
|
+
// eslint-disable -next-line @typescript-eslint/await-thenable
|
|
112
|
+
const fPromises = directories
|
|
157
113
|
.filter((d) => {
|
|
158
114
|
/* eslint-disable */
|
|
159
115
|
const exists = fs.existsSync(path.normalize(d));
|
|
@@ -166,15 +122,12 @@ function _listOrResolveFromFiles(filter, configPath, resolve, typeMatcher) {
|
|
|
166
122
|
.flatMap((f) => {
|
|
167
123
|
logger.trace(`Loading file ${f}`);
|
|
168
124
|
/* eslint-disable */
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (type.prototype instanceof di_1.AsyncService) {
|
|
176
|
-
promised = true;
|
|
177
|
-
return di_1.DI.resolve(type).then((instance) => {
|
|
125
|
+
return import(`file://${f}`).then((fTypes) => {
|
|
126
|
+
for (const key of Object.keys(fTypes)) {
|
|
127
|
+
const nameToResolve = typeMatcher ? typeMatcher(path.parse(f).name, key) : key;
|
|
128
|
+
const type = fTypes[`${nameToResolve}`];
|
|
129
|
+
if (type.prototype instanceof AsyncService) {
|
|
130
|
+
return DI.resolve(type).then((instance) => {
|
|
178
131
|
return {
|
|
179
132
|
file: f,
|
|
180
133
|
instance,
|
|
@@ -183,20 +136,16 @@ function _listOrResolveFromFiles(filter, configPath, resolve, typeMatcher) {
|
|
|
183
136
|
};
|
|
184
137
|
});
|
|
185
138
|
}
|
|
139
|
+
return Promise.resolve({
|
|
140
|
+
file: f,
|
|
141
|
+
instance: DI.resolve(type),
|
|
142
|
+
name: nameToResolve,
|
|
143
|
+
type,
|
|
144
|
+
});
|
|
186
145
|
}
|
|
187
|
-
|
|
188
|
-
file: f,
|
|
189
|
-
instance: resolve ? di_1.DI.resolve(type) : null,
|
|
190
|
-
name: nameToResolve,
|
|
191
|
-
type,
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
if (types.length === 0) {
|
|
195
|
-
throw new ReflectionException(`cannot find any exported class in file ${f}`);
|
|
196
|
-
}
|
|
197
|
-
return types;
|
|
146
|
+
});
|
|
198
147
|
});
|
|
199
|
-
return
|
|
148
|
+
return Promise.all(fPromises);
|
|
200
149
|
}
|
|
201
150
|
};
|
|
202
151
|
}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAS,EAAE,EAAE,MAAM,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|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@spinajs/
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@spinajs/reflection",
|
|
3
|
+
"version": "2.0.50",
|
|
4
|
+
"description": "SpinaJS reflection helpers",
|
|
5
|
+
"exports": "./lib/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"private": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=16.11"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "npm run clean && npm run compile",
|
|
13
|
+
"compile": "tsc -b tsconfig.json",
|
|
14
|
+
"rimraf": "./node_modules/rimraf/bin.js",
|
|
15
|
+
"clean": "rimraf lib/ && rimraf tsconfig.tsbuildinfo",
|
|
16
|
+
"test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
|
|
17
|
+
"coverage": "nyc npm run test",
|
|
18
|
+
"build-docs": "rimraf docs && typedoc --options typedoc.json src/",
|
|
19
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
20
|
+
"lint": "eslint -c .eslintrc.cjs --ext .ts src --fix",
|
|
21
|
+
"preversion": "npm run lint",
|
|
22
|
+
"version": "npm run format && git add -A src",
|
|
23
|
+
"postinstall": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"lib/**/*"
|
|
27
|
+
],
|
|
28
|
+
"author": "SpinaJS <spinajs@coderush.pl> (https://github.com/spinajs/core)",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/spinajs/reflection/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/spinajs/reflection#readme",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@spinajs/configuration": "^2.0.46",
|
|
36
|
+
"@spinajs/di": "^2.0.46",
|
|
37
|
+
"@spinajs/exceptions": "^2.0.39",
|
|
38
|
+
"@spinajs/log": "^2.0.46",
|
|
39
|
+
"glob": "^8.1.0",
|
|
40
|
+
"lodash": "^4.17.21",
|
|
41
|
+
"typescript": "^4.9.4",
|
|
42
|
+
"typescript-mix": "^3.1.3"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/glob": "8.0.1",
|
|
46
|
+
"@types/node": "^18.11.18"
|
|
47
|
+
},
|
|
48
|
+
"gitHead": "002dc553b0ffffd72193d0121ac425a4083bc9ee"
|
|
49
|
+
}
|