nestjs-docfy 0.2.0 → 0.2.2
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.
|
@@ -4,12 +4,26 @@ export interface ParamInfo {
|
|
|
4
4
|
type: string;
|
|
5
5
|
nestDecorator: string | null;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* A resolved DTO/entity type suitable for use in ApiResponse({ type: ... }).
|
|
9
|
+
* Only set when the return type resolves to a named class or interface from
|
|
10
|
+
* a source file — primitives, inline objects, and unresolvable types are null.
|
|
11
|
+
*/
|
|
12
|
+
export interface ResponseTypeInfo {
|
|
13
|
+
/** Short identifier name, e.g. "RegisterResponseDto" */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Absolute path to the file that declares the type */
|
|
16
|
+
absolutePath: string;
|
|
17
|
+
/** True when the original return type was an array, e.g. Promise<User[]> */
|
|
18
|
+
isArray: boolean;
|
|
19
|
+
}
|
|
7
20
|
export interface MethodInfo {
|
|
8
21
|
name: string;
|
|
9
22
|
httpDecorator: string | null;
|
|
10
23
|
httpPath: string | null;
|
|
11
24
|
params: ParamInfo[];
|
|
12
25
|
returnType: string;
|
|
26
|
+
responseType: ResponseTypeInfo | null;
|
|
13
27
|
isAsync: boolean;
|
|
14
28
|
isInherited: boolean;
|
|
15
29
|
inheritedFrom: string | null;
|
|
@@ -10,6 +10,14 @@ const NEST_PARAM_DECORATORS = new Set([
|
|
|
10
10
|
'Param', 'Body', 'Query', 'Headers', 'Req', 'Res', 'Request',
|
|
11
11
|
'Response', 'Session', 'UploadedFile', 'UploadedFiles', 'Ip', 'HostParam',
|
|
12
12
|
]);
|
|
13
|
+
/** Primitives and built-ins that should never appear as ApiResponse type. */
|
|
14
|
+
const SKIP_TYPE_NAMES = new Set([
|
|
15
|
+
'void', 'undefined', 'null', 'never', 'unknown', 'any',
|
|
16
|
+
'string', 'number', 'boolean', 'object', 'symbol', 'bigint',
|
|
17
|
+
'String', 'Number', 'Boolean', 'Object', 'Array',
|
|
18
|
+
'Promise', 'Observable', 'Subject', 'BehaviorSubject',
|
|
19
|
+
]);
|
|
20
|
+
const IDENTIFIER_RE = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/;
|
|
13
21
|
function getDecoratorName(dec) {
|
|
14
22
|
try {
|
|
15
23
|
return dec.getName() ?? null;
|
|
@@ -59,6 +67,76 @@ function extractParams(method) {
|
|
|
59
67
|
return [];
|
|
60
68
|
}
|
|
61
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Unwraps Promise<T> → T, and Observable<T> → T.
|
|
72
|
+
* Returns the original type if it's not a wrapper.
|
|
73
|
+
*/
|
|
74
|
+
function unwrapAsync(type) {
|
|
75
|
+
try {
|
|
76
|
+
const name = type.getSymbol()?.getName();
|
|
77
|
+
if (name === 'Promise' || name === 'Observable') {
|
|
78
|
+
const args = type.getTypeArguments();
|
|
79
|
+
if (args.length > 0)
|
|
80
|
+
return args[0];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
86
|
+
return type;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Resolves the ResponseTypeInfo for a method's return type.
|
|
90
|
+
* Returns null for primitives, inline objects, void, and unresolvable types.
|
|
91
|
+
*/
|
|
92
|
+
function resolveResponseType(method) {
|
|
93
|
+
try {
|
|
94
|
+
const rawType = method.getReturnType();
|
|
95
|
+
const inner = unwrapAsync(rawType);
|
|
96
|
+
// Check for array: T[] or Array<T>
|
|
97
|
+
let isArray = false;
|
|
98
|
+
let elementType = inner;
|
|
99
|
+
if (inner.isArray()) {
|
|
100
|
+
isArray = true;
|
|
101
|
+
elementType = inner.getArrayElementTypeOrThrow();
|
|
102
|
+
}
|
|
103
|
+
// Skip primitives, void, inline objects, union/intersection types
|
|
104
|
+
if (elementType.isString() || elementType.isNumber() || elementType.isBoolean())
|
|
105
|
+
return null;
|
|
106
|
+
if (elementType.isUndefined() || elementType.isNull() || elementType.isVoid())
|
|
107
|
+
return null;
|
|
108
|
+
if (elementType.isAnonymous())
|
|
109
|
+
return null; // inline { id: string } objects
|
|
110
|
+
if (elementType.isUnion() || elementType.isIntersection())
|
|
111
|
+
return null;
|
|
112
|
+
if (elementType.isTuple())
|
|
113
|
+
return null;
|
|
114
|
+
const symbol = elementType.getSymbol() ?? elementType.getAliasSymbol();
|
|
115
|
+
if (!symbol)
|
|
116
|
+
return null;
|
|
117
|
+
const name = symbol.getName();
|
|
118
|
+
// Validate identifier — skip anything that isn't a clean class/interface name
|
|
119
|
+
if (!name || !IDENTIFIER_RE.test(name))
|
|
120
|
+
return null;
|
|
121
|
+
if (SKIP_TYPE_NAMES.has(name))
|
|
122
|
+
return null;
|
|
123
|
+
// Resolve the source file where the type is declared
|
|
124
|
+
const declarations = symbol.getDeclarations();
|
|
125
|
+
if (!declarations || declarations.length === 0)
|
|
126
|
+
return null;
|
|
127
|
+
const sourceFile = declarations[0].getSourceFile();
|
|
128
|
+
const absolutePath = sourceFile.getFilePath();
|
|
129
|
+
// Skip node_modules and .d.ts declaration files (no user source)
|
|
130
|
+
if (absolutePath.includes('node_modules'))
|
|
131
|
+
return null;
|
|
132
|
+
if (absolutePath.endsWith('.d.ts'))
|
|
133
|
+
return null;
|
|
134
|
+
return { name, absolutePath, isArray };
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
62
140
|
/**
|
|
63
141
|
* Extracts public, non-static methods from a controller class declaration.
|
|
64
142
|
* Marks inherited methods (from base classes) but still includes them.
|
|
@@ -95,12 +173,14 @@ function extractMethods(cls) {
|
|
|
95
173
|
catch {
|
|
96
174
|
// ts-morph can fail to infer complex types — keep 'unknown'
|
|
97
175
|
}
|
|
176
|
+
const responseType = resolveResponseType(method);
|
|
98
177
|
results.push({
|
|
99
178
|
name: method.getName(),
|
|
100
179
|
httpDecorator,
|
|
101
180
|
httpPath,
|
|
102
181
|
params: extractParams(method),
|
|
103
182
|
returnType,
|
|
183
|
+
responseType,
|
|
104
184
|
isAsync: method.isAsync(),
|
|
105
185
|
isInherited: false,
|
|
106
186
|
inheritedFrom: null,
|
|
@@ -134,6 +214,7 @@ function extractMethods(cls) {
|
|
|
134
214
|
httpPath: null,
|
|
135
215
|
params: extractParams(method),
|
|
136
216
|
returnType: 'unknown',
|
|
217
|
+
responseType: null,
|
|
137
218
|
isAsync: method.isAsync(),
|
|
138
219
|
isInherited: true,
|
|
139
220
|
inheritedFrom: baseClassName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-methods.js","sourceRoot":"","sources":["../../src/cli/extract-methods.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extract-methods.js","sourceRoot":"","sources":["../../src/cli/extract-methods.ts"],"names":[],"mappings":";;AAoLA,wCAuFC;AAMD,sDAcC;AA/RD,uCAAiF;AA0CjF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK;CAClE,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS;IAC5D,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW;CAC1E,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK;IACtD,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IAC3D,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OA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,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import type { ControllerInfo } from './extract-methods';
|
|
2
|
-
/**
|
|
3
|
-
* Computes the relative import path from the generated docs file to the
|
|
4
|
-
* controller file, stripping the .ts extension (CommonJS/ESM convention).
|
|
5
|
-
*/
|
|
6
2
|
export declare function relativeImport(docsFilePath: string, controllerFilePath: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Renders a complete .controller.docs.ts file for the given controller.
|
|
9
|
-
* All user-sourced values are sanitised before interpolation.
|
|
10
|
-
*/
|
|
11
3
|
export declare function renderDocsFile(ctrl: ControllerInfo, docsFilePath: string, format: 'ts' | 'js'): string;
|
|
@@ -7,37 +7,60 @@ exports.relativeImport = relativeImport;
|
|
|
7
7
|
exports.renderDocsFile = renderDocsFile;
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
|
-
// Sanitisation helpers
|
|
11
|
-
// string interpolation so they can never inject executable code.
|
|
10
|
+
// Sanitisation helpers
|
|
12
11
|
// ---------------------------------------------------------------------------
|
|
13
|
-
/** Whitelist for JS identifiers: letters, digits, $ and _. */
|
|
14
12
|
const IDENTIFIER_RE = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/;
|
|
15
13
|
function sanitizeIdentifier(value, fallback) {
|
|
16
14
|
return IDENTIFIER_RE.test(value) ? value : fallback;
|
|
17
15
|
}
|
|
18
|
-
/** Strips characters that could close a JS string or inject code into a comment. */
|
|
19
16
|
function sanitizeComment(value) {
|
|
20
17
|
return value.replace(/[`'"\\*]/g, '').slice(0, 200);
|
|
21
18
|
}
|
|
22
|
-
/** Escapes a URL path for safe use inside a line comment. */
|
|
23
19
|
function sanitizeHttpPath(value) {
|
|
24
20
|
if (!value)
|
|
25
21
|
return '';
|
|
26
22
|
return '/' + value.replace(/[^a-zA-Z0-9/_:.-]/g, '');
|
|
27
23
|
}
|
|
28
24
|
// ---------------------------------------------------------------------------
|
|
25
|
+
// HTTP verb → default success status code
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
function defaultStatusCode(httpDecorator) {
|
|
28
|
+
switch (httpDecorator) {
|
|
29
|
+
case 'Post': return 201;
|
|
30
|
+
case 'Delete': return 204;
|
|
31
|
+
default: return 200;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
29
35
|
// Import path resolution
|
|
30
36
|
// ---------------------------------------------------------------------------
|
|
31
|
-
/**
|
|
32
|
-
* Computes the relative import path from the generated docs file to the
|
|
33
|
-
* controller file, stripping the .ts extension (CommonJS/ESM convention).
|
|
34
|
-
*/
|
|
35
37
|
function relativeImport(docsFilePath, controllerFilePath) {
|
|
36
38
|
const rel = path_1.default.relative(path_1.default.dirname(docsFilePath), controllerFilePath);
|
|
37
39
|
const withoutExt = rel.replace(/\.ts$/, '');
|
|
38
|
-
// Ensure it starts with ./ for Node module resolution
|
|
39
40
|
return withoutExt.startsWith('.') ? withoutExt : `./${withoutExt}`;
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Collects all unique response type imports needed for a controller's methods.
|
|
44
|
+
* Deduplicates by type name — if two methods return the same type, one import.
|
|
45
|
+
* Validates each type name with IDENTIFIER_RE before including.
|
|
46
|
+
*/
|
|
47
|
+
function collectResponseImports(methods, docsFilePath) {
|
|
48
|
+
const seen = new Map(); // name → importPath
|
|
49
|
+
for (const m of methods) {
|
|
50
|
+
const rt = m.responseType;
|
|
51
|
+
if (!rt)
|
|
52
|
+
continue;
|
|
53
|
+
if (!IDENTIFIER_RE.test(rt.name))
|
|
54
|
+
continue; // safety: skip invalid identifiers
|
|
55
|
+
if (seen.has(rt.name))
|
|
56
|
+
continue;
|
|
57
|
+
const rel = path_1.default.relative(path_1.default.dirname(docsFilePath), rt.absolutePath);
|
|
58
|
+
const importPath = rel.replace(/\.ts$/, '').replace(/\\/g, '/');
|
|
59
|
+
const normalized = importPath.startsWith('.') ? importPath : `./${importPath}`;
|
|
60
|
+
seen.set(rt.name, normalized);
|
|
61
|
+
}
|
|
62
|
+
return Array.from(seen.entries()).map(([name, importPath]) => ({ name, importPath }));
|
|
63
|
+
}
|
|
41
64
|
// ---------------------------------------------------------------------------
|
|
42
65
|
// Method signature comment
|
|
43
66
|
// ---------------------------------------------------------------------------
|
|
@@ -57,23 +80,44 @@ function methodSignatureComment(m) {
|
|
|
57
80
|
return `${route}${asyncPrefix}${methodName}(${paramList}): ${returnType}${inherited}`;
|
|
58
81
|
}
|
|
59
82
|
// ---------------------------------------------------------------------------
|
|
60
|
-
//
|
|
83
|
+
// ApiResponse rendering
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
function renderApiResponse(status, responseType) {
|
|
86
|
+
if (!responseType || !IDENTIFIER_RE.test(responseType.name)) {
|
|
87
|
+
return `ApiResponse({ status: ${status} })`;
|
|
88
|
+
}
|
|
89
|
+
const typePart = responseType.isArray
|
|
90
|
+
? `[${responseType.name}]`
|
|
91
|
+
: responseType.name;
|
|
92
|
+
return `ApiResponse({ status: ${status}, type: ${typePart} })`;
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Method block
|
|
61
96
|
// ---------------------------------------------------------------------------
|
|
62
97
|
function renderMethod(m, indent) {
|
|
63
98
|
const name = sanitizeIdentifier(m.name, '_method');
|
|
64
99
|
const sig = methodSignatureComment(m);
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
100
|
+
const status = defaultStatusCode(m.httpDecorator);
|
|
101
|
+
const apiResponse = renderApiResponse(status, m.responseType);
|
|
102
|
+
return [
|
|
103
|
+
`${indent}// ${sig}`,
|
|
104
|
+
`${indent}${name}: [`,
|
|
105
|
+
`${indent} ApiOperation({ summary: '' }),`,
|
|
106
|
+
`${indent} ${apiResponse},`,
|
|
107
|
+
`${indent}],`,
|
|
108
|
+
].join('\n');
|
|
72
109
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
// ApiTags value
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
function apiTagValue(ctrl) {
|
|
114
|
+
if (ctrl.controllerPath)
|
|
115
|
+
return sanitizeComment(ctrl.controllerPath);
|
|
116
|
+
return sanitizeComment(ctrl.className.replace(/Controller$/, '').toLowerCase());
|
|
117
|
+
}
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
// Full file renderer
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
77
121
|
function renderDocsFile(ctrl, docsFilePath, format) {
|
|
78
122
|
const importPath = relativeImport(docsFilePath, ctrl.filePath);
|
|
79
123
|
const className = sanitizeIdentifier(ctrl.className, 'Controller');
|
|
@@ -81,20 +125,27 @@ function renderDocsFile(ctrl, docsFilePath, format) {
|
|
|
81
125
|
? ` (route: "${sanitizeHttpPath(ctrl.controllerPath)}")`
|
|
82
126
|
: '';
|
|
83
127
|
const timestamp = new Date().toISOString();
|
|
128
|
+
const tag = apiTagValue(ctrl);
|
|
129
|
+
const responseImports = collectResponseImports(ctrl.methods, docsFilePath);
|
|
84
130
|
const methodsBlock = ctrl.methods.length === 0
|
|
85
131
|
? ' // No public HTTP methods found.'
|
|
86
132
|
: ctrl.methods.map((m) => renderMethod(m, ' ')).join('\n\n');
|
|
87
133
|
if (format === 'js') {
|
|
134
|
+
const requireLines = responseImports
|
|
135
|
+
.map((i) => `const { ${i.name} } = require('${i.importPath}');`)
|
|
136
|
+
.join('\n');
|
|
88
137
|
return [
|
|
89
|
-
`// Auto-generated by nestjs-docfy
|
|
138
|
+
`// Auto-generated by nestjs-docfy`,
|
|
90
139
|
`// Generated: ${timestamp}`,
|
|
91
140
|
``,
|
|
92
141
|
`const { docs } = require('nestjs-docfy');`,
|
|
142
|
+
`const { ApiTags, ApiOperation, ApiResponse } = require('@nestjs/swagger');`,
|
|
93
143
|
`const { ${className} } = require('${importPath}');`,
|
|
144
|
+
...(requireLines ? [requireLines] : []),
|
|
94
145
|
``,
|
|
95
146
|
`docs(${className}, {`,
|
|
96
147
|
` classDecorators: [`,
|
|
97
|
-
`
|
|
148
|
+
` ApiTags('${tag}'),`,
|
|
98
149
|
` ],`,
|
|
99
150
|
` methods: {`,
|
|
100
151
|
methodsBlock.split('\n').map((l) => (l ? ` ${l}` : l)).join('\n'),
|
|
@@ -103,19 +154,23 @@ function renderDocsFile(ctrl, docsFilePath, format) {
|
|
|
103
154
|
``,
|
|
104
155
|
].join('\n');
|
|
105
156
|
}
|
|
157
|
+
const importLines = responseImports
|
|
158
|
+
.map((i) => `import { ${i.name} } from '${i.importPath}';`)
|
|
159
|
+
.join('\n');
|
|
106
160
|
return [
|
|
107
161
|
`/**`,
|
|
108
|
-
` * Auto-generated by nestjs-docfy
|
|
162
|
+
` * Auto-generated by nestjs-docfy`,
|
|
109
163
|
` * Controller: ${className}${controllerRoute}`,
|
|
110
164
|
` * Generated: ${timestamp}`,
|
|
111
165
|
` */`,
|
|
112
166
|
`import { docs } from 'nestjs-docfy';`,
|
|
113
167
|
`import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';`,
|
|
114
168
|
`import { ${className} } from '${importPath}';`,
|
|
169
|
+
...(importLines ? [importLines] : []),
|
|
115
170
|
``,
|
|
116
171
|
`docs(${className}, {`,
|
|
117
172
|
` classDecorators: [`,
|
|
118
|
-
`
|
|
173
|
+
` ApiTags('${tag}'),`,
|
|
119
174
|
` ],`,
|
|
120
175
|
` methods: {`,
|
|
121
176
|
methodsBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-file.js","sourceRoot":"","sources":["../../src/cli/generate-file.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"generate-file.js","sourceRoot":"","sources":["../../src/cli/generate-file.ts"],"names":[],"mappings":";;;;;AAs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