@nestia/sdk 11.0.0-dev.20260313 → 11.0.0-dev.20260313-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/assets/bundle/distribute/package.json +1 -1
- package/lib/INestiaConfig.d.ts +2 -2
- package/lib/NestiaSwaggerComposer.d.ts +2 -1
- package/lib/NestiaSwaggerComposer.js +2 -6
- package/lib/NestiaSwaggerComposer.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +64 -9
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +5 -6
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/package.json +6 -6
- package/src/executable/internal/NestiaConfigLoader.ts +1 -1
package/lib/INestiaConfig.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export declare namespace INestiaConfig {
|
|
|
160
160
|
* generated `swagger.json` file would be downgraded from the OpenAPI v3.1
|
|
161
161
|
* specification by {@link OpenApi.downgrade} method.
|
|
162
162
|
*
|
|
163
|
-
* @default 3.
|
|
163
|
+
* @default 3.1
|
|
164
164
|
*/
|
|
165
165
|
openapi?: "2.0" | "3.0" | "3.1" | "3.2";
|
|
166
166
|
/**
|
|
@@ -233,7 +233,7 @@ export declare namespace INestiaConfig {
|
|
|
233
233
|
operationId?(props: {
|
|
234
234
|
class: string;
|
|
235
235
|
function: string;
|
|
236
|
-
method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
236
|
+
method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "QUERY";
|
|
237
237
|
path: string;
|
|
238
238
|
}): string;
|
|
239
239
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INestApplication } from "@nestjs/common";
|
|
2
|
-
import {
|
|
2
|
+
import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@typia/interface";
|
|
3
|
+
import { OpenApi } from "typia";
|
|
3
4
|
import { INestiaConfig } from "./INestiaConfig";
|
|
4
5
|
export declare namespace NestiaSwaggerComposer {
|
|
5
6
|
const document: (app: INestApplication, config: Omit<INestiaConfig.ISwaggerConfig, "output">) => Promise<OpenApi.IDocument | OpenApiV3_1.IDocument | OpenApiV3.IDocument | SwaggerV2.IDocument>;
|
|
@@ -27,20 +27,16 @@ const VersioningStrategy_1 = require("./utils/VersioningStrategy");
|
|
|
27
27
|
var NestiaSwaggerComposer;
|
|
28
28
|
(function (NestiaSwaggerComposer) {
|
|
29
29
|
NestiaSwaggerComposer.document = (app, config) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
var _a;
|
|
30
31
|
const input = yield ConfigAnalyzer_1.ConfigAnalyzer.application(app);
|
|
31
32
|
const document = yield SwaggerGenerator_1.SwaggerGenerator.compose({
|
|
32
33
|
config,
|
|
33
34
|
routes: analyze(input),
|
|
34
35
|
document: yield SwaggerGenerator_1.SwaggerGenerator.initialize(config),
|
|
35
36
|
});
|
|
36
|
-
return config.openapi
|
|
37
|
+
return ((_a = config.openapi) !== null && _a !== void 0 ? _a : "3.2") === "3.2"
|
|
37
38
|
? document
|
|
38
39
|
: utils_1.OpenApiConverter.downgradeDocument(document, config.openapi);
|
|
39
|
-
// return config.openapi === "2.0"
|
|
40
|
-
// ? OpenApiConverter.downgradeDocument(document, "2.0")
|
|
41
|
-
// : config.openapi === "3.0"
|
|
42
|
-
// ? OpenApiConverter.downgradeDocument(document, "3.0")
|
|
43
|
-
// : document;
|
|
44
40
|
});
|
|
45
41
|
const analyze = (input) => {
|
|
46
42
|
var _a, _b, _c, _d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSwaggerComposer.js","sourceRoot":"","sources":["../src/NestiaSwaggerComposer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,wCAAgD;AAChD,gDAAwB;AACxB,+BAA+B;
|
|
1
|
+
{"version":3,"file":"NestiaSwaggerComposer.js","sourceRoot":"","sources":["../src/NestiaSwa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,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC9D,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACzD,KAAK;YACL,QAAQ;iBACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACT,IAAI,OAAO,CAAC,KAAK,QAAQ;oBAAE,OAAO,OAAO,CAAC,EAAE,CAAC;;oBAE3C,OAAO;wBACL,CAAC,CAAC,QAAQ;4BACR,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI;4BACnB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK;wBACrC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;qBAC3C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;SACd,CAAC,IAAI,CAAC,EAAE,CAAC,CACX,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,8CAA8C,QAAQ,EAAE,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAe,EAAY,EAAE,CAC9C,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC"}
|
|
@@ -102,7 +102,7 @@ var NestiaConfigLoader;
|
|
|
102
102
|
x.transform === "@nestia/sdk/src/transform.ts");
|
|
103
103
|
const plugins = [
|
|
104
104
|
...((_b = compilerOptions.plugins) !== null && _b !== void 0 ? _b : []),
|
|
105
|
-
...(setup ? [{ transform: "@nestia/sdk/lib/transform" }]
|
|
105
|
+
...(setup ? [] : [{ transform: "@nestia/sdk/lib/transform" }]),
|
|
106
106
|
];
|
|
107
107
|
if (!process[Symbol.for("ts-node.register.instance")])
|
|
108
108
|
(0, ts_node_1.register)({
|
|
@@ -120,7 +120,7 @@ var NestiaConfigLoader;
|
|
|
120
120
|
? instance
|
|
121
121
|
: [instance];
|
|
122
122
|
try {
|
|
123
|
-
return (() => { const _io0 = input => null !== input.input && undefined !== input.input && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && _io1(input.input))) && (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && _io2(input.swagger)) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.keyword || "boolean" === typeof input.keyword) && (undefined === input.simulate || "boolean" === typeof input.simulate) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.propagate || "boolean" === typeof input.propagate) && (undefined === input.clone || "boolean" === typeof input.clone) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json); const _io1 = input => Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem)); const _io2 = input => "string" === typeof input.output && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || "3.2" === input.openapi) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify) && (undefined === input.additional || "boolean" === typeof input.additional) && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && _io3(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && _io9(input.security)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "object" === typeof elem && null !== elem &&
|
|
123
|
+
return (() => { const _io0 = input => null !== input.input && undefined !== input.input && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && _io1(input.input))) && (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && _io2(input.swagger)) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.keyword || "boolean" === typeof input.keyword) && (undefined === input.simulate || "boolean" === typeof input.simulate) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.propagate || "boolean" === typeof input.propagate) && (undefined === input.clone || "boolean" === typeof input.clone) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json); const _io1 = input => Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem)); const _io2 = input => "string" === typeof input.output && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || "3.2" === input.openapi) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify) && (undefined === input.additional || "boolean" === typeof input.additional) && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && _io3(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && _io9(input.security)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "object" === typeof elem && null !== elem && _io21(elem))) && (undefined === input.decompose || "boolean" === typeof input.decompose); const _io3 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && _io4(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && _io5(input.license)) && (undefined === input.version || "string" === typeof input.version); const _io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.email || "string" === typeof input.email && __typia_transform__isFormatEmail._isFormatEmail(input.email)); const _io5 = input => "string" === typeof input.name && (undefined === input.identifier || "string" === typeof input.identifier) && (undefined === input.url || "string" === typeof input.url); const _io6 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description) && (undefined === input.variables || "object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) && _io7(input.variables)); const _io7 = input => Object.keys(input).every(key => {
|
|
124
124
|
const value = input[key];
|
|
125
125
|
if (undefined === value)
|
|
126
126
|
return true;
|
|
@@ -130,12 +130,12 @@ var NestiaConfigLoader;
|
|
|
130
130
|
if (undefined === value)
|
|
131
131
|
return true;
|
|
132
132
|
return "object" === typeof value && null !== value && _iu0(value);
|
|
133
|
-
}); const _io10 = input => "apiKey" === input.type && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description); const _io11 = input => "http" === input.type && "basic" === input.scheme && (undefined === input.description || "string" === typeof input.description); const _io12 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat) && (undefined === input.description || "string" === typeof input.description); const _io13 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && _io14(input.flows)) && (undefined === input.description || "string" === typeof input.description); const _io14 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) && _io15(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) && _io17(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && _io18(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && _io18(input.clientCredentials)); const _io15 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io16 = input => Object.keys(input).every(key => {
|
|
133
|
+
}); const _io10 = input => "apiKey" === input.type && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description); const _io11 = input => "http" === input.type && "basic" === input.scheme && (undefined === input.description || "string" === typeof input.description); const _io12 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat) && (undefined === input.description || "string" === typeof input.description); const _io13 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && _io14(input.flows)) && (undefined === input.oauth2MetadataUrl || "string" === typeof input.oauth2MetadataUrl) && (undefined === input.description || "string" === typeof input.description); const _io14 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) && _io15(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) && _io17(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && _io18(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && _io18(input.clientCredentials)) && (undefined === input.deviceAuthorization || "object" === typeof input.deviceAuthorization && null !== input.deviceAuthorization && _io19(input.deviceAuthorization)); const _io15 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io16 = input => Object.keys(input).every(key => {
|
|
134
134
|
const value = input[key];
|
|
135
135
|
if (undefined === value)
|
|
136
136
|
return true;
|
|
137
137
|
return "string" === typeof value;
|
|
138
|
-
}); const _io17 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io18 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io19 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl && (undefined === input.description || "string" === typeof input.description); const
|
|
138
|
+
}); const _io17 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io18 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io19 = input => "string" === typeof input.deviceAuthorizationUrl && "string" === typeof input.tokenUrl && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && _io16(input.scopes)); const _io20 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl && (undefined === input.description || "string" === typeof input.description); const _io21 = input => "string" === typeof input.name && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.parent || "string" === typeof input.parent) && (undefined === input.kind || "string" === typeof input.kind); const _iu0 = input => (() => {
|
|
139
139
|
if ("apiKey" === input.type)
|
|
140
140
|
return _io10(input);
|
|
141
141
|
else if ("basic" === input.scheme)
|
|
@@ -145,7 +145,7 @@ var NestiaConfigLoader;
|
|
|
145
145
|
else if ("oauth2" === input.type)
|
|
146
146
|
return _io13(input);
|
|
147
147
|
else if ("openIdConnect" === input.type)
|
|
148
|
-
return
|
|
148
|
+
return _io20(input);
|
|
149
149
|
else
|
|
150
150
|
return false;
|
|
151
151
|
})(); const _ao0 = (input, _path, _exceptionable = true) => (null !== input.input || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
@@ -333,7 +333,7 @@ var NestiaConfigLoader;
|
|
|
333
333
|
path: _path + ".tags[" + _index13 + "]",
|
|
334
334
|
expected: "OpenApi.IDocument.ITag",
|
|
335
335
|
value: elem
|
|
336
|
-
}, _errorFactory)) &&
|
|
336
|
+
}, _errorFactory)) && _ao21(elem, _path + ".tags[" + _index13 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
337
337
|
method: "typia.assert",
|
|
338
338
|
path: _path + ".tags[" + _index13 + "]",
|
|
339
339
|
expected: "OpenApi.IDocument.ITag",
|
|
@@ -573,6 +573,11 @@ var NestiaConfigLoader;
|
|
|
573
573
|
path: _path + ".flows",
|
|
574
574
|
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
575
575
|
value: input.flows
|
|
576
|
+
}, _errorFactory)) && (undefined === input.oauth2MetadataUrl || "string" === typeof input.oauth2MetadataUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
577
|
+
method: "typia.assert",
|
|
578
|
+
path: _path + ".oauth2MetadataUrl",
|
|
579
|
+
expected: "(string | undefined)",
|
|
580
|
+
value: input.oauth2MetadataUrl
|
|
576
581
|
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
577
582
|
method: "typia.assert",
|
|
578
583
|
path: _path + ".description",
|
|
@@ -618,6 +623,16 @@ var NestiaConfigLoader;
|
|
|
618
623
|
path: _path + ".clientCredentials",
|
|
619
624
|
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
620
625
|
value: input.clientCredentials
|
|
626
|
+
}, _errorFactory)) && (undefined === input.deviceAuthorization || ("object" === typeof input.deviceAuthorization && null !== input.deviceAuthorization || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
627
|
+
method: "typia.assert",
|
|
628
|
+
path: _path + ".deviceAuthorization",
|
|
629
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IDeviceFlow | undefined)",
|
|
630
|
+
value: input.deviceAuthorization
|
|
631
|
+
}, _errorFactory)) && _ao19(input.deviceAuthorization, _path + ".deviceAuthorization", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
632
|
+
method: "typia.assert",
|
|
633
|
+
path: _path + ".deviceAuthorization",
|
|
634
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IDeviceFlow | undefined)",
|
|
635
|
+
value: input.deviceAuthorization
|
|
621
636
|
}, _errorFactory)); const _ao15 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
622
637
|
method: "typia.assert",
|
|
623
638
|
path: _path + ".authorizationUrl",
|
|
@@ -693,7 +708,32 @@ var NestiaConfigLoader;
|
|
|
693
708
|
path: _path + ".scopes",
|
|
694
709
|
expected: "(Record<string, string> | undefined)",
|
|
695
710
|
value: input.scopes
|
|
696
|
-
}, _errorFactory)); const _ao19 = (input, _path, _exceptionable = true) => ("
|
|
711
|
+
}, _errorFactory)); const _ao19 = (input, _path, _exceptionable = true) => ("string" === typeof input.deviceAuthorizationUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
712
|
+
method: "typia.assert",
|
|
713
|
+
path: _path + ".deviceAuthorizationUrl",
|
|
714
|
+
expected: "string",
|
|
715
|
+
value: input.deviceAuthorizationUrl
|
|
716
|
+
}, _errorFactory)) && ("string" === typeof input.tokenUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
717
|
+
method: "typia.assert",
|
|
718
|
+
path: _path + ".tokenUrl",
|
|
719
|
+
expected: "string",
|
|
720
|
+
value: input.tokenUrl
|
|
721
|
+
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
722
|
+
method: "typia.assert",
|
|
723
|
+
path: _path + ".refreshUrl",
|
|
724
|
+
expected: "(string | undefined)",
|
|
725
|
+
value: input.refreshUrl
|
|
726
|
+
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
727
|
+
method: "typia.assert",
|
|
728
|
+
path: _path + ".scopes",
|
|
729
|
+
expected: "(Record<string, string> | undefined)",
|
|
730
|
+
value: input.scopes
|
|
731
|
+
}, _errorFactory)) && _ao16(input.scopes, _path + ".scopes", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
732
|
+
method: "typia.assert",
|
|
733
|
+
path: _path + ".scopes",
|
|
734
|
+
expected: "(Record<string, string> | undefined)",
|
|
735
|
+
value: input.scopes
|
|
736
|
+
}, _errorFactory)); const _ao20 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
697
737
|
method: "typia.assert",
|
|
698
738
|
path: _path + ".type",
|
|
699
739
|
expected: "\"openIdConnect\"",
|
|
@@ -708,16 +748,31 @@ var NestiaConfigLoader;
|
|
|
708
748
|
path: _path + ".description",
|
|
709
749
|
expected: "(string | undefined)",
|
|
710
750
|
value: input.description
|
|
711
|
-
}, _errorFactory)); const
|
|
751
|
+
}, _errorFactory)); const _ao21 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
712
752
|
method: "typia.assert",
|
|
713
753
|
path: _path + ".name",
|
|
714
754
|
expected: "string",
|
|
715
755
|
value: input.name
|
|
756
|
+
}, _errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
757
|
+
method: "typia.assert",
|
|
758
|
+
path: _path + ".summary",
|
|
759
|
+
expected: "(string | undefined)",
|
|
760
|
+
value: input.summary
|
|
716
761
|
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
717
762
|
method: "typia.assert",
|
|
718
763
|
path: _path + ".description",
|
|
719
764
|
expected: "(string | undefined)",
|
|
720
765
|
value: input.description
|
|
766
|
+
}, _errorFactory)) && (undefined === input.parent || "string" === typeof input.parent || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
767
|
+
method: "typia.assert",
|
|
768
|
+
path: _path + ".parent",
|
|
769
|
+
expected: "(string | undefined)",
|
|
770
|
+
value: input.parent
|
|
771
|
+
}, _errorFactory)) && (undefined === input.kind || "string" === typeof input.kind || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
772
|
+
method: "typia.assert",
|
|
773
|
+
path: _path + ".kind",
|
|
774
|
+
expected: "(string | undefined)",
|
|
775
|
+
value: input.kind
|
|
721
776
|
}, _errorFactory)); const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
722
777
|
if ("apiKey" === input.type)
|
|
723
778
|
return _ao10(input, _path, true && _exceptionable);
|
|
@@ -728,7 +783,7 @@ var NestiaConfigLoader;
|
|
|
728
783
|
else if ("oauth2" === input.type)
|
|
729
784
|
return _ao13(input, _path, true && _exceptionable);
|
|
730
785
|
else if ("openIdConnect" === input.type)
|
|
731
|
-
return
|
|
786
|
+
return _ao20(input, _path, true && _exceptionable);
|
|
732
787
|
else
|
|
733
788
|
return __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
734
789
|
method: "typia.assert",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA6D;AAC7D,4CAAoB;AACpB,gDAAwB;AACxB,qCAAmC;AACnC,uCAAiC;AACjC,4DAA4B;AAC5B,kDAA0B;AAI1B,IAAiB,kBAAkB,CA0ElC;AA1ED,WAAiB,kBAAkB;IACpB,kCAAe,GAAG,CAC7B,OAAe,EACgB,EAAE;QACjC,MAAM,cAAc,GAAG,oBAAE,CAAC,cAAc,CACtC,OAAO,CAAC,GAAG,EAAE,EACb,oBAAE,CAAC,GAAG,CAAC,UAAU,EACjB,OAAO,CACR,CAAC;QACF,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,SAAS,CAAC,CAAC;QAC1E,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,gBAAK,EAAC,cAAc,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,EAAE,MAAM,EAAE,GAAG,oBAAE,CAAC,yBAAyB,CAC7C,cAAc,EACd,cAAc,CACf,CAAC;QACF,OAAO,oBAAE,CAAC,0BAA0B,CAClC,MAAM,EACN,oBAAE,CAAC,GAAG,EACN,cAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAC7B,CAAC;IACJ,CAAC,CAAA,CAAC;IAEW,iCAAc,GAAG,CAC5B,IAAY,EACZ,eAAoC,EACV,EAAE;;QAC5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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAoB,cAAc,EAAE;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,meAAmC,GAAG;gBACpC,GAAG,CAAC,OAAO,GAAG,YAAY,IAAI,SAAS,CAAC;YAC1C,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,EA1EgB,kBAAkB,kCAAlB,kBAAkB,QA0ElC"}
|
|
@@ -59,6 +59,7 @@ const SwaggerOperationComposer_1 = require("./internal/SwaggerOperationComposer"
|
|
|
59
59
|
var SwaggerGenerator;
|
|
60
60
|
(function (SwaggerGenerator) {
|
|
61
61
|
SwaggerGenerator.generate = (app) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
var _a;
|
|
62
63
|
// GET CONFIGURATION
|
|
63
64
|
console.log("Generating Swagger Document");
|
|
64
65
|
if (app.project.config.swagger === undefined)
|
|
@@ -71,7 +72,7 @@ var SwaggerGenerator;
|
|
|
71
72
|
try {
|
|
72
73
|
yield fs_1.default.promises.mkdir(directory);
|
|
73
74
|
}
|
|
74
|
-
catch (
|
|
75
|
+
catch (_b) { }
|
|
75
76
|
if (fs_1.default.existsSync(directory) === false)
|
|
76
77
|
throw new Error(`Error on NestiaApplication.swagger(): failed to create output directory: ${directory}`);
|
|
77
78
|
const location = !!parsed.ext
|
|
@@ -83,11 +84,9 @@ var SwaggerGenerator;
|
|
|
83
84
|
routes: app.routes.filter((route) => route.protocol === "http"),
|
|
84
85
|
document: yield SwaggerGenerator.initialize(config),
|
|
85
86
|
});
|
|
86
|
-
const specified = config.openapi === "2
|
|
87
|
-
?
|
|
88
|
-
: config.openapi
|
|
89
|
-
? utils_1.OpenApiConverter.downgradeDocument(document, config.openapi)
|
|
90
|
-
: document;
|
|
87
|
+
const specified = ((_a = config.openapi) !== null && _a !== void 0 ? _a : "3.2") === "3.2"
|
|
88
|
+
? document
|
|
89
|
+
: utils_1.OpenApiConverter.downgradeDocument(document, config.openapi);
|
|
91
90
|
yield fs_1.default.promises.writeFile(location, !config.beautify
|
|
92
91
|
? JSON.stringify(specified)
|
|
93
92
|
: JSON.stringify(specified, null, typeof config.beautify === "number" ? config.beautify : 2), "utf8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAoE;
|
|
1
|
+
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAoE;AAQpE,wCAAgD;AAChD,4CAAoB;AACpB,gDAAwB;AACxB,+BAAiC;AACjC,kDAAqD;AAKrD,0DAAuD;AACvD,sFAAmF;AACnF,kFAA+E;AAE/E,IAAiB,gBAAgB,CAkQhC;AAlQD,WAAiB,gBAAgB;IAClB,yBAAQ,GAAG,CAAO,GAAsB,EAAiB,EAAE;;QACtE,oBAAoB;QACpB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS;YAC1C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAiC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;QAExE,kBAAkB;QAClB,MAAM,MAAM,GAAoB,cAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1D,MAAM,SAAS,GAAW,cAAI,CAAC,OAAO,CAAC,MAAM,CA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,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE;oBACpB,KAAK,MAAM,OAAO,IAAI,KAAK;wBACzB,OAAO,CAAC;4BACN,OAAO,EAAE,KAAK,CAAC,QAAQ;4BACvB,MAAM,EAAE,CAAC,CAAC,MAAM;4BAChB,IAAI;4BACJ,KAAK,EAAE,SAAS;4BAChB,EAAE,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;4BACnD,GAAG,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;yBACvB,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,eAAe;QACf,KAAK,MAAM,EAAE,IAAI,WAAW;YAAE,EAAE,EAAE,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAU,EAAE;QACjD,IAAI,GAAG,GAAW,KAAK,CAAC,IAAI,CAAC;QAC7B,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,cAAc;YACtC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;QAC3D,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC,EAlQgB,gBAAgB,gCAAhB,gBAAgB,QAkQhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/sdk",
|
|
3
|
-
"version": "11.0.0-dev.20260313",
|
|
3
|
+
"version": "11.0.0-dev.20260313-4",
|
|
4
4
|
"description": "Nestia SDK and Swagger generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
"tsconfig-paths": "^4.1.1",
|
|
59
59
|
"tstl": "^3.0.0",
|
|
60
60
|
"typia": "12.0.0-dev.20260313",
|
|
61
|
-
"@nestia/core": "^11.0.0-dev.20260313",
|
|
62
|
-
"@nestia/fetcher": "^11.0.0-dev.20260313"
|
|
61
|
+
"@nestia/core": "^11.0.0-dev.20260313-4",
|
|
62
|
+
"@nestia/fetcher": "^11.0.0-dev.20260313-4"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@nestia/core": "^11.0.0-dev.20260313"
|
|
65
|
+
"@nestia/core": "^11.0.0-dev.20260313-4"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@nestjs/common": "^11.1.
|
|
69
|
-
"@nestjs/core": "^11.1.
|
|
68
|
+
"@nestjs/common": "^11.1.6",
|
|
69
|
+
"@nestjs/core": "^11.1.6",
|
|
70
70
|
"@types/cli": "^0.11.21",
|
|
71
71
|
"@types/express": "^4.17.15",
|
|
72
72
|
"@types/node": "^25.3.3",
|
|
@@ -49,7 +49,7 @@ export namespace NestiaConfigLoader {
|
|
|
49
49
|
);
|
|
50
50
|
const plugins: any[] = [
|
|
51
51
|
...(compilerOptions.plugins ?? []),
|
|
52
|
-
...(setup ? [{ transform: "@nestia/sdk/lib/transform" }]
|
|
52
|
+
...(setup ? [] : [{ transform: "@nestia/sdk/lib/transform" }]),
|
|
53
53
|
];
|
|
54
54
|
if (!(process as any)[Symbol.for("ts-node.register.instance")])
|
|
55
55
|
register({
|