@nestia/core 12.0.0-dev.20260619.1 → 12.0.0-rc.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.
|
@@ -22,10 +22,7 @@ const load_controllers = (path, isTsNode) => __awaiter(void 0, void 0, void 0, f
|
|
|
22
22
|
const exclude = typeof path === "object" && !Array.isArray(path)
|
|
23
23
|
? ((_a = path.exclude) !== null && _a !== void 0 ? _a : [])
|
|
24
24
|
: [];
|
|
25
|
-
const filter = isTsNode === true
|
|
26
|
-
? (file) => file.substring(file.length - 3) === ".ts" &&
|
|
27
|
-
file.substring(file.length - 5) !== ".d.ts"
|
|
28
|
-
: (file) => file.substring(file.length - 3) === ".js";
|
|
25
|
+
const filter = isTsNode === true ? isTypeScriptSource : isJavaScriptModule;
|
|
29
26
|
const sources = yield SourceFinder_1.SourceFinder.find({
|
|
30
27
|
include,
|
|
31
28
|
exclude,
|
|
@@ -42,12 +39,10 @@ const load_controllers = (path, isTsNode) => __awaiter(void 0, void 0, void 0, f
|
|
|
42
39
|
// `.ts` file is then served as the transformed emit by the hooks.
|
|
43
40
|
if (!isTsxRuntime())
|
|
44
41
|
return controllers;
|
|
45
|
-
const tsFilter = (file) => file.substring(file.length - 3) === ".ts" &&
|
|
46
|
-
file.substring(file.length - 5) !== ".d.ts";
|
|
47
42
|
const fallback = yield SourceFinder_1.SourceFinder.find({
|
|
48
43
|
include,
|
|
49
44
|
exclude,
|
|
50
|
-
filter:
|
|
45
|
+
filter: isTypeScriptSource,
|
|
51
46
|
});
|
|
52
47
|
return fallback.length === 0 ? controllers : mount(fallback);
|
|
53
48
|
});
|
|
@@ -85,4 +80,10 @@ function isTsxRuntime() {
|
|
|
85
80
|
return (typeof process.env.TTSX_RUNTIME_MANIFEST === "string" &&
|
|
86
81
|
process.env.TTSX_RUNTIME_MANIFEST.length !== 0);
|
|
87
82
|
}
|
|
83
|
+
const isJavaScriptModule = (file) => /\.(?:[cm]?js)$/.test(file.toLowerCase());
|
|
84
|
+
const isTypeScriptSource = (file) => {
|
|
85
|
+
const lower = file.toLowerCase();
|
|
86
|
+
return (/\.(?:[cm]?ts)$/.test(lower) &&
|
|
87
|
+
/\.(?:d\.[cm]?ts|d\.ts)$/.test(lower) === false);
|
|
88
|
+
};
|
|
88
89
|
//# sourceMappingURL=load_controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load_controller.js","sourceRoot":"","sources":["../../../src/decorators/internal/load_controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAoC;AAGpC,2DAAwD;AAEjD,MAAM,gBAAgB,GAAG,CAC9B,IAAmE,EACnE,QAAkB,EACU,EAAE;;IAC9B,MAAM,OAAO,GAAa,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAC3C,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;YACxB,CAAC,CAAC,IAAI,CAAC,OAAO;YACd,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACb,MAAM,OAAO,GACX,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAC9C,CAAC,CAAC,OAAC,IAAI,CAAC,OAAO,mCAAI,EAAE,CAAC;QACtB,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"load_controller.js","sourceRoot":"","sources":["../../../src/decorators/internal/load_controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAoC;AAGpC,2DAAwD;AAEjD,MAAM,gBAAgB,GAAG,CAC9B,IAAmE,EACnE,QAAkB,EACU,EAAE;;IAC9B,MAAM,OAAO,GAAa,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAC3C,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;YACxB,CAAC,CAAC,IAAI,CAAC,OAAO;YACd,CAAC,CAAC,CAA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Super-fast validation decorators of NestJS",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://nestia.io",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@typia/interface": "13.0.0-
|
|
50
|
-
"@typia/utils": "13.0.0-
|
|
49
|
+
"@typia/interface": "^13.0.0-rc.1",
|
|
50
|
+
"@typia/utils": "^13.0.0-rc.1",
|
|
51
51
|
"get-function-location": "^2.0.0",
|
|
52
52
|
"glob": "^11.0.3",
|
|
53
53
|
"path-parser": "^6.1.0",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"reflect-metadata": ">=0.1.12",
|
|
56
56
|
"rxjs": ">=6.0.3",
|
|
57
57
|
"tgrid": "^1.1.0",
|
|
58
|
-
"typia": "13.0.0-
|
|
58
|
+
"typia": "^13.0.0-rc.1",
|
|
59
59
|
"ws": "^7.5.3",
|
|
60
|
-
"@nestia/fetcher": "^12.0.0-
|
|
60
|
+
"@nestia/fetcher": "^12.0.0-rc.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@modelcontextprotocol/sdk": "^1.18.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@nestjs/core": ">=7.0.1",
|
|
66
66
|
"reflect-metadata": ">=0.1.12",
|
|
67
67
|
"rxjs": ">=6.0.3",
|
|
68
|
-
"typia": "13.0.0-
|
|
69
|
-
"@nestia/fetcher": "^12.0.0-
|
|
68
|
+
"typia": "^13.0.0-rc.1",
|
|
69
|
+
"@nestia/fetcher": "^12.0.0-rc.2"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
72
72
|
"@modelcontextprotocol/sdk": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/ws": "^8.5.10",
|
|
84
84
|
"fastify": "^4.28.1",
|
|
85
85
|
"rimraf": "^6.1.3",
|
|
86
|
-
"ttsc": "^0.16.
|
|
86
|
+
"ttsc": "^0.16.10",
|
|
87
87
|
"tstl": "^3.0.0",
|
|
88
88
|
"typescript": "7.0.1-rc"
|
|
89
89
|
},
|
|
@@ -16,12 +16,7 @@ export const load_controllers = async (
|
|
|
16
16
|
typeof path === "object" && !Array.isArray(path)
|
|
17
17
|
? (path.exclude ?? [])
|
|
18
18
|
: [];
|
|
19
|
-
const filter =
|
|
20
|
-
isTsNode === true
|
|
21
|
-
? (file: string) =>
|
|
22
|
-
file.substring(file.length - 3) === ".ts" &&
|
|
23
|
-
file.substring(file.length - 5) !== ".d.ts"
|
|
24
|
-
: (file: string) => file.substring(file.length - 3) === ".js";
|
|
19
|
+
const filter = isTsNode === true ? isTypeScriptSource : isJavaScriptModule;
|
|
25
20
|
const sources: string[] = await SourceFinder.find({
|
|
26
21
|
include,
|
|
27
22
|
exclude,
|
|
@@ -38,13 +33,10 @@ export const load_controllers = async (
|
|
|
38
33
|
// `.ts` file is then served as the transformed emit by the hooks.
|
|
39
34
|
if (!isTsxRuntime()) return controllers;
|
|
40
35
|
|
|
41
|
-
const tsFilter = (file: string) =>
|
|
42
|
-
file.substring(file.length - 3) === ".ts" &&
|
|
43
|
-
file.substring(file.length - 5) !== ".d.ts";
|
|
44
36
|
const fallback: string[] = await SourceFinder.find({
|
|
45
37
|
include,
|
|
46
38
|
exclude,
|
|
47
|
-
filter:
|
|
39
|
+
filter: isTypeScriptSource,
|
|
48
40
|
});
|
|
49
41
|
return fallback.length === 0 ? controllers : mount(fallback);
|
|
50
42
|
};
|
|
@@ -89,3 +81,14 @@ function isTsxRuntime(): boolean {
|
|
|
89
81
|
process.env.TTSX_RUNTIME_MANIFEST.length !== 0
|
|
90
82
|
);
|
|
91
83
|
}
|
|
84
|
+
|
|
85
|
+
const isJavaScriptModule = (file: string): boolean =>
|
|
86
|
+
/\.(?:[cm]?js)$/.test(file.toLowerCase());
|
|
87
|
+
|
|
88
|
+
const isTypeScriptSource = (file: string): boolean => {
|
|
89
|
+
const lower: string = file.toLowerCase();
|
|
90
|
+
return (
|
|
91
|
+
/\.(?:[cm]?ts)$/.test(lower) &&
|
|
92
|
+
/\.(?:d\.[cm]?ts|d\.ts)$/.test(lower) === false
|
|
93
|
+
);
|
|
94
|
+
};
|