@nestia/sdk 10.0.2 → 11.0.0-dev.20260312
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/LICENSE +21 -21
- package/README.md +93 -93
- package/assets/bundle/api/HttpError.ts +1 -1
- package/assets/bundle/api/IConnection.ts +1 -1
- package/assets/bundle/api/Primitive.ts +1 -1
- package/assets/bundle/api/Resolved.ts +1 -1
- package/assets/bundle/api/index.ts +4 -4
- package/assets/bundle/api/module.ts +6 -6
- package/assets/bundle/distribute/README.md +37 -37
- package/assets/bundle/distribute/package.json +28 -28
- package/assets/bundle/distribute/tsconfig.json +109 -109
- package/assets/bundle/e2e/index.ts +42 -42
- package/assets/config/nestia.config.ts +97 -97
- package/lib/INestiaConfig.d.ts +3 -3
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/NestiaSwaggerComposer.d.ts +3 -2
- package/lib/NestiaSwaggerComposer.js +5 -6
- package/lib/NestiaSwaggerComposer.js.map +1 -1
- package/lib/analyses/AccessorAnalyzer.js +2 -2
- package/lib/analyses/AccessorAnalyzer.js.map +1 -1
- package/lib/analyses/DtoAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +3 -3
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +4 -2
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +7 -11
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +6 -6
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.js +6 -8
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +111 -52
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/executable/sdk.js +0 -0
- package/lib/generates/SwaggerGenerator.d.ts +1 -1
- package/lib/generates/SwaggerGenerator.js +11 -12
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.js +8 -9
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +2 -2
- package/lib/generates/internal/SdkAliasCollection.js +2 -2
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.js +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +11 -12
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +13 -16
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +4 -4
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +12 -16
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkImportWizard.js +2 -2
- package/lib/generates/internal/SdkImportWizard.js.map +1 -1
- package/lib/generates/internal/SdkTypeProgrammer.d.ts +2 -3
- package/lib/generates/internal/SdkTypeProgrammer.js +6 -7
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.js +11 -11
- package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +6 -8
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +2 -2
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +3 -3
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +10 -8
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +3 -3
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
- package/lib/module.d.ts +1 -0
- package/lib/module.js +1 -0
- package/lib/module.js.map +1 -1
- package/lib/structures/IReflectHttpOperationException.d.ts +3 -4
- package/lib/structures/IReflectHttpOperationParameter.d.ts +3 -5
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +3 -4
- package/lib/structures/ITypedApplication.d.ts +1 -1
- package/lib/structures/ITypedHttpRouteException.d.ts +2 -2
- package/lib/structures/ITypedHttpRouteParameter.d.ts +2 -2
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +2 -2
- package/lib/transformers/IOperationMetadata.d.ts +2 -4
- package/lib/transformers/ISdkOperationTransformerContext.d.ts +1 -1
- package/lib/transformers/SdkOperationProgrammer.js +8 -10
- package/lib/transformers/SdkOperationProgrammer.js.map +1 -1
- package/lib/transformers/SdkOperationTransformer.js +6 -8
- package/lib/transformers/SdkOperationTransformer.js.map +1 -1
- package/lib/transformers/TextPlainValidator.d.ts +2 -2
- package/lib/transformers/TextPlainValidator.js.map +1 -1
- package/lib/utils/MetadataUtil.d.ts +2 -2
- package/lib/utils/MetadataUtil.js.map +1 -1
- package/lib/validators/HttpHeadersValidator.d.ts +2 -3
- package/lib/validators/HttpHeadersValidator.js +2 -2
- package/lib/validators/HttpHeadersValidator.js.map +1 -1
- package/lib/validators/HttpQueryValidator.d.ts +2 -3
- package/lib/validators/HttpQueryValidator.js +2 -2
- package/lib/validators/HttpQueryValidator.js.map +1 -1
- package/package.json +44 -30
- package/src/INestiaConfig.ts +267 -267
- package/src/NestiaSdkApplication.ts +307 -307
- package/src/NestiaSwaggerComposer.ts +143 -138
- package/src/analyses/AccessorAnalyzer.ts +67 -67
- package/src/analyses/DtoAnalyzer.ts +260 -260
- package/src/analyses/ImportAnalyzer.ts +126 -126
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +183 -183
- package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +72 -71
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +350 -348
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +126 -127
- package/src/analyses/TypedHttpRouteAnalyzer.ts +208 -204
- package/src/executable/internal/NestiaConfigLoader.ts +85 -78
- package/src/executable/internal/NestiaSdkCommand.ts +107 -103
- package/src/generates/SwaggerGenerator.ts +291 -284
- package/src/generates/internal/E2eFileProgrammer.ts +196 -197
- package/src/generates/internal/FilePrinter.ts +64 -64
- package/src/generates/internal/ImportDictionary.ts +192 -192
- package/src/generates/internal/SdkAliasCollection.ts +260 -261
- package/src/generates/internal/SdkFileProgrammer.ts +110 -110
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +126 -124
- package/src/generates/internal/SdkHttpCloneReferencer.ts +77 -77
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +278 -279
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +502 -500
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +109 -108
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +312 -310
- package/src/generates/internal/SdkImportWizard.ts +62 -62
- package/src/generates/internal/SdkTypeProgrammer.ts +388 -385
- package/src/generates/internal/SdkTypeTagProgrammer.ts +114 -104
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +379 -381
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +302 -302
- package/src/generates/internal/SwaggerOperationComposer.ts +119 -119
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +161 -162
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +110 -110
- package/src/module.ts +4 -3
- package/src/structures/IReflectHttpOperationException.ts +18 -19
- package/src/structures/IReflectHttpOperationParameter.ts +79 -77
- package/src/structures/IReflectHttpOperationSuccess.ts +21 -22
- package/src/structures/ITypedApplication.ts +11 -11
- package/src/structures/ITypedHttpRouteException.ts +15 -15
- package/src/structures/ITypedHttpRouteParameter.ts +41 -41
- package/src/structures/ITypedHttpRouteSuccess.ts +22 -22
- package/src/transformers/IOperationMetadata.ts +46 -44
- package/src/transformers/ISdkOperationTransformerContext.ts +8 -8
- package/src/transformers/SdkOperationProgrammer.ts +240 -238
- package/src/transformers/SdkOperationTransformer.ts +248 -252
- package/src/transformers/TextPlainValidator.ts +17 -17
- package/src/utils/MetadataUtil.ts +26 -26
- package/src/validators/HttpHeadersValidator.ts +36 -34
- package/src/validators/HttpQueryValidator.ts +36 -34
|
@@ -46,9 +46,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.NestiaConfigLoader = void 0;
|
|
49
|
-
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard
|
|
50
|
-
const
|
|
51
|
-
const
|
|
49
|
+
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard"));
|
|
50
|
+
const __typia_transform__isFormatEmail = __importStar(require("typia/lib/internal/_isFormatEmail"));
|
|
51
|
+
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString"));
|
|
52
|
+
const core_1 = require("@nestia/core");
|
|
52
53
|
const fs_1 = __importDefault(require("fs"));
|
|
53
54
|
const path_1 = __importDefault(require("path"));
|
|
54
55
|
const ts_node_1 = require("ts-node");
|
|
@@ -67,47 +68,50 @@ var NestiaConfigLoader;
|
|
|
67
68
|
return typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, path_1.default.dirname(configFileName));
|
|
68
69
|
});
|
|
69
70
|
NestiaConfigLoader.configurations = (file, compilerOptions) => __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a;
|
|
71
|
+
var _a, _b;
|
|
71
72
|
if (fs_1.default.existsSync(path_1.default.resolve(file)) === false)
|
|
72
73
|
throw new Error(`Unable to find "${file}" file.`);
|
|
73
|
-
|
|
74
|
+
core_1.NoTransformConfigurationError.throws = false;
|
|
75
|
+
const setup = (() => { const _io0 = input => true; const _ao0 = (input, _path, _exceptionable = true) => true; const __is = input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io0(elem)); let _errorFactory; return (input, errorFactory) => {
|
|
76
|
+
if (false === __is(input)) {
|
|
77
|
+
_errorFactory = errorFactory;
|
|
78
|
+
((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
79
|
+
method: "typia\r\n .assert",
|
|
80
|
+
path: _path + "",
|
|
81
|
+
expected: "Array<object>",
|
|
82
|
+
value: input
|
|
83
|
+
}, _errorFactory)) && input.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || __typia_transform__assertGuard._assertGuard(true, {
|
|
84
|
+
method: "typia\r\n .assert",
|
|
85
|
+
path: _path + "[" + _index2 + "]",
|
|
86
|
+
expected: "object",
|
|
87
|
+
value: elem
|
|
88
|
+
}, _errorFactory)) && _ao0(elem, _path + "[" + _index2 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
89
|
+
method: "typia\r\n .assert",
|
|
90
|
+
path: _path + "[" + _index2 + "]",
|
|
91
|
+
expected: "object",
|
|
92
|
+
value: elem
|
|
93
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
94
|
+
method: "typia\r\n .assert",
|
|
95
|
+
path: _path + "",
|
|
96
|
+
expected: "Array<object>",
|
|
97
|
+
value: input
|
|
98
|
+
}, _errorFactory))(input, "$input", true);
|
|
99
|
+
}
|
|
100
|
+
return input;
|
|
101
|
+
}; })()((_a = compilerOptions.plugins) !== null && _a !== void 0 ? _a : []).some((x) => x.transform === "@nestia/sdk/lib/transform" ||
|
|
102
|
+
x.transform === "@nestia/sdk/src/transform.ts");
|
|
74
103
|
const plugins = [
|
|
75
|
-
...((
|
|
76
|
-
|
|
77
|
-
_errorFactory = errorFactory;
|
|
78
|
-
((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
79
|
-
method: "typia\n .assert",
|
|
80
|
-
path: _path + "",
|
|
81
|
-
expected: "Array<object>",
|
|
82
|
-
value: input
|
|
83
|
-
}, _errorFactory)) && input.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || __typia_transform__assertGuard._assertGuard(true, {
|
|
84
|
-
method: "typia\n .assert",
|
|
85
|
-
path: _path + "[" + _index2 + "]",
|
|
86
|
-
expected: "object",
|
|
87
|
-
value: elem
|
|
88
|
-
}, _errorFactory)) && _ao0(elem, _path + "[" + _index2 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
89
|
-
method: "typia\n .assert",
|
|
90
|
-
path: _path + "[" + _index2 + "]",
|
|
91
|
-
expected: "object",
|
|
92
|
-
value: elem
|
|
93
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
94
|
-
method: "typia\n .assert",
|
|
95
|
-
path: _path + "",
|
|
96
|
-
expected: "Array<object>",
|
|
97
|
-
value: input
|
|
98
|
-
}, _errorFactory))(input, "$input", true);
|
|
99
|
-
}
|
|
100
|
-
return input;
|
|
101
|
-
}; })()((_a = compilerOptions.plugins) !== null && _a !== void 0 ? _a : []).filter((x) => x.transform !== "@nestia/sdk/lib/transform"),
|
|
102
|
-
{ transform: "@nestia/sdk/lib/transform" },
|
|
104
|
+
...((_b = compilerOptions.plugins) !== null && _b !== void 0 ? _b : []),
|
|
105
|
+
...(setup ? [{ transform: "@nestia/sdk/lib/transform" }] : []),
|
|
103
106
|
];
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
if (!process[Symbol.for("ts-node.register.instance")])
|
|
108
|
+
(0, ts_node_1.register)({
|
|
109
|
+
emit: false,
|
|
110
|
+
compilerOptions: Object.assign(Object.assign({}, compilerOptions), { plugins }),
|
|
111
|
+
require: compilerOptions.baseUrl
|
|
112
|
+
? ["tsconfig-paths/register"]
|
|
113
|
+
: undefined,
|
|
114
|
+
});
|
|
111
115
|
const loaded = yield Promise.resolve(`${path_1.default.resolve(file)}`).then(s => __importStar(require(s)));
|
|
112
116
|
const instance = typeof (loaded === null || loaded === void 0 ? void 0 : loaded.default) === "object" && loaded.default !== null
|
|
113
117
|
? loaded.default
|
|
@@ -116,7 +120,7 @@ var NestiaConfigLoader;
|
|
|
116
120
|
? instance
|
|
117
121
|
: [instance];
|
|
118
122
|
try {
|
|
119
|
-
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) && (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 => {
|
|
120
124
|
const value = input[key];
|
|
121
125
|
if (undefined === value)
|
|
122
126
|
return true;
|
|
@@ -126,12 +130,12 @@ var NestiaConfigLoader;
|
|
|
126
130
|
if (undefined === value)
|
|
127
131
|
return true;
|
|
128
132
|
return "object" === typeof value && null !== value && _iu0(value);
|
|
129
|
-
}); 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 => {
|
|
130
134
|
const value = input[key];
|
|
131
135
|
if (undefined === value)
|
|
132
136
|
return true;
|
|
133
137
|
return "string" === typeof value;
|
|
134
|
-
}); 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 => (() => {
|
|
135
139
|
if ("apiKey" === input.type)
|
|
136
140
|
return _io10(input);
|
|
137
141
|
else if ("basic" === input.scheme)
|
|
@@ -141,7 +145,7 @@ var NestiaConfigLoader;
|
|
|
141
145
|
else if ("oauth2" === input.type)
|
|
142
146
|
return _io13(input);
|
|
143
147
|
else if ("openIdConnect" === input.type)
|
|
144
|
-
return
|
|
148
|
+
return _io20(input);
|
|
145
149
|
else
|
|
146
150
|
return false;
|
|
147
151
|
})(); const _ao0 = (input, _path, _exceptionable = true) => (null !== input.input || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
@@ -264,10 +268,10 @@ var NestiaConfigLoader;
|
|
|
264
268
|
path: _path + ".output",
|
|
265
269
|
expected: "string",
|
|
266
270
|
value: input.output
|
|
267
|
-
}, _errorFactory)) && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
271
|
+
}, _errorFactory)) && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || "3.2" === input.openapi || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
268
272
|
method: "typia.assert",
|
|
269
273
|
path: _path + ".openapi",
|
|
270
|
-
expected: "(\"2.0\" | \"3.0\" | \"3.1\" | undefined)",
|
|
274
|
+
expected: "(\"2.0\" | \"3.0\" | \"3.1\" | \"3.2\" | undefined)",
|
|
271
275
|
value: input.openapi
|
|
272
276
|
}, _errorFactory)) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
273
277
|
method: "typia.assert",
|
|
@@ -329,7 +333,7 @@ var NestiaConfigLoader;
|
|
|
329
333
|
path: _path + ".tags[" + _index13 + "]",
|
|
330
334
|
expected: "OpenApi.IDocument.ITag",
|
|
331
335
|
value: elem
|
|
332
|
-
}, _errorFactory)) &&
|
|
336
|
+
}, _errorFactory)) && _ao21(elem, _path + ".tags[" + _index13 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
333
337
|
method: "typia.assert",
|
|
334
338
|
path: _path + ".tags[" + _index13 + "]",
|
|
335
339
|
expected: "OpenApi.IDocument.ITag",
|
|
@@ -399,7 +403,7 @@ var NestiaConfigLoader;
|
|
|
399
403
|
path: _path + ".url",
|
|
400
404
|
expected: "(string | undefined)",
|
|
401
405
|
value: input.url
|
|
402
|
-
}, _errorFactory)) && (undefined === input.email || "string" === typeof input.email && (
|
|
406
|
+
}, _errorFactory)) && (undefined === input.email || "string" === typeof input.email && (__typia_transform__isFormatEmail._isFormatEmail(input.email) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
403
407
|
method: "typia.assert",
|
|
404
408
|
path: _path + ".email",
|
|
405
409
|
expected: "string & Format<\"email\">",
|
|
@@ -569,6 +573,11 @@ var NestiaConfigLoader;
|
|
|
569
573
|
path: _path + ".flows",
|
|
570
574
|
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
571
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
|
|
572
581
|
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
573
582
|
method: "typia.assert",
|
|
574
583
|
path: _path + ".description",
|
|
@@ -614,6 +623,16 @@ var NestiaConfigLoader;
|
|
|
614
623
|
path: _path + ".clientCredentials",
|
|
615
624
|
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
616
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
|
|
617
636
|
}, _errorFactory)); const _ao15 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
618
637
|
method: "typia.assert",
|
|
619
638
|
path: _path + ".authorizationUrl",
|
|
@@ -689,7 +708,32 @@ var NestiaConfigLoader;
|
|
|
689
708
|
path: _path + ".scopes",
|
|
690
709
|
expected: "(Record<string, string> | undefined)",
|
|
691
710
|
value: input.scopes
|
|
692
|
-
}, _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, {
|
|
693
737
|
method: "typia.assert",
|
|
694
738
|
path: _path + ".type",
|
|
695
739
|
expected: "\"openIdConnect\"",
|
|
@@ -704,16 +748,31 @@ var NestiaConfigLoader;
|
|
|
704
748
|
path: _path + ".description",
|
|
705
749
|
expected: "(string | undefined)",
|
|
706
750
|
value: input.description
|
|
707
|
-
}, _errorFactory)); const
|
|
751
|
+
}, _errorFactory)); const _ao21 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
708
752
|
method: "typia.assert",
|
|
709
753
|
path: _path + ".name",
|
|
710
754
|
expected: "string",
|
|
711
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
|
|
712
761
|
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
713
762
|
method: "typia.assert",
|
|
714
763
|
path: _path + ".description",
|
|
715
764
|
expected: "(string | undefined)",
|
|
716
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
|
|
717
776
|
}, _errorFactory)); const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
718
777
|
if ("apiKey" === input.type)
|
|
719
778
|
return _ao10(input, _path, true && _exceptionable);
|
|
@@ -724,7 +783,7 @@ var NestiaConfigLoader;
|
|
|
724
783
|
else if ("oauth2" === input.type)
|
|
725
784
|
return _ao13(input, _path, true && _exceptionable);
|
|
726
785
|
else if ("openIdConnect" === input.type)
|
|
727
|
-
return
|
|
786
|
+
return _ao20(input, _path, true && _exceptionable);
|
|
728
787
|
else
|
|
729
788
|
return __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
730
789
|
method: "typia.assert",
|
|
@@ -761,7 +820,7 @@ var NestiaConfigLoader;
|
|
|
761
820
|
}; })()(configurations);
|
|
762
821
|
}
|
|
763
822
|
catch (exp) {
|
|
764
|
-
if ((() => { const _io0 = input => "string" === typeof input.method && (undefined === input.path || "string" === typeof input.path) && "string" === typeof input.expected && true && (undefined === input.description || "string" === typeof input.description) && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack); return input => "object" === typeof input && null !== input && _io0(input); })()(exp))
|
|
823
|
+
if ((() => { const _io0 = input => "string" === typeof input.method && (undefined === input.path || "string" === typeof input.path) && "string" === typeof input.expected && true && (undefined === input.description || "string" === typeof input.description) && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack) && true; return input => "object" === typeof input && null !== input && _io0(input); })()(exp))
|
|
765
824
|
exp.message = `invalid "${file}" data.`;
|
|
766
825
|
throw exp;
|
|
767
826
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSdkCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,qEAAkE;AAClE,6DAA0D;AAE1D,IAAiB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NestiaSdkCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA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AAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAEnC,MAAM,KAAK,GAAW,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACzE,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;aACzB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,wBAAwB,CAAC,CAAC;QAEzD,MAAM,IAAI,GAAW,IAAI,CAAC,KAAK,GAAG,CAAC,CAAE,CAAC;QACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK;YAC1C,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,iBAAiB,KAAK,CAAC,SAAS,OAAO,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC,EApGgB,gBAAgB,gCAAhB,gBAAgB,QAoGhC"}
|
package/lib/executable/sdk.js
CHANGED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenApi } from "@
|
|
1
|
+
import { OpenApi } from "@typia/interface";
|
|
2
2
|
import { INestiaConfig } from "../INestiaConfig";
|
|
3
3
|
import { ITypedApplication } from "../structures/ITypedApplication";
|
|
4
4
|
import { ITypedHttpRoute } from "../structures/ITypedHttpRoute";
|
|
@@ -46,19 +46,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.SwaggerGenerator = void 0;
|
|
49
|
-
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard
|
|
50
|
-
const
|
|
49
|
+
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard"));
|
|
50
|
+
const core_1 = require("@typia/core");
|
|
51
|
+
const utils_1 = require("@typia/utils");
|
|
51
52
|
const fs_1 = __importDefault(require("fs"));
|
|
52
53
|
const path_1 = __importDefault(require("path"));
|
|
53
54
|
const tstl_1 = require("tstl");
|
|
54
55
|
const typia_1 = __importDefault(require("typia"));
|
|
55
|
-
const JsonSchemasProgrammer_1 = require("typia/lib/programmers/json/JsonSchemasProgrammer");
|
|
56
56
|
const FileRetriever_1 = require("../utils/FileRetriever");
|
|
57
57
|
const SdkHttpParameterProgrammer_1 = require("./internal/SdkHttpParameterProgrammer");
|
|
58
58
|
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
|
-
? openapi_1.OpenApi.downgrade(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");
|
|
@@ -106,7 +105,7 @@ var SwaggerGenerator;
|
|
|
106
105
|
.flat()
|
|
107
106
|
.filter((m) => m.size() !== 0);
|
|
108
107
|
// COMPOSE JSON SCHEMAS
|
|
109
|
-
const json =
|
|
108
|
+
const json = core_1.JsonSchemasProgrammer.writeSchemas({
|
|
110
109
|
version: "3.1",
|
|
111
110
|
metadatas,
|
|
112
111
|
});
|
|
@@ -213,7 +212,7 @@ var SwaggerGenerator;
|
|
|
213
212
|
}
|
|
214
213
|
}));
|
|
215
214
|
return {
|
|
216
|
-
openapi: "3.
|
|
215
|
+
openapi: "3.2.0",
|
|
217
216
|
servers: (_a = config.servers) !== null && _a !== void 0 ? _a : [
|
|
218
217
|
{
|
|
219
218
|
url: "https://github.com/samchon/nestia",
|
|
@@ -227,7 +226,7 @@ var SwaggerGenerator;
|
|
|
227
226
|
securitySchemes: config.security,
|
|
228
227
|
},
|
|
229
228
|
tags: (_t = config.tags) !== null && _t !== void 0 ? _t : [],
|
|
230
|
-
"x-
|
|
229
|
+
"x-typia-emended-v12": true,
|
|
231
230
|
};
|
|
232
231
|
});
|
|
233
232
|
const fillPaths = (props) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sC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M,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"}
|
|
@@ -13,9 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.E2eFileProgrammer = void 0;
|
|
16
|
+
const core_1 = require("@typia/core");
|
|
16
17
|
const typescript_1 = __importDefault(require("typescript"));
|
|
17
|
-
const IdentifierFactory_1 = require("typia/lib/factories/IdentifierFactory");
|
|
18
|
-
const LiteralFactory_1 = require("typia/lib/factories/LiteralFactory");
|
|
19
18
|
const FilePrinter_1 = require("./FilePrinter");
|
|
20
19
|
const ImportDictionary_1 = require("./ImportDictionary");
|
|
21
20
|
const SdkAliasCollection_1 = require("./SdkAliasCollection");
|
|
@@ -47,12 +46,12 @@ var E2eFileProgrammer;
|
|
|
47
46
|
typescript_1.default.factory.createVariableDeclaration(typescript_1.default.factory.createIdentifier(getFunctionName(route)), undefined, undefined, generateArrow(project)(importer)(route)),
|
|
48
47
|
], typescript_1.default.NodeFlags.Const));
|
|
49
48
|
const generateArrow = (project) => (importer) => (route) => {
|
|
50
|
-
const random =
|
|
49
|
+
const random = core_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(SdkImportWizard_1.SdkImportWizard.typia(importer)), "random");
|
|
51
50
|
const connection = route.headerObject
|
|
52
51
|
? typescript_1.default.factory.createObjectLiteralExpression([
|
|
53
52
|
typescript_1.default.factory.createSpreadAssignment(typescript_1.default.factory.createIdentifier("connection")),
|
|
54
53
|
typescript_1.default.factory.createPropertyAssignment("headers", typescript_1.default.factory.createObjectLiteralExpression([
|
|
55
|
-
typescript_1.default.factory.createSpreadAssignment(
|
|
54
|
+
typescript_1.default.factory.createSpreadAssignment(core_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier("connection"), "headers")),
|
|
56
55
|
typescript_1.default.factory.createSpreadAssignment(typescript_1.default.factory.createCallExpression(random, [
|
|
57
56
|
project.config.clone === true
|
|
58
57
|
? SdkAliasCollection_1.SdkAliasCollection.from(project)(importer)(route.headerObject.metadata)
|
|
@@ -73,16 +72,16 @@ var E2eFileProgrammer;
|
|
|
73
72
|
connection,
|
|
74
73
|
...(project.config.keyword === true && entries.length !== 0
|
|
75
74
|
? [
|
|
76
|
-
|
|
75
|
+
core_1.LiteralFactory.write(Object.fromEntries(entries.map((e) => [
|
|
77
76
|
e.key,
|
|
78
|
-
typescript_1.default.factory.createCallExpression(
|
|
77
|
+
typescript_1.default.factory.createCallExpression(core_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(SdkImportWizard_1.SdkImportWizard.typia(importer)), "random"), [e.type], undefined),
|
|
79
78
|
]))),
|
|
80
79
|
]
|
|
81
|
-
: entries.map((e) => typescript_1.default.factory.createCallExpression(
|
|
80
|
+
: entries.map((e) => typescript_1.default.factory.createCallExpression(core_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(SdkImportWizard_1.SdkImportWizard.typia(importer)), "random"), [e.type], undefined))),
|
|
82
81
|
]);
|
|
83
|
-
const assert = typescript_1.default.factory.createCallExpression(
|
|
82
|
+
const assert = typescript_1.default.factory.createCallExpression(core_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(SdkImportWizard_1.SdkImportWizard.typia(importer)), "assert"), undefined, [typescript_1.default.factory.createIdentifier("output")]);
|
|
84
83
|
return typescript_1.default.factory.createArrowFunction([typescript_1.default.factory.createModifier(typescript_1.default.SyntaxKind.AsyncKeyword)], undefined, [
|
|
85
|
-
|
|
84
|
+
core_1.IdentifierFactory.parameter("connection", typescript_1.default.factory.createTypeReferenceNode("api.IConnection")),
|
|
86
85
|
], undefined, undefined, typescript_1.default.factory.createBlock([
|
|
87
86
|
typescript_1.default.factory.createVariableStatement([], typescript_1.default.factory.createVariableDeclarationList([
|
|
88
87
|
typescript_1.default.factory.createVariableDeclaration("output", undefined, project.config.propagate !== true &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2eFileProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/E2eFileProgrammer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"E2eFileProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/E2eFileProgrammer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAgE;AAChE,4DAA4B;AAI5B,+CAA4C;AAC5C,yDAAsD;AACtD,6DAA0D;AAC1D,6EAA0E;AAC1E,uDAAoD;AAEpD,IAAiB,iBAAiB,CAqLjC;AArLD,WAAiB,iBAAiB;IACnB,0BAAQ,GACnB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,KAAuC,EAAE,EAAE,CAC5C,CAAO,KAAsB,EAAiB,EAAE;QAC9C,MAAM,QAAQ,GAAqB,IAAI,mCAAgB,CACrD,GAAG,KAAK,CAAC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,KAAK,CAChD,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;YAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACxE,QAAQ,CAAC,QAAQ,CAAC;YAChB,IAAI,EAAE,KAAK,CAAC,GAAG;YACf,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;QACH,MAAM,OAAO,GAAiB,eAAe,CAAC,OAAO,CAAC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CAAC,mBAAmB,CACnC,CAAC,oBAAE,CAAC,OAAO,CAAC,cAAc,CAAC,oBAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EACvD,SAAS,EACT;YACE,wBAAiB,CAAC,SAAS,CACzB,YAAY,EACZ,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CACtD;SACF,EACD,SAAS,EACT,SAAS,EACT,oBAAE,CAAC,OAAO,CAAC,WAAW,CAAC;YACrB,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,EAAE,EACF,oBAAE,CAAC,OAAO,CAAC,6BAA6B,CACtC;gBACE,oBAAE,CAAC,OAAO,CAAC,yBAAyB,CAClC,QAAQ,EACR,SAAS,EACT,OAAO,CAAC,MAAM,CAAC,SAAS,KAAK,IAAI;oBAC/B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM;oBAClC,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,uCAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACzD,oBAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,CACxC;aACF,EACD,oBAAE,CAAC,SAAS,CAAC,KAAK,CACnB,CACF;YACD,oBAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC,MAAM,CAAC;SAC7C,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACN,CAAC,EArLgB,iBAAiB,iCAAjB,iBAAiB,QAqLjC;AAED,MAAM,eAAe,GAAG,CAAC,KAAsB,EAAU,EAAE,CACzD,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { MetadataSchema } from "@typia/core";
|
|
1
2
|
import ts from "typescript";
|
|
2
|
-
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
3
3
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
4
4
|
import { IReflectType } from "../../structures/IReflectType";
|
|
5
5
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
@@ -10,7 +10,7 @@ export declare namespace SdkAliasCollection {
|
|
|
10
10
|
const name: ({ type }: {
|
|
11
11
|
type: IReflectType;
|
|
12
12
|
}) => ts.TypeNode;
|
|
13
|
-
const from: (project: INestiaProject) => (importer: ImportDictionary) => (metadata:
|
|
13
|
+
const from: (project: INestiaProject) => (importer: ImportDictionary) => (metadata: MetadataSchema) => ts.TypeNode;
|
|
14
14
|
const httpProps: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute) => ts.TypeNode;
|
|
15
15
|
const websocketProps: (route: ITypedWebSocketRoute) => ts.TypeNode;
|
|
16
16
|
const headers: (project: INestiaProject) => (importer: ImportDictionary) => (param: ITypedHttpRouteParameter.IHeaders) => ts.TypeNode;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SdkAliasCollection = void 0;
|
|
7
|
+
const core_1 = require("@typia/core");
|
|
7
8
|
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
-
const TypeFactory_1 = require("typia/lib/factories/TypeFactory");
|
|
9
9
|
const FilePrinter_1 = require("./FilePrinter");
|
|
10
10
|
const SdkHttpParameterProgrammer_1 = require("./SdkHttpParameterProgrammer");
|
|
11
11
|
const SdkTypeProgrammer_1 = require("./SdkTypeProgrammer");
|
|
@@ -100,7 +100,7 @@ var SdkAliasCollection;
|
|
|
100
100
|
SdkAliasCollection.response = (project) => (importer) => (route) => {
|
|
101
101
|
var _a;
|
|
102
102
|
const schema = (p) => p.metadata.size() === 0
|
|
103
|
-
?
|
|
103
|
+
? core_1.TypeFactory.keyword("void")
|
|
104
104
|
: project.config.clone === true
|
|
105
105
|
? SdkAliasCollection.from(project)(importer)(p.metadata)
|
|
106
106
|
: project.config.primitive !== false
|