@trapi/metadata 0.1.5 → 0.1.6
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/dist/decorator/index.d.ts +1 -1
- package/dist/decorator/index.d.ts.map +1 -1
- package/dist/decorator/index.js +1 -3
- package/dist/decorator/index.js.map +1 -1
- package/dist/generator/index.d.ts +5 -33
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +15 -145
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/module.d.ts +41 -0
- package/dist/generator/module.d.ts.map +1 -0
- package/dist/generator/module.js +166 -0
- package/dist/generator/module.js.map +1 -0
- package/dist/type.d.ts +5 -0
- package/dist/type.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/decorator/index.js
CHANGED
|
@@ -16,12 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.getNodeDecorators = void 0;
|
|
20
19
|
__exportStar(require("./mapper"), exports);
|
|
21
20
|
__exportStar(require("./representation"), exports);
|
|
22
21
|
__exportStar(require("./utils"), exports);
|
|
23
22
|
__exportStar(require("./functions"), exports);
|
|
24
23
|
__exportStar(require("./type"), exports);
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, "getNodeDecorators", { enumerable: true, get: function () { return node_1.getNodeDecorators; } });
|
|
24
|
+
__exportStar(require("./utils"), exports);
|
|
27
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAEH,2CAAyB;AACzB,mDAAiC;AACjC,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
readonly nodes: Node[];
|
|
7
|
-
readonly typeChecker: TypeChecker;
|
|
8
|
-
readonly decoratorMapper: DecoratorMapper;
|
|
9
|
-
readonly config: Config;
|
|
10
|
-
private readonly program;
|
|
11
|
-
private cache;
|
|
12
|
-
private controllers;
|
|
13
|
-
private referenceTypes;
|
|
14
|
-
private circularDependencyResolvers;
|
|
15
|
-
constructor(config: Config, compilerOptions: CompilerOptions);
|
|
16
|
-
generate(): GeneratorOutput;
|
|
17
|
-
protected buildNodesFromSourceFiles(): number;
|
|
18
|
-
/**
|
|
19
|
-
* Check if the source file path is in the ignored path list.
|
|
20
|
-
*
|
|
21
|
-
* @param filePath
|
|
22
|
-
* @protected
|
|
23
|
-
*/
|
|
24
|
-
protected isIgnoredPath(filePath: string): boolean;
|
|
25
|
-
isExportedNode(node: Node): boolean;
|
|
26
|
-
addReferenceType(referenceType: Resolver.ReferenceType): void;
|
|
27
|
-
getReferenceType(refName: string): Resolver.ReferenceType;
|
|
28
|
-
registerDependencyResolver(callback: Resolver.DependencyResolver): void;
|
|
29
|
-
getClassDeclaration(className: string): Node;
|
|
30
|
-
getInterfaceDeclaration(className: string): Node;
|
|
31
|
-
private scanSourceFiles;
|
|
32
|
-
private buildControllers;
|
|
33
|
-
}
|
|
1
|
+
export * from './controller';
|
|
2
|
+
export * from './endpoint';
|
|
3
|
+
export * from './method';
|
|
4
|
+
export * from './module';
|
|
5
|
+
export * from './parameter';
|
|
34
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAOA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
package/dist/generator/index.js
CHANGED
|
@@ -5,150 +5,20 @@
|
|
|
5
5
|
* For the full copyright and license information,
|
|
6
6
|
* view the LICENSE file that was distributed with this source code.
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
8
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const resolver_1 = require("../resolver");
|
|
15
|
-
const driver_1 = require("../cache/driver");
|
|
16
|
-
const minimatch = require("minimatch");
|
|
17
|
-
class MetadataGenerator {
|
|
18
|
-
// -------------------------------------------------------------------------
|
|
19
|
-
constructor(config, compilerOptions) {
|
|
20
|
-
this.nodes = new Array();
|
|
21
|
-
this.referenceTypes = {};
|
|
22
|
-
this.circularDependencyResolvers = new Array();
|
|
23
|
-
this.config = config;
|
|
24
|
-
this.cache = new driver_1.CacheDriver(config.cache);
|
|
25
|
-
this.decoratorMapper = new mapper_1.DecoratorMapper(config.decorator);
|
|
26
|
-
resolver_1.TypeNodeResolver.clearCache();
|
|
27
|
-
const sourceFiles = this.scanSourceFiles(config.entryFile);
|
|
28
|
-
this.program = (0, typescript_1.createProgram)(sourceFiles, compilerOptions);
|
|
29
|
-
this.typeChecker = this.program.getTypeChecker();
|
|
30
|
-
}
|
|
31
|
-
// -------------------------------------------------------------------------
|
|
32
|
-
generate() {
|
|
33
|
-
const sourceFileSize = this.buildNodesFromSourceFiles();
|
|
34
|
-
let cache = this.cache.get(sourceFileSize);
|
|
35
|
-
if (!cache) {
|
|
36
|
-
this.buildControllers();
|
|
37
|
-
this.circularDependencyResolvers.forEach(resolve => resolve(this.referenceTypes));
|
|
38
|
-
cache = {
|
|
39
|
-
controllers: this.controllers,
|
|
40
|
-
referenceTypes: this.referenceTypes,
|
|
41
|
-
sourceFilesSize: sourceFileSize
|
|
42
|
-
};
|
|
43
|
-
this.cache.save(cache);
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
controllers: cache.controllers,
|
|
47
|
-
referenceTypes: cache.referenceTypes
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
buildNodesFromSourceFiles() {
|
|
51
|
-
let endSize = 0;
|
|
52
|
-
this.program.getSourceFiles().forEach((sf) => {
|
|
53
|
-
const isIgnored = this.isIgnoredPath(sf.fileName);
|
|
54
|
-
if (isIgnored) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
endSize += sf.end;
|
|
58
|
-
(0, typescript_1.forEachChild)(sf, (node) => {
|
|
59
|
-
if ((0, typescript_1.isModuleDeclaration)(node)) {
|
|
60
|
-
/**
|
|
61
|
-
* For some reason unknown to me, TS resolves both `declare module` and `namespace` to
|
|
62
|
-
* the same kind (`ModuleDeclaration`). In order to figure out whether it's one or the other,
|
|
63
|
-
* we check the node flags. They tell us whether it is a namespace or not.
|
|
64
|
-
*/
|
|
65
|
-
// tslint:disable-next-line:no-bitwise
|
|
66
|
-
if ((node.flags & typescript_1.NodeFlags.Namespace) === 0 && node.body && (0, typescript_1.isModuleBlock)(node.body)) {
|
|
67
|
-
node.body.statements.forEach(statement => {
|
|
68
|
-
this.nodes.push(statement);
|
|
69
|
-
});
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
this.nodes.push(node);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
return endSize;
|
|
77
|
-
}
|
|
78
|
-
// -------------------------------------------------------------------------
|
|
79
|
-
/**
|
|
80
|
-
* Check if the source file path is in the ignored path list.
|
|
81
|
-
*
|
|
82
|
-
* @param filePath
|
|
83
|
-
* @protected
|
|
84
|
-
*/
|
|
85
|
-
isIgnoredPath(filePath) {
|
|
86
|
-
if (typeof this.config.ignore === 'undefined') {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return this.config.ignore.some(item => minimatch(filePath, item));
|
|
90
|
-
}
|
|
91
|
-
// -------------------------------------------------------------------------
|
|
92
|
-
isExportedNode(node) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
// -------------------------------------------------------------------------
|
|
96
|
-
addReferenceType(referenceType) {
|
|
97
|
-
if (!referenceType.refName) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.referenceTypes[referenceType.refName] = referenceType;
|
|
101
|
-
}
|
|
102
|
-
getReferenceType(refName) {
|
|
103
|
-
return this.referenceTypes[refName];
|
|
104
|
-
}
|
|
105
|
-
registerDependencyResolver(callback) {
|
|
106
|
-
this.circularDependencyResolvers.push(callback);
|
|
107
|
-
}
|
|
108
|
-
getClassDeclaration(className) {
|
|
109
|
-
const found = this.nodes
|
|
110
|
-
.filter(node => {
|
|
111
|
-
const classDeclaration = node;
|
|
112
|
-
return (node.kind === typescript_1.SyntaxKind.ClassDeclaration && classDeclaration.name && classDeclaration.name.text === className);
|
|
113
|
-
});
|
|
114
|
-
if (found && found.length) {
|
|
115
|
-
return found[0];
|
|
116
|
-
}
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
getInterfaceDeclaration(className) {
|
|
120
|
-
const found = this.nodes
|
|
121
|
-
.filter(node => {
|
|
122
|
-
const interfaceDeclaration = node;
|
|
123
|
-
return (node.kind === typescript_1.SyntaxKind.InterfaceDeclaration && interfaceDeclaration.name && interfaceDeclaration.name.text === className);
|
|
124
|
-
});
|
|
125
|
-
if (found && found.length) {
|
|
126
|
-
return found[0];
|
|
127
|
-
}
|
|
128
|
-
return undefined;
|
|
129
|
-
}
|
|
130
|
-
scanSourceFiles(sourceFiles) {
|
|
131
|
-
const sourceFilesExpressions = Array.isArray(sourceFiles) ? sourceFiles : [sourceFiles];
|
|
132
|
-
const result = new Set();
|
|
133
|
-
const options = { cwd: process.cwd() };
|
|
134
|
-
sourceFilesExpressions.forEach(pattern => {
|
|
135
|
-
const matches = (0, glob_1.sync)(pattern, options);
|
|
136
|
-
matches.forEach(file => { result.add(file); });
|
|
137
|
-
});
|
|
138
|
-
return Array.from(result);
|
|
139
|
-
}
|
|
140
|
-
buildControllers() {
|
|
141
|
-
this.controllers = this.nodes
|
|
142
|
-
.filter(node => node.kind === typescript_1.SyntaxKind.ClassDeclaration)
|
|
143
|
-
.filter(node => {
|
|
144
|
-
const isHidden = this.decoratorMapper.match('HIDDEN', node);
|
|
145
|
-
return typeof isHidden === 'undefined';
|
|
146
|
-
})
|
|
147
|
-
.filter(node => typeof this.decoratorMapper.match('CLASS_PATH', node) !== 'undefined')
|
|
148
|
-
.map((classDeclaration) => new controller_1.ControllerGenerator(classDeclaration, this))
|
|
149
|
-
.filter(generator => generator.isValid())
|
|
150
|
-
.map(generator => generator.generate());
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
exports.MetadataGenerator = MetadataGenerator;
|
|
19
|
+
__exportStar(require("./controller"), exports);
|
|
20
|
+
__exportStar(require("./endpoint"), exports);
|
|
21
|
+
__exportStar(require("./method"), exports);
|
|
22
|
+
__exportStar(require("./module"), exports);
|
|
23
|
+
__exportStar(require("./parameter"), exports);
|
|
154
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CompilerOptions, Node, TypeChecker } from 'typescript';
|
|
2
|
+
import { Config, GeneratorOutput } from "../type";
|
|
3
|
+
import { DecoratorMapper } from "../decorator";
|
|
4
|
+
import { Resolver } from "../resolver";
|
|
5
|
+
export declare class MetadataGenerator {
|
|
6
|
+
readonly nodes: Node[];
|
|
7
|
+
readonly typeChecker: TypeChecker;
|
|
8
|
+
readonly decoratorMapper: DecoratorMapper;
|
|
9
|
+
readonly config: Config;
|
|
10
|
+
private readonly program;
|
|
11
|
+
private cache;
|
|
12
|
+
private controllers;
|
|
13
|
+
private referenceTypes;
|
|
14
|
+
private circularDependencyResolvers;
|
|
15
|
+
constructor(config: Config, compilerOptions: CompilerOptions);
|
|
16
|
+
generate(): GeneratorOutput;
|
|
17
|
+
protected buildNodesFromSourceFiles(): number;
|
|
18
|
+
/**
|
|
19
|
+
* Check if the source file path is in the ignored path list.
|
|
20
|
+
*
|
|
21
|
+
* @param filePath
|
|
22
|
+
* @protected
|
|
23
|
+
*/
|
|
24
|
+
protected isIgnoredPath(filePath: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Check if the source file path is in the ignored path list.
|
|
27
|
+
*
|
|
28
|
+
* @param filePath
|
|
29
|
+
* @protected
|
|
30
|
+
*/
|
|
31
|
+
protected isAllowedPath(filePath: string): boolean;
|
|
32
|
+
isExportedNode(node: Node): boolean;
|
|
33
|
+
addReferenceType(referenceType: Resolver.ReferenceType): void;
|
|
34
|
+
getReferenceType(refName: string): Resolver.ReferenceType;
|
|
35
|
+
registerDependencyResolver(callback: Resolver.DependencyResolver): void;
|
|
36
|
+
getClassDeclaration(className: string): Node;
|
|
37
|
+
getInterfaceDeclaration(className: string): Node;
|
|
38
|
+
private scanSourceFiles;
|
|
39
|
+
private buildControllers;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/generator/module.ts"],"names":[],"mappings":"AAQA,OAAO,EAEH,eAAe,EAMf,IAAI,EAKJ,WAAW,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,MAAM,EAAc,eAAe,EAAC,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAKrC,qBAAa,iBAAiB;IAC1B,SAAgB,KAAK,SAAqB;IAC1C,SAAgB,WAAW,EAAE,WAAW,CAAC;IAEzC,SAAgB,eAAe,EAAE,eAAe,CAAC;IAEjD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAElC,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,cAAc,CAA+B;IAErD,OAAO,CAAC,2BAA2B,CAA4C;gBAK3E,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe;IAgB7B,QAAQ,IAAI,eAAe;IAyBlC,SAAS,CAAC,yBAAyB,IAAK,MAAM;IAwC9C;;;;;OAKG;IACH,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAI,OAAO;IAQnD;;;;;OAKG;IACH,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM;IAUjC,cAAc,CAAC,IAAI,EAAE,IAAI;IAMzB,gBAAgB,CAAC,aAAa,EAAE,QAAQ,CAAC,aAAa;IAQtD,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAIhC,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,kBAAkB;IAIhE,mBAAmB,CAAC,SAAS,EAAE,MAAM;IAYrC,uBAAuB,CAAC,SAAS,EAAE,MAAM;IAYhD,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,gBAAgB;CAa3B"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022.
|
|
4
|
+
* Author Peter Placzek (tada5hi)
|
|
5
|
+
* For the full copyright and license information,
|
|
6
|
+
* view the LICENSE file that was distributed with this source code.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MetadataGenerator = void 0;
|
|
10
|
+
const glob_1 = require("glob");
|
|
11
|
+
const typescript_1 = require("typescript");
|
|
12
|
+
const decorator_1 = require("../decorator");
|
|
13
|
+
const controller_1 = require("./controller");
|
|
14
|
+
const resolver_1 = require("../resolver");
|
|
15
|
+
const cache_1 = require("../cache");
|
|
16
|
+
const minimatch = require("minimatch");
|
|
17
|
+
class MetadataGenerator {
|
|
18
|
+
// -------------------------------------------------------------------------
|
|
19
|
+
constructor(config, compilerOptions) {
|
|
20
|
+
this.nodes = new Array();
|
|
21
|
+
this.referenceTypes = {};
|
|
22
|
+
this.circularDependencyResolvers = new Array();
|
|
23
|
+
this.config = config;
|
|
24
|
+
this.cache = new cache_1.CacheDriver(config.cache);
|
|
25
|
+
this.decoratorMapper = new decorator_1.DecoratorMapper(config.decorator);
|
|
26
|
+
resolver_1.TypeNodeResolver.clearCache();
|
|
27
|
+
const sourceFiles = this.scanSourceFiles(config.entryFile);
|
|
28
|
+
this.program = (0, typescript_1.createProgram)(sourceFiles, compilerOptions);
|
|
29
|
+
this.typeChecker = this.program.getTypeChecker();
|
|
30
|
+
}
|
|
31
|
+
// -------------------------------------------------------------------------
|
|
32
|
+
generate() {
|
|
33
|
+
const sourceFileSize = this.buildNodesFromSourceFiles();
|
|
34
|
+
let cache = this.cache.get(sourceFileSize);
|
|
35
|
+
if (!cache) {
|
|
36
|
+
this.buildControllers();
|
|
37
|
+
this.circularDependencyResolvers.forEach(resolve => resolve(this.referenceTypes));
|
|
38
|
+
cache = {
|
|
39
|
+
controllers: this.controllers,
|
|
40
|
+
referenceTypes: this.referenceTypes,
|
|
41
|
+
sourceFilesSize: sourceFileSize
|
|
42
|
+
};
|
|
43
|
+
this.cache.save(cache);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
controllers: cache.controllers,
|
|
47
|
+
referenceTypes: cache.referenceTypes
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
buildNodesFromSourceFiles() {
|
|
51
|
+
let endSize = 0;
|
|
52
|
+
this.program.getSourceFiles().forEach((sf) => {
|
|
53
|
+
if (this.isIgnoredPath(sf.fileName) &&
|
|
54
|
+
!this.isAllowedPath(sf.fileName)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
endSize += sf.end;
|
|
58
|
+
(0, typescript_1.forEachChild)(sf, (node) => {
|
|
59
|
+
if ((0, typescript_1.isModuleDeclaration)(node)) {
|
|
60
|
+
/**
|
|
61
|
+
* For some reason unknown to me, TS resolves both `declare module` and `namespace` to
|
|
62
|
+
* the same kind (`ModuleDeclaration`). In order to figure out whether it's one or the other,
|
|
63
|
+
* we check the node flags. They tell us whether it is a namespace or not.
|
|
64
|
+
*/
|
|
65
|
+
// tslint:disable-next-line:no-bitwise
|
|
66
|
+
if ((node.flags & typescript_1.NodeFlags.Namespace) === 0 && node.body && (0, typescript_1.isModuleBlock)(node.body)) {
|
|
67
|
+
node.body.statements.forEach(statement => {
|
|
68
|
+
this.nodes.push(statement);
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
this.nodes.push(node);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return endSize;
|
|
77
|
+
}
|
|
78
|
+
// -------------------------------------------------------------------------
|
|
79
|
+
/**
|
|
80
|
+
* Check if the source file path is in the ignored path list.
|
|
81
|
+
*
|
|
82
|
+
* @param filePath
|
|
83
|
+
* @protected
|
|
84
|
+
*/
|
|
85
|
+
isIgnoredPath(filePath) {
|
|
86
|
+
if (typeof this.config.ignore === 'undefined') {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return this.config.ignore.some(item => minimatch(filePath, item));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if the source file path is in the ignored path list.
|
|
93
|
+
*
|
|
94
|
+
* @param filePath
|
|
95
|
+
* @protected
|
|
96
|
+
*/
|
|
97
|
+
isAllowedPath(filePath) {
|
|
98
|
+
if (typeof this.config.allow === 'undefined') {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
return this.config.allow.some(item => minimatch(filePath, item));
|
|
102
|
+
}
|
|
103
|
+
// -------------------------------------------------------------------------
|
|
104
|
+
isExportedNode(node) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
// -------------------------------------------------------------------------
|
|
108
|
+
addReferenceType(referenceType) {
|
|
109
|
+
if (!referenceType.refName) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.referenceTypes[referenceType.refName] = referenceType;
|
|
113
|
+
}
|
|
114
|
+
getReferenceType(refName) {
|
|
115
|
+
return this.referenceTypes[refName];
|
|
116
|
+
}
|
|
117
|
+
registerDependencyResolver(callback) {
|
|
118
|
+
this.circularDependencyResolvers.push(callback);
|
|
119
|
+
}
|
|
120
|
+
getClassDeclaration(className) {
|
|
121
|
+
const found = this.nodes
|
|
122
|
+
.filter(node => {
|
|
123
|
+
const classDeclaration = node;
|
|
124
|
+
return (node.kind === typescript_1.SyntaxKind.ClassDeclaration && classDeclaration.name && classDeclaration.name.text === className);
|
|
125
|
+
});
|
|
126
|
+
if (found && found.length) {
|
|
127
|
+
return found[0];
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
getInterfaceDeclaration(className) {
|
|
132
|
+
const found = this.nodes
|
|
133
|
+
.filter(node => {
|
|
134
|
+
const interfaceDeclaration = node;
|
|
135
|
+
return (node.kind === typescript_1.SyntaxKind.InterfaceDeclaration && interfaceDeclaration.name && interfaceDeclaration.name.text === className);
|
|
136
|
+
});
|
|
137
|
+
if (found && found.length) {
|
|
138
|
+
return found[0];
|
|
139
|
+
}
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
scanSourceFiles(sourceFiles) {
|
|
143
|
+
const sourceFilesExpressions = Array.isArray(sourceFiles) ? sourceFiles : [sourceFiles];
|
|
144
|
+
const result = new Set();
|
|
145
|
+
const options = { cwd: process.cwd() };
|
|
146
|
+
sourceFilesExpressions.forEach(pattern => {
|
|
147
|
+
const matches = (0, glob_1.sync)(pattern, options);
|
|
148
|
+
matches.forEach(file => { result.add(file); });
|
|
149
|
+
});
|
|
150
|
+
return Array.from(result);
|
|
151
|
+
}
|
|
152
|
+
buildControllers() {
|
|
153
|
+
this.controllers = this.nodes
|
|
154
|
+
.filter(node => node.kind === typescript_1.SyntaxKind.ClassDeclaration)
|
|
155
|
+
.filter(node => {
|
|
156
|
+
const isHidden = this.decoratorMapper.match('HIDDEN', node);
|
|
157
|
+
return typeof isHidden === 'undefined';
|
|
158
|
+
})
|
|
159
|
+
.filter(node => typeof this.decoratorMapper.match('CLASS_PATH', node) !== 'undefined')
|
|
160
|
+
.map((classDeclaration) => new controller_1.ControllerGenerator(classDeclaration, this))
|
|
161
|
+
.filter(generator => generator.isValid())
|
|
162
|
+
.map(generator => generator.generate());
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.MetadataGenerator = MetadataGenerator;
|
|
166
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/generator/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA0B;AAC1B,2CAcoB;AAEpB,4CAA6C;AAC7C,6CAAiD;AACjD,0CAA6C;AAE7C,oCAAqC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEvC,MAAa,iBAAiB;IAgB1B,4EAA4E;IAE5E,YACI,MAAc,EACd,eAAgC;QAnBpB,UAAK,GAAG,IAAI,KAAK,EAAQ,CAAC;QAWlC,mBAAc,GAA4B,EAAE,CAAC;QAE7C,gCAA2B,GAAG,IAAI,KAAK,EAA+B,CAAC;QAQ3E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,2BAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE7D,2BAAgB,CAAC,UAAU,EAAE,CAAC;QAE9B,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,I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S,CAAC,OAAO,EAAE,CAAC;aACxC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ;AA1MD,8CA0MC"}
|
package/dist/type.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export interface Config {
|
|
|
11
11
|
* Default: []
|
|
12
12
|
*/
|
|
13
13
|
ignore?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Directory to allow during TypeScript files scan.
|
|
16
|
+
* Default: []
|
|
17
|
+
*/
|
|
18
|
+
allow?: string[];
|
|
14
19
|
/**
|
|
15
20
|
* Directory to store and cache metadata cache files.
|
|
16
21
|
* Default: false
|
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,MAAM,WAAW,MAAM;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,MAAM,WAAW,MAAM;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE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,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,QAAQ;IACrB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,QAAQ,CAAC,uBAAuB,GAAG,QAAQ,CAAC,aAAa,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAE9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trapi/metadata",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Generate REST-API metadata scheme from TypeScript Decorators.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/glob": "^7.2.0",
|
|
34
|
-
"@types/jest": "^27.0
|
|
34
|
+
"@types/jest": "^27.4.0",
|
|
35
35
|
"@types/minimatch": "^3.0.5",
|
|
36
36
|
"@types/node": "^16.11.12",
|
|
37
37
|
"@types/yup": "^0.29.13",
|
|
38
|
-
"jest": "^27.4.
|
|
38
|
+
"jest": "^27.4.7",
|
|
39
39
|
"jsonata": "^1.8.5",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@trapi/metadata-utils": "^0.0.4",
|
|
44
|
-
"glob": "^7.
|
|
44
|
+
"glob": "^7.2.0",
|
|
45
45
|
"minimatch": "^3.0.4",
|
|
46
46
|
"typescript": "^4.5.4",
|
|
47
47
|
"yup": "^0.32.11"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "62b194d06e2fe4bcce24df6306cfcdfa7c1479a6"
|
|
53
53
|
}
|